tried Remote (parse commands from ESP on Robo)

does not work yet
main
Jonas Arnold 4 years ago
parent dfd6103b23
commit 970fda699d
  1. 13
      ADIS_Sumo_Styger/Sumo/Remote.c

@ -52,8 +52,17 @@ static void RemoteTask(void *pv) {
}
#endif
for(;;) {
res = xQueueReceive(REMOTE_RxFromESP_Queue, &ch, portMAX_DELAY); /* make sure we empty the queue */
/*! \todo ADIS: implement handling remote stream from ESP **/
res = xQueueReceive(REMOTE_RxFromESP_Queue, &ch, pdMS_TO_TICKS(10)); /* wait max 10 ms */
if (res==errQUEUE_EMPTY) {
ch = '\0'; /* nothing received */
}
else if(res == pdPASS) {
/* something was received */
/* handle remote stream from ESP */
if(ch == '@'){
BUZ_Beep(200, 500);
}
}
}
}

Loading…
Cancel
Save