X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=src%2Feasymotor-v2%2Fao_pins.h;h=1d970e1927df605d35743c0539f237ee743422b5;hb=db449c108431cb45bcc572b3a9f6c8b945695e16;hp=8930a46e110916d634da819c930751dd2a8b7430;hpb=6740c19d0f141342e377284a013835b2bb133f2f;p=fw%2Faltos diff --git a/src/easymotor-v2/ao_pins.h b/src/easymotor-v2/ao_pins.h index 8930a46e..1d970e19 100644 --- a/src/easymotor-v2/ao_pins.h +++ b/src/easymotor-v2/ao_pins.h @@ -67,6 +67,7 @@ #define AO_PA11_PA12_RMP 1 #define HAS_BEEP 1 #define HAS_BATTERY_REPORT 1 +#define HAS_PAD_REPORT 1 #define BEEPER_CHANNEL 3 #define BEEPER_TIMER 2 #define BEEPER_PORT (&stm_gpioa) @@ -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: %5u 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_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_ */