00c9f82999a5d632b4d56c1cf2d63892c77cc690
11 #include "interpret.h"
12 #include "mTaskSymbols.h"
15 #include "interface.h"
17 #define MSG_GET_TASK 't'
18 #define MSG_DEL_TASK 'd'
19 #define MSG_SDS_SPEC 's'
20 #define MSG_SDS_UPD 'u'
22 void read_message(void)
25 if(input_available()){
26 uint8_t c
= read_byte();
28 debug("Receiving input: %c %02x\n", c
, c
);
31 debug("Receiving an sds");
35 debug("Receiving an sds update");
36 //TODO do something with the return value
40 debug("Receiving a delete task request");
44 debug("Receiving a task");
55 debug("Unknown message: %X", c
);
69 cyclestart
= millis();
70 for(ct
= 0; ct
<MAXTASKS
; ct
++){
71 //See whether the task is even in use
72 if((curtask
= task_get(ct
)) == NULL
){
73 // debug("Task %d not implemented\n", ct);
76 //See whether the task interval has passed
77 if(cyclestart
-curtask
->lastrun
< curtask
->interval
){
78 // debug("Task %d not scheduled\n", ct);
81 debug("Current task to run: %d", ct
);
83 curtask
->lastrun
= cyclestart
;
90 int main(int argc
, char *argv
[]){
99 //debug("booting up");
101 //Check for newetasks