mirror of
https://github.com/oopuuu/zTC1.git
synced 2025-12-14 14:08:19 +08:00
add:MQTT连接失败时,led每5s闪烁一次
This commit is contained in:
@@ -342,6 +342,10 @@ void mqtt_client_thread( mico_thread_arg_t arg )
|
||||
MQTT_reconnect:
|
||||
mqtt_log("Disconnect MQTT client, and reconnect after 5s, reason: mqtt_rc = %d, err = %d", rc, err );
|
||||
mqtt_client_release( &c, &n );
|
||||
|
||||
user_led_set( -1 );
|
||||
mico_rtos_thread_msleep(100);
|
||||
user_led_set( -1 );
|
||||
mico_rtos_thread_sleep( 5 );
|
||||
goto MQTT_start;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user