altos: Add motor pressure calibration data to easy motor log
[fw/altos] / src / easymotor-v2 / ao_pins.h
index 6ea08e1a13ee7080a57aa368955b97746e18c18b..1d970e1927df605d35743c0539f237ee743422b5 100644 (file)
 #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);
 
 
@@ -162,4 +162,10 @@ struct ao_adc {
 #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_ */