Skip to content

Commit

Permalink
Merge pull request konnected-io#14 from konnected-io/dev
Browse files Browse the repository at this point in the history
Don't requeue commands while not synced.
  • Loading branch information
heythisisnate authored Jun 18, 2024
2 parents b472ace + 507d3ac commit 4e6f493
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions gdo.c
Original file line number Diff line number Diff line change
Expand Up @@ -1452,6 +1452,13 @@ static void gdo_main_task(void* arg) {
}

if (rx_pending || gpio_get_level(g_config.uart_rx_pin)) {
// If not synced yet just delete the message as the sync loop will resend it
if (!g_status.synced) {
xQueueReceive(gdo_tx_queue, &tx_message, 0);
free(tx_message.packet);
break;
}

ESP_LOGW(TAG, "Collision detected, requeing command");
// Wait 150ms for the collision to clear
if (schedule_event(GDO_EVENT_TX_PENDING, 150 * 1000) != ESP_OK) {
Expand Down

0 comments on commit 4e6f493

Please sign in to comment.