]> hydra-www.ietfng.org Git - acmetensortoys-esp-lua_core/commitdiff
init: expose stop() even on panic
authorNathaniel Wesley Filardo <nwfilardo@gmail.com>
Mon, 13 Jan 2020 23:01:07 +0000 (23:01 +0000)
committerNathaniel Wesley Filardo <nwfilardo@gmail.com>
Mon, 13 Jan 2020 23:01:07 +0000 (23:01 +0000)
init.lua

index 3566ecf5913ad43243799c1028a2e1805b553a29..386ea62a50d5ce48ce448859a21ff46512d140be 100644 (file)
--- a/init.lua
+++ b/init.lua
@@ -77,8 +77,9 @@ local function waitFLASH()
     gpio.trig(3,"low",function(_) print("Aborting..."); stop() end)
 end
 local function bootPANIC()
-  print("Panic!  Lingering for a minute with telnet console up; 'got:stop()' to persist...")
+  print("Panic!  Lingering for a minute with telnet console up; 'stop()' to persist...")
   gotmr:alarm(60000,tmr.ALARM_SINGLE,node.restart)
+  function stop() gotmr:stop() end
   goab()
 end
 local bct = {