mirror of
https://github.com/lumapu/ahoy.git
synced 2025-05-30 17:26:12 +02:00
0.8.119
* fix reset values at midnight if WiFi isn't available #1620 * fix typo in English versions
This commit is contained in:
parent
85e3dea281
commit
61ee8aa91f
4 changed files with 14 additions and 8 deletions
14
src/app.cpp
14
src/app.cpp
|
@ -148,12 +148,14 @@ void app::loop(void) {
|
|||
//-----------------------------------------------------------------------------
|
||||
void app::onNetwork(bool gotIp) {
|
||||
mNetworkConnected = gotIp;
|
||||
ah::Scheduler::resetTicker();
|
||||
regularTickers(); //reinstall regular tickers
|
||||
every(std::bind(&app::tickSend, this), mConfig->inst.sendInterval, "tSend");
|
||||
mTickerInstallOnce = true;
|
||||
mSunrise = 0; // needs to be set to 0, to reinstall sunrise and ivComm tickers!
|
||||
once(std::bind(&app::tickNtpUpdate, this), 2, "ntp2");
|
||||
if(gotIp) {
|
||||
ah::Scheduler::resetTicker();
|
||||
regularTickers(); //reinstall regular tickers
|
||||
every(std::bind(&app::tickSend, this), mConfig->inst.sendInterval, "tSend");
|
||||
mTickerInstallOnce = true;
|
||||
mSunrise = 0; // needs to be set to 0, to reinstall sunrise and ivComm tickers!
|
||||
once(std::bind(&app::tickNtpUpdate, this), 2, "ntp2");
|
||||
}
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue