Index: firmware/App/Modes/ModeFill.c =================================================================== diff -u -r8c22edb621da0832b1e1d9c7b1600dd63c94877d -r1ada95392e4baf6f97158cb23e3c0e85709c07ba --- firmware/App/Modes/ModeFill.c (.../ModeFill.c) (revision 8c22edb621da0832b1e1d9c7b1600dd63c94877d) +++ firmware/App/Modes/ModeFill.c (.../ModeFill.c) (revision 1ada95392e4baf6f97158cb23e3c0e85709c07ba) @@ -7,8 +7,8 @@ * * @file ModeFill.c * -* @author (last) Dara Navaei -* @date (last) 19-Sep-2023 +* @author (last) Sean Nash +* @date (last) 30-Sep-2023 * * @author (original) Leonardo Baloa * @date (original) 19-Nov-2019 @@ -242,7 +242,10 @@ // Set initial actuator states setValveState( VDR, VALVE_STATE_DRAIN_C_TO_NO ); setValveState( VPO, VALVE_STATE_NOFILL_C_TO_NO ); -#ifdef 0 + +#if !defined(DEBUG_ENABLED) && !defined (_RELEASE_) && !defined (_VECTORCAST_) + // Compile this part of code only if it is not debug, release, or VectorCAST. This is to make sure this part of code is not compiled + // and instrumented in VectorCAST // Reset the state machine // Note: the substate timers, and operation flags need to be reset on recovery, consider // reinitializing the state variables, the resetting the state, by calling setModeFillStateTransition() @@ -307,6 +310,7 @@ } } #endif + getFillChemicalCondRecord( &chemicalsCond ); turnOnUVReactor( INLET_UV_REACTOR ); turnOnUVReactor( OUTLET_UV_REACTOR ); @@ -537,7 +541,7 @@ * @param flag to TRUE if prime is needed otherwise FALSE * @return none *************************************************************************/ -void setThisFisrtFillFlag( BOOL flag ) +void setThisFirstFillFlag( BOOL flag ) { fillStatus.isThisFirstFill = flag; } @@ -950,7 +954,7 @@ ( getTargetFillVolumeML() > MIN_FILL_TARGET_TO_CHECK_RO_AND_CPO_ML ) && ( getTestConfigStatus( TEST_CONFIG_MIX_WITH_WATER ) != TRUE ) ) { setBadAvgConductivityDetectedFlag( TRUE ); // signal idle bad avg conductivity detected - setThisFisrtFillFlag( TRUE ); + setThisFirstFillFlag( TRUE ); resetChemicalUsedVolumeML( BICARB ); resetChemicalUsedVolumeML( ACID ); SET_ALARM_WITH_2_F32_DATA( ALARM_ID_DG_FILL_CONDUCTIVITY_OUT_OF_RANGE, avgBicarbConduSPerCM, bicarbNormalConduSPerCM ); // trigger replace bottles alarm #1 @@ -1091,7 +1095,7 @@ case DG_FILL_MODE_STATE_DELIVER_DIALYSATE: setValveState( VPO, VALVE_STATE_FILL_C_TO_NC ); - if ( ( didFillRecoverFromPause != TRUE ) || ( 0 == dialysateFillStartTimeMS ) ) + if ( ( didFillRecoverFromPause != TRUE ) || ( 0 == dialysateFillStartTimeMS ) ) { dialysateFillStartTimeMS = getMSTimerCount(); } @@ -1173,7 +1177,9 @@ * percentFactor. * @details Inputs: None * @details Outputs: None - * @param: testValue, baseValue, percentFactor + * @param testValue value to check range for + * @param baseValue value associated with 100% + * @param percentFactor percentage range (100% +/- this value) * @return TRUE if testValue is within range. Otherwise, return FALSE *************************************************************************/ static BOOL isValueWithinPercentRange( F32 testValue, F32 baseValue, F32 percentFactor ) @@ -1264,7 +1270,7 @@ * acid volume. * @details Inputs: used acid volume * @details Outputs: used acid volume - * @param: value : override used acid volume in mL + * @param value override used acid volume in mL * @return TRUE if override successful, FALSE if not *************************************************************************/ BOOL testSetUsedAcidVolumeMLOverride( F32 value ) @@ -1312,7 +1318,7 @@ * bicarb volume. * @details Inputs: used bicarb volume * @details Outputs: used bicarb volume - * @param: value : override used bicarb volume in mL + * @param value override used bicarb volume in mL * @return TRUE if override successful, FALSE if not *************************************************************************/ BOOL testSetUsedBicarbVolumeMLOverride( F32 value ) @@ -1360,7 +1366,7 @@ * fill mode data publish interval. * @details Inputs: FillModeDataPublishInterval * @details Outputs: FillModeDataPublishInterval - * @param: value override fill mode data publish interval with (in ms) + * @param value override fill mode data publish interval with (in ms) * @return TRUE if override successful, FALSE if not *************************************************************************/ BOOL testSetFillModeDataPublishIntervalOverride( U32 value ) @@ -1406,7 +1412,7 @@ * integrated volume. * @details Inputs: value * @details Outputs: integratedVolumeML - * @param: value integrated volume in mL + * @param value integrated volume in mL * @return TRUE if override successful, FALSE if not *************************************************************************/ BOOL testSetIntegratedVolumeOverride( F32 value )