X-Git-Url: https://git.gag.com/?p=fw%2Faltos;a=blobdiff_plain;f=src%2Feasymotor-v2%2Fao_pins.h;h=0fa037b3b73dfe5866c3d393847d384e14d70249;hp=497df40436cc4eb6c3d436be2ed6605591a267d2;hb=7f46240dfc57164f0c1b0c4c4ed9695bca63860d;hpb=fa4bb77064a2606e82091e3e533dac897912c627 diff --git a/src/easymotor-v2/ao_pins.h b/src/easymotor-v2/ao_pins.h index 497df404..0fa037b3 100644 --- a/src/easymotor-v2/ao_pins.h +++ b/src/easymotor-v2/ao_pins.h @@ -53,7 +53,7 @@ #define SERIAL_3_PC10_PC11 0 #define SERIAL_3_PD8_PD9 0 -#define AO_CONFIG_DEFAULT_FLIGHT_LOG_MAX (512 * 1024) +#define AO_CONFIG_DEFAULT_FLIGHT_LOG_MAX (1984 * 1024) #define AO_CONFIG_MAX_SIZE 1024 #define LOG_ERASE_MARK 0x55 #define LOG_MAX_ERASE 128 @@ -67,11 +67,12 @@ #define AO_PA11_PA12_RMP 1 #define HAS_BEEP 1 #define HAS_BATTERY_REPORT 1 -#define BEEPER_CHANNEL 4 -#define BEEPER_TIMER 3 -#define BEEPER_PORT (&stm_gpiob) -#define BEEPER_PIN 1 -#define BEEPER_AFR STM_AFR_AF1 +#define HAS_PAD_REPORT 1 +#define BEEPER_CHANNEL 3 +#define BEEPER_TIMER 2 +#define BEEPER_PORT (&stm_gpioa) +#define BEEPER_PIN 2 +#define BEEPER_AFR STM_AFR_AF2 #define HAS_RADIO 0 #define HAS_TELEMETRY 0 @@ -103,14 +104,14 @@ #define AO_DATA_RING 64 struct ao_adc { - int16_t pressure; + int16_t motor_pressure; int16_t v_batt; }; #define AO_ADC_DUMP(p) \ - printf("tick: %5u pressure: %5d batt: %5d\n", \ + printf("tick: %5lu motor_pressure: %5d batt: %5d\n", \ (p)->tick, \ - (p)->adc.pressure, \ + (p)->adc.motor_pressure, \ (p)->adc.v_batt); @@ -156,8 +157,15 @@ struct ao_adc { #define AO_ADXL375_AXIS x #define AO_ADXL375_ACROSS_AXIS y -#define AO_ADXL375_INVERT 1 +#define AO_ADXL375_THROUGH_AXIS z +#define AO_ADXL375_INVERT 0 #define HAS_IMU 1 #define USE_ADXL375_IMU 1 +/* Motor pressure */ +#define HAS_MOTOR_PRESSURE 1 +#define ao_data_motor_pressure(packet) ((packet)->adc.motor_pressure) + +typedef int16_t motor_pressure_t; + #endif /* _AO_PINS_H_ */