mirror of
https://github.com/alexandrebobkov/ESP-Nodes.git
synced 2025-08-07 21:48:09 +00:00
FreeRTOS
This commit is contained in:
@@ -155,12 +155,15 @@ void restart_task(void *pvParameters) {
|
||||
|
||||
// Display task; receives data from both queues and prints it
|
||||
void display_task(void *pvParameters) {
|
||||
SensorsData rx_data;
|
||||
while (1) {
|
||||
if (xQueueReceive(xQueue1, &s_data, 500)) {
|
||||
printf("Display Task received sensors_data from Queue 1: num1=%" PRIu32 ", num2=%" PRIu32 ", num3=%" PRIu32 "\n", s_data.num1, s_data.num2, s_data.num3);
|
||||
if (xQueueReceive(xQueue1, &rx_data, 500)) {
|
||||
printf("Received sensors_data from Queue 1: num1=%" PRIu32 ", num2=%" PRIu32 ", num3=%" PRIu32 "\n",
|
||||
s_data.num1, s_data.num2, s_data.num3);
|
||||
}
|
||||
if (xQueueReceive(xQueue2, &s_data, 500)) {
|
||||
printf("Display Task received sensors_data from Queue 2: num1=%" PRIu32 ", num2=%" PRIu32 ", num3=%" PRIu32 "\n", s_data.num1, s_data.num2, s_data.num3);
|
||||
if (xQueueReceive(xQueue2, &rx_data, 500)) {
|
||||
printf("Received sensors_data from Queue 2: num1=%" PRIu32 ", num2=%" PRIu32 ", num3=%" PRIu32 "\n",
|
||||
s_data.num1, s_data.num2, s_data.num3);
|
||||
}
|
||||
|
||||
printf("\n\nsensors_data\nnum1=%" PRIu32 "\nnum2=%" PRIu32 "\nnum3=%" PRIu32 "\n",
|
||||
|
Reference in New Issue
Block a user