Index: firmware/App/Modes/ModeTreatment.c =================================================================== diff -u -r9f5e68247ff2f5214e8828a1b8152ea16941fe39 -rc282822f36836a8127f447c8ac5b8a50e851be63 --- firmware/App/Modes/ModeTreatment.c (.../ModeTreatment.c) (revision 9f5e68247ff2f5214e8828a1b8152ea16941fe39) +++ firmware/App/Modes/ModeTreatment.c (.../ModeTreatment.c) (revision c282822f36836a8127f447c8ac5b8a50e851be63) @@ -156,28 +156,6 @@ /*********************************************************************//** * @brief - * The userRequestEndTreatment function conveys a user request to end the - * treatment. - * @details Inputs: currentTreatmentState - * @details Outputs: response to user request sent - * @return TRUE if request accepted, FALSE if not - *************************************************************************/ -BOOL userRequestEndTreatment( void ) -{ - BOOL result = FALSE; - - if ( TREATMENT_STOP_STATE == currentTreatmentState ) - { - pendingUserEndTreatmentRequest = TRUE; - result = TRUE; - } - sendTreatmentEndResponseMsg( result ); - - return result; -} - -/*********************************************************************//** - * @brief * The signalAlarmActionToTreatmentMode function executes the given alarm action * as appropriate while in Treatment Mode. * @details Inputs: none @@ -287,10 +265,6 @@ // TODO - implement break; - case TREATMENT_DIALYSIS_END_STATE: - // TODO - implement - break; - case TREATMENT_END_STATE: // TODO - implement endAirTrapControl(); // TODO - move to appropriate place @@ -454,7 +428,7 @@ // Check if we are in an appropriate treatment state for settings adjustment if ( ( MODE_TREA == currMode ) && - ( currentTreatmentState > TREATMENT_START_STATE ) && ( currentTreatmentState < TREATMENT_DIALYSIS_END_STATE ) && + ( currentTreatmentState > TREATMENT_START_STATE ) && ( currentTreatmentState < TREATMENT_END_STATE ) && ( CALC_ELAPSED_TREAT_TIME_IN_MIN() < treatmentTime ) && ( treatmentTime >= MIN_TREATMENT_TIME_MINUTES ) ) { F32 uFVolume; @@ -494,7 +468,7 @@ rejectReason = REQUEST_REJECT_REASON_NOT_IN_TREATMENT_MODE; } else if ( ( currentTreatmentState <= TREATMENT_START_STATE ) || - ( currentTreatmentState >= TREATMENT_DIALYSIS_END_STATE ) ) + ( currentTreatmentState >= TREATMENT_END_STATE ) ) { rejectReason = REQUEST_REJECT_REASON_INVALID_TREATMENT_STATE; } @@ -541,7 +515,7 @@ // Check if we are in an appropriate treatment state for settings adjustment if ( ( MODE_TREA == currMode ) && - ( currentTreatmentState > TREATMENT_START_STATE ) && ( currentTreatmentState < TREATMENT_DIALYSIS_END_STATE ) && + ( currentTreatmentState > TREATMENT_START_STATE ) && ( currentTreatmentState < TREATMENT_END_STATE ) && ( uFVolume <= MAX_UF_VOLUME_ML ) && ( CALC_TREAT_TIME_REMAINING_IN_SECS() >= PREVENT_UF_VOL_CHANGE_IF_NEARLY_DONE_SEC ) ) { @@ -600,7 +574,7 @@ rejectReason = REQUEST_REJECT_REASON_TREATMENT_TIME_OUT_OF_RANGE; } else if ( ( currentTreatmentState <= TREATMENT_START_STATE ) || - ( currentTreatmentState >= TREATMENT_DIALYSIS_END_STATE ) ) + ( currentTreatmentState >= TREATMENT_END_STATE ) ) { rejectReason = REQUEST_REJECT_REASON_INVALID_TREATMENT_STATE; } @@ -849,7 +823,7 @@ { stopDialysis(); elapsedTreatmentTimeInSecs = presTreatmentTimeSecs; - currentTreatmentState = TREATMENT_DIALYSIS_END_STATE; + currentTreatmentState = TREATMENT_END_STATE; } // Broadcast treatment time and state data at interval if ( ++treatmentTimeBroadcastTimerCtr >= TREATMENT_TIME_DATA_PUB_INTERVAL )