9b6a88bc03164b76803205dfc5314c58366eb3c7
10 #include "interpret.h"
11 #include "mTaskSymbols.h"
14 #include "interface.h"
16 #define MSG_GET_TASK 't'
17 #define MSG_DEL_TASK 'd'
18 #define MSG_SDS_SPEC 's'
19 #define MSG_SDS_UPD 'u'
21 void read_message(void)
24 if(input_available()){
25 uint8_t c
= read_byte();
26 debug("Receiving input: %c\n", c
);
29 debug("Receiving an sds");
33 debug("Receiving an sds");
34 //TODO do something with the return value
38 debug("Receiving a delete task request");
42 debug("Receiving a task");
52 debug("Unknown message: %X", c
);
66 cyclestart
= millis();
67 for(ct
= 0; ct
<MAXTASKS
; ct
++){
68 //See whether the task is even in use
69 if((curtask
= task_get(ct
)) == NULL
){
70 // debug("Task %d not implemented\n", ct);
73 //See whether the task interval has passed
74 if(cyclestart
-curtask
->lastrun
< curtask
->interval
){
75 // debug("Task %d not scheduled\n", ct);
78 debug("Current task to run: %d", ct
);
80 curtask
->lastrun
= cyclestart
;
88 int main(int argc
, char *argv
[]){
101 //Check for newetasks