Index: firmware/App/Drivers/PressureSensor.c =================================================================== diff -u -r3a5cc585b69ffa194e3601a005915d23b48bd865 -r7e4bcfd25226dcac849ba52f417fd08865d04c2c --- firmware/App/Drivers/PressureSensor.c (.../PressureSensor.c) (revision 3a5cc585b69ffa194e3601a005915d23b48bd865) +++ firmware/App/Drivers/PressureSensor.c (.../PressureSensor.c) (revision 7e4bcfd25226dcac849ba52f417fd08865d04c2c) @@ -33,6 +33,7 @@ #define COUNTS_TO_MILLI_BAR 100 ///< Counts to milli-bar conversion. #define BAR_TO_MMHG ( 750.062F ) ///< Conversion factor for converting bar to mmHg. #define PRES_SENSORS_READ_ERR_MAX_CNT 0xFF ///< Pressure sensor read and error max count value +#define PRES_MIN_PSI_ALPHA 0.0F #define PRES_MIN_PSI -14.5038F ///< Minimum value for PSI conversion #define HIGH_PRES_MAX_PSI 145.038F ///< Maximum range of pressure sensors (in PSI) @@ -99,12 +100,12 @@ // Update and convert raw pressures to mmHg currentPressureReadings[ M1_PRES ].data = convertPressureReading( getFPGAM1RawPressure(), PRES_MIN_PSI, HIGH_PRES_MAX_PSI ); currentPressureReadings[ M3_PRES ].data = convertPressureReading( getFPGAM3RawPressure(), PRES_MIN_PSI, HIGH_PRES_MAX_PSI ); - currentPressureReadings[ P8_PRES ].data = convertPressureReading( getFPGAP8RawPressure(), PRES_MIN_PSI, HIGH_PRES_MAX_PSI ); + currentPressureReadings[ P8_PRES ].data = convertPressureReading( getFPGAP8RawPressure(), PRES_MIN_PSI_ALPHA, HIGH_PRES_MAX_PSI ); currentPressureReadings[ P13_PRES ].data = convertPressureReading( getFPGAP13RawPressure(), PRES_MIN_PSI, HIGH_PRES_MAX_PSI ); currentPressureReadings[ P17_PRES ].data = convertPressureReading( getFPGAP17RawPressure(), PRES_MIN_PSI, HIGH_PRES_MAX_PSI ); - currentPressureReadings[ X1_PRES ].data = convertPressureReading( getFPGAX1RawPressure(), PRES_MIN_PSI, HIGH_PRES_MAX_PSI ); + currentPressureReadings[ X1_PRES ].data = convertPressureReading( getFPGAX1RawPressure(), PRES_MIN_PSI_ALPHA, HIGH_PRES_MAX_PSI ); currentPressureReadings[ X2_PRES ].data = convertPressureReading( getFPGAX2RawPressure(), PRES_MIN_PSI, HIGH_PRES_MAX_PSI ); - currentPressureReadings[ X3_PRES ].data = convertPressureReading( getFPGAX3RawPressure(), PRES_MIN_PSI, HIGH_PRES_MAX_PSI ); + currentPressureReadings[ X3_PRES ].data = convertPressureReading( getFPGAX3RawPressure(), PRES_MIN_PSI_ALPHA, HIGH_PRES_MAX_PSI ); currentPressureReadings[ X4_PRES ].data = convertPressureReading( getFPGAX4RawPressure(), PRES_MIN_PSI, HIGH_PRES_MAX_PSI ); // Update and convert raw pressure sensor temperatures to deg C