First try to output some dBm info for the NRF module
This commit is contained in:
parent
7f267ff2fb
commit
c5a31de5a8
@ -55,6 +55,7 @@ void HoymilesRadio_NRF::loop()
|
|||||||
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();
|
f.channel = _radio->getChannel();
|
||||||
|
f.rssi = _radio->testRPD() ? -30 : -80;
|
||||||
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;
|
||||||
_radio->read(f.fragment, f.len);
|
_radio->read(f.fragment, f.len);
|
||||||
@ -76,7 +77,9 @@ void HoymilesRadio_NRF::loop()
|
|||||||
if (nullptr != inv) {
|
if (nullptr != inv) {
|
||||||
// Save packet in inverter rx buffer
|
// Save packet in inverter rx buffer
|
||||||
Hoymiles.getMessageOutput()->printf("RX Channel: %d --> ", f.channel);
|
Hoymiles.getMessageOutput()->printf("RX Channel: %d --> ", f.channel);
|
||||||
dumpBuf(f.fragment, f.len);
|
dumpBuf(f.fragment, f.len, false);
|
||||||
|
Hoymiles.getMessageOutput()->printf("| %d dBm\r\n", f.rssi);
|
||||||
|
|
||||||
inv->addRxFragment(f.fragment, f.len);
|
inv->addRxFragment(f.fragment, f.len);
|
||||||
} else {
|
} else {
|
||||||
Hoymiles.getMessageOutput()->println("Inverter Not found!");
|
Hoymiles.getMessageOutput()->println("Inverter Not found!");
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user