Skip to content

Commit

Permalink
Fixed bootCount
Browse files Browse the repository at this point in the history
  • Loading branch information
matthias-bs committed Aug 18, 2024
1 parent 4facfd2 commit cbce301
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions BresserWeatherSensorLW.ino
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@
// 20240729 PowerFeather: Enabled battery temperature measurement, added specific configuration
// 20240730 PowerFeather: modified setSupplyMaintainVoltage()
// 20240804 PowerFeather: Added configuration of maximum battery charging current
// 20240818 Fixed bootCount
//
// ToDo:
// -
Expand Down Expand Up @@ -544,14 +545,15 @@ void setup()
#else
print_wakeup_reason();
#endif
log_i("Boot count: %u", bootCount++);
log_i("Boot count: %u", bootCount);

if (bootCount == 1)
{
rtcTimeSource = E_TIME_SOURCE::E_UNSYNCHED;
appStatusUplinkPending = 0;
lwStatusUplinkPending = 0;
appStatusUplinkPending = false;
lwStatusUplinkPending = false;
}
bootCount++;

// Set time zone
setenv("TZ", timeZoneInfo.c_str(), 1);
Expand Down

0 comments on commit cbce301

Please sign in to comment.