Queue assetion failure ESP-NOW video #101
-
Hi Mair, I set up a queue like shown in video but get error assert failed: xQueueGenericSend queue.c:820(pxQueue). Do you know what might cause this or how I can debug it? Below is code that does the queue assertion. (I see the "Received Wifi Position" OK then it crashes void on_receive(const uint8_t *mac_addr, const uint8_t *data, int data_len) Thanks |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments
-
payload_t * payload = (payload_t *) data; You are sending a pointer to a pointer. |
Beta Was this translation helpful? Give feedback.
-
Thanks Mair, I did not realize that |
Beta Was this translation helpful? Give feedback.
-
Mair, With regard to queue. If more data comes in before previous data was consumed, does the receiver keep being fired after each time it processes one item until all have been consumed ? ie. RTOS handles continual firing the receiver until all data consumed |
Beta Was this translation helpful? Give feedback.
-
@orbitcoms will task 1 keep firing even if task 2 has not had a chance to process and get the next item. Yes it will |
Beta Was this translation helpful? Give feedback.
payload_t * payload = (payload_t *) data;
xQueueSend(message_received_queue, &payload, 0);
You are sending a pointer to a pointer.
should be
xQueueSend(message_received_queue, payload, 0);