diff options
author | Birte Kristina Friesel <derf@finalrewind.org> | 2023-09-10 05:04:38 +0200 |
---|---|---|
committer | Birte Kristina Friesel <derf@finalrewind.org> | 2023-09-10 05:04:38 +0200 |
commit | 45aaa579d00bb03c88eb475a1c0cf133e69c1372 (patch) | |
tree | 9ee0dd376d5712723b84743ffa27d96ea5440a5a | |
parent | fce31d962e361f6837426705f0e98c3916fb25cd (diff) |
init.lua: print MAC only once
-rw-r--r-- | src/init.lua | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/init.lua b/src/init.lua index 3aebe29..d2e8cef 100644 --- a/src/init.lua +++ b/src/init.lua @@ -43,7 +43,6 @@ function get_battery_percent(bat_mv) end function connect_wifi() - print("WiFi MAC: " .. wifi.sta.getmac()) print("Connecting to ESSID " .. station_cfgs[wifi_index].ssid) wifi.eventmon.register(wifi.eventmon.STA_GOT_IP, wifi_connected) wifi.eventmon.register(wifi.eventmon.STA_DHCP_TIMEOUT, wifi_err) @@ -124,6 +123,7 @@ init_t:register(1 * 1000, tmr.ALARM_SINGLE, scd4x_start) init_t:start() function wifi_connected() + print("Connected") have_wifi = true no_wifi_count = 0 end @@ -132,4 +132,5 @@ function wifi_err() have_wifi = false end +print("WiFi MAC: " .. wifi.sta.getmac()) connect_wifi() |