IZU2020 / Mbed 2 deprecated IZU2020_AVIONICS

Dependencies:   PQMPU9250 PQINA226 mbed PQAEGPS PQEEPROM PQADXL375 SDFileSystem PQLPS22HB PQES920LR

Revision:
3:84d2520b9079
Parent:
2:104839501493
Child:
4:5bc218b2a974
--- a/main.cpp	Thu Feb 20 04:14:33 2020 +0000
+++ b/main.cpp	Thu Feb 20 10:26:08 2020 +0000
@@ -177,9 +177,9 @@
                         press_LPF_prev = press_LPF;
                         if(press_LPF_diff > 0.0f) {
                             apogee = true;
+                        } else {
+                            t = flight_timer.read_ms();
                         }
-                    } else {
-                        t = flight_timer.read_ms();
                     }
                     if(!burning && (apogee || flight_timer.read() > T_SEP)) {
                         phase = SEP;
@@ -619,6 +619,7 @@
 {
     mission_time_bits = (short)(mission_time / TIME_LSB);
     flight_time_bits = (short)(flight_time / TIME_LSB);
+    flags = 0;
     flags |= f_sd      << 7;
     flags |= f_gps     << 6;
     flags |= f_adxl    << 5;