diff --git a/README.md b/README.md index b96dc94..95ff1cb 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.37 +-------------------- + + Reset AFC offset to zero after setting frequency from client app + 10/02/2020 - V1.8.35 -------------------- diff --git a/gateway.c b/gateway.c index f4513c9..652b2b6 100644 --- a/gateway.c +++ b/gateway.c @@ -46,7 +46,7 @@ #include "udpclient.h" #include "lifo_buffer.h" -#define VERSION "V1.8.36" +#define VERSION "V1.8.37" bool run = TRUE; // RFM98 diff --git a/server.c b/server.c index fdb7913..24ba7a3 100644 --- a/server.c +++ b/server.c @@ -115,6 +115,15 @@ void ProcessJSONClientLine(int connfd, char *line) value = strtok_r( NULL, "\n", &saveptr); SetConfigValue(setting, value); + + if (strstr(line, "frequency_0") != NULL) + { + Config.LoRaDevices[0].FrequencyOffset = 0; + } + else if (strstr(line, "frequency_1") != NULL) + { + Config.LoRaDevices[1].FrequencyOffset = 0; + } } else if (strchr(line, ':') != NULL) {