]> git.0d.be Git - PanikSwitch.git/blobdiff - FINAL2013V2.ino
always enable nonstop on boot
[PanikSwitch.git] / FINAL2013V2.ino
index 5415ece0f4107be3f9a70344bb845a50cc71626c..3e5dc6b93032194d8cf403c63fd161c1f2b44e1d 100644 (file)
@@ -62,7 +62,7 @@ const int ledsArray[] = { RELAY_GREEN_LEDS, RELAY_RED_LEDS, RELAY_YELLOW_LEDS };
 /* activeSelection is the variable that holds the active output of the switch
    it is declared as an attribute that keeps its value between arduino resets
 */
-switchSelection_t activeSelection __attribute__ ((section (".noinit")));
+switchSelection_t activeSelection = 0;  // __attribute__ ((section (".noinit")));
 
 // variables and timers for blinking selection (selected but not confirmed)
 switchSelection_t blinkingSelection = nonstop;
@@ -158,9 +158,6 @@ void webCmd(WebServer &server, WebServer::ConnectionType type, char *url_tail, b
 // setup function
 void setup()
 {
-  // make sure that activeSelection holds something valid
-//  if (!(activeSelection > nonstop) || !(activeSelection < _NbrSwitchSelections))
-//    activeSelection = nonstop;
   blinkingSelection = activeSelection = nonstop;
 
   // open serial communication for debugging