mirror of
https://github.com/oopuuu/zTC1.git
synced 2025-12-11 20:48:16 +08:00
编译通过
This commit is contained in:
@@ -36,10 +36,10 @@ $(NAME)_SOURCES := main.c\
|
||||
ota_server/user_ota.c\
|
||||
user_power.c\
|
||||
mqtt_server/user_function.c\
|
||||
timed_task/timed_task.c\
|
||||
http_server/web_log.c\
|
||||
http_server/app_httpd.c
|
||||
timed_task/timed_task.c\
|
||||
|
||||
|
||||
$(NAME)_COMPONENTS := protocols/SNTP\
|
||||
protocols/mqtt\
|
||||
utilities/url\
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
#include<string.h>
|
||||
#include<stdio.h>
|
||||
#include<stdlib.h>
|
||||
#include<string.h>
|
||||
#include<stdbool.h>
|
||||
#include"timed_task/timed_task.h"
|
||||
|
||||
pTimedTask task_top = NULL;
|
||||
@@ -7,7 +9,7 @@ int task_count = 0;
|
||||
|
||||
bool AddTask(pTimedTask task)
|
||||
{
|
||||
task_count++
|
||||
task_count++;
|
||||
if (task_top == NULL)
|
||||
{
|
||||
task->next = NULL;
|
||||
@@ -25,7 +27,7 @@ bool AddTask(pTimedTask task)
|
||||
pTimedTask tmp = task_top;
|
||||
while (tmp)
|
||||
{
|
||||
if (task->time > tmp->time && task->time <= tmp->next->time
|
||||
if ((task->time > tmp->time && task->time <= tmp->next->time)
|
||||
|| tmp->next == NULL)
|
||||
{
|
||||
task->next = tmp->next;
|
||||
|
||||
Reference in New Issue
Block a user