#define HAS_MPU6000 1
#define HAS_MMA655X 1
#define HAS_HMC5883 1
+#define HAS_BEEP 1
+#define AO_CONFIG_MAX_SIZE 1024
struct ao_adc {
int16_t sense[AO_ADC_NUM_SENSE];
int16_t v_batt;
int16_t v_pbatt;
- int16_t accel_ref;
- int16_t accel;
int16_t temp;
};
#else
#if TELEMEGA
#include "ao_convert_pa.c"
#include <ao_ms5607.h>
-struct ao_ms5607_prom ms5607_prom;
+struct ao_ms5607_prom ao_ms5607_prom;
#include "ao_ms5607_convert.c"
#define AO_PYRO_NUM 4
#include <ao_pyro.h>
#include "ao_convert.c"
#endif
-struct ao_config {
- uint16_t main_deploy;
- int16_t accel_plus_g;
- int16_t accel_minus_g;
- uint8_t pad_orientation;
- uint16_t apogee_lockout;
-#if TELEMEGA
- struct ao_pyro pyro[AO_PYRO_NUM]; /* minor version 12 */
- int16_t accel_zero_along;
- int16_t accel_zero_across;
- int16_t accel_zero_through;
-#endif
-};
-
-#define AO_PAD_ORIENTATION_ANTENNA_UP 0
-#define AO_PAD_ORIENTATION_ANTENNA_DOWN 1
+#include <ao_config.h>
+#include <ao_fake_flight.h>
#define ao_config_get()
continue;
} else if (nword == 3 && strcmp(words[0], "ms5607") == 0) {
if (strcmp(words[1], "reserved:") == 0)
- ms5607_prom.reserved = strtoul(words[2], NULL, 10);
+ ao_ms5607_prom.reserved = strtoul(words[2], NULL, 10);
else if (strcmp(words[1], "sens:") == 0)
- ms5607_prom.sens = strtoul(words[2], NULL, 10);
+ ao_ms5607_prom.sens = strtoul(words[2], NULL, 10);
else if (strcmp(words[1], "off:") == 0)
- ms5607_prom.off = strtoul(words[2], NULL, 10);
+ ao_ms5607_prom.off = strtoul(words[2], NULL, 10);
else if (strcmp(words[1], "tcs:") == 0)
- ms5607_prom.tcs = strtoul(words[2], NULL, 10);
+ ao_ms5607_prom.tcs = strtoul(words[2], NULL, 10);
else if (strcmp(words[1], "tco:") == 0)
- ms5607_prom.tco = strtoul(words[2], NULL, 10);
+ ao_ms5607_prom.tco = strtoul(words[2], NULL, 10);
else if (strcmp(words[1], "tref:") == 0)
- ms5607_prom.tref = strtoul(words[2], NULL, 10);
+ ao_ms5607_prom.tref = strtoul(words[2], NULL, 10);
else if (strcmp(words[1], "tempsens:") == 0)
- ms5607_prom.tempsens = strtoul(words[2], NULL, 10);
+ ao_ms5607_prom.tempsens = strtoul(words[2], NULL, 10);
else if (strcmp(words[1], "crc:") == 0)
- ms5607_prom.crc = strtoul(words[2], NULL, 10);
+ ao_ms5607_prom.crc = strtoul(words[2], NULL, 10);
continue;
} else if (nword >= 3 && strcmp(words[0], "Pyro") == 0) {
int p = strtoul(words[1], NULL, 10);
pyro->flags |= ao_pyro_values[j].flag;
if (ao_pyro_values[j].offset != NO_VALUE && i + 1 < nword) {
int16_t val = strtoul(words[++i], NULL, 10);
+ printf("pyro %d condition %s value %d\n", p, words[i-1], val);
*((int16_t *) ((char *) pyro + ao_pyro_values[j].offset)) = val;
}
}
emulator_in = f;
emulator_info = info;
ao_summary = summary;
+
ao_flight_init();
ao_flight();
}