还以为见鬼了

This commit is contained in:
zogodo
2020-02-17 18:07:29 +08:00
parent 312c9484e9
commit f0c3f24577
2 changed files with 7 additions and 19 deletions

View File

@@ -4,7 +4,7 @@
#include "mico.h" #include "mico.h"
#include "micokit_ext.h" #include "micokit_ext.h"
#define VERSION "v1.0.9" #define VERSION "v1.0.11"
#define TYPE 1 #define TYPE 1
#define TYPE_NAME "zTC1" #define TYPE_NAME "zTC1"

View File

@@ -69,38 +69,26 @@ void UserMqttTimerFunc(void *arg)
mico_stop_timer(&timer_handle); mico_stop_timer(&timer_handle);
return; return;
} }
if (mico_rtos_is_queue_empty(&mqtt_msg_send_queue) == true) if (mico_rtos_is_queue_empty(&mqtt_msg_send_queue))
{ {
timer_status++;
switch (timer_status) switch (timer_status)
{ {
case 0:
case 1: case 1:
UserMqttHassAutoPower();
break;
case 2: case 2:
case 3: case 3:
case 4: case 4:
case 5: case 5:
UserMqttHassAuto(timer_status);
break;
case 6: case 6:
case 7: UserMqttHassAutoPower();
UserMqttHassAuto(timer_status - 2);
break;
case 8:
case 9:
case 10:
case 11:
case 12:
case 13:
UserMqttHassAuto(timer_status - 8);
break;
case 14:
break;
case 15:
break; break;
default: default:
mico_stop_timer(&timer_handle); mico_stop_timer(&timer_handle);
break; break;
} }
timer_status++;
} }
} }