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 //debug("Receiving input: %c\n", c);
39 debug("Receiving an sds");
43 debug("Receiving an sds");
44 //TODO do something with the return value
48 debug("Receiving a delete task request");
52 debug("Receiving a task");
60 debug("Unknown message: %X", bt
);
74 cyclestart
= millis();
75 for(ct
= 0; ct
<MAXTASKS
; ct
++){
76 //See whether the task is even in use
77 if((curtask
= task_get(ct
)) == NULL
){
78 // debug("Task %d not implemented\n", ct);
81 //See whether the task interval has passed
82 if(cyclestart
-curtask
->lastrun
< curtask
->interval
){
83 // debug("Task %d not scheduled\n", ct);
86 debug("Current task to run: %d", ct
);
88 curtask
->lastrun
= cyclestart
;
97 HAL_UART_Receive(&huart3
, &bt
, 1, 100000);
99 int main(int argc
, char *argv
[]){
113 //Check for new tasks
114 // debug("loop\r\n");