#define MSG_SDS_UPD 'u'
#define MSG_SPEC 'c'
+#define LOOPDELAY 100
+
void read_message(void)
{
//Find next task
default:
debug("Unknown message: %X", c);
}
+ } else {
+// debug("No input");
}
}
+unsigned long loopmillis = 0;
void loop(void)
{
+#ifdef ARDUINO_ESP8266_NODEMCU
+ if(getmillis()-loopmillis < LOOPDELAY){
+ return;
+ }
+ loopmillis = getmillis();
+#endif
+ debug("Loop");
+
int ct;
long cyclestart;
struct task *curtask;
#endif
//Initialize systems
- setup();
+ real_setup();
sds_init();
task_init();
debug("sending device spec");
+
+#ifndef ARDUINO_ESP8266_NODEMCU
while(true){
//Check for newtasks
loop();
- msdelay(100);
+ msdelay(LOOPDELAY);
}
-#ifndef ARDUINO_ESP8266_NODEMCU
return 0;
#endif
}