Output channel for RX messages
This commit is contained in:
parent
223b7ff3ce
commit
05d9ce4590
@ -48,6 +48,7 @@ void HoymilesRadio::loop()
|
|||||||
f = _rxBuffer.getFront();
|
f = _rxBuffer.getFront();
|
||||||
memset(f->fragment, 0xcc, MAX_RF_PAYLOAD_SIZE);
|
memset(f->fragment, 0xcc, MAX_RF_PAYLOAD_SIZE);
|
||||||
f->len = _radio->getDynamicPayloadSize();
|
f->len = _radio->getDynamicPayloadSize();
|
||||||
|
f->channel = _radio->getChannel();
|
||||||
if (f->len > MAX_RF_PAYLOAD_SIZE)
|
if (f->len > MAX_RF_PAYLOAD_SIZE)
|
||||||
f->len = MAX_RF_PAYLOAD_SIZE;
|
f->len = MAX_RF_PAYLOAD_SIZE;
|
||||||
|
|
||||||
@ -69,7 +70,9 @@ void HoymilesRadio::loop()
|
|||||||
|
|
||||||
if (nullptr != inv) {
|
if (nullptr != inv) {
|
||||||
// Save packet in inverter rx buffer
|
// 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);
|
inv->addRxFragment(f->fragment, f->len);
|
||||||
} else {
|
} else {
|
||||||
Serial.println(F("Inverter Not found!"));
|
Serial.println(F("Inverter Not found!"));
|
||||||
|
|||||||
@ -14,5 +14,6 @@ typedef struct {
|
|||||||
uint8_t mainCmd;
|
uint8_t mainCmd;
|
||||||
uint8_t fragment[MAX_RF_PAYLOAD_SIZE];
|
uint8_t fragment[MAX_RF_PAYLOAD_SIZE];
|
||||||
uint8_t len;
|
uint8_t len;
|
||||||
|
uint8_t channel;
|
||||||
bool wasReceived;
|
bool wasReceived;
|
||||||
} fragment_t;
|
} fragment_t;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user