Index: firmware/App/Controllers/DialInFlow.h =================================================================== diff -u -r13a064292b5a36a85593f53eabae268ae2bf4bc6 -r8639aa012127798aeb8fd719dd7f93b83275f944 --- firmware/App/Controllers/DialInFlow.h (.../DialInFlow.h) (revision 13a064292b5a36a85593f53eabae268ae2bf4bc6) +++ firmware/App/Controllers/DialInFlow.h (.../DialInFlow.h) (revision 8639aa012127798aeb8fd719dd7f93b83275f944) @@ -14,27 +14,28 @@ * @date (original) 16-Dec-2019 * ***************************************************************************/ - -#ifndef __DIALYSATE_IN_FLOW_H__ -#define __DIALYSATE_IN_FLOW_H__ - -#include "HDCommon.h" - -/** - * @defgroup DialysateInletFlow DialysateInletFlow - * @brief Dialysate Inlet Pump & Dialysate Flow controller/monitor module. - * Monitors the dialysate flow rate and controls the dialysate inlet pump. - * - * @addtogroup DialysateInletFlow - * @{ - */ - -// ********** public definitions ********** - -#define MAX_DIAL_IN_FLOW_RATE 600 ///< Maximum dialysate inlet flow rate (in mL/min). -#define MIN_DIAL_IN_FLOW_RATE 100 ///< Minimum dialysate inlet flow rate (in mL/min). + +#ifndef __DIALYSATE_IN_FLOW_H__ +#define __DIALYSATE_IN_FLOW_H__ + +#include "HDCommon.h" + +/** + * @defgroup DialysateInletFlow DialysateInletFlow + * @brief Dialysate Inlet Pump & Dialysate Flow controller/monitor module. + * Monitors the dialysate flow rate and controls the dialysate inlet pump. + * + * @addtogroup DialysateInletFlow + * @{ + */ + +// ********** public definitions ********** + +#define MAX_DIAL_IN_FLOW_RATE 600 ///< Maximum dialysate inlet flow rate (in mL/min). +#define MIN_DIAL_IN_FLOW_RATE 100 ///< Minimum dialysate inlet flow rate (in mL/min). #define DIALYSATE_FLOW_RATE_FOR_RECIRC 250 ///< Dialysate recirculation flow rate (in mL/min). - +#define MIN_DG_DIAL_FLOW_RATE 10.0F ///< Minimum DG Dialysate Flow Rate (mL/Min) + /// Payload record structure for a dialysate inlet pump data message. typedef struct { @@ -50,50 +51,50 @@ U32 rotorHall; ///< Rotor hall in counts. } DIALIN_PUMP_STATUS_PAYLOAD_T; -// ********** public function prototypes ********** - -void initDialInFlow( void ); -void execDialInFlowMonitor( void ); -void execDialInFlowController( void ); - -BOOL setDialInPumpTargetFlowRate( U32 flowRate, MOTOR_DIR_T dir, PUMP_CONTROL_MODE_T mode ); +// ********** public function prototypes ********** + +void initDialInFlow( void ); +void execDialInFlowMonitor( void ); +void execDialInFlowController( void ); + +BOOL setDialInPumpTargetFlowRate( U32 flowRate, MOTOR_DIR_T dir, PUMP_CONTROL_MODE_T mode ); BOOL setDialInPumpTargetRPM( U32 rpm, MOTOR_DIR_T dir ); -void signalDialInPumpHardStop( void ); +void signalDialInPumpHardStop( void ); void signalDialInPumpRotorHallSensor( void ); -BOOL homeDialInPump( void ); +BOOL homeDialInPump( void ); BOOL isDialInPumpRunning( void ); BOOL isDialInPumpRampComplete( void ); void resetDialInPumpRotorCount( void ); - -SELF_TEST_STATUS_T execDialInFlowTest( void ); - -S32 getTargetDialInFlowRate( void ); + +SELF_TEST_STATUS_T execDialInFlowTest( void ); + +S32 getTargetDialInFlowRate( void ); F32 getMeasuredDialInFlowRate( void ); -F32 getMeasuredDialInPumpRotorSpeed( void ); -F32 getMeasuredDialInPumpSpeed( void ); -F32 getMeasuredDialInPumpMCSpeed( void ); +F32 getMeasuredDialInPumpRotorSpeed( void ); +F32 getMeasuredDialInPumpSpeed( void ); +F32 getMeasuredDialInPumpMCSpeed( void ); F32 getMeasuredDialInPumpMCCurrent( void ); F32 getDialInPumpPWMDutyCyclePct( BOOL init ); U32 getDialInPumpRotorCount( void ); U32 getPumpRotorErrorPersistTime( F32 mtr_speed, F32 gear_ratio ); - -BOOL testSetDialInFlowDataPublishIntervalOverride( U32 value ); -BOOL testResetDialInFlowDataPublishIntervalOverride( void ); -BOOL testSetTargetDialInFlowRateOverride( S32 value, U32 ctrlMode ); -BOOL testSetMeasuredDialInFlowRateOverride( F32 value ); -BOOL testResetMeasuredDialInFlowRateOverride( void ); -BOOL testSetMeasuredDialInPumpRotorSpeedOverride( F32 value ); -BOOL testResetMeasuredDialInPumpRotorSpeedOverride( void ); -BOOL testSetMeasuredDialInPumpSpeedOverride( F32 value ); -BOOL testResetMeasuredDialInPumpSpeedOverride( void ); -BOOL testSetMeasuredDialInPumpMCSpeedOverride( F32 value ); -BOOL testResetMeasuredDialInPumpMCSpeedOverride( void ); -BOOL testSetMeasuredDialInPumpMCCurrentOverride( F32 value ); + +BOOL testSetDialInFlowDataPublishIntervalOverride( U32 value ); +BOOL testResetDialInFlowDataPublishIntervalOverride( void ); +BOOL testSetTargetDialInFlowRateOverride( S32 value, U32 ctrlMode ); +BOOL testSetMeasuredDialInFlowRateOverride( F32 value ); +BOOL testResetMeasuredDialInFlowRateOverride( void ); +BOOL testSetMeasuredDialInPumpRotorSpeedOverride( F32 value ); +BOOL testResetMeasuredDialInPumpRotorSpeedOverride( void ); +BOOL testSetMeasuredDialInPumpSpeedOverride( F32 value ); +BOOL testResetMeasuredDialInPumpSpeedOverride( void ); +BOOL testSetMeasuredDialInPumpMCSpeedOverride( F32 value ); +BOOL testResetMeasuredDialInPumpMCSpeedOverride( void ); +BOOL testSetMeasuredDialInPumpMCCurrentOverride( F32 value ); BOOL testResetMeasuredDialInPumpMCCurrentOverride( void ); BOOL testSetDialInPumpTargetDutyCycle( F32 value ); BOOL testSetDialysateInPumpRotorCountOverride( U32 value ); -BOOL testResetDialysateInPumpRotorCountOverride( void ); - -/**@}*/ - -#endif +BOOL testResetDialysateInPumpRotorCountOverride( void ); + +/**@}*/ + +#endif