From 38b9ed20cd7b69975ad7e80f46c284108e084b0a Mon Sep 17 00:00:00 2001 From: arofarn Date: Wed, 22 Apr 2020 11:11:22 +0200 Subject: [PATCH] Rename connection status LED function --- code/main.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/code/main.py b/code/main.py index 6d6ead5..982d414 100644 --- a/code/main.py +++ b/code/main.py @@ -180,10 +180,9 @@ def update_button_c(button, button_state, pwr, mode): return mode -def update_wifi_led(): +def update_conn_led(): """Refresh Wifi status LED""" - - WIFI_LED.value = not WLAN.isconnected() + WIFI_LED.value(not WLAN.isconnected()) ##################### @@ -235,6 +234,8 @@ while True: BUTTN_STATE = ENC_BUT.value() + update_conn_led() + # On n'envoie les données de luminosité qu'une fois stabilisée (MQTT_DELAY) if BRIGHTN_DATA is not None and time.ticks_diff(time.ticks_ms(), MQTT_TIMER) >= 0: MqttMultiPublish(BRIGHTN_DATA)