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();
27 debug("Receiving input: %c %02x\n", c
, c
);
30 debug("Receiving an sds");
34 debug("Receiving an sds update");
35 //TODO do something with the return value
39 debug("Receiving a delete task request");
43 debug("Receiving a task");
44 // write_dpin(0, true);
46 // write_dpin(0, false);
53 debug("Unknown message: %X", c
);
67 cyclestart
= millis();
68 for(ct
= 0; ct
<MAXTASKS
; ct
++){
69 //See whether the task is even in use
70 if((curtask
= task_get(ct
)) == NULL
){
71 // debug("Task %d not implemented\n", ct);
74 //See whether the task interval has passed
75 if(cyclestart
-curtask
->lastrun
< curtask
->interval
){
76 // debug("Task %d not scheduled\n", ct);
79 debug("Current task to run: %d", ct
);
81 curtask
->lastrun
= cyclestart
;
88 int main(int argc
, char *argv
[]){
97 //debug("booting up");