Index: firmware/App/Drivers/PressureSensor.c =================================================================== diff -u -r322747d530c1b8205be257557e53dcfe9caad50a -rafb05eebd86337012af4f6a9d21cb9a1e7f5f16a --- firmware/App/Drivers/PressureSensor.c (.../PressureSensor.c) (revision 322747d530c1b8205be257557e53dcfe9caad50a) +++ firmware/App/Drivers/PressureSensor.c (.../PressureSensor.c) (revision afb05eebd86337012af4f6a9d21cb9a1e7f5f16a) @@ -32,7 +32,11 @@ #define PRES_SENSORS_COUNT_ERROR_TIMEOUT_MS ( 2 * MS_PER_SECOND ) ///< Pressure sensors read and error count timeout in milliseconds. #define HIGH_PRES_MAX_PSI 145.038F ///< Convert pressure to PSI for 10 bar pressure sensor #define LOW_PRES_MAX_PSI 50.7632F ///< Convert pressure to PSI for 3.5 bar pressure sensor +#ifndef __BETA_HW_VER__ #define PRES_MIN_PSI 0.0F ///< Minimum value for PSI conversion +#else +#define PRES_MIN_PSI -14.5038F ///< Minimum value for PSI conversion +#endif #define ONE_BAR_TO_MILLI_BAR 1000 ///< 1 bar to milli-bar conversion. #define COUNTS_TO_MILLI_BAR 100 ///< Counts to milli-bar conversion. #define BAR_TO_MMHG ( 750.062F ) ///< Conversion factor for converting bar to mmHg. @@ -142,9 +146,15 @@ void readPressureSensors( void ) { // Update and convert raw pressures to mmHg +#ifndef __BETA_HW_VER__ currentPressureReadings[ M1_PRES ].data = convertPressureReading( getFPGAM1PresRawPressure(), PRES_MIN_PSI, HIGH_PRES_MAX_PSI ); currentPressureReadings[ M3_PRES ].data = convertPressureReading( getFPGAM3PresRawPressure(),PRES_MIN_PSI, HIGH_PRES_MAX_PSI ); currentPressureReadings[ D9_PRES ].data = convertPressureReading( getFPGAD9PresRawPressure(),PRES_MIN_PSI, HIGH_PRES_MAX_PSI ); +#else + currentPressureReadings[ M1_PRES ].data = convertPressureReading( getFPGAM1PresRawPressure(), PRES_MIN_PSI, LOW_PRES_MAX_PSI ); + currentPressureReadings[ M3_PRES ].data = convertPressureReading( getFPGAM3PresRawPressure(),PRES_MIN_PSI, LOW_PRES_MAX_PSI ); + currentPressureReadings[ D9_PRES ].data = convertPressureReading( getFPGAD9PresRawPressure(),PRES_MIN_PSI, LOW_PRES_MAX_PSI ); +#endif currentPressureReadings[ D66_PRES ].data = convertPressureReading( getFPGAD66PresRawPressure(), PRES_MIN_PSI, LOW_PRES_MAX_PSI ); currentPressureReadings[ D51_PRES ].data = convertPressureReading( getFPGAD51PresRawPressure(), PRES_MIN_PSI, LOW_PRES_MAX_PSI ); currentPressureReadings[ D18_PRES ].data = convertPressureReading( getFPGAD18PresRawPressure(), PRES_MIN_PSI, LOW_PRES_MAX_PSI );