mirror of
https://git.aixiao.me/aixiao/Danger-alarm.git
synced 2025-07-29 19:13:39 +08:00
优化FreeRTOS
This commit is contained in:
@@ -105,18 +105,19 @@ int ZC13(const char *model)
|
||||
void CH4(void *pvParameters)
|
||||
{
|
||||
ZC13_INIT();
|
||||
char CH4_DATA[BUFER] = { 0 };
|
||||
_printTaskStackHighWaterMark("CH4");
|
||||
|
||||
while (1)
|
||||
{
|
||||
|
||||
char CH4_DATA[BUFER] = { 0 };
|
||||
sprintf(CH4_DATA, "CH4 Concentration: %d\n", ZC13("ZC05"));
|
||||
snprintf(CH4_DATA, BUFER, "CH4 Concentration: %d\n", ZC13("ZC05"));
|
||||
_HC_12(CH4_DATA);
|
||||
memset(CH4_DATA, 0, BUFER);
|
||||
|
||||
//_printTaskStackHighWaterMark("CH4");
|
||||
//watchdog_update(); // 喂狗
|
||||
vTaskDelay(pdMS_TO_TICKS(3000)); // 非阻塞延时
|
||||
vTaskDelay(pdMS_TO_TICKS(5000)); // 非阻塞延时
|
||||
}
|
||||
|
||||
return ;
|
||||
|
||||
Reference in New Issue
Block a user