Index: firmware/App/Controllers/BloodFlow.h =================================================================== diff -u -r8466e63f95f65a3ffb18c3af85ac99328e41167b -r8bd1ae47aa13a843aa8abd6321ddc050deacb4a6 --- firmware/App/Controllers/BloodFlow.h (.../BloodFlow.h) (revision 8466e63f95f65a3ffb18c3af85ac99328e41167b) +++ firmware/App/Controllers/BloodFlow.h (.../BloodFlow.h) (revision 8bd1ae47aa13a843aa8abd6321ddc050deacb4a6) @@ -1,17 +1,17 @@ /************************************************************************** * -* Copyright (c) 2019-2020 Diality Inc. - All Rights Reserved. +* Copyright (c) 2019-2021 Diality Inc. - All Rights Reserved. * * THIS CODE MAY NOT BE COPIED OR REPRODUCED IN ANY FORM, IN PART OR IN * WHOLE, WITHOUT THE EXPLICIT PERMISSION OF THE COPYRIGHT OWNER. * -* @file BloodFlow.h +* @file BloodFlow.h * -* @author (last) Sean Nash -* @date (last) 26-Aug-2020 +* @author (last) Sean Nash +* @date (last) 13-Aug-2021 * -* @author (original) Sean Nash -* @date (original) 07-Nov-2019 +* @author (original) Sean Nash +* @date (original) 07-Nov-2019 * ***************************************************************************/ @@ -35,7 +35,7 @@ #define MIN_SET_BLOOD_FLOW_RATE 100 ///< Minimum blood flow rate (in mL/min). #define SALINE_BOLUS_FLOW_RATE 150 ///< Saline bolus flow rate (in mL/min). -#define VOLUME_PER_BP_MOTOR_REV_ML 0.2 ///< Theoretical volume (mL) of blood/saline volume per motor revolution. +#define VOLUME_PER_BP_MOTOR_REV_ML 0.216 ///< Theoretical volume (mL) of blood/saline volume per motor revolution. #define BP_HALL_EDGE_COUNTS_PER_REV 48 ///< Number of hall sensor edge counts per motor revolution. /// Payload record structure for a blood pump data message. @@ -48,7 +48,7 @@ F32 measMCSpd; F32 measMCCurr; F32 pwmDC; - F32 flowSigStrength; + U32 rotorCount; } BLOOD_PUMP_STATUS_PAYLOAD_T; // ********** public function prototypes ********** @@ -63,12 +63,13 @@ BOOL homeBloodPump( void ); U32 getBloodPumpMotorCount( void ); U32 getBloodPumpRotorCount( void ); -BOOL isBloodPumpRunning( void ); +BOOL isBloodPumpRunning( void ); +void resetBloodPumpRotorCount( void ); SELF_TEST_STATUS_T execBloodFlowTest( void ); - + +S32 getTargetBloodFlowRate( void ); F32 getMeasuredBloodFlowRate( void ); -F32 getMeasuredBloodFlowSignalStrength( void); F32 getMeasuredBloodPumpRotorSpeed( void ); F32 getMeasuredBloodPumpSpeed( void ); F32 getMeasuredBloodPumpMCSpeed( void ); @@ -87,8 +88,8 @@ BOOL testResetMeasuredBloodPumpMCSpeedOverride( void ); BOOL testSetMeasuredBloodPumpMCCurrentOverride( F32 value ); BOOL testResetMeasuredBloodPumpMCCurrentOverride( void ); -BOOL testSetMeasuredBloodFlowSignalStrengthOverride( F32 value ); -BOOL testResetMeasuredBloodFlowSignalStrengthOverride( void ); +BOOL testSetBloodPumpRotorCountOverride( U32 value ); +BOOL testResetBloodPumpRotorCountOverride( void ); /**@}*/