X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=src%2Ftelemega-v6.0%2Fao_pins.h;h=8e9be45d8c5831c0e1d0727d16f49a3f49feff3b;hb=d6bdabbdfa0cd3854e67fd363dc1bb4bd14e68d9;hp=da1dd15f1f95902622b6ee26af44997673b72191;hpb=7b40813fdafce4ebd635aceb4c32355339a4d98d;p=fw%2Faltos diff --git a/src/telemega-v6.0/ao_pins.h b/src/telemega-v6.0/ao_pins.h index da1dd15f..8e9be45d 100644 --- a/src/telemega-v6.0/ao_pins.h +++ b/src/telemega-v6.0/ao_pins.h @@ -83,9 +83,6 @@ #define BEEPER_CHANNEL 2 #define BEEPER_PORT (&stm_gpioe) #define BEEPER_PIN 4 -#define AO_BEEP_MID_DEFAULT 179 /* 2100 Hz */ -#define AO_BEEP_MAKE_LOW(m) ((uint8_t) ((m) * 197U/179U)) /* 1900 Hz */ -#define AO_BEEP_MAKE_HIGH(m) ((uint8_t) ((m) * 163U/179U)) /* 2300 Hz */ #define HAS_BATTERY_REPORT 1 #define HAS_RADIO 1 #define HAS_TELEMETRY 1 @@ -268,6 +265,12 @@ struct ao_adc { #define AO_BATTERY_DIV_PLUS 56 /* 5.6k */ #define AO_BATTERY_DIV_MINUS 100 /* 10k */ +/* + * Voltage divider on ADC pyro battery sampler + */ +#define AO_PYRO_BATTERY_DIV_PLUS 100 /* 100k */ +#define AO_PYRO_BATTERY_DIV_MINUS 27 /* 27k */ + /* * Voltage divider on ADC igniter samplers */ @@ -330,21 +333,28 @@ struct ao_adc { /* * - * If the board is laying component side up with - * the antenna (nose) pointing north + * Here are the required sensor signs: + * + * +along nose up + * +across USB down + * +through TH down * - * +along north +roll left up - * +across west +pitch nose down - * +through up +yaw left turn + * With the board aligned to have positive accel for the relevant + * axis, looking down from above we have: + * + * +roll counter clockwise (nose up) + * +pitch counter clockwise (USB down) + * +yaw counter clockwise (TH down) */ /* - * bmi088 - * - * pin 1 NE corner of chip + * On TMega v6, bmi088 pin 1 (NE corner of chip) is placed towards the + * USB and antenna edges of the board. Relative to bmi088 specs, to + * get the above values, we need to flip the Y axis, assigning values + * as follows: * - * +along +Y +roll +Y - * +across -X +pitch -X + * +along +X +roll +X + * +across -Y +pitch -Y * +through +Z +yaw +Z */ @@ -356,12 +366,12 @@ struct ao_adc { #define AO_BMI088_GYR_CS_PIN 13 #define HAS_IMU 1 -#define ao_bmi088_along(m) ((m)->acc.y) -#define ao_bmi088_across(m) (-(m)->acc.x) +#define ao_bmi088_along(m) ((m)->acc.x) +#define ao_bmi088_across(m) (-(m)->acc.y) #define ao_bmi088_through(m) ((m)->acc.z) -#define ao_bmi088_roll(m) ((m)->gyr.y) -#define ao_bmi088_pitch(m) (-(m)->gyr.x) +#define ao_bmi088_roll(m) ((m)->gyr.x) +#define ao_bmi088_pitch(m) (-(m)->gyr.y) #define ao_bmi088_yaw(m) ((m)->gyr.z) #define ao_data_along(packet) ao_bmi088_along(&(packet)->bmi088)