From fa207b76ee44ad51520ef2367df126979275b853 Mon Sep 17 00:00:00 2001 From: kuthullu Date: Fri, 10 Jun 2016 21:46:12 -0300 Subject: [PATCH] Update TaskManager.h and TaskManager.cpp to avoid watchdogTimeOutFlag overflow (#13) * Update TaskManager.cpp * Update TaskManager.h --- src/TaskManager.cpp | 2 +- src/TaskManager.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/TaskManager.cpp b/src/TaskManager.cpp index c515164..9b65d07 100644 --- a/src/TaskManager.cpp +++ b/src/TaskManager.cpp @@ -86,7 +86,7 @@ TaskState TaskManager::StatusTask(Task* pTask) return pTask->_taskState; } -void TaskManager::Loop(uint8_t watchdogTimeOutFlag) +void TaskManager::Loop(uint16_t watchdogTimeOutFlag) { uint32_t currentTick = GetTaskTime(); uint32_t deltaTime = currentTick - _lastTick; diff --git a/src/TaskManager.h b/src/TaskManager.h index befd41d..2136ec2 100644 --- a/src/TaskManager.h +++ b/src/TaskManager.h @@ -30,7 +30,7 @@ class TaskManager void Setup(); // for esp8266, its always 3.2 seconds - void Loop(uint8_t watchdogTimeOutFlag = WDTO_500MS); + void Loop(uint16_t watchdogTimeOutFlag = WDTO_500MS); void StartTask(Task* pTask); void StopTask(Task* pTask); TaskState StatusTask(Task* pTask);