From 3b07b53deea2a75f2d1e576ac706658bb1c7f9e4 Mon Sep 17 00:00:00 2001 From: Alex Mikhalev Date: Mon, 31 Dec 2018 00:06:59 -0700 Subject: [PATCH] fix error msgs and a few things --- components/sx127x_driver/sx127x_driver.c | 2 +- main/ugv_main.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/components/sx127x_driver/sx127x_driver.c b/components/sx127x_driver/sx127x_driver.c index 28213ab..4b94758 100644 --- a/components/sx127x_driver/sx127x_driver.c +++ b/components/sx127x_driver/sx127x_driver.c @@ -288,6 +288,6 @@ esp_err_t sx127x_send_packet(sx127x_t *handle, char *data, size_t data_len, Tick SX127X_CHECK(packet.data != NULL, "malloc error", ESP_ERR_NO_MEM); memcpy(packet.data, data, data_len); BaseType_t pdRet = xQueueSend(handle->tx_packet_queue, &packet, ticks_to_wait); - SX127X_CHECK(pdRet == pdTRUE, "tx queue full", ESP_FAIL); + SX127X_CHECK(pdRet == pdTRUE, "tx queue full", ESP_ERR_TIMEOUT); return ESP_OK; } diff --git a/main/ugv_main.c b/main/ugv_main.c index bf4625f..3044b8e 100644 --- a/main/ugv_main.c +++ b/main/ugv_main.c @@ -114,7 +114,7 @@ void loraTask(void *params) { char tx_buf[20]; const size_t tx_buf_len = (sizeof(tx_buf) / sizeof(tx_buf[0])); int packet_len; - TickType_t send_period = pdMS_TO_TICKS(2000); + TickType_t send_period = pdMS_TO_TICKS(1000); TickType_t current_time = xTaskGetTickCount(); TickType_t next_send = current_time + send_period; struct Packet recvd_packet; @@ -144,7 +144,7 @@ void loraTask(void *params) { if (ret != ESP_OK) { ESP_LOGE(TAG, "error sending packet: %d", ret); } else { - ESP_LOGI(TAG, "lora wrote %d bytes\n", written_bytes); + ESP_LOGI(TAG, "lora wrote %d bytes", written_bytes); } current_time = xTaskGetTickCount();