elementzonline / SIM800_MQTT

Visit our blog/website for more information
http://www.elementzonline.com
GNU General Public License v3.0
170 stars 96 forks source link

Worried about millis() timer overflow? #9

Closed tinamore closed 7 years ago

tinamore commented 7 years ago

Hi. `void GSM_MQTT::_ping(void) {

if (pingFlag == true) { unsigned long currentMillis = millis(); if ((currentMillis - _PingPrevMillis ) >= _KeepAliveTimeOut * 1000) { // save the last time you blinked the LED _PingPrevMillis = currentMillis; Serial.print(char(PINGREQ * 16)); _sendLength(0); } } }`

when millis() over 49days and millis() = 0 again ?

nithinkurian commented 7 years ago

thanks for your concern this issue is rectified