From 3f44542ff8f070b4b95eb8ecf7e4db5304599f42 Mon Sep 17 00:00:00 2001 From: Dave Akerman Date: Fri, 5 Jun 2020 18:37:32 +0000 Subject: [PATCH] Send current frequency to client app, with current RSSI --- README.md | 5 +++++ gateway.c | 2 +- server.c | 5 +++-- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 95ff1cb..e7d23ab 100644 --- a/README.md +++ b/README.md @@ -232,6 +232,11 @@ Many thanks to David Brooke for coding this feature and the AFC. Change History ============== +06/05/2020 - V1.8.38 +-------------------- + + Send current frequency to client app, with current RSSI + 06/05/2020 - V1.8.37 -------------------- diff --git a/gateway.c b/gateway.c index 652b2b6..b515a1a 100644 --- a/gateway.c +++ b/gateway.c @@ -46,7 +46,7 @@ #include "udpclient.h" #include "lifo_buffer.h" -#define VERSION "V1.8.37" +#define VERSION "V1.8.38" bool run = TRUE; // RFM98 diff --git a/server.c b/server.c index 24ba7a3..b70ea1e 100644 --- a/server.c +++ b/server.c @@ -237,9 +237,10 @@ int SendJSON(int connfd) { if (Config.LoRaDevices[Channel].InUse) { - sprintf(line, "{\"class\":\"STATS\",\"index\":%d,\"rssi\":%d}\r\n", + sprintf(line, "{\"class\":\"STATS\",\"index\":%d,\"rssi\":%d,\"freq\":%.4lf}\r\n", Channel, - Config.LoRaDevices[Channel].CurrentRSSI); + Config.LoRaDevices[Channel].CurrentRSSI, + Config.LoRaDevices[Channel].Frequency + Config.LoRaDevices[Channel].FrequencyOffset); strcat(sendBuff, line); }