Index: firmware/App/Modes/ModeGenDialysate.c =================================================================== diff -u -rde4b330865ad6f9966c76f3b335d5b3966f8a1b2 -r6408d79e3a9a543e90b2fa7ab823be348befd391 --- firmware/App/Modes/ModeGenDialysate.c (.../ModeGenDialysate.c) (revision de4b330865ad6f9966c76f3b335d5b3966f8a1b2) +++ firmware/App/Modes/ModeGenDialysate.c (.../ModeGenDialysate.c) (revision 6408d79e3a9a543e90b2fa7ab823be348befd391) @@ -245,57 +245,57 @@ *************************************************************************/ U32 execGenDialysateMode( void ) { + // Manage water level control + hydChamberWaterInletControl(); + + // Update any dynamic treatment parameter changes + updateTreatmentSettings(); + //TODO: Transition to post gen dialysate then standby. if ( TRUE == getU32OverrideValue( &pendingStopDDGenDialRequest ) ) { pendingStopDDGenDialRequest.data = FALSE; requestNewOperationMode( DD_MODE_STAN ); } - // Continuous water inlet pressure check - if ( genDialysateState != DD_GEND_DIALYSATE_DELIVERY_PAUSE ) + else if ( ( genDialysateState != DD_GEND_DIALYSATE_DELIVERY_PAUSE ) && + ( TRUE == areInletWaterConditionsAlarmsActive() ) ) { - if ( TRUE == areInletWaterConditionsAlarmsActive() ) // Check RO alarms as required - { - setModeGenDStateTransition( DD_GEND_DIALYSATE_DELIVERY_PAUSE ); - genDialysateState = DD_GEND_DIALYSATE_DELIVERY_PAUSE; - } + //Check RO alarms as required + setModeGenDStateTransition( DD_GEND_DIALYSATE_DELIVERY_PAUSE ); + genDialysateState = DD_GEND_DIALYSATE_DELIVERY_PAUSE; } - - // Manage water level control - hydChamberWaterInletControl(); - - // Update any dynamic treatment parameter changes - updateTreatmentSettings(); - - // execute current gen dialysate state - switch ( genDialysateState ) + else { - case DD_GEND_STATE_START: - setModeGenDStateTransition( DD_GEND_DIALYSATE_BYPASS_STATE ); - genDialysateState = DD_GEND_DIALYSATE_BYPASS_STATE; - break; + // execute current gen dialysate state + switch ( genDialysateState ) + { + case DD_GEND_STATE_START: + setModeGenDStateTransition( DD_GEND_DIALYSATE_BYPASS_STATE ); + genDialysateState = DD_GEND_DIALYSATE_BYPASS_STATE; + break; - case DD_GEND_DIALYSATE_BYPASS_STATE: - genDialysateState = handleGenDDialysateBypassState(); - break; + case DD_GEND_DIALYSATE_BYPASS_STATE: + genDialysateState = handleGenDDialysateBypassState(); + break; - case DD_GEND_DIALYSATE_DELIVERY_STATE: - genDialysateState = handleGenDDialysateDeliveryState(); - break; + case DD_GEND_DIALYSATE_DELIVERY_STATE: + genDialysateState = handleGenDDialysateDeliveryState(); + break; - case DD_GEND_DIALYSATE_DELIVERY_PAUSE: - genDialysateState = handleGenDDialysateDeliveryPauseState(); - break; + case DD_GEND_DIALYSATE_DELIVERY_PAUSE: + genDialysateState = handleGenDDialysateDeliveryPauseState(); + break; - case DD_GEND_ISOLATED_UF_STATE: - genDialysateState = handleGenDDialysateIsolatedUFState(); - break; + case DD_GEND_ISOLATED_UF_STATE: + genDialysateState = handleGenDDialysateIsolatedUFState(); + break; - default: - SET_ALARM_WITH_2_U32_DATA( ALARM_ID_DD_SOFTWARE_FAULT, SW_FAULT_ID_GEND_MODE_INVALID_EXEC_STATE, genDialysateState ) - genDialysateState = DD_GEND_STATE_START; - break; + default: + SET_ALARM_WITH_2_U32_DATA( ALARM_ID_DD_SOFTWARE_FAULT, SW_FAULT_ID_GEND_MODE_INVALID_EXEC_STATE, genDialysateState ) + genDialysateState = DD_GEND_STATE_START; + break; + } } //Publish Gen dialysate mode data @@ -678,22 +678,21 @@ /*********************************************************************//** * @brief - * The testDDstopGenDialysateOverride function sets the override value + * The testDDStopGenDialysateOverride function sets the override value * to stop the gen dialysate operation mode. * @details Inputs: pendingStopDDGenDialRequest * @details Outputs: pendingStopDDGenDialRequest * @param message Override message from Dialin which includes the flag * to override the operation mode. * @return TRUE if override successful, FALSE if not *************************************************************************/ -BOOL testDDstopGenDialysateOverride( MESSAGE_T *message ) +BOOL testDDStopGenDialysateOverride( MESSAGE_T *message ) { BOOL result = u32Override( message, &pendingStopDDGenDialRequest, FALSE, TRUE ); return result; } - /*********************************************************************//** * @brief * The testGenDExecStateOverride function sets the Gen dialysate execution state Index: firmware/App/Modes/ModeGenDialysate.h =================================================================== diff -u -rde4b330865ad6f9966c76f3b335d5b3966f8a1b2 -r6408d79e3a9a543e90b2fa7ab823be348befd391 --- firmware/App/Modes/ModeGenDialysate.h (.../ModeGenDialysate.h) (revision de4b330865ad6f9966c76f3b335d5b3966f8a1b2) +++ firmware/App/Modes/ModeGenDialysate.h (.../ModeGenDialysate.h) (revision 6408d79e3a9a543e90b2fa7ab823be348befd391) @@ -63,7 +63,7 @@ BOOL testDialGoodToDeliverStatusOverride( MESSAGE_T *message ); // To override the dialysate good to deliver status flag BOOL testGenDHydChamberFluidTempOverride( MESSAGE_T *message ); // Override the hydraulics chamber fluid temperature BOOL testGenDExecStateOverride( MESSAGE_T *message ); // Override the Gen dialysate execution state -BOOL testDDstopGenDialysateOverride( MESSAGE_T *message ); // Override the stop gen dialysate request +BOOL testDDStopGenDialysateOverride( MESSAGE_T *message ); // Override the stop gen dialysate request /**@}*/ Index: firmware/App/Modes/ModePreGenDialysate.c =================================================================== diff -u -rde4b330865ad6f9966c76f3b335d5b3966f8a1b2 -r6408d79e3a9a543e90b2fa7ab823be348befd391 --- firmware/App/Modes/ModePreGenDialysate.c (.../ModePreGenDialysate.c) (revision de4b330865ad6f9966c76f3b335d5b3966f8a1b2) +++ firmware/App/Modes/ModePreGenDialysate.c (.../ModePreGenDialysate.c) (revision 6408d79e3a9a543e90b2fa7ab823be348befd391) @@ -111,26 +111,28 @@ requestNewOperationMode( DD_MODE_GEND ); } //TODO: Transition to post gen dialysate if concentrate priming has been started - if ( TRUE == getU32OverrideValue( &pendingStopDDPreGenDialRequest ) ) + else if ( TRUE == getU32OverrideValue( &pendingStopDDPreGenDialRequest ) ) { pendingStopDDPreGenDialRequest.data = FALSE; requestNewOperationMode( DD_MODE_STAN ); } - - // execute current pre-gen dialysate state - switch ( preGenDialysateState ) + else { - case DD_PRE_GEN_DIALYSATE_HYD_CHAMBER_FILL_CHECK: - preGenDialysateState = handlePreGenDialysateFillCompleteCheckState(); - break; + // execute current pre-gen dialysate state + switch ( preGenDialysateState ) + { + case DD_PRE_GEN_DIALYSATE_HYD_CHAMBER_FILL_CHECK: + preGenDialysateState = handlePreGenDialysateFillCompleteCheckState(); + break; - case DD_PRE_GEN_DIALYSATE_WAIT_FOR_GEND: - // TODO : handle wait for Gen dialysate - break; + case DD_PRE_GEN_DIALYSATE_WAIT_FOR_GEND: + // TODO : handle wait for Gen dialysate + break; - default: - SET_ALARM_WITH_2_U32_DATA( ALARM_ID_DD_SOFTWARE_FAULT, SW_FAULT_ID_PRE_GEND_MODE_INVALID_EXEC_STATE, preGenDialysateState ) - break; + default: + SET_ALARM_WITH_2_U32_DATA( ALARM_ID_DD_SOFTWARE_FAULT, SW_FAULT_ID_PRE_GEND_MODE_INVALID_EXEC_STATE, preGenDialysateState ) + break; + } } publishPreGenDialysateState(); @@ -258,15 +260,15 @@ /*********************************************************************//** * @brief - * The testDDstartGenDialysateOverride function sets the override value + * The testDDStartGenDialysateOverride function sets the override value * to start the gen dialysate operation mode. * @details Inputs: pendingStartDDGenDialRequest * @details Outputs: pendingStartDDGenDialRequest * @param message Override message from Dialin which includes the flag * to override the operation mode. * @return TRUE if override successful, FALSE if not *************************************************************************/ -BOOL testDDstartGenDialysateOverride( MESSAGE_T *message ) +BOOL testDDStartGenDialysateOverride( MESSAGE_T *message ) { BOOL result = u32Override( message, &pendingStartDDGenDialRequest, FALSE, TRUE ); @@ -275,15 +277,15 @@ /*********************************************************************//** * @brief - * The testDDstopPreGenDialysateOverride function sets the override value + * The testDDStopPreGenDialysateOverride function sets the override value * to stop the pre gen dialysate operation mode. * @details Inputs: pendingStopDDPreGenDialRequest * @details Outputs: pendingStopDDPreGenDialRequest * @param message Override message from Dialin which includes the flag * to override the operation mode. * @return TRUE if override successful, FALSE if not *************************************************************************/ -BOOL testDDstopPreGenDialysateOverride( MESSAGE_T *message ) +BOOL testDDStopPreGenDialysateOverride( MESSAGE_T *message ) { BOOL result = u32Override( message, &pendingStopDDPreGenDialRequest, FALSE, TRUE ); Index: firmware/App/Modes/ModePreGenDialysate.h =================================================================== diff -u -rde4b330865ad6f9966c76f3b335d5b3966f8a1b2 -r6408d79e3a9a543e90b2fa7ab823be348befd391 --- firmware/App/Modes/ModePreGenDialysate.h (.../ModePreGenDialysate.h) (revision de4b330865ad6f9966c76f3b335d5b3966f8a1b2) +++ firmware/App/Modes/ModePreGenDialysate.h (.../ModePreGenDialysate.h) (revision 6408d79e3a9a543e90b2fa7ab823be348befd391) @@ -47,8 +47,8 @@ BOOL requestDDPreGenStop( void ); // stop pregenerate dialysate delivery BOOL testDDPreGenDialysateDataPublishIntervalOverride( MESSAGE_T *message ); // pre-gen dialysate publish override request -BOOL testDDstartGenDialysateOverride( MESSAGE_T *message ); // start gen dialysate override request -BOOL testDDstopPreGenDialysateOverride( MESSAGE_T *message ); // stop the pregen dialysate override request +BOOL testDDStartGenDialysateOverride( MESSAGE_T *message ); // start gen dialysate override request +BOOL testDDStopPreGenDialysateOverride( MESSAGE_T *message ); // stop the pregen dialysate override request /**@}*/ Index: firmware/App/Modes/ModeStandby.c =================================================================== diff -u -r724b64673b719eaac10b0c9dd839ad9675274911 -r6408d79e3a9a543e90b2fa7ab823be348befd391 --- firmware/App/Modes/ModeStandby.c (.../ModeStandby.c) (revision 724b64673b719eaac10b0c9dd839ad9675274911) +++ firmware/App/Modes/ModeStandby.c (.../ModeStandby.c) (revision 6408d79e3a9a543e90b2fa7ab823be348befd391) @@ -504,15 +504,15 @@ /*********************************************************************//** * @brief - * The testDDstartPreGenDialysateOverride function sets the override value + * The testDDStartPreGenDialysateOverride function sets the override value * to start the pre-gen dialysate operation mode. * @details Inputs: pendingStartDDPreGenRequest * @details Outputs: pendingStartDDPreGenRequest * @param message Override message from Dialin which includes the flag * to override the operation mode. * @return TRUE if override successful, FALSE if not *************************************************************************/ -BOOL testDDstartPreGenDialysateOverride( MESSAGE_T *message ) +BOOL testDDStartPreGenDialysateOverride( MESSAGE_T *message ) { BOOL result = u32Override( message, &pendingStartDDPreGenRequest, FALSE, TRUE ); Index: firmware/App/Modes/ModeStandby.h =================================================================== diff -u -r724b64673b719eaac10b0c9dd839ad9675274911 -r6408d79e3a9a543e90b2fa7ab823be348befd391 --- firmware/App/Modes/ModeStandby.h (.../ModeStandby.h) (revision 724b64673b719eaac10b0c9dd839ad9675274911) +++ firmware/App/Modes/ModeStandby.h (.../ModeStandby.h) (revision 6408d79e3a9a543e90b2fa7ab823be348befd391) @@ -54,7 +54,7 @@ BOOL startDDHeatDisinfectActiveCool( void ); DD_STANDBY_MODE_STATE_T getCurrentStandbyState( void ); // get the current state of the standby mode. -BOOL testDDstartPreGenDialysateOverride( MESSAGE_T *message ); // Overide start pre-gen dialysate mode +BOOL testDDStartPreGenDialysateOverride( MESSAGE_T *message ); // Overide start pre-gen dialysate mode /**@}*/ Index: firmware/App/Services/Messaging.c =================================================================== diff -u -rde4b330865ad6f9966c76f3b335d5b3966f8a1b2 -r6408d79e3a9a543e90b2fa7ab823be348befd391 --- firmware/App/Services/Messaging.c (.../Messaging.c) (revision de4b330865ad6f9966c76f3b335d5b3966f8a1b2) +++ firmware/App/Services/Messaging.c (.../Messaging.c) (revision 6408d79e3a9a543e90b2fa7ab823be348befd391) @@ -206,7 +206,7 @@ &testTDCommunicationStatusOverride, //40 &testDDOpModePublishIntervalOverride, &testSetOperationMode, - &testDDstartGenDialysateOverride, + &testDDStartGenDialysateOverride, &testDialysatePumpStartStopOverride, &testDDGenDialysateDataPublishIntervalOverride, //45 &testConcentratePumpStartStopOverride, @@ -228,10 +228,10 @@ &testHeaterPWMPeriodOverride, &testDDPreGenDialysateDataPublishIntervalOverride, &testDDPostGenDialysateDataPublishIntervalOverride, - &testDDstartPreGenDialysateOverride, //65 + &testDDStartPreGenDialysateOverride, //65 &handlePreGenDialysateRequestMsg, - &testDDstopPreGenDialysateOverride, - &testDDstopGenDialysateOverride, + &testDDStopPreGenDialysateOverride, + &testDDStopGenDialysateOverride, #ifdef __PUMPTEST__ &testDDPistonPumpControlDataPublishIntervalOverride, &testDDPistonPumpStartStopOverride,