bd0a42854324dc5e33ae0c38632a735cbb9b3d25
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");
50 debug("Unknown message: %X", c
);
64 cyclestart
= millis();
65 for(ct
= 0; ct
<MAXTASKS
; ct
++){
66 //See whether the task is even in use
67 if((curtask
= task_get(ct
)) == NULL
){
68 // debug("Task %d not implemented\n", ct);
71 //See whether the task interval has passed
72 if(cyclestart
-curtask
->lastrun
< curtask
->interval
){
73 // debug("Task %d not scheduled\n", ct);
76 debug("Current task to run: %d", ct
);
78 curtask
->lastrun
= cyclestart
;
86 int main(int argc
, char *argv
[]){
97 while(!input_available()){
103 //Check for newetasks