Skip to content

Commit

Permalink
First try to output some dBm info for the NRF module
Browse files Browse the repository at this point in the history
  • Loading branch information
tbnobody committed Jun 3, 2023
1 parent 7f267ff commit c5a31de
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/Hoymiles/src/HoymilesRadio_NRF.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ void HoymilesRadio_NRF::loop()
memset(f.fragment, 0xcc, MAX_RF_PAYLOAD_SIZE);
f.len = _radio->getDynamicPayloadSize();
f.channel = _radio->getChannel();
f.rssi = _radio->testRPD() ? -30 : -80;
if (f.len > MAX_RF_PAYLOAD_SIZE)
f.len = MAX_RF_PAYLOAD_SIZE;
_radio->read(f.fragment, f.len);
Expand All @@ -76,7 +77,9 @@ void HoymilesRadio_NRF::loop()
if (nullptr != inv) {
// Save packet in inverter rx buffer
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);
} else {
Hoymiles.getMessageOutput()->println("Inverter Not found!");
Expand Down

0 comments on commit c5a31de

Please sign in to comment.