From cc5a52fe86be708d4af295091f0fc09e23d00fea Mon Sep 17 00:00:00 2001 From: Richard Meadows Date: Sat, 13 Aug 2016 13:05:12 +0100 Subject: [PATCH] [ubseds17] set night time cycle to once every 3 minutes, so night-time ARISS is once every 6 * ariss is only enabled after 5 successful cycles, in case rf amplifier can't be supported by battery --- firmware/inc/hw_config/low-power-solar.h | 4 ++-- firmware/src/sequencer.c | 7 ++++--- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/firmware/inc/hw_config/low-power-solar.h b/firmware/inc/hw_config/low-power-solar.h index a0c1b76..2fc2f82 100644 --- a/firmware/inc/hw_config/low-power-solar.h +++ b/firmware/inc/hw_config/low-power-solar.h @@ -169,7 +169,7 @@ * Cycle Times */ #define CYCLE_TIME_FAST (30) /* shortest hibernate */ -#define CYCLE_TIME_SLOW (100) /* once every two minutes */ +#define CYCLE_TIME_SLOW (180) /* once every three minutes */ /** * Radio @@ -227,7 +227,7 @@ * Telemetry */ #define TELEMETRY_ENABLE 1 -#define TELEMETRY_USE_GEOFENCE 0 +#define TELEMETRY_USE_GEOFENCE 1 #define TELEMETRY_FREQUENCY 434612500 #define TELEMETRY_POWER RF_POWER_8dBm diff --git a/firmware/src/sequencer.c b/firmware/src/sequencer.c index b254eb8..bb8e6f0 100644 --- a/firmware/src/sequencer.c +++ b/firmware/src/sequencer.c @@ -84,7 +84,7 @@ void telemetry_sequence(struct tracker_datapoint* dp, uint32_t n) /* APRS */ #if APRS_ENABLE - if (get_since_aprs_s() >= 60) { /* limit APRS frequency to once per minute */ + if (get_since_aprs_s() >= 55) { /* limit APRS transmissions to about once per minute */ clear_since_aprs_s(); #if APRS_USE_GEOFENCE if (location_aprs_should_tx()) { /* transmit only when we *should* */ @@ -99,8 +99,9 @@ void telemetry_sequence(struct tracker_datapoint* dp, uint32_t n) /* ARISS */ #if ARISS_ENABLE - if ((get_battery_use_state() == BATTERY_GOOD) && /* battery good, */ - ((n % 2) == 0)) { /* one-in-two times */ + if ((get_battery_use_state() == BATTERY_GOOD) && /* battery good, */ + (n > 5) && /* have been running for some time, */ + ((n % 2) == 0)) { /* one-in-two times */ #if ARISS_USE_GEOFENCE if (location_aprs_could_tx()) { /* transmit anywhere it's not disallowed */ #endif