From 20a6abddbc8e6a7433df0353ea8d2c8032f118fc Mon Sep 17 00:00:00 2001 From: Philippe <31780464+phfu@users.noreply.github.com> Date: Sun, 3 Jan 2021 19:24:03 +0100 Subject: [PATCH] Corrected RSSI float to int and added SNR RSSI display was wrong as it was lloking for a float. It is an int --- examples/ArduinoLoRa/LoRaReceiver/LoRaReceiver.ino | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/examples/ArduinoLoRa/LoRaReceiver/LoRaReceiver.ino b/examples/ArduinoLoRa/LoRaReceiver/LoRaReceiver.ino index 8fbbeb6..164c245 100644 --- a/examples/ArduinoLoRa/LoRaReceiver/LoRaReceiver.ino +++ b/examples/ArduinoLoRa/LoRaReceiver/LoRaReceiver.ino @@ -42,8 +42,10 @@ void loop() char buf[256]; u8g2->drawStr(0, 12, "Received OK!"); u8g2->drawStr(0, 26, recv.c_str()); - snprintf(buf, sizeof(buf), "RSSI:%.2f", LoRa.packetRssi()); + snprintf(buf, sizeof(buf), "RSSI:%i", LoRa.packetRssi()); u8g2->drawStr(0, 40, buf); + snprintf(buf, sizeof(buf), "SNR:%.1f", LoRa.packetSnr()); + u8g2->drawStr(0, 56, buf); u8g2->sendBuffer(); } #endif