rename states. launchpad -> pad, coast -> fast
authorKeith Packard <keithp@keithp.com>
Sun, 14 Jun 2009 23:39:28 +0000 (16:39 -0700)
committerKeith Packard <keithp@keithp.com>
Sun, 14 Jun 2009 23:39:28 +0000 (16:39 -0700)
src/ao.h
src/ao_flight.c
src/ao_flight_test.c
src/ao_report.c
src/ao_state.c

index c4cb5bf7176d526b2ea4a4bbe887684778070a59..20431b98d28080d6a848e3fd789d7cf9c86d05c6 100644 (file)
--- a/src/ao.h
+++ b/src/ao.h
@@ -553,9 +553,9 @@ ao_log_init(void);
 enum ao_flight_state {
        ao_flight_startup = 0,
        ao_flight_idle = 1,
 enum ao_flight_state {
        ao_flight_startup = 0,
        ao_flight_idle = 1,
-       ao_flight_launchpad = 2,
+       ao_flight_pad = 2,
        ao_flight_boost = 3,
        ao_flight_boost = 3,
-       ao_flight_coast = 4,
+       ao_flight_fast = 4,
        ao_flight_apogee = 5,
        ao_flight_drogue = 6,
        ao_flight_main = 7,
        ao_flight_apogee = 5,
        ao_flight_drogue = 6,
        ao_flight_main = 7,
index c0f5683047b4d5e3e37dd6d28d14bb9de71295e2..6de6e7cc324620c0f6b82c3ae317d61d5f6ceb45 100644 (file)
@@ -216,7 +216,7 @@ ao_flight(void)
                        ao_old_vel = ao_flight_vel;
                        ao_old_vel_tick = ao_flight_tick;
 
                        ao_old_vel = ao_flight_vel;
                        ao_old_vel_tick = ao_flight_tick;
 
-                       /* Go to launchpad state if the nose is pointing up */
+                       /* Go to pad state if the nose is pointing up */
                        ao_config_get();
                        if (ao_flight_accel < ao_config.accel_zero_g - ACCEL_NOSE_UP) {
 
                        ao_config_get();
                        if (ao_flight_accel < ao_config.accel_zero_g - ACCEL_NOSE_UP) {
 
@@ -229,7 +229,7 @@ ao_flight(void)
                                 */
                                ao_telemetry_set_interval(AO_TELEMETRY_INTERVAL_PAD);
 
                                 */
                                ao_telemetry_set_interval(AO_TELEMETRY_INTERVAL_PAD);
 
-                               ao_flight_state = ao_flight_launchpad;
+                               ao_flight_state = ao_flight_pad;
                                ao_wakeup(DATA_TO_XDATA(&ao_flight_state));
                        } else {
                                ao_flight_state = ao_flight_idle;
                                ao_wakeup(DATA_TO_XDATA(&ao_flight_state));
                        } else {
                                ao_flight_state = ao_flight_idle;
@@ -242,7 +242,7 @@ ao_flight(void)
                        /* signal successful initialization by turning off the LED */
                        ao_led_off(AO_LED_RED);
                        break;
                        /* signal successful initialization by turning off the LED */
                        ao_led_off(AO_LED_RED);
                        break;
-               case ao_flight_launchpad:
+               case ao_flight_pad:
 
                        /* Trim velocity
                         *
 
                        /* Trim velocity
                         *
@@ -283,7 +283,7 @@ ao_flight(void)
                        break;
                case ao_flight_boost:
 
                        break;
                case ao_flight_boost:
 
-                       /* boost to coast:
+                       /* boost to fast:
                         *
                         * accelerometer: start to fall at > 1/4 G
                         *              OR
                         *
                         * accelerometer: start to fall at > 1/4 G
                         *              OR
@@ -296,14 +296,14 @@ ao_flight(void)
                        if (ao_flight_accel > ao_ground_accel + (ACCEL_G >> 2) ||
                            (int16_t) (ao_flight_tick - ao_launch_tick) > BOOST_TICKS_MAX)
                        {
                        if (ao_flight_accel > ao_ground_accel + (ACCEL_G >> 2) ||
                            (int16_t) (ao_flight_tick - ao_launch_tick) > BOOST_TICKS_MAX)
                        {
-                               ao_flight_state = ao_flight_coast;
+                               ao_flight_state = ao_flight_fast;
                                ao_wakeup(DATA_TO_XDATA(&ao_flight_state));
                                break;
                        }
                        break;
                                ao_wakeup(DATA_TO_XDATA(&ao_flight_state));
                                break;
                        }
                        break;
-               case ao_flight_coast:
+               case ao_flight_fast:
 
 
-                       /* coast to apogee detect:
+                       /* fast to coast:
                         *
                         * accelerometer: integrated velocity < 200 m/s
                         *               OR
                         *
                         * accelerometer: integrated velocity < 200 m/s
                         *               OR
index f4731aa8718a9ef326134e379cda363f8fbfa08c..fde38dc334b2ccbbdc43902eba076b27241937e4 100644 (file)
@@ -48,9 +48,9 @@ struct ao_adc {
 enum ao_flight_state {
        ao_flight_startup = 0,
        ao_flight_idle = 1,
 enum ao_flight_state {
        ao_flight_startup = 0,
        ao_flight_idle = 1,
-       ao_flight_launchpad = 2,
+       ao_flight_pad = 2,
        ao_flight_boost = 3,
        ao_flight_boost = 3,
-       ao_flight_coast = 4,
+       ao_flight_fast = 4,
        ao_flight_apogee = 5,
        ao_flight_drogue = 6,
        ao_flight_main = 7,
        ao_flight_apogee = 5,
        ao_flight_drogue = 6,
        ao_flight_main = 7,
@@ -105,7 +105,7 @@ void
 ao_sleep(void *wchan);
 
 const char const * const ao_state_names[] = {
 ao_sleep(void *wchan);
 
 const char const * const ao_state_names[] = {
-       "startup", "idle", "pad", "boost", "coast",
+       "startup", "idle", "pad", "boost", "fast",
        "apogee", "drogue", "main", "landed", "invalid"
 };
 
        "apogee", "drogue", "main", "landed", "invalid"
 };
 
index e52b29281a3a1d46d614fd8c282b294b6afc22cc..8885ea4e8b13f8196a7132247e6e47ec3c9b2cac 100644 (file)
@@ -20,9 +20,9 @@
 static const char * __xdata flight_reports[] = {
        "...",          /* startup, 'S' */
        "..",           /* idle 'I' */
 static const char * __xdata flight_reports[] = {
        "...",          /* startup, 'S' */
        "..",           /* idle 'I' */
-       ".--.",         /* launchpad 'P' */
+       ".--.",         /* pad 'P' */
        "-...",         /* boost 'B' */
        "-...",         /* boost 'B' */
-       "-.-.",         /* coast 'C' */
+       "..-.",         /* fast 'F' */
        ".-",           /* apogee 'A' */
        "-..",          /* drogue 'D' */
        "--",           /* main 'M' */
        ".-",           /* apogee 'A' */
        "-..",          /* drogue 'D' */
        "--",           /* main 'M' */
index 96b4c1a4645dad1feb1ad40608ba7597a51f6db7..c34435037cc4fef9b533268c3659216037e6f18e 100644 (file)
@@ -18,6 +18,6 @@
 #include "ao.h"
 
 const char const * const ao_state_names[] = {
 #include "ao.h"
 
 const char const * const ao_state_names[] = {
-       "startup", "idle", "pad", "boost", "coast",
+       "startup", "idle", "pad", "boost", "fast",
        "apogee", "drogue", "main", "landed", "invalid"
 };
        "apogee", "drogue", "main", "landed", "invalid"
 };