diff --git a/docs/nmea/init-cool.lua b/docs/nmea/init-cool.lua index 5f5e493..4ddbd40 100644 --- a/docs/nmea/init-cool.lua +++ b/docs/nmea/init-cool.lua @@ -167,11 +167,11 @@ function PrintUart() fail_cnt = fail_cnt + 1 end if (sync_att >= 2 or fail_cnt >= 3) then - print("going to deep sleep mode") + print("going to deep sleep for " .. math.floor((node.dsleepMax()-1e8)/1e6/60) .. " min") tmr.create():alarm(3000, tmr.ALARM_SINGLE, function() -- !! rtctime.dsleep() breaks NTP, using node.dsleep() instead -- node.dsleep(1810e6); -- ~30 min sleep, will be rebooted (32-bit value for "integer" fw) - node.dsleep(36000e6) -- >3 hrs sleep, will be rebooted (64-bit value for "float" fw) + node.dsleep(node.dsleepMax()-1e8) -- >3 hrs sleep, will be rebooted (64-bit value for "float" fw) end) end end diff --git a/docs/nmea/nmea_howto.txt b/docs/nmea/nmea_howto.txt index 3bc00b0..1b74465 100644 --- a/docs/nmea/nmea_howto.txt +++ b/docs/nmea/nmea_howto.txt @@ -88,11 +88,11 @@ so USB-TTL +5V line shouldn't be connected when powered from the clock! - uses DHCP mode by default (can be disabled with DHCP=0) - has no http server - - after 2 successfull sync attempts it goes to deep sleep for 10 hrs. + - after 2 successfull sync attempts it goes to deep sleep for ~3.5 hrs. so it consumes much less power and generates almost no heat. just rename it to init.lua before uploading to ESP866. - - script uses node.dsleep() for 10 hrs by default. - please change value to 30 min if you're using "integer" nodemcu FW. + - script uses node.dsleep() for ~3.5 hrs (max for nodemcu) by default. + please change value to less than 36 min if you're using "integer" nodemcu FW. notice: deep sleep function can only be used when ESP8266 PIN32(RST) and PIN8(XPD_DCDC aka GPIO16) are connected together.