mirror of
https://github.com/lumapu/ahoy.git
synced 2025-05-12 08:26:38 +02:00
* inverter dependent mqtt (is avail)
* implemented heap stats #58 * inserted 'break' in ISR while loop
This commit is contained in:
parent
81943441e0
commit
df5a306bb2
6 changed files with 52 additions and 25 deletions
|
@ -32,6 +32,8 @@ Main::Main(void) {
|
|||
mUptimeInterval = 1000;
|
||||
|
||||
mTimestamp = 0;
|
||||
|
||||
mHeapStatCnt = 0;
|
||||
}
|
||||
|
||||
|
||||
|
@ -102,6 +104,11 @@ void Main::loop(void) {
|
|||
DPRINTLN("[NTP]: " + getDateTimeStr(mTimestamp));
|
||||
}
|
||||
}
|
||||
|
||||
if(++mHeapStatCnt >= 10) {
|
||||
mHeapStatCnt = 0;
|
||||
stats();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -134,6 +141,7 @@ bool Main::getConfig(void) {
|
|||
if(!mSettingsValid) {
|
||||
DPRINTLN(F("Settings not valid, erasing ..."));
|
||||
eraseSettings();
|
||||
saveValues(false);
|
||||
delay(100);
|
||||
DPRINTLN(F("... restarting ..."));
|
||||
delay(100);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue