1a704b4cb0803fc2e7ad2c79d6c808948ce86847
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 uint8_t c
= read_byte();
36 debug("Receiving input: %c\n", c
);
39 debug("Receiving an sds\n");
43 debug("Receiving an sds\n");
44 //TODO do something with the return value
48 debug("Receiving a delete task request\n");
52 debug("Receiving a task\n");
58 debug("Unknown message: %X\n", c
);
72 cyclestart
= millis();
73 for(ct
= 0; ct
<MAXTASKS
; ct
++){
74 //See whether the task is even in use
75 if((curtask
= task_get(ct
)) == NULL
){
76 // debug("Task %d not implemented\n", ct);
79 //See whether the task interval has passed
80 if(cyclestart
-curtask
->lastrun
< curtask
->interval
){
81 // debug("Task %d not scheduled\n", ct);
84 printf("Current task to run: %d\n", ct
);
86 curtask
->lastrun
= cyclestart
;
94 int main(int argc
, char *argv
[]){
106 //Check for new tasks