Switch to using internal cc1111 temperature sensor
[fw/altos] / src / ao.h
index b72cac5c4aac6ddbe524cff75d41b7d2f8344a2a..2c6eb2b91180d254818ca2553849a0b2cde95a90 100644 (file)
--- a/src/ao.h
+++ b/src/ao.h
@@ -108,6 +108,7 @@ ao_start_scheduler(void);
 #define AO_PANIC_CMD           6       /* Too many command sets registered */
 #define AO_PANIC_STDIO         7       /* Too many stdio handlers registered */
 #define AO_PANIC_REBOOT                8       /* Reboot failed */
+#define AO_PANIC_FLASH         9       /* Invalid flash part (or wrong blocksize) */
 
 /* Stop the operating system, beeping and blinking the reason */
 void
@@ -330,6 +331,7 @@ enum ao_cmd_status {
 };
 
 extern __xdata uint16_t ao_cmd_lex_i;
+extern __xdata uint32_t ao_cmd_lex_u32;
 extern __xdata char    ao_cmd_lex_c;
 extern __xdata enum ao_cmd_status ao_cmd_status;
 
@@ -616,6 +618,7 @@ extern __pdata int16_t                      ao_ground_pres;
 extern __pdata int16_t                 ao_ground_accel;
 extern __pdata int16_t                 ao_min_pres;
 extern __pdata uint16_t                        ao_launch_time;
+extern __xdata uint8_t                 ao_flight_force_idle;
 
 /* Flight thread */
 void
@@ -834,6 +837,11 @@ extern __xdata uint8_t ao_radio_mutex;
 void
 ao_radio_general_isr(void) interrupt 16;
 
+void
+ao_radio_get(void);
+
+#define ao_radio_put() ao_mutex_put(&ao_radio_mutex)
+
 void
 ao_radio_set_telemetry(void);
 
@@ -937,17 +945,18 @@ ao_igniter_init(void);
  */
 
 #define AO_CONFIG_MAJOR        1
-#define AO_CONFIG_MINOR        2
+#define AO_CONFIG_MINOR        3
 
 struct ao_config {
        uint8_t         major;
        uint8_t         minor;
        uint16_t        main_deploy;
-       int16_t         accel_plus_g;
+       int16_t         accel_plus_g;           /* changed for minor version 2 */
        uint8_t         radio_channel;
        char            callsign[AO_MAX_CALLSIGN + 1];
-       uint8_t         apogee_delay;
-       int16_t         accel_minus_g;
+       uint8_t         apogee_delay;           /* minor version 1 */
+       int16_t         accel_minus_g;          /* minor version 2 */
+       uint32_t        radio_cal;              /* minor version 3 */
 };
 
 extern __xdata struct ao_config ao_config;