|
@@ -124,6 +124,22 @@ static void idle_hook(void)
|
|
|
device_status.clear_status=2 ; //2024-03-21 :开机不再转仓
|
|
device_status.clear_status=2 ; //2024-03-21 :开机不再转仓
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
+#else
|
|
|
|
|
+ static time_t work_start = 0;
|
|
|
|
|
+ static uint8_t last_ws = 0;
|
|
|
|
|
+ if (device_status.work_status == 1 && last_ws == 0) {
|
|
|
|
|
+ work_start = now; // 记录开始工作的时间
|
|
|
|
|
+ }
|
|
|
|
|
+ last_ws = device_status.work_status;
|
|
|
|
|
+ if (device_status.work_status == 1 &&
|
|
|
|
|
+ (device_status.clt_time != 10 || device_status.heattime != 10) &&
|
|
|
|
|
+ difftime(now, work_start) >= 3600)
|
|
|
|
|
+ {
|
|
|
|
|
+ work_start = now; // 重置,开始下一小时计时
|
|
|
|
|
+ if (device_status.version_type == 1) {
|
|
|
|
|
+ device_status.clear_status = 2;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
#endif
|
|
#endif
|
|
|
if((alarm_new.tm_hour)==8&&(alarm_new.tm_min==20)&&(alarm_new.tm_sec==0))
|
|
if((alarm_new.tm_hour)==8&&(alarm_new.tm_min==20)&&(alarm_new.tm_sec==0))
|
|
|
{
|
|
{
|