|
@ -148,12 +148,14 @@ void app::loop(void) { |
|
|
//-----------------------------------------------------------------------------
|
|
|
//-----------------------------------------------------------------------------
|
|
|
void app::onNetwork(bool gotIp) { |
|
|
void app::onNetwork(bool gotIp) { |
|
|
mNetworkConnected = gotIp; |
|
|
mNetworkConnected = gotIp; |
|
|
|
|
|
if(gotIp) { |
|
|
ah::Scheduler::resetTicker(); |
|
|
ah::Scheduler::resetTicker(); |
|
|
regularTickers(); //reinstall regular tickers
|
|
|
regularTickers(); //reinstall regular tickers
|
|
|
every(std::bind(&app::tickSend, this), mConfig->inst.sendInterval, "tSend"); |
|
|
every(std::bind(&app::tickSend, this), mConfig->inst.sendInterval, "tSend"); |
|
|
mTickerInstallOnce = true; |
|
|
mTickerInstallOnce = true; |
|
|
mSunrise = 0; // needs to be set to 0, to reinstall sunrise and ivComm tickers!
|
|
|
mSunrise = 0; // needs to be set to 0, to reinstall sunrise and ivComm tickers!
|
|
|
once(std::bind(&app::tickNtpUpdate, this), 2, "ntp2"); |
|
|
once(std::bind(&app::tickNtpUpdate, this), 2, "ntp2"); |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
//-----------------------------------------------------------------------------
|
|
|
//-----------------------------------------------------------------------------
|
|
|