编译通过

This commit is contained in:
zogodo
2019-12-12 21:48:36 +08:00
parent 7443277d6b
commit ad71aff9f7
2 changed files with 7 additions and 5 deletions

View File

@@ -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\

View File

@@ -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;