This commit is contained in:
Klaus K Wilting committed 2018-08-11 19:31:42 +02:00
1 parent fcd9357116
commit 5880b7e9ff
3 files changed
+17 -19

No files matched your search

+1 -4
View File
@@ -4,11 +4,8 @@
// The mother of all embedded development...
#include <Arduino.h>
// needed for ESP_LOGx on arduino framework
#include <esp32-hal-log.h>
// attn: increment version after modifications to configData_t truct!
#define PROGVERSION "1.4.22" // use max 10 chars here!
#define PROGVERSION "1.4.23" // use max 10 chars here!
#define PROGNAME "PAXCNT"
// std::set for unified array functions
+4 -11
View File
@@ -8,8 +8,8 @@ void SendData(uint8_t port) {
SendBuffer.MessageSize = payload.getSize();
SendBuffer.MessagePort = PAYLOAD_ENCODER <= 2
? port
: (PAYLOAD_ENCODER == 4 ? LPP2PORT : LPP1PORT);
? port
: (PAYLOAD_ENCODER == 4 ? LPP2PORT : LPP1PORT);
memcpy(SendBuffer.Message, payload.getBuffer(), payload.getSize());
// enqueue message in LoRa send queue
@@ -79,9 +79,6 @@ void IRAM_ATTR SendCycleIRQ() {
// cyclic called function to eat data from RTos send queues and transmit it
void processSendBuffer() {
int m1 = 0, m2 = 0;
m1 = ESP.getFreeHeap();
MessageBuffer_t SendBuffer;
#ifdef HAS_LORA
@@ -93,7 +90,7 @@ void processSendBuffer() {
// SendBuffer gets struct MessageBuffer with next payload from queue
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 bytes sent to LoRa", SendBuffer.MessageSize);
sprintf(display_line7, "PACKET QUEUED");
}
}
@@ -101,14 +98,10 @@ void processSendBuffer() {
#ifdef HAS_SPI
if (xQueueReceive(SPISendQueue, &SendBuffer, (TickType_t)0) == pdTRUE) {
//ESP_LOGI(TAG, "%d bytes sent to SPI", SendBuffer.MessageSize);
ESP_LOGI(TAG, "%d bytes sent to SPI", SendBuffer.MessageSize);
}
#endif
m2 = ESP.getFreeHeap();
if (m2 - m1)
ESP_LOGI(TAG, "processSendBuffer consumed %d bytes", m2 - m1);
} // processSendBuffer
void flushQueues() {