From 46983605cb88d69024de41e709d9573cc7afb10c Mon Sep 17 00:00:00 2001 From: YohanHadji Date: Sat, 9 Apr 2022 13:42:03 +0200 Subject: [PATCH] fix cam bug --- .../R2Home_OBC_V1.04/main/camera.hpp | 10 +++++----- .../R2Home_OBC_V1.04/main/config.h | 4 ++-- .../R2Home_OBC_V1.04/main/flight_state.hpp | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/RLS_V1.0/R2Home_SOFTWARE_V1.01/R2Home_OBC_V1.04/main/camera.hpp b/RLS_V1.0/R2Home_SOFTWARE_V1.01/R2Home_OBC_V1.04/main/camera.hpp index 642251f..8ef5b6f 100644 --- a/RLS_V1.0/R2Home_SOFTWARE_V1.01/R2Home_OBC_V1.04/main/camera.hpp +++ b/RLS_V1.0/R2Home_SOFTWARE_V1.01/R2Home_OBC_V1.04/main/camera.hpp @@ -43,11 +43,11 @@ void updatecam() { if ((millis()-camOn)>=onDuration) { setcam(0, (onDuration/1000)-4, offDuration/1000); } - else { - if ((millis()-camOff)>offDuration) { - setcam(1, (onDuration/1000)-4, offDuration/1000); - } - } + } + else { + if ((millis()-camOff)>offDuration) { + setcam(1, (onDuration/1000)-4, offDuration/1000); + } } } } diff --git a/RLS_V1.0/R2Home_SOFTWARE_V1.01/R2Home_OBC_V1.04/main/config.h b/RLS_V1.0/R2Home_SOFTWARE_V1.01/R2Home_OBC_V1.04/main/config.h index d3a678a..e0cb099 100644 --- a/RLS_V1.0/R2Home_SOFTWARE_V1.01/R2Home_OBC_V1.04/main/config.h +++ b/RLS_V1.0/R2Home_SOFTWARE_V1.01/R2Home_OBC_V1.04/main/config.h @@ -11,7 +11,7 @@ #define LOW_RATE false // Dataloging at low HZ (if true) instead of 20Hz, for balloon flight #define CONFIG_FILE_SV false // Will also save the config file with the name of the file to debug if the config was wrong #define LED_MODEL 0 // Big led = 1, small led = 0. -#define CAM_CYCLE false // If true, camera will only be powered on for 20s every 10min, used to save battery on long HAB flight +#define CAM_CYCLE true // If true, camera will only be powered on for 20s every 10min, used to save battery on long HAB flight #define SAFE_TRIGGER false // For HAB flight, will use a safer, but slower methode to detect apogee and transision to descent mode #define COG_BRAKE false // Will reduce command if CoG is turning faster than a threshold #define GPS_FREQ 5 // Hz @@ -72,7 +72,7 @@ #define GPS_VS_AVG 1 -#define GPS_SAFE_AVG 50 +#define GPS_SAFE_AVG 10 #define BARO_SAFE_AVG 5 #define PRE_PE_AVG 50 diff --git a/RLS_V1.0/R2Home_SOFTWARE_V1.01/R2Home_OBC_V1.04/main/flight_state.hpp b/RLS_V1.0/R2Home_SOFTWARE_V1.01/R2Home_OBC_V1.04/main/flight_state.hpp index 7dc640f..ec0937c 100644 --- a/RLS_V1.0/R2Home_SOFTWARE_V1.01/R2Home_OBC_V1.04/main/flight_state.hpp +++ b/RLS_V1.0/R2Home_SOFTWARE_V1.01/R2Home_OBC_V1.04/main/flight_state.hpp @@ -94,7 +94,7 @@ void ready_steady() { if (I_WANT_TO_FLY) { flight_mode = 5; - } + } } }