X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=src%2Feasymotor-v3%2Fao_pins.h;h=a0e40bd7ba5d326a7591d4da75bd13dfef5fed79;hb=e4ce0ce186b68497cfb14a400410fdd38aa93abc;hp=c54c7f0e3d581eebe5003e3258872acabd1c72ac;hpb=72d0c00a063338642a3448f39b0308751285e5ee;p=fw%2Faltos diff --git a/src/easymotor-v3/ao_pins.h b/src/easymotor-v3/ao_pins.h index c54c7f0e..a0e40bd7 100644 --- a/src/easymotor-v3/ao_pins.h +++ b/src/easymotor-v3/ao_pins.h @@ -62,10 +62,10 @@ #define HAS_PAD_REPORT 1 /* Beeper is on pio0_1 ct32b0_mat2 */ -#define BEEPER_PORT 0 -#define BEEPER_PIN 1 -#define BEEPER_TIMER 0 -#define BEEPER_OUTPUT 2 +#define AO_LPC_BEEP_PORT 0 +#define AO_LPC_BEEP_PIN 1 +#define AO_LPC_BEEP_TIMER 0 +#define AO_LPC_BEEP_CHANNEL 2 #define HAS_RADIO 0 #define HAS_TELEMETRY 0 @@ -90,10 +90,6 @@ #define AO_DATA_RING 32 -struct ao_adc { - int16_t v_batt; - int16_t motor_pressure; -}; #define AO_ADC_DUMP(p) \ printf("tick: %5lu batt: %5d motor_pressure: %5d\n", \ @@ -152,10 +148,26 @@ struct ao_adc { #define HAS_IMU 1 #define USE_ADXL375_IMU 1 +#define HAS_KALMAN 0 + /* Motor pressure */ #define HAS_MOTOR_PRESSURE 1 #define ao_data_motor_pressure(packet) ((packet)->adc.motor_pressure) typedef int16_t motor_pressure_t; +/* want about 50psi, or 344kPa for boost and 30psi for coast */ + +#define AO_FULL_SCALE_PRESSURE 11031612 /* 1600psi */ +#define AO_BOOST_DETECT_PRESSURE 344000 /* 50psi */ +#define AO_QUIET_DETECT_PRESSURE 207000 /* 30psi */ + +#define AO_PRESSURE_VOLTS_BASE 0.5 +#define AO_PRESSURE_VOLTS_MAX 4.5 + +struct ao_adc { + int16_t v_batt; + int16_t motor_pressure; +}; + #endif /* _AO_PINS_H_ */