From c5a31de5a82f05ed997038324941e975659eaa4e Mon Sep 17 00:00:00 2001 From: Thomas Basler Date: Sat, 3 Jun 2023 11:54:23 +0200 Subject: [PATCH] First try to output some dBm info for the NRF module --- lib/Hoymiles/src/HoymilesRadio_NRF.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/Hoymiles/src/HoymilesRadio_NRF.cpp b/lib/Hoymiles/src/HoymilesRadio_NRF.cpp index 88b7dbb6..66b9691e 100644 --- a/lib/Hoymiles/src/HoymilesRadio_NRF.cpp +++ b/lib/Hoymiles/src/HoymilesRadio_NRF.cpp @@ -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); @@ -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!");