fix error msgs and a few things

This commit is contained in:
Alex Mikhalev 2018-12-31 00:06:59 -07:00
parent 9dfb6aa1b9
commit 3b07b53dee
2 changed files with 3 additions and 3 deletions

View File

@ -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;
}

View File

@ -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();