Bug Fix - did not show timers unless when an update was available!

Bug Fix - Timer repeat icon had X.Y dimensions reversed.
Bug Fix: Fixed factory default was ineffective!
Introduced a hold off to avoid E-07 unless persistent.
This commit is contained in:
Ray Jones 2019-06-16 20:37:25 +10:00
parent 7081b957f1
commit 7210302e5e
6 changed files with 28 additions and 16 deletions

View file

@ -121,6 +121,9 @@ CScreenHeader::animate()
break; break;
} }
} }
else {
showTimers();
}
showWifiIcon(); showWifiIcon();

View file

@ -512,7 +512,7 @@ const uint8_t PROGMEM verticalRepeatIcon [] =
0x20, // # 0x20, // #
0x20, // # 0x20, // #
}; };
const BITMAP_INFO VerticalRepeatIconInfo(15, 5, verticalRepeatIcon); const BITMAP_INFO VerticalRepeatIconInfo(5, 15, verticalRepeatIcon);
const uint8_t PROGMEM GPIO1OFFIcon[] = const uint8_t PROGMEM GPIO1OFFIcon[] =
{ {

View file

@ -440,17 +440,25 @@ CProtocolPackage::reportFrames(bool isOEM)
} }
int int
CProtocolPackage::getErrState() const CProtocolPackage::getErrState() const
{ {
static int CommsErrHoldoff = 5;
if(getBlueWireStat() & 0x01) { if(getBlueWireStat() & 0x01) {
return 8; // force E-07 - we're not seeing heater data if(CommsErrHoldoff)
CommsErrHoldoff--; // expire holdoff events, don't be too trigger happy on comms error
else
return 8; // persistently not seeing heater data - force E-07
} }
else { else {
int smartErr = getSmartError(); CommsErrHoldoff = 5;
if(smartErr)
return smartErr;
else
return Heater.getErrState();
} }
int smartErr = getSmartError();
if(smartErr)
return smartErr;
else
return Heater.getErrState();
} }

View file

@ -63,7 +63,7 @@ struct sTimer : public CESP32_NVStorage {
temperature = rhs.temperature; temperature = rhs.temperature;
timerID = rhs.timerID; timerID = rhs.timerID;
} }
void init() { void init(int idx) {
start.hour = 0; start.hour = 0;
start.min = 0; start.min = 0;
stop.hour = 0; stop.hour = 0;
@ -71,6 +71,7 @@ struct sTimer : public CESP32_NVStorage {
enabled = 0; enabled = 0;
repeat = 0; repeat = 0;
temperature = 22; temperature = 22;
timerID = idx;
} }
bool valid() { bool valid() {
bool retval = true; bool retval = true;

View file

@ -44,9 +44,11 @@ sNVStore::init()
{ {
heaterTuning.init(); heaterTuning.init();
userSettings.init(); userSettings.init();
for(int i=0; i<2; i++) {
timer[i].init(); for(int i=0; i<14; i++) {
timer[i].init(i);
} }
MQTT.init(); MQTT.init();
Credentials.init(); Credentials.init();
} }
@ -216,9 +218,7 @@ CESP32HeaterStorage::~CESP32HeaterStorage()
void void
CESP32HeaterStorage::init() CESP32HeaterStorage::init()
{ {
for(int i=0; i<14; i++) { _calValues.init();
_calValues.timer[i].timerID = i; // each instance needs a unique ID
}
} }
void void

View file

@ -97,8 +97,8 @@ void DoOTA()
if(tDelta > 0) { if(tDelta > 0) {
// FOTAtime = millis() + 6000; // 6 seconds // FOTAtime = millis() + 6000; // 6 seconds
// FOTAtime = millis() + 60000; // 60 seconds // FOTAtime = millis() + 60000; // 60 seconds
FOTAtime = millis() + 600000; // 10 minutes // FOTAtime = millis() + 600000; // 10 minutes
// FOTAtime = millis() + 3600000; // 1 hour FOTAtime = millis() + 3600000; // 1 hour
if ((WiFi.status() == WL_CONNECTED)) { // bug workaround in FOTA where execHTTPcheck does not return false in this condition if ((WiFi.status() == WL_CONNECTED)) { // bug workaround in FOTA where execHTTPcheck does not return false in this condition
FOTA.checkURL = "http://www.mrjones.id.au/afterburner/fota/fota.json"; FOTA.checkURL = "http://www.mrjones.id.au/afterburner/fota/fota.json";
DebugPort.println("Checking for new firmware..."); DebugPort.println("Checking for new firmware...");