Index: firmware/App/Controllers/ConcentratePumps.c =================================================================== diff -u -r9ff57b5ab7490ee5bbc2c51b25f738ee6c569ec1 -r1644c24b0b51661ceaba579e5ebee0d1d5bad85f --- firmware/App/Controllers/ConcentratePumps.c (.../ConcentratePumps.c) (revision 9ff57b5ab7490ee5bbc2c51b25f738ee6c569ec1) +++ firmware/App/Controllers/ConcentratePumps.c (.../ConcentratePumps.c) (revision 1644c24b0b51661ceaba579e5ebee0d1d5bad85f) @@ -923,6 +923,7 @@ static CONCENTRATE_PUMP_STATE_T handleConcentratePumpRampToTargetSpeedState( CONCENTRATE_PUMPS_T pumpId ) { CONCENTRATE_PUMP_STATE_T state = CONCENTRATE_PUMP_RAMP_TO_TARGET_SPEED_STATE; + //U16 currentMeasuredRev = getConcPumpCurrentMeasuredRevolutionCount( pumpId ); if ( TRUE == stepConcentratePumpToTargetSpeed( pumpId ) ) { @@ -953,6 +954,7 @@ static CONCENTRATE_PUMP_STATE_T handleConcentratePumpControlTargetSpeedState( CONCENTRATE_PUMPS_T pumpId ) { CONCENTRATE_PUMP_STATE_T state = CONCENTRATE_PUMP_CONTROL_TARGET_SPEED_STATE; + //U16 currentMeasuredRev = getConcPumpCurrentMeasuredRevolutionCount( pumpId ); F32 targetToCurreSpeedDiffMLPM = fabs( getPumpTargetSpeed( pumpId ) - concentratePumps[ pumpId ].currentPumpSpeed ); if ( ++concentratePumps[ pumpId ].controlTimerCounter >= CONCENTRATE_PUMP_CONTROL_INTERVAL ) Index: firmware/App/Controllers/DialysatePumps.c =================================================================== diff -u -rf6022e86136c821709ce24b61e11e8e2bdf0b11e -r1644c24b0b51661ceaba579e5ebee0d1d5bad85f --- firmware/App/Controllers/DialysatePumps.c (.../DialysatePumps.c) (revision f6022e86136c821709ce24b61e11e8e2bdf0b11e) +++ firmware/App/Controllers/DialysatePumps.c (.../DialysatePumps.c) (revision 1644c24b0b51661ceaba579e5ebee0d1d5bad85f) @@ -127,7 +127,6 @@ static OVERRIDE_U32_T dialysatePumpDataPublishInterval = { DIALYSATE_PUMP_DATA_PUB_INTERVAL, DIALYSATE_PUMP_DATA_PUB_INTERVAL, 0, 0 }; ///< Interval (in ms) at which to publish dialysate pump data to CAN bus. - //static DD_DIALYSATE_PUMP_CAL_RECORD_T dialysatePumpCalRecord; ///< Dialysate pump calibration record. static DIALYSATE_PUMP_DATA_T dialysatePumps[ NUM_OF_DIALYSATE_PUMPS ]; ///< Array of dialysate pumps data structure. static OVERRIDE_F32_T pumpTargetSpeed[ NUM_OF_DIALYSATE_PUMPS ]; ///< Target dialysate pumps' speed (mL/min).forward direction only, hence positive speed. @@ -233,6 +232,17 @@ } #endif + // Init the dialysate pump with valid PWM while motor is disabled. + // when enable triggers, we dont want invlid RPM set that triggers alarm in motor controller. + setFPGAD12PumpSpeed( MIN_DIALYSATE_PUMP_RPM ); + setFPGAD48PumpSpeed( MIN_DIALYSATE_PUMP_RPM ); + +#ifdef __PITEST__ + for ( i = 0; i < NUM_OF_CONTROLLER_SIGNAL; i++ ) + { + pIControlSignal[ i ] = 0.0F; + } +#endif // Initialize the persistent alarms for fresh dialysate pump initPersistentAlarm( ALARM_ID_DD_D12_PUMP_RPM_OUT_OF_RANGE, RPM_OUT_OF_RANGE_TIME_OUT, RPM_OUT_OF_RANGE_TIME_OUT ); initPersistentAlarm( ALARM_ID_DD_D12_PUMP_OFF_FAULT, SAFETY_SHUTDOWN_TIMEOUT, SAFETY_SHUTDOWN_TIMEOUT ); Index: firmware/App/Controllers/Heaters.c =================================================================== diff -u -r9ff57b5ab7490ee5bbc2c51b25f738ee6c569ec1 -r1644c24b0b51661ceaba579e5ebee0d1d5bad85f --- firmware/App/Controllers/Heaters.c (.../Heaters.c) (revision 9ff57b5ab7490ee5bbc2c51b25f738ee6c569ec1) +++ firmware/App/Controllers/Heaters.c (.../Heaters.c) (revision 1644c24b0b51661ceaba579e5ebee0d1d5bad85f) @@ -40,6 +40,7 @@ */ // ********** private definitions ********** + #define AC_HEATER_TX_MAX_DUTY_CYCLE 0.50F ///< AC Heater Treatement mode max duty cycle (50% of 1400W : 700W ) or ON state #define AC_HEATER_HEAT_MAX_DUTY_CYCLE 0.70F ///< AC Heater heat disinfect mode max duty cycle (70% of 1400W : 980W ) or ON state #define AC_HEATER_MAX_DUTY_CYCLE 1.0F ///< AC Heater max duty cycle (100.0%) or ON state Index: firmware/App/DDCommon.h =================================================================== diff -u -re11b336715c3f5308512edb46d6082d33e1c42a1 -r1644c24b0b51661ceaba579e5ebee0d1d5bad85f --- firmware/App/DDCommon.h (.../DDCommon.h) (revision e11b336715c3f5308512edb46d6082d33e1c42a1) +++ firmware/App/DDCommon.h (.../DDCommon.h) (revision 1644c24b0b51661ceaba579e5ebee0d1d5bad85f) @@ -27,6 +27,12 @@ #define DD_VERSION_MICRO 0 #define DD_VERSION_BUILD 3 +//Uncomment the below line for new dosing pump testing +//#define __PUMPTEST__ 1 + +//Uncomment below for PI testing +#define __PITEST__ 1 + // ********** development build switches ********** #ifndef _RELEASE_