]> hydra-www.ietfng.org Git - acmetensortoys-esp-lua_ctfws/commitdiff
Add a UART diagnostic at boot before we panic
authorNathaniel Wesley Filardo <nwfilardo@gmail.com>
Sat, 27 Oct 2018 19:12:51 +0000 (20:12 +0100)
committerNathaniel Wesley Filardo <nwfilardo@gmail.com>
Sat, 27 Oct 2018 19:12:51 +0000 (20:12 +0100)
init3.lua

index 62c63087ba878ae4fbf157e037fdb2646598a5ba..de0f5a15b8da4d1046e6f9fac046318fae545c37 100644 (file)
--- a/init3.lua
+++ b/init3.lua
@@ -21,6 +21,9 @@ ctfws_lcd:drawFlagsMessage("BOOT...")
 
 -- MQTT plumbing
 mqc, mqttUser = OVL.nwfmqtt().mkclient("nwfmqtt.conf")
+if mqc == nil then
+  print("You forgot your MQTT configuration file")
+end
 local mqttBootTopic  = string.format("ctfws/dev/%s/beat",mqttUser)
 mqc:lwt(mqttBootTopic,"dead",1,1)