From bf23816181ec7309d1c6bdc85f85de73b801eb9b Mon Sep 17 00:00:00 2001 From: lightaprs <48382675+lightaprs@users.noreply.github.com> Date: Mon, 14 Feb 2022 14:38:13 +0300 Subject: [PATCH] Minor bugfix - Minor bugfix for ARISS mode --- .../LightAPRS-W-pico-balloon.ino | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/LightAPRS-W-pico-balloon/LightAPRS-W-pico-balloon.ino b/LightAPRS-W-pico-balloon/LightAPRS-W-pico-balloon.ino index b74e9fd..037c311 100644 --- a/LightAPRS-W-pico-balloon/LightAPRS-W-pico-balloon.ino +++ b/LightAPRS-W-pico-balloon/LightAPRS-W-pico-balloon.ino @@ -156,7 +156,8 @@ int16_t GpsResetTime=1800; // timeout for reset if GPS is not fixed // GEOFENCE uint32_t GEOFENCE_APRS_frequency = 144390000; //default frequency before geofencing. This variable will be updated based on GPS location. -uint32_t GEOFENCE_no_tx = 0; +uint32_t GEOFENCE_no_tx = 0; +boolean arissModEnabled = false; //do not change this, temp value. boolean GpsFirstFix=false; //do not change this boolean ublox_high_alt_mode_enabled = false; //do not change this @@ -287,11 +288,11 @@ void loop() { configureFreqbyLocation(); } - if(autoPathSizeHighAlt && gps.altitude.feet()>3000){ + if(!arissModEnabled && autoPathSizeHighAlt && gps.altitude.feet()>3000){ //force to use high altitude settings (WIDE2-n) APRS_setPathSize(1); - } else { - //use defualt settings + } else { + //use default settings APRS_setPathSize(pathSize); } @@ -390,7 +391,8 @@ void configureFreqbyLocation() { APRS_setPath1("ARISS", Wide1); APRS_setPath2("WIDE2", Wide2); APRS_setPathSize(2); - configDra818("145.8250"); + configDra818("145.8250"); + arissModEnabled = true; } else { GEOFENCE_position(tempLat,tempLong); @@ -398,7 +400,7 @@ void configureFreqbyLocation() { char aprsFreq_buff[9]; dtostrf(dividedFreq, 8, 4, aprsFreq_buff); configDra818(aprsFreq_buff); - + arissModEnabled = false; } radioSetup = true;