mirror of
https://github.com/oopuuu/zTC1.git
synced 2025-12-13 05:28:14 +08:00
还以为见鬼了
This commit is contained in:
@@ -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"
|
||||||
|
|||||||
@@ -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++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user