Index: firmware/App/Controllers/Fans.c =================================================================== diff -u -ref6d5a5ca314cbe30131156824e9d32792402fc4 -rdbf9c245d46c7536c72d277da24f7b44d7a84118 --- firmware/App/Controllers/Fans.c (.../Fans.c) (revision ef6d5a5ca314cbe30131156824e9d32792402fc4) +++ firmware/App/Controllers/Fans.c (.../Fans.c) (revision dbf9c245d46c7536c72d277da24f7b44d7a84118) @@ -338,7 +338,7 @@ *************************************************************************/ static void setInletFansDutyCycle( F32 pwm ) { - etpwmSetCmpA( etpwmREG7, (U32)( (S32)( ( pwm * (F32)(etpwmREG6->TBPRD) ) + FLOAT_TO_INT_ROUNDUP_OFFSET ) ) ); + etpwmSetCmpA( etpwmREG7, (U32)( (S32)( ( pwm * (F32)(etpwmREG7->TBPRD) ) + FLOAT_TO_INT_ROUNDUP_OFFSET ) ) ); } /*********************************************************************//** Index: firmware/App/Controllers/Switches.c =================================================================== diff -u -ref6d5a5ca314cbe30131156824e9d32792402fc4 -rdbf9c245d46c7536c72d277da24f7b44d7a84118 --- firmware/App/Controllers/Switches.c (.../Switches.c) (revision ef6d5a5ca314cbe30131156824e9d32792402fc4) +++ firmware/App/Controllers/Switches.c (.../Switches.c) (revision dbf9c245d46c7536c72d277da24f7b44d7a84118) @@ -104,9 +104,12 @@ currentSwitchStatus = ( PUMP_TRACK_SWITCH_MASK == getFPGAPumpTrackSwitchStatus() ? STATE_OPEN : STATE_CLOSED ); break; +#ifndef _VECTORCAST_ + // Since this is a for loop the default cannot be reached in VectorCAST for 100% coverage default: SET_ALARM_WITH_2_U32_DATA( ALARM_ID_HD_SOFTWARE_FAULT, SW_FAULT_ID_HD_INVALID_SWITCH_ID, i ) break; +#endif } // Check if the current switch status is not the same as the recorded data Index: firmware/App/Controllers/SyringePump.c =================================================================== diff -u -r49533d4870aa10c1b20406dd5c013567fe854694 -rdbf9c245d46c7536c72d277da24f7b44d7a84118 --- firmware/App/Controllers/SyringePump.c (.../SyringePump.c) (revision 49533d4870aa10c1b20406dd5c013567fe854694) +++ firmware/App/Controllers/SyringePump.c (.../SyringePump.c) (revision dbf9c245d46c7536c72d277da24f7b44d7a84118) @@ -492,12 +492,9 @@ if ( ( SYRINGE_PUMP_OFF_STATE == syringePumpState ) && ( heparinDeliveryState != HEPARIN_STATE_OFF ) ) { { - heparinDeliveryState = HEPARIN_STATE_STOPPED; - if ( ( SYRINGE_PUMP_OFF_STATE == syringePumpState ) ) - { - syringePumpSetRate = SYRINGE_PUMP_RETRACT_RATE; - syringePumpRetractRequested = TRUE; - } + heparinDeliveryState = HEPARIN_STATE_STOPPED; + syringePumpSetRate = SYRINGE_PUMP_RETRACT_RATE; + syringePumpRetractRequested = TRUE; } } @@ -571,6 +568,10 @@ // If valid to start a bolus, kick it off if ( FALSE == isSyringePumpHome() ) { + if ( MODE_SERV == getCurrentOperationMode() ) // Allow syringe pump operations in Service Mode. + { + heparinDeliveryState = HEPARIN_STATE_STOPPED; + } if ( ( TRUE == isSyringeDetected() ) && ( TRUE == syringePumpPrimeCompleted ) && ( SYRINGE_PUMP_OFF_STATE == syringePumpState ) && ( HEPARIN_STATE_STOPPED == heparinDeliveryState ) ) { @@ -586,6 +587,7 @@ { SET_ALARM_WITH_2_F32_DATA( ALARM_ID_HD_SOFTWARE_FAULT, (F32)SW_FAULT_ID_HD_SYRINGE_INVALID_BOLUS_CMD, syringePumpSetRate ) } + } return syringePumpBolusRequested; @@ -1790,9 +1792,9 @@ syringePumpRampTimerCtr++; if ( syringePumpRampUpToggleTime > syringePumpSetToggleTime ) { - syringePumpRampUpToggleTime = (U32)((F32)SYRINGE_PUMP_START_RAMP_SPEED / - (F32)( ( syringePumpRampTimerCtr * syringePumpRampTimerCtr * syringePumpRampTimerCtr ) / SYRINGE_PUMP_RAMP_DIVISOR ) ); - syringePumpRampUpPct = syringePumpSetToggleTime / syringePumpRampUpToggleTime; + syringePumpRampUpToggleTime = (U32)( (F32)SYRINGE_PUMP_START_RAMP_SPEED / + ( (F32)( syringePumpRampTimerCtr * syringePumpRampTimerCtr * syringePumpRampTimerCtr ) / (F32)SYRINGE_PUMP_RAMP_DIVISOR ) ); + syringePumpRampUpPct = (F32)syringePumpSetToggleTime / (F32)syringePumpRampUpToggleTime; if ( syringePumpRampUpToggleTime > syringePumpSetToggleTime ) { setFPGASyringePumpStepToggleTime( syringePumpRampUpToggleTime ); Index: firmware/App/Controllers/Valves.c =================================================================== diff -u -r208ceefa8e8b1cc30feb93be771ced6d313e6995 -rdbf9c245d46c7536c72d277da24f7b44d7a84118 --- firmware/App/Controllers/Valves.c (.../Valves.c) (revision 208ceefa8e8b1cc30feb93be771ced6d313e6995) +++ firmware/App/Controllers/Valves.c (.../Valves.c) (revision dbf9c245d46c7536c72d277da24f7b44d7a84118) @@ -614,16 +614,20 @@ *************************************************************************/ static VALVE_STATE_T handleValveStateHomingNotStarted( VALVE_T valve ) { - VALVE_STATE_T state = VALVE_STATE_HOMING_NOT_STARTED; + VALVE_STATE_T state = VALVE_STATE_HOMING_NOT_STARTED; + OPN_CLS_STATE_T frontDoor = getSwitchStatus( FRONT_DOOR ); - // TODO connect this flag to the doors driver later - // For now it is assumed the door is closed - BOOL isDoorClosed = TRUE; +#ifndef _RELEASE_ + if ( SW_CONFIG_ENABLE_VALUE == getSoftwareConfigStatus( SW_CONFIG_DISABLE_SWITCHES_MONITOR ) ) + { + frontDoor = STATE_CLOSED; + } +#endif // If homing has been requested or POST is completed and the door has been close for the specified - // Period of time, start the homing - if ( valveSelfTestState == VALVE_SELF_TEST_COMPLETE && ( valvesStatus[ valve ].hasHomingBeenRequested || isDoorClosed ) - && ( ! valvesStatus[ valve ].hasHomingFailed ) ) + // Period of time, start the homing process + if ( ( VALVE_SELF_TEST_COMPLETE == valveSelfTestState ) && ( ( TRUE == valvesStatus[ valve ].hasHomingBeenRequested ) || ( STATE_CLOSED == frontDoor ) ) + && ( FALSE == valvesStatus[ valve ].hasHomingFailed ) ) { // Get ready for the energized state valvesStatus[ valve ].homingEdgeDetectionCounter = 0; Index: firmware/App/Modes/ModeStandby.c =================================================================== diff -u -r5b448e81db260e5b041699a83c6f2a3faa260ea9 -rdbf9c245d46c7536c72d277da24f7b44d7a84118 --- firmware/App/Modes/ModeStandby.c (.../ModeStandby.c) (revision 5b448e81db260e5b041699a83c6f2a3faa260ea9) +++ firmware/App/Modes/ModeStandby.c (.../ModeStandby.c) (revision dbf9c245d46c7536c72d277da24f7b44d7a84118) @@ -586,7 +586,6 @@ static HD_STANDBY_STATE_T handleStandbyModeWaitForDGFlushCmdResponseState( void ) { DG_CMD_RESPONSE_T dgCmdResp; - HD_STANDBY_STATE_T state = STANDBY_WAIT_FOR_DG_FLUSH_CMD_RESPONSE_STATE; BOOL result = FALSE; @@ -666,7 +665,6 @@ static HD_STANDBY_STATE_T handleStandbyModeWaitForDGHeatDisinfectCmdResponseState( void ) { DG_CMD_RESPONSE_T dgCmdResp; - HD_STANDBY_STATE_T state = STANDBY_WAIT_FOR_DG_HEAT_DISINFECT_CMD_RESPONSE_STATE; BOOL result = FALSE; @@ -743,7 +741,6 @@ static HD_STANDBY_STATE_T handleStandbyModeWaitForDGChemDisinfectCmdResponseState( void ) { DG_CMD_RESPONSE_T dgCmdResp; - HD_STANDBY_STATE_T state = STANDBY_WAIT_FOR_DG_CHEM_DISINFECT_CMD_RESPONSE_STATE; BOOL result = FALSE; Index: firmware/App/Modes/Rinseback.c =================================================================== diff -u -r49533d4870aa10c1b20406dd5c013567fe854694 -rdbf9c245d46c7536c72d277da24f7b44d7a84118 --- firmware/App/Modes/Rinseback.c (.../Rinseback.c) (revision 49533d4870aa10c1b20406dd5c013567fe854694) +++ firmware/App/Modes/Rinseback.c (.../Rinseback.c) (revision dbf9c245d46c7536c72d277da24f7b44d7a84118) @@ -498,14 +498,14 @@ activateAlarmNoData( ALARM_ID_TREATMENT_RINSEBACK_TIMEOUT_ALARM ); } // Have we been in this stopped state for too long despite having delivered full blood volume back to patient? - else if ( ( rinsebackTimerCtr > MAX_RINSEBACK_DONE_TIME ) && ( getRinsebackVolume() >= rinsebackTargetVolume_mL ) ) + else if ( ( rinsebackTimerCtr > MAX_RINSEBACK_DONE_TIME ) /*&& ( getRinsebackVolume() >= rinsebackTargetVolume_mL )*/ ) // Commented out the second condition because the done time > max rinse back time { signalGoToTreatmentStopped(); activateAlarmNoData( ALARM_ID_TREATMENT_RINSEBACK_TIMEOUT_ALARM ); clearAlarm( ALARM_ID_HD_TREATMENT_RINSEBACK_TIMEOUT_WARNING ); } // Have we been in this stopped state for too long despite having delivered full blood volume back to patient? - else if ( ( RINSEBACK_DONE_WARNING_TIME == rinsebackTimerCtr ) && ( getRinsebackVolume() >= rinsebackTargetVolume_mL ) ) + else if ( ( RINSEBACK_DONE_WARNING_TIME == rinsebackTimerCtr ) /*&& ( getRinsebackVolume() >= rinsebackTargetVolume_mL )*/ ) // Commented out the second condition because the warning time > max rinse back time { activateAlarmNoData( ALARM_ID_HD_TREATMENT_RINSEBACK_TIMEOUT_WARNING ); } Index: firmware/App/Services/SystemComm.c =================================================================== diff -u -r6e86723c766c0097c9867af984c0c7e82802537a -rdbf9c245d46c7536c72d277da24f7b44d7a84118 --- firmware/App/Services/SystemComm.c (.../SystemComm.c) (revision 6e86723c766c0097c9867af984c0c7e82802537a) +++ firmware/App/Services/SystemComm.c (.../SystemComm.c) (revision dbf9c245d46c7536c72d277da24f7b44d7a84118) @@ -784,7 +784,7 @@ { if ( TRUE == incTimeWindowedCount( TIME_WINDOWED_COUNT_BAD_MSG_CRC ) ) { - SET_ALARM_WITH_1_U32_DATA( ALARM_ID_COMM_TOO_MANY_BAD_CRCS, (U32)ALARM_SOURCE_HD ); + SET_ALARM_WITH_1_U32_DATA( ALARM_ID_HD_COMM_TOO_MANY_BAD_CRCS, (U32)ALARM_SOURCE_HD ); } }