Skip to content

Commit

Permalink
Merge pull request #7 from Makuna/esp8266WDTFix
Browse files Browse the repository at this point in the history
For Esp8266 Leave WDT at default during Setup
  • Loading branch information
Makuna committed Mar 30, 2016
2 parents de9bbf1 + 8b55a90 commit efb2b54
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion library.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name=Task by Makuna
version=1.1.1
version=1.1.2
author=Michael C. Miller ([email protected])
maintainer=Michael C. Miller ([email protected])
sentence=A library that makes creating complex mulitple task projects easy.
Expand Down
2 changes: 1 addition & 1 deletion src/Task.h
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ class Task
protected:
virtual bool OnStart() { return true; };
virtual void OnStop() {};
virtual void OnUpdate(uint32_t deltaTime) = 0;
virtual void OnUpdate(uint32_t deltaTime) {};

uint32_t _remainingTime;
uint32_t _timeInterval;
Expand Down
8 changes: 7 additions & 1 deletion src/TaskManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,13 @@ TaskManager::TaskManager() :
_pFirstTask( NULL ),
_pLastTask( NULL )
{
#if defined(ARDUINO_ARCH_ESP8266) || defined(ARDUINO_ARCH_AVR) && !defined(__arm__)

#if defined(ARDUINO_ARCH_AVR) && !defined(__arm__)
// make sure the watch dog is disabled during setup
// avoid this for Esp8266 due to it will only disable the software watchdog
// but leave the hardware one to fire, further this would disable all the
// built in hidden watchdog feed calls that would keep it from firing and
// thus causing an effect of enabling the watchdog rather than disabling
wdt_reset();
wdt_disable();
#endif
Expand Down

0 comments on commit efb2b54

Please sign in to comment.