From 7b262838e0bb67c5bd27443790a1e00f16290a06 Mon Sep 17 00:00:00 2001 From: Dave Akerman Date: Thu, 15 Sep 2016 19:35:41 +0000 Subject: [PATCH] V1.8.4 - Fix to handle disable LoRa channel --- *.dpa | 30 ++++++++++++++++++++++++++++++ gateway.c | 7 +++++-- 2 files changed, 35 insertions(+), 2 deletions(-) create mode 100644 *.dpa diff --git a/*.dpa b/*.dpa new file mode 100644 index 0000000..055b51a --- /dev/null +++ b/*.dpa @@ -0,0 +1,30 @@ +tracker=LCARS +EnableHabitat=N +EnableSSDV=N +LogTelemetry=Y +LogPackets=Y +CallingTimeout=60 +ServerPort=6004 +Latitude=51.950230 +Longitude=-2.544500 +Antenna=MagMount +JPGFolder=SSDV +EnableDev=N + +#NetworkLED=21 +#InternetLED=22 +#ActivityLED_0=23 +#ActivityLED_1=24 + +frequency_0=434.450000 +mode_0=1 +#mode_0=1 +DIO0_0=6 +DIO5_0=5 +AFC_0=N + +frequency_1=869.850000 +mode_1=3 +DIO0_1=27 +DIO5_1=26 +AFC_1=N diff --git a/gateway.c b/gateway.c index a893789..b2e6238 100644 --- a/gateway.c +++ b/gateway.c @@ -34,7 +34,7 @@ #include "gateway.h" #include "config.h" -#define VERSION "V1.8.3" +#define VERSION "V1.8.4" bool run = TRUE; // RFM98 @@ -1452,6 +1452,9 @@ void LoadConfigFile(void) Config.LoRaDevices[0].DIO5 = 5; Config.LoRaDevices[1].DIO0 = 27; Config.LoRaDevices[1].DIO5 = 26; + + Config.LoRaDevices[0].Frequency = -1; + Config.LoRaDevices[1].Frequency = -1; if ( ( fp = fopen( filename, "r" ) ) == NULL ) { @@ -1527,7 +1530,7 @@ void LoadConfigFile(void) for (Channel = 0; Channel <= 1; Channel++) { RegisterConfigDouble(MainSection, Channel, "frequency", &Config.LoRaDevices[Channel].Frequency, NULL); - if (Config.LoRaDevices[Channel].Frequency >= 0.0) + if (Config.LoRaDevices[Channel].Frequency > 100) { // Defaults Config.LoRaDevices[Channel].ImplicitOrExplicit = EXPLICIT_MODE;