Rename connection status LED function

This commit is contained in:
arofarn 2020-04-22 11:11:22 +02:00
parent e85548bef4
commit 38b9ed20cd
1 changed files with 4 additions and 3 deletions

View File

@ -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)