Dig Only V3 PCB, Fixed Hz setting reporting bug fix
This commit is contained in:
parent
d30536e939
commit
af34331401
|
@ -1119,10 +1119,10 @@ float getTemperatureDesired()
|
|||
return getHeaterInfo().getHeaterDemand();
|
||||
}
|
||||
else {
|
||||
// if(getThermostatModeActive())
|
||||
if(getThermostatModeActive())
|
||||
return RTC_Store.getDesiredTemp();
|
||||
// else
|
||||
// return RTC_Store.getDesiredPump();
|
||||
else
|
||||
return RTC_Store.getDesiredPump();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1497,7 +1497,7 @@ bool isCyclicActive()
|
|||
|
||||
void setupGPIO()
|
||||
{
|
||||
if(BoardRevision == 10 || BoardRevision == 20 || BoardRevision == 21) {
|
||||
if(BoardRevision == 10 || BoardRevision == 20 || BoardRevision == 21 || BoardRevision == 30) {
|
||||
// some special considerations for GPIO inputs, depending upon PCB hardware
|
||||
// V1.0 PCBs only expose bare inputs, which are pulled high. Active state into ESP32 is LOW.
|
||||
// V2.0+ PCBs use an input transistor buffer. Active state into ESP32 is HIGH (inverted).
|
||||
|
|
|
@ -302,7 +302,7 @@ CGPIOSetupScreen::keyHandler(uint8_t event)
|
|||
_rowSel--;
|
||||
if((_rowSel == 3) && (_GPIOparams.in2Mode != CGPIOin2::Thermostat))
|
||||
_rowSel--; // force skip if not set to external thermostat
|
||||
if((_rowSel == 1) && (getBoardRevision() == BRD_V2_GPIO_NOALG)) // GPIO but NO analog support
|
||||
if((_rowSel == 1) && ((getBoardRevision() == BRD_V2_GPIO_NOALG) || (getBoardRevision() == BRD_V3_GPIO_NOALG))) // GPIO but NO analog support
|
||||
_rowSel--; // force skip if analog input is not supported by PCB
|
||||
LOWERLIMIT(_rowSel, 0);
|
||||
}
|
||||
|
@ -311,7 +311,7 @@ CGPIOSetupScreen::keyHandler(uint8_t event)
|
|||
if(event & key_Up) {
|
||||
switch(_rowSel) {
|
||||
case 0:
|
||||
if(getBoardRevision() == BRD_V2_GPIO_NOALG) // GPIO but NO Analog support
|
||||
if((getBoardRevision() == BRD_V2_GPIO_NOALG) || (getBoardRevision() == BRD_V3_GPIO_NOALG)) // GPIO but NO Analog support
|
||||
_rowSel++; // force skip if analog input is not supported by PCB
|
||||
case 1:
|
||||
case 2:
|
||||
|
|
|
@ -87,7 +87,7 @@ CVersionInfoScreen::show()
|
|||
_drawBitmap(18, 34, HardwareIconInfo);
|
||||
int PCB = getBoardRevision();
|
||||
_printMenuText(41, 38, getBoardRevisionString(PCB));
|
||||
if(PCB == BRD_V2_GPIO_NOALG) {
|
||||
if(PCB == BRD_V2_GPIO_NOALG || PCB == BRD_V3_GPIO_NOALG) {
|
||||
_display.fillRect(70, 36, 57, 11, WHITE);
|
||||
_printInverted(99, 38, "No Analog", true, eCentreJustify);
|
||||
}
|
||||
|
|
|
@ -52,11 +52,12 @@
|
|||
// Input state truth table
|
||||
// GPIO25 GPIO26 GPIO33
|
||||
// ------ ------ ------
|
||||
// V1.0 HIGH HIGH HIGH
|
||||
// unmodified V2.0 LOW HIGH LOW
|
||||
// modified V2.0 LOW LOW HIGH
|
||||
// V2.1 LOW LOW HIGH
|
||||
// No GPIO V2.0 HIGH LOW HIGH
|
||||
// V1.0 HIGH HIGH HIGH - green V1 PCB
|
||||
// unmodified V2.0 LOW HIGH LOW - digital only (V2 PCB)
|
||||
// modified V2.0 LOW LOW HIGH - full GPIO (V2 or V3 PCB)
|
||||
// V2.1 LOW LOW HIGH - digital only (modified V2 PCB)
|
||||
// No GPIO V2.0 HIGH LOW HIGH - no GPIO (V2 or V3 PCB, 0R in C6)
|
||||
// V2.1 LOW LOW LOW - digital only (V3 PCB, 0R in C6)
|
||||
//
|
||||
//
|
||||
// ****************************************************************************************
|
||||
|
@ -114,10 +115,10 @@ int BoardDetect()
|
|||
revision = BRD_V2_GPIO_NOALG;
|
||||
DebugPort.println("Board detect: digital input test reveals V2.0 PCB - Digital only GPIO (V2.1 userID)");
|
||||
}
|
||||
// original V2 PCB, no traces cut n shunted, pin 26 grounded via 0R instead of 100n cap, dig inputs pulled low by transistors
|
||||
// V3 PCB, no traces cut n shunted, pin 26 grounded via 0R instead of 100n cap, dig inputs pulled low by transistors
|
||||
else if((pin33 == LOW) && (pin26 == LOW) && (pin25 == LOW)) {
|
||||
revision = BRD_V2_GPIO_NOALG;
|
||||
DebugPort.println("Board detect: digital input test reveals V2.0 PCB - Digital only GPIO (V2.1 userID)");
|
||||
revision = BRD_V3_GPIO_NOALG;
|
||||
DebugPort.println("Board detect: digital input test reveals V3.0 PCB - Digital only GPIO (V2.1 userID)");
|
||||
}
|
||||
// original V2 PCB, pin 26 grounded via 0R instead of 100n cap, digio transistors not fitted dig in pins pull high
|
||||
else if((pin33 == HIGH) && (pin26 == LOW) && (pin25 == HIGH)) {
|
||||
|
@ -153,6 +154,7 @@ const char* getBoardRevisionString(int ID)
|
|||
case BRD_V2_FULLGPIO: return "V2.2";
|
||||
case BRD_V2_NOGPIO: return "V2.0";
|
||||
case BRD_V2_GPIO_NOALG: return "V2.1";
|
||||
case BRD_V3_GPIO_NOALG: return "V2.1";
|
||||
default: return "???";
|
||||
}
|
||||
}
|
||||
|
|
|
@ -33,6 +33,7 @@
|
|||
#define BRD_V2_GPIO_NOALG 20 // original V20 board - no cut traces - analog on wrong pin :-(
|
||||
#define BRD_V2_FULLGPIO 21 // V2 board cut traces tranposed GPIO1 & Analog
|
||||
#define BRD_V2_NOGPIO 22 // V2 board forced short on analog input - NO GPIO mode
|
||||
#define BRD_V3_GPIO_NOALG 30 // V3 board - no cut traces - analog input grounded
|
||||
|
||||
int BoardDetect();
|
||||
void BoardRevisionReset();
|
||||
|
|
Loading…
Reference in a new issue