Bug fixes:

Telnet spy would not work in AP only mode
LVC would not allow start when in warning mode, and LVC warning always started at 12/24V
Added "No GPIO" option for new boards with C6 fitted as a 0R
This commit is contained in:
Ray Jones 2019-12-06 21:12:56 +11:00
parent c9298656fa
commit c76490481d
4 changed files with 24 additions and 5 deletions

View File

@ -545,7 +545,13 @@ void TelnetSpy::handle() {
return;
}
if (!listening) {
if (WiFi.status() != WL_CONNECTED) {
wifi_mode_t currentMode = WiFi.getMode();
bool isAPEnabled = ((currentMode & WIFI_MODE_AP) != 0);
bool isSTAconnected = WiFi.status() == WL_CONNECTED;
// if (WiFi.status() != WL_CONNECTED && !isAPEnabled) {
if (!isSTAconnected && !isAPEnabled) {
return;
}
telnetServer = new WiFiServer(port);

View File

@ -1043,7 +1043,8 @@ bool validateFrame(const CProtocol& frame, const char* name)
int requestOn(bool checkTemp)
{
if(bHasHtrData && (0 == SmartError.checkVolts(FilteredSamples.FastipVolts.getValue(), FilteredSamples.FastGlowAmps.getValue()))) {
bool LVCOK = SmartError.checkVolts(FilteredSamples.FastipVolts.getValue(), FilteredSamples.FastGlowAmps.getValue()) != 2;
if(bHasHtrData && LVCOK) {
RTC_Store.setCyclicEngaged(true); // for cyclic mode
RTC_Store.setFrostOn(false); // cancel frost mode
if(!preemptCyclicMode()) { // only start if below cyclic threshold when enabled

View File

@ -130,8 +130,12 @@ CSmartError::checkVolts(float ipVolts, float glowI, bool throwfault)
// Native NV values here are x10 integers
// loom compenstaion, allow 1V drop for 10A current (bit naive but better than no compensation)
float cableComp = glowI * 0.1;
float threshLVC = NVstore.getHeaterTuning().getLVC() - cableComp; // NVstore
float cableComp = glowI * 0.1;
float usrLVC = NVstore.getHeaterTuning().getLVC();
if(usrLVC == 0) {
return 0;
}
float threshLVC = usrLVC - cableComp; // NVstore
// test low voltage cutout
if(ipVolts < threshLVC) {
@ -144,6 +148,7 @@ CSmartError::checkVolts(float ipVolts, float glowI, bool throwfault)
// warning threshold
float threshWarn = threshLVC + 0.5; // nominally create a warning threshold, 0.5V over LVC threhsold
/*
float alertlimit; // but always introduce it if below system voltage
if(NVstore.getHeaterTuning().sysVoltage == 120) {
alertlimit = 12.0 - cableComp;
@ -154,6 +159,7 @@ CSmartError::checkVolts(float ipVolts, float glowI, bool throwfault)
if(threshWarn < alertlimit) {
threshWarn = alertlimit;
}
*/
if(ipVolts < threshWarn) {
return 1; // LVC OK, but below warning threshold, return code = 1

View File

@ -56,8 +56,9 @@
// 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)
// No GPIO V2.0 HIGH LOW HIGH - no GPIO (V2 PCB, 0R in C6)
// V2.1 LOW LOW LOW - digital only (V3 PCB, 0R in C6)
// No GPIO V3.x HIGH HIGH LOW - no GPIO (V3.x PCB, 0R in C6)
//
//
// ****************************************************************************************
@ -125,6 +126,11 @@ int BoardDetect()
revision = BRD_V2_NOGPIO;
DebugPort.println("Board detect: digital input test reveals V2.2 PCB - no GPIO (V2.0 userID) ");
}
// V3.x PCB, pin 33 grounded via 0R instead of 100n cap, digio transistors not fitted dig in pins pull high
else if((pin33 == LOW) && (pin26 == HIGH) && (pin25 == HIGH)) {
revision = BRD_V2_NOGPIO;
DebugPort.println("Board detect: digital input test reveals V3.x PCB - no GPIO (V2.0 userID) ");
}
// modified V2 PCB or new V2.1PCB, pins 25 & 33 swapped, Alg routed to usuable pin 33 // cap, dig inputs pulled low by transistors
else if((pin33 == HIGH) && (pin26 == LOW) && (pin25 == LOW)) {
revision = BRD_V2_FULLGPIO;