lorawan.cpp: bugfix logging

This commit is contained in:
Klaus K Wilting 2018-11-04 14:55:30 +01:00
parent 7ae82d1881
commit 5d5531e3af
2 changed files with 5 additions and 5 deletions

View File

@ -329,11 +329,11 @@ void lora_send(osjob_t *job) {
} else { } else {
if (xQueueReceive(LoraSendQueue, &SendBuffer, (TickType_t)0) == pdTRUE) { if (xQueueReceive(LoraSendQueue, &SendBuffer, (TickType_t)0) == pdTRUE) {
// SendBuffer gets struct MessageBuffer with next payload from queue // 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))) { 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 { } else {
ESP_LOGE(TAG, "coult not send %d bytes to LoRa", ESP_LOGE(TAG, "could not send %d byte(s) to LoRa",
SendBuffer.MessageSize); SendBuffer.MessageSize);
} }
// sprintf(display_line7, "PACKET QUEUED"); // sprintf(display_line7, "PACKET QUEUED");

View File

@ -79,7 +79,7 @@ void spi_slave_task(void *param) {
spi_transaction.rx_buffer = rxbuf; spi_transaction.rx_buffer = rxbuf;
// wait until spi master clocks out the data, and read results in rx buffer // 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_LOG_BUFFER_HEXDUMP(TAG, txbuf, transaction_size, ESP_LOG_DEBUG);
esp_err_t ret = esp_err_t ret =
spi_slave_transmit(HSPI_HOST, &spi_transaction, portMAX_DELAY); 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 = BaseType_t ret =
xQueueSendToBack(SPISendQueue, (void *)message, (TickType_t)0); xQueueSendToBack(SPISendQueue, (void *)message, (TickType_t)0);
if (ret == pdTRUE) { 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 { } else {
ESP_LOGW(TAG, "SPI sendqueue is full"); ESP_LOGW(TAG, "SPI sendqueue is full");
} }