From 5d5531e3af911e946d84c1c01adf98dea8f14799 Mon Sep 17 00:00:00 2001 From: Klaus K Wilting Date: Sun, 4 Nov 2018 14:55:30 +0100 Subject: [PATCH] lorawan.cpp: bugfix logging --- src/lorawan.cpp | 6 +++--- src/spislave.cpp | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/lorawan.cpp b/src/lorawan.cpp index b9c49623..41d5f884 100644 --- a/src/lorawan.cpp +++ b/src/lorawan.cpp @@ -329,11 +329,11 @@ void lora_send(osjob_t *job) { } else { if (xQueueReceive(LoraSendQueue, &SendBuffer, (TickType_t)0) == pdTRUE) { // SendBuffer gets struct MessageBuffer with next payload from queue - if (LMIC_setTxData2(SendBuffer.MessagePort, SendBuffer.Message, + if (!LMIC_setTxData2(SendBuffer.MessagePort, SendBuffer.Message, SendBuffer.MessageSize, (cfg.countermode & 0x02))) { - ESP_LOGI(TAG, "%d bytes sent to LoRa", SendBuffer.MessageSize); + ESP_LOGI(TAG, "%d byte(s) sent to LoRa", SendBuffer.MessageSize); } else { - ESP_LOGE(TAG, "coult not send %d bytes to LoRa", + ESP_LOGE(TAG, "could not send %d byte(s) to LoRa", SendBuffer.MessageSize); } // sprintf(display_line7, "PACKET QUEUED"); diff --git a/src/spislave.cpp b/src/spislave.cpp index 67d544eb..6df563b1 100644 --- a/src/spislave.cpp +++ b/src/spislave.cpp @@ -79,7 +79,7 @@ void spi_slave_task(void *param) { spi_transaction.rx_buffer = rxbuf; // wait until spi master clocks out the data, and read results in rx buffer - ESP_LOGI(TAG, "Prepared SPI transaction for %zu bytes", transaction_size); + ESP_LOGI(TAG, "Prepared SPI transaction for %zu byte(s)", transaction_size); ESP_LOG_BUFFER_HEXDUMP(TAG, txbuf, transaction_size, ESP_LOG_DEBUG); esp_err_t ret = spi_slave_transmit(HSPI_HOST, &spi_transaction, portMAX_DELAY); @@ -149,7 +149,7 @@ void spi_enqueuedata(uint8_t messageType, MessageBuffer_t *message) { BaseType_t ret = xQueueSendToBack(SPISendQueue, (void *)message, (TickType_t)0); if (ret == pdTRUE) { - ESP_LOGI(TAG, "%d bytes enqueued for SPI interface", message->MessageSize); + ESP_LOGI(TAG, "%d byte(s) enqueued for SPI interface", message->MessageSize); } else { ESP_LOGW(TAG, "SPI sendqueue is full"); }