Index: firmware/App/Monitors/Pressures.c =================================================================== diff -u -rf979c391268b595e44fb6747d43487e4d2294e68 -r505bb60b1df9cedd1277e6aa81cbeb9a620e44a5 --- firmware/App/Monitors/Pressures.c (.../Pressures.c) (revision f979c391268b595e44fb6747d43487e4d2294e68) +++ firmware/App/Monitors/Pressures.c (.../Pressures.c) (revision 505bb60b1df9cedd1277e6aa81cbeb9a620e44a5) @@ -51,6 +51,8 @@ /// Pressure Limit minimum stabilization time before short stabilization time activation static const U32 PRES_LIMIT_MIN_STABILIZATION_TIME_IN_MS = ( PRES_LIMIT_STABILIZATION_TIME_MS - PRES_LIMIT_SHORT_STABILIZE_TIME_MS ); +#define PSI_TO_MMHG ( 51.715F ) ////< Conversion constant for PSI to mmHg + #define VENOUS_PRESSURE_MIN_PSI ( -30.0F ) ///< Minimum of scale for venous pressure sensor reading (in PSI). #define VENOUS_PRESSURE_MAX_PSI ( 30.0F ) ///< Maximum of scale for venous pressure sensor reading (in PSI). #define MIN_VENOUS_PRESSURE_FOR_RAMP_MMHG ( 0.0F ) ///< Minimum venous pressure during blood pump ramp up (in mmHg). @@ -557,7 +559,7 @@ filterBaroPressureReadings( fpgaBaroPresPSI ); // Get latest dialysate pressure so we can calculate TMP - tmpPressure.data = getLongFilteredVenousPressure() - getDialysatePressure(); + tmpPressure.data = getFilteredVenousPressure() - ( getDialysatePressure() * PSI_TO_MMHG ); // Handle pressure limits state machine execPressureLimits();