Definition at line 196 of file systems.cpp.
+Definition at line 214 of file systems.cpp.
diff --git a/docs/systems_8cpp_source.html b/docs/systems_8cpp_source.html
index 07f5ab9..2fe23df 100644
--- a/docs/systems_8cpp_source.html
+++ b/docs/systems_8cpp_source.html
@@ -109,233 +109,251 @@
-
-
-
-
-
-
-
-
+
+
+
+ 34 constexpr float altChgThreshold = 200;
+ 35 constexpr float presChgThreshold = 500;
+ 36 constexpr float tempChgThreshold = 10;
+ 37 constexpr unsigned int maxConsecutiveRejects = 3;
+ 38 unsigned int rejects = maxConsecutiveRejects;
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+ 41 bool is_rogue = std::abs(prev_reading.
altitude - reading.
altitude) > altChgThreshold;
+
+
+
+ 45 if (is_rogue && rejects++ < maxConsecutiveRejects)
+
+
+
+
+ 50 prev_reading = reading;
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
- 101 bool already_played_freebird =
false;
-
-
-
-
- 106 FSMState next_state = fsm.tick_fsm(current_state, state_estimate);
-
-
-
-
-
- 112 already_played_freebird =
true;
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 119 bool already_played_freebird =
false;
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 147 .
ax = current_accelerometer.
ax,
- 148 .ay = current_accelerometer.
ay,
- 149 .az = current_accelerometer.
az
-
-
-
- 153 yessir.
tick(dt, 13.0, current_barom_buf, current_accelerations, current_orientation, FSM_state);
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 172 if(command.
valid()) {
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 190#define INIT_SYSTEM(s) do { ErrorCode code = (s).init(); if (code != NoError) { return code; } } while (0)
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 227 if (init_error_code !=
NoError) {
-
-
-
-
-
-
-
-
-
+
+
+
+ 124 FSMState next_state = fsm.tick_fsm(current_state, state_estimate);
+
+
+
+
+
+ 130 already_played_freebird =
true;
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 165 .
ax = current_accelerometer.
ax,
+ 166 .ay = current_accelerometer.
ay,
+ 167 .az = current_accelerometer.
az
+
+
+
+ 171 yessir.
tick(dt, 13.0, current_barom_buf, current_accelerations, current_orientation, FSM_state);
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 190 if(command.
valid()) {
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 208#define INIT_SYSTEM(s) do { ErrorCode code = (s).init(); if (code != NoError) { return code; } } while (0)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+ 245 if (init_error_code !=
NoError) {
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Sound free_bird[FREE_BIRD_LENGTH]
free bird solo song, to be played on startup/ second stage iginition
@@ -373,6 +391,7 @@
Barometer read()
Reads the pressure and temperature from the MS5611.
+
void play_tune(Sound *tune, uint32_t length)
starts playing a new song
void tick()
public interface to tick the buzzer
Continuity read()
Reads the value of the ADC.
@@ -434,9 +453,9 @@
Voltage read()
Reads the value of the given analog pin and converts it to a battery voltage with the assumption that...
data about battery voltage
-
-void begin_systems(RocketSystems *config)
Initializes the systems, and then creates and starts the thread for each system. If initialization fa...
-ErrorCode init_systems(RocketSystems &systems)
Initializes all systems in order, returning early if a system's initialization process errors out....
+
+void begin_systems(RocketSystems *config)
Initializes the systems, and then creates and starts the thread for each system. If initialization fa...
+ErrorCode init_systems(RocketSystems &systems)
Initializes all systems in order, returning early if a system's initialization process errors out....
DECLARE_THREAD(logger, RocketSystems *arg)
These are all the functions that will run in each task Each function has a while (true) loop within t...
diff --git a/docs/systems_8h.html b/docs/systems_8h.html
index 9b7e119..13db60a 100644
--- a/docs/systems_8h.html
+++ b/docs/systems_8h.html
@@ -134,7 +134,7 @@ Definition at line 224 of file systems.cpp.
+Definition at line 242 of file systems.cpp.
diff --git a/docs/systems_8h_source.html b/docs/systems_8h_source.html
index 8a43d26..e344d70 100644
--- a/docs/systems_8h_source.html
+++ b/docs/systems_8h_source.html
@@ -173,7 +173,7 @@
MagnetometerSensor magnetometer
-void begin_systems(RocketSystems *config)
Initializes the systems, and then creates and starts the thread for each system. If initialization fa...
+void begin_systems(RocketSystems *config)
Initializes the systems, and then creates and starts the thread for each system. If initialization fa...