diff --git a/ADIS_Sumo_Styger/Sumo/Remote.c b/ADIS_Sumo_Styger/Sumo/Remote.c index 0c34ff8..7b806fe 100644 --- a/ADIS_Sumo_Styger/Sumo/Remote.c +++ b/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); + } + } } }