This can control an external recording device to log data only during ascent.
Signed-off-by: Keith Packard <keithp@keithp.com>
ao_wakeup(&ao_gps_data);
ao_wakeup(&ao_gps_tracking_data);
#endif
ao_wakeup(&ao_gps_data);
ao_wakeup(&ao_gps_tracking_data);
#endif
+#ifdef ASCENT_PIN
+ ASCENT_PIN = 0;
+#endif
ao_wakeup(DATA_TO_XDATA(&ao_flight_state));
break;
ao_wakeup(DATA_TO_XDATA(&ao_flight_state));
break;
/* Turn the RDF beacon back on */
ao_rdf_set(1);
/* Turn the RDF beacon back on */
ao_rdf_set(1);
+#ifdef ASCENT_PIN
+ ASCENT_PIN = 1;
+#endif
/*
* Start recording min/max height
* to figure out when the rocket has landed
/*
* Start recording min/max height
* to figure out when the rocket has landed
void
ao_flight_init(void)
{
void
ao_flight_init(void)
{
+#ifdef ASCENT_SIGNAL
+ ASCENT_SIGNAL = 1;
+ ASCENT_SIGNAL_DIR |= (1 << ASCENT_SIGNAL_PIN);
+ ASCENT_SIGNAL_SEL &= ~(1 << ASCENT_SIGNAL_PIN);
+#endif
ao_flight_state = ao_flight_startup;
ao_add_task(&flight_task, ao_flight, "flight");
}
ao_flight_state = ao_flight_startup;
ao_add_task(&flight_task, ao_flight, "flight");
}
#define M25_MAX_CHIPS 1
#define HAS_ACCEL 1
#define HAS_IGNITE 1
#define M25_MAX_CHIPS 1
#define HAS_ACCEL 1
#define HAS_IGNITE 1
+
+ #define ASCENT_SIGNAL P1_2 /* Use CS1 to signal ascent */
+ #define ASCENT_SIGNAL_DIR P1DIR
+ #define ASCENT_SIGNAL_SEL P1SEL
+ #define ASCENT_SIGNAL_PIN 2
#endif
#if defined(TELEDONGLE_V_0_2)
#endif
#if defined(TELEDONGLE_V_0_2)