|
@ -148,6 +148,7 @@ 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"); |
|
@ -155,6 +156,7 @@ void app::onNetwork(bool gotIp) { |
|
|
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"); |
|
|
} |
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
//-----------------------------------------------------------------------------
|
|
|
//-----------------------------------------------------------------------------
|
|
|
void app::regularTickers(void) { |
|
|
void app::regularTickers(void) { |
|
|