main program

Dependencies:   PQMPU9250 PQINA226 mbed PQAEGPS PQEEPROM PQADXL375 SDFileSystem PQLPS22HB PQES920LR

Files at this revision

API Documentation at this revision

Comitter:
tanahashi
Date:
Thu Dec 03 10:23:39 2020 +0000
Parent:
5:22adf1eae5e4
Commit message:
first commit

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/main.cpp	Mon Mar 02 07:16:00 2020 +0000
+++ b/main.cpp	Thu Dec 03 10:23:39 2020 +0000
@@ -454,13 +454,13 @@
             if(phase == READY) phase = FLIGHT;
             break;
         case 0xB3:
-            if(!burning & phase == FLIGHT) phase = SEP;
+            if(!burning && phase == FLIGHT) phase = SEP;
             break;
         case 0xB4:
-            if(phase >= FLIGHT & phase <= SEP) phase = EMERGENCY;
+            if(phase >= FLIGHT && phase <= SEP) phase = EMERGENCY;
             break;
         case 0xB5:
-            if(phase == SEP) phase = RECOVERY;
+            if(phase >= SEP && phase <= EMERGENCY) phase = RECOVERY;
             break;
         case 0xB6:
             break;
@@ -651,7 +651,7 @@
     char data[50];
     data[0] = DOWNLINK_HEADER;
     data[1] = mission_timer_reset;
-    data[2] = ((char*)&mission_time_bits)[0];
+    data[2] = *(char*)&mission_time_bits+0;
     data[3] = ((char*)&mission_time_bits)[1];
     data[4] = ((char*)&flight_time_bits)[0];
     data[5] = ((char*)&flight_time_bits)[1];