Output channel for RX messages

This commit is contained in:
Thomas Basler 2022-10-08 18:14:43 +02:00
parent 223b7ff3ce
commit 05d9ce4590
2 changed files with 5 additions and 1 deletions

View File

@ -48,6 +48,7 @@ void HoymilesRadio::loop()
f = _rxBuffer.getFront();
memset(f->fragment, 0xcc, MAX_RF_PAYLOAD_SIZE);
f->len = _radio->getDynamicPayloadSize();
f->channel = _radio->getChannel();
if (f->len > MAX_RF_PAYLOAD_SIZE)
f->len = MAX_RF_PAYLOAD_SIZE;
@ -69,7 +70,9 @@ void HoymilesRadio::loop()
if (nullptr != inv) {
// Save packet in inverter rx buffer
dumpBuf("RX ", f->fragment, f->len);
char buf[30];
snprintf(buf, sizeof(buf), "RX Channel: %d --> ", f->channel);
dumpBuf(buf, f->fragment, f->len);
inv->addRxFragment(f->fragment, f->len);
} else {
Serial.println(F("Inverter Not found!"));

View File

@ -14,5 +14,6 @@ typedef struct {
uint8_t mainCmd;
uint8_t fragment[MAX_RF_PAYLOAD_SIZE];
uint8_t len;
uint8_t channel;
bool wasReceived;
} fragment_t;