Skip to content

Commit

Permalink
One more try...
Browse files Browse the repository at this point in the history
  • Loading branch information
bombcheck committed Mar 6, 2018
1 parent 5de2d10 commit 171933c
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions espArtLeDNode/espArtLeDNode.ino
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ extern "C" {
extern struct rst_info resetInfo;
}

#define FIRMWARE_VERSION "v1.0.3-dev16"
#define FIRMWARE_VERSION "v1.0.3-dev18"
#define ART_FIRM_VERSION 0x0200 // Firmware given over Artnet (2 bytes)


Expand Down Expand Up @@ -135,6 +135,15 @@ bool doReboot = false;
byte* dataIn;

void setup(void) {
// Restart if crashed before
switch (resetInfo.reason) {
case REASON_WDT_RST: // hardware watch dog reset
case REASON_EXCEPTION_RST: // exception reset, GPIO status won’t change
case REASON_SOFT_WDT_RST: // software watch dog reset, GPIO status won’t change
ESP.restart();
break;
}

//pinMode(4, OUTPUT);
//digitalWrite(4, LOW);
//Serial.begin(74880); // to match bootloader baudrate
Expand Down Expand Up @@ -238,15 +247,6 @@ void setup(void) {
deviceSettings.doFirmwareUpdate = false;
}
break;

case REASON_WDT_RST: // hardware watch dog reset
case REASON_EXCEPTION_RST: // exception reset, GPIO status won’t change
case REASON_SOFT_WDT_RST: // software watch dog reset, GPIO status won’t change
ESP.restart();
break;
case REASON_DEEP_SLEEP_AWAKE:
// not used
break;
}

delay(10);
Expand Down

0 comments on commit 171933c

Please sign in to comment.