7 #include "stm32f7xx_hal.h"
13 #include <netinet/in.h>
15 #include <sys/socket.h>
17 #include <sys/types.h>
21 #include "interpret.h"
22 #include "mTaskSymbols.h"
25 #include "interface.h"
27 #define MSG_GET_TASK 't'
28 #define MSG_DEL_TASK 'd'
29 #define MSG_SDS_SPEC 's'
30 #define MSG_SDS_UPD 'u'
35 if(input_available()){
36 uint8_t c
= read_byte();
37 debug("Receiving input: %c\n", c
);
40 debug("Receiving an sds");
44 debug("Receiving an sds");
45 //TODO do something with the return value
49 debug("Receiving a delete task request");
53 debug("Receiving a task");
61 debug("Unknown message: %X", c
);
75 cyclestart
= millis();
76 for(ct
= 0; ct
<MAXTASKS
; ct
++){
77 //See whether the task is even in use
78 if((curtask
= task_get(ct
)) == NULL
){
79 // debug("Task %d not implemented\n", ct);
82 //See whether the task interval has passed
83 if(cyclestart
-curtask
->lastrun
< curtask
->interval
){
84 // debug("Task %d not scheduled\n", ct);
87 debug("Current task to run: %d", ct
);
89 curtask
->lastrun
= cyclestart
;
97 int main(int argc
, char *argv
[]){
107 //debug("booting up");
111 //Check for new tasks
112 // debug("loop\r\n");