Index: firmware/App/Controllers/BloodLeak.c =================================================================== diff -u -r223b7a2ff87e3559679b52e52236a7cb7195c985 -rfb1673d2282822995ed233f3e9ea5dfb0567780d --- firmware/App/Controllers/BloodLeak.c (.../BloodLeak.c) (revision 223b7a2ff87e3559679b52e52236a7cb7195c985) +++ firmware/App/Controllers/BloodLeak.c (.../BloodLeak.c) (revision fb1673d2282822995ed233f3e9ea5dfb0567780d) @@ -247,8 +247,8 @@ /*********************************************************************//** * @brief * The execBloodLeak function executes the blood leak detector driver. - * @details Inputs: bloodLeakGetCalStartTime, bloodLeakSignalEmbeddedModeReq - * @details Outputs: bloodLeakStatus, bloodLeakGetCalStartTime + * @details Inputs: bloodLeakState + * @details Outputs: bloodLeakCalRecord, bloodLeakState * @return none *************************************************************************/ void execBloodLeak( void ) @@ -296,8 +296,8 @@ * @brief * The execBloodLeakEmbModeCommand function executes the blood leak embedded * mode command. - * @details Inputs: bloodLeakGetCalStartTime, bloodLeakSignalEmbeddedModeReq - * @details Outputs: bloodLeakStatus, bloodLeakGetCalStartTime + * @details Inputs: bloodLeakEmbModeSubstate + * @details Outputs: bloodLeakEmbModeSubstate * @return none *************************************************************************/ void execBloodLeakEmbModeCommand( void ) @@ -386,7 +386,7 @@ * The handleBloodLeakWaitForPostState function handles the wait for POST * state of the of blood leak state machine. * @details Inputs: bloodLeakEmbModeCmd - * @details Outputs: none + * @details Outputs: bloodLeakEmbModeCmd * @return next state *************************************************************************/ static BLOOD_LEAK_STATE_T handleBloodLeakWaitForPostState( void ) @@ -434,8 +434,8 @@ * @brief * The handleBloodLeakCheckSetPointState function handles the check set point * state to ensure the set point is set correctly. - * @details Inputs: none - * @details Outputs: bloodLeakUARTCmdIndex + * @details Inputs: bloodLeakCalRecord + * @details Outputs: bloodLeakCalRecord * @return next state *************************************************************************/ static BLOOD_LEAK_STATE_T handleBloodLeakCheckSetPointState( void ) @@ -474,7 +474,7 @@ * @brief * The handleBloodLeakInitState function handles the Blood Leak module in init * state. - * @details Inputs: none + * @details Inputs: bloodLeakEmbModeHasZeroBeenRqustd * @details Outputs: none * @return next state *************************************************************************/ @@ -584,16 +584,6 @@ { BLOOD_LEAK_STATE_T state = BLOOD_LEAK_NORMAL_STATE; - // TODO remove - /*if ( TRUE == noFPGABloodLeakDetected() ) // TODO remove noFPGABloodLeakDetected() - { - bloodLeakStatus.data = BLOOD_LEAK_NOT_DETECTED; - } - else - { - bloodLeakStatus.data = BLOOD_LEAK_DETECTED; - }*/ - // If the blood leak status bit is low (0) it means blood has not been detected, otherwise, blood has been detected bloodLeakStatus.data = ( BLOOD_LEAK_STATUS_BIT_LOW == getFPGABloodLeakStatus() ? BLOOD_LEAK_NOT_DETECTED : BLOOD_LEAK_DETECTED ); @@ -687,7 +677,7 @@ * The handleBloodLeakEmbModeWaitForCommandState function handles the wait for * command state. The state prepares the message to be sent to the blood leak * sensor. - * @details Inputs: bloodLeakCalCharacter + * @details Inputs: bloodLeakEmbModeRqstedCmd, bloodLeakCalCharacter * @details Outputs: bloodLeakCalCommandSquence, bloodLeakUARTCmdIndex * @return next state *************************************************************************/ @@ -763,10 +753,12 @@ /*********************************************************************//** * @brief * The handleBloodLeakEmbModeSendCommandState function handles the send command - * state. The state sends the command sequence to the blood leak sensor one by - * one. - * @details Inputs: bloodLeakCalCharacter, bloodLeakUARTCmdIndex - * @details Outputs: bloodLeakCalCommandSquence, bloodLeakUARTCmdIndex + * state. The state sends the command sequence to the blood leak sensor one by one. + * @details Inputs: bloodLeakEmbModeRqstedCmd, bloodLeakCalCharacter, bloodLeakUARTCmdIndex + * bloodLeakEmbModeCmdSeqLength + * @details Outputs: bloodLeakEmbModeRqstedCmd, bloodLeakCalCommandSquence, + * bloodLeakUARTCmdIndex, bloodLeakEmbModeCmdSeqLength, bloodLeakEmbModeCmdSeqLength, + * bloodLeakSetPointSequence * @return next state *************************************************************************/ static BLOOD_LEAK_EMB_MODE_STATE_T handleBloodLeakEmbModeSendCommandState( void ) @@ -826,7 +818,14 @@ // Check if the current index towards the end of the buffer which are FIFO set and FIFO reset if ( FALSE == isUARTCtrlDone ) { - FALSE == isUARTCtrlCmd ? setFPGABloodLeakUARTTransmit( command ) : setFPGABloodLeakUARTControl( command ); + if ( FALSE == isUARTCtrlCmd ) + { + setFPGABloodLeakUARTTransmit( command ); + } + else + { + setFPGABloodLeakUARTControl( command ); + } } else { @@ -846,8 +845,10 @@ * @brief * The handleBloodLeakEmbModeWaitForCommandResponseState function handles the * wait for command responses state. The state receives data in the buffer. - * @details Inputs: bloodLeakEmbModeCmd, bloodLeakEmbModeRespIndex - * @details Outputs: bloodLeakEmbModeRespBuffer, bloodLeakEmbModeRespIndex + * @details Inputs: bloodLeakEmbModeHasRxRqstBeenSent, bloodLeakEmbModeRespBuffer, + * bloodLeakEmbModeRespIndex, bloodLeakEmbModeRqstedCmd, bloodLeakEmbModeOpsStartTime + * @details Outputs: bloodLeakEmbModeCmd, bloodLeakEmbModeRqstedCmd, + * bloodLeakEmbModeCmdSeq, bloodLeakEmbModeRespBuffer * @return next state *************************************************************************/ static BLOOD_LEAK_EMB_MODE_STATE_T handleBloodLeakEmbModeWaitForCommandResponseState( void ) @@ -1286,9 +1287,10 @@ /*********************************************************************//** * @brief - * The enqueueEmbModeCmd function enqueues the embedded mode command. - * @details Inputs: bloodLeakEmbModeCmdQRearIndex + * The enqueueEmbModeCmd function enqueues an embedded mode command. + * @details Inputs: none * @details Outputs: bloodLeakEmbModeCmdQRearIndex, bloodLeakEmbModeCmdQCount + * bloodLeakEmbModeCmdQ, bloodLeakEmbModeCmd * @return none *************************************************************************/ static void enqueueEmbModeCmd( U08 cmd ) @@ -1483,7 +1485,7 @@ * The testSetBloodLeakEmbeddedModeCommand function sets the blood leak * calibration command. * @details Inputs: none - * @details Outputs: bloodLeakEmbModeRqstedCmd, bloodLeakEmbModeSetPoint + * @details Outputs: bloodLeakEmbModeSetPoint * @param command the command ID to be sent to blood leak in embedded mode * @param setpointPayload the set point value that is sent with the set point * command. This value is 0 with other commands since they do not have a payload Index: firmware/App/Controllers/DGInterface.c =================================================================== diff -u -r8ceb2ec143cf3c62e50f2187ad771cd63f046842 -rfb1673d2282822995ed233f3e9ea5dfb0567780d --- firmware/App/Controllers/DGInterface.c (.../DGInterface.c) (revision 8ceb2ec143cf3c62e50f2187ad771cd63f046842) +++ firmware/App/Controllers/DGInterface.c (.../DGInterface.c) (revision fb1673d2282822995ed233f3e9ea5dfb0567780d) @@ -126,26 +126,26 @@ dgCurrentOpMode = DG_MODE_INIT; dgSubMode = 0; dgStartCommandSent = FALSE; - dgDialysateFlowRateMlMin = 0.0; + dgDialysateFlowRateMlMin = 0.0F; dgDialysateFlowDataFreshFlag = FALSE; // initialize load cell weights for ( i = 0; i < NUM_OF_LOAD_CELLS; i++ ) { - loadCellWeightInGrams[ i ].data = 0.0; - loadCellWeightInGrams[ i ].ovInitData = 0.0; - loadCellWeightInGrams[ i ].ovData = 0.0; + loadCellWeightInGrams[ i ].data = 0.0F; + loadCellWeightInGrams[ i ].ovInitData = 0.0F; + loadCellWeightInGrams[ i ].ovData = 0.0F; loadCellWeightInGrams[ i ].override = 0; } // initialize reservoirs weights for ( i = 0; i < NUM_OF_DG_RESERVOIRS; i++ ) { - lgFilteredReservoirWeightInGrams[ i ] = 0.0; + lgFilteredReservoirWeightInGrams[ i ] = 0.0F; for ( j = 0; j < SIZE_OF_LARGE_LOAD_CELL_AVG; j++ ) { - lgLoadCellReadings[ i ][ j ] = 0.0; - lgLoadCellBackupReadings[ i ][ j ] = 0.0; + lgLoadCellReadings[ i ][ j ] = 0.0F; + lgLoadCellBackupReadings[ i ][ j ] = 0.0F; } } @@ -158,10 +158,10 @@ } lgLoadCellReadingsIdx = 0; - lgLoadCellReadingsTotal[ DG_RESERVOIR_1 ] = 0.0; - lgLoadCellReadingsTotal[ DG_RESERVOIR_2 ] = 0.0; - lgLoadCellBackupReadingsTotal[ DG_RESERVOIR_1 ] = 0.0; - lgLoadCellBackupReadingsTotal[ DG_RESERVOIR_2 ] = 0.0; + lgLoadCellReadingsTotal[ DG_RESERVOIR_1 ] = 0.0F; + lgLoadCellReadingsTotal[ DG_RESERVOIR_2 ] = 0.0F; + lgLoadCellBackupReadingsTotal[ DG_RESERVOIR_1 ] = 0.0F; + lgLoadCellBackupReadingsTotal[ DG_RESERVOIR_2 ] = 0.0F; initPersistentAlarm( ALARM_ID_HD_DIALYSATE_TEMP_OUT_OF_HIGH_SAFETY_RANGE, DIALYSATE_TEMP_HIGH_SAFETY_TIMEOUT_MS, DIALYSATE_TEMP_HIGH_SAFETY_TIMEOUT_MS ); initPersistentAlarm( ALARM_ID_HD_DIALYSATE_TEMP_OUT_OF_LOW_SAFETY_RANGE, DIALYSATE_TEMP_LOW_SAFETY_TIMEOUT_MS, DIALYSATE_TEMP_LOW_SAFETY_TIMEOUT_MS ); Index: firmware/App/Controllers/DialInFlow.c =================================================================== diff -u -r1e1576d7b9653037829d1d4f834c1077a63fe3fe -rfb1673d2282822995ed233f3e9ea5dfb0567780d --- firmware/App/Controllers/DialInFlow.c (.../DialInFlow.c) (revision 1e1576d7b9653037829d1d4f834c1077a63fe3fe) +++ firmware/App/Controllers/DialInFlow.c (.../DialInFlow.c) (revision fb1673d2282822995ed233f3e9ea5dfb0567780d) @@ -1255,9 +1255,9 @@ dipCurrErrorDurationCtr += TASK_PRIORITY_INTERVAL; if ( dipCurrErrorDurationCtr > DIP_MAX_CURR_ERROR_DURATION_MS ) { - #ifndef _RELEASE_ +#ifndef _RELEASE_ if ( getSoftwareConfigStatus( SW_CONFIG_DISABLE_MOTOR_CURRNT_CHECKS ) != SW_CONFIG_ENABLE_VALUE ) - #endif +#endif { SET_ALARM_WITH_1_F32_DATA( ALARM_ID_DIAL_IN_PUMP_MC_CURRENT_CHECK, getMeasuredDialInPumpMCCurrent() ); } Index: firmware/App/Controllers/DialOutFlow.c =================================================================== diff -u -r173e4fbf9bd750bccb2e758eb1c7ef36ed8db5a0 -rfb1673d2282822995ed233f3e9ea5dfb0567780d --- firmware/App/Controllers/DialOutFlow.c (.../DialOutFlow.c) (revision 173e4fbf9bd750bccb2e758eb1c7ef36ed8db5a0) +++ firmware/App/Controllers/DialOutFlow.c (.../DialOutFlow.c) (revision fb1673d2282822995ed233f3e9ea5dfb0567780d) @@ -1115,9 +1115,9 @@ dopCurrErrorDurationCtr += TASK_PRIORITY_INTERVAL; if ( dopCurrErrorDurationCtr > DOP_MAX_CURR_ERROR_DURATION_MS ) { - #ifndef _RELEASE_ +#ifndef _RELEASE_ if ( getSoftwareConfigStatus( SW_CONFIG_DISABLE_MOTOR_CURRNT_CHECKS ) != SW_CONFIG_ENABLE_VALUE ) - #endif +#endif { SET_ALARM_WITH_1_F32_DATA( ALARM_ID_DIAL_OUT_PUMP_MC_CURRENT_CHECK, getMeasuredDialOutPumpMCCurrent() ); } Index: firmware/App/Controllers/PresOccl.c =================================================================== diff -u -rf9570a9717805d0759622da836a33ee04f3fa40f -rfb1673d2282822995ed233f3e9ea5dfb0567780d --- firmware/App/Controllers/PresOccl.c (.../PresOccl.c) (revision f9570a9717805d0759622da836a33ee04f3fa40f) +++ firmware/App/Controllers/PresOccl.c (.../PresOccl.c) (revision fb1673d2282822995ed233f3e9ea5dfb0567780d) @@ -679,8 +679,9 @@ SET_ALARM_WITH_1_U32_DATA( ALARM_ID_HD_BP_OCCLUSION_OUT_OF_RANGE, bpOccl ); } - // Check for BP occlusion - if ( bpOccl > ( OCCLUSION_THRESHOLD_OFFSET + bloodPumpOcclusionAfterCartridgeInstall ) ) + // Check for occlusion in PreTreatment modes when the cartridge is installed + // and setOcclusionInstallLevel has been called. + if ( MODE_PRET == getCurrentOperationMode() ) { if ( getPreTreatmentSubState() > HD_PRE_TREATMENT_CART_INSTALL_STATE && getDrySelfTestsState() > DRY_SELF_TESTS_START_STATE ) { @@ -714,7 +715,8 @@ } // Check for venous occlusion - if ( ( TRUE == txMode || TRUE == ptxMode ) && ( venPres > getS32TreatmentParamUpperRangeLimit( TREATMENT_PARAM_VEN_PRESSURE_HIGH_LIMIT ) + VENOUS_PRESSURE_OCCL_OFFSET_MMHG ) ) + if ( ( TRUE == txMode || TRUE == ptxMode ) && + ( venPres > getS32TreatmentParamUpperRangeLimit( TREATMENT_PARAM_VEN_PRESSURE_HIGH_LIMIT ) + VENOUS_PRESSURE_OCCL_OFFSET_MMHG ) ) { if ( TRUE == isPersistentAlarmTriggered( ALARM_ID_HD_VENOUS_LINE_OCCLUSION, TRUE ) ) { Index: firmware/App/Controllers/SyringePump.c =================================================================== diff -u -r93383819b0f9b7bb0be3acb95f368ee6b8d8080a -rfb1673d2282822995ed233f3e9ea5dfb0567780d --- firmware/App/Controllers/SyringePump.c (.../SyringePump.c) (revision 93383819b0f9b7bb0be3acb95f368ee6b8d8080a) +++ firmware/App/Controllers/SyringePump.c (.../SyringePump.c) (revision fb1673d2282822995ed233f3e9ea5dfb0567780d) @@ -1161,8 +1161,8 @@ * The execSyringePumpSelfTest function executes the state machine for the * syringe pump self-test. * @details Inputs: none - * @details Outputs: none - * @return the current state of the BloodFlow self-test. + * @details Outputs: forceSensorCalRecord + * @return TRUE if the self test passed otherwise, FALSE *************************************************************************/ SELF_TEST_STATUS_T execSyringePumpSelfTest( void ) { @@ -2001,7 +2001,6 @@ *************************************************************************/ - /*********************************************************************//** * @brief * The testSetSyringePumpDataPublishIntervalOverride function overrides the Index: firmware/App/Controllers/Temperatures.c =================================================================== diff -u -r0b0cfd7e0f84f89b3a428cf77334e2d76b13a6a9 -rfb1673d2282822995ed233f3e9ea5dfb0567780d --- firmware/App/Controllers/Temperatures.c (.../Temperatures.c) (revision 0b0cfd7e0f84f89b3a428cf77334e2d76b13a6a9) +++ firmware/App/Controllers/Temperatures.c (.../Temperatures.c) (revision fb1673d2282822995ed233f3e9ea5dfb0567780d) @@ -120,16 +120,15 @@ * The execTemperaturesSelfTest function runs the temperatures POST during * the self-test. * @details Inputs: none - * @details Outputs: none - * @return execTemperaturesSelfTest which is the status of the self test + * @details Outputs: temperaturesCalRecord + * @return TRUE if the self test passed otherwise, FALSE *************************************************************************/ SELF_TEST_STATUS_T execTemperaturesSelfTest( void ) { SELF_TEST_STATUS_T result = SELF_TEST_STATUS_IN_PROGRESS; + BOOL calStatus = getNVRecord2Driver( GET_CAL_TEMPERATURE_SESNORS, (U08*)&temperaturesCalRecord, sizeof( HD_TEMP_SENSORS_CAL_RECORD_T ), + NUM_OF_CAL_DATA_HD_TEMP_SENSORS, ALARM_ID_NO_ALARM ); - BOOL calStatus = getNVRecord2Driver( GET_CAL_TEMPERATURE_SESNORS, (U08*)&temperaturesCalRecord, sizeof( HD_TEMP_SENSORS_CAL_RECORD_T ), - NUM_OF_CAL_DATA_HD_TEMP_SENSORS, ALARM_ID_NO_ALARM ); - if ( TRUE == calStatus ) { result = SELF_TEST_STATUS_PASSED; @@ -190,8 +189,8 @@ /*********************************************************************//** * @brief - * The getThermistorTemperatureValue function returns the temperature of - * a requested thermistor or temperature sensor. + * The getTemperatureValue function returns the temperature of a requested + * thermistor or a temperature sensor. * @details Inputs: thermistorsStatus * @details Outputs: none * @param sensorID index to get its temperature value Index: firmware/App/Controllers/Valves.c =================================================================== diff -u -r0f3fd4faffac7e8ccb9f6283a29638bc9d475eff -rfb1673d2282822995ed233f3e9ea5dfb0567780d --- firmware/App/Controllers/Valves.c (.../Valves.c) (revision 0f3fd4faffac7e8ccb9f6283a29638bc9d475eff) +++ firmware/App/Controllers/Valves.c (.../Valves.c) (revision fb1673d2282822995ed233f3e9ea5dfb0567780d) @@ -79,7 +79,7 @@ #define INITIAL_EDGE_OFFSET_READ_COUNT 100U ///< Offset in counts from energized and de-energized edges -#define INITIAL_ENERGIZED_EDGE_UPPER_RANGE 14000U // TODO it was originally 13000 ///< Energized edge maximum count +#define INITIAL_ENERGIZED_EDGE_UPPER_RANGE 14000U ///< Energized edge maximum count (originally 13000 count) #define INITIAL_ENERGIZED_EDGE_LOWER_RANGE 9000U ///< Energized edge minimum count #define AIR_TRAP_VALVE_GPIO_PIN 0x12 ///< Air trap valve GPIO Pin 18 of HET Port 1 @@ -296,11 +296,11 @@ /*********************************************************************//** * @brief - * The homeValve function sets the homing request flag of a valve to TRUE. - * @details Inputs: none - * @details Outputs: valvesStatus (The flag that sets the homing request) + * The homeValve function processes the homing of a valve + * @details Inputs: valvesStatus + * @details Outputs: valvesStatus * @param valve that is set to be homed - * @return none + * @return TRUE if the homing command accepted otherwise, FALSE *************************************************************************/ BOOL homeValve( VALVE_T valve ) { Index: firmware/App/Drivers/Battery.c =================================================================== diff -u -r50ce0801d50b365148d2969b0d75e5768744181a -rfb1673d2282822995ed233f3e9ea5dfb0567780d --- firmware/App/Drivers/Battery.c (.../Battery.c) (revision 50ce0801d50b365148d2969b0d75e5768744181a) +++ firmware/App/Drivers/Battery.c (.../Battery.c) (revision fb1673d2282822995ed233f3e9ea5dfb0567780d) @@ -103,8 +103,9 @@ * @brief * The execBatteryMonitor function monitors the battery status. * @details Inputs: lastBatteryMonitorTime, hasBatteryChargerStatus, batteryStatus, - * batteryRelStateOfCharge_pct, batteryPackStatus - * @details Outputs: monitor battery status + * batteryRelStateOfCharge_pct, batteryPackStatus, lostACPowerPersistentCount + * @details Outputs: lastBatteryMonitorTime, hasBatteryChargerStatus, + * lostACPowerPersistentCount, batteryRelStateOfCharge_pct, batteryRemCapacity_mAh * @return none *************************************************************************/ void execBatteryMonitor( void ) @@ -421,7 +422,7 @@ * The testSetBatteryRemainingPercentOverride function overrides the battery * remaining percent value. * @details Inputs: none - * @details Outputs: batteryRelStateOfCharge_pct + * @details Outputs: batteryRemCapacity_mAh * @param value override battery remaining percent * @return TRUE if override successful, FALSE if not *************************************************************************/ @@ -444,8 +445,7 @@ * The testResetSetBatteryRemainingPercentOverride function resets the * override of the battery remaining percent value. * @details Inputs: none - * @details Outputs: batteryRelStateOfCharge_pct - * @param value override battery remaining percent + * @details Outputs: batteryRemCapacity_mAh * @return TRUE if reset successful, FALSE if not *************************************************************************/ BOOL testResetSetBatteryRemainingPercentOverride( void ) Index: firmware/App/Modes/BloodPrime.c =================================================================== diff -u -r223b7a2ff87e3559679b52e52236a7cb7195c985 -rfb1673d2282822995ed233f3e9ea5dfb0567780d --- firmware/App/Modes/BloodPrime.c (.../BloodPrime.c) (revision 223b7a2ff87e3559679b52e52236a7cb7195c985) +++ firmware/App/Modes/BloodPrime.c (.../BloodPrime.c) (revision fb1673d2282822995ed233f3e9ea5dfb0567780d) @@ -237,7 +237,7 @@ setBloodIsPrimed( TRUE ); // Signal treatment mode that blood prime is completed signalDialInPumpHardStop(); // Stop dialysate recirculation - dialysis sub-mode will restart dialysate pumps signalBloodPrimeToDialysis(); // Signal treatment mode that it's time to start dialysis - //cmdStopDGTrimmerHeater(); // Stop trimmer heater - dialysis sub-mode will restart as appropriate + //cmdStopDGTrimmerHeater(); // Stop trimmer heater - dialysis sub-mode will restart as appropriate // TODO un-comment in DEN-13834 } // Is blood prime taking too long based on set BP rate? else if ( fabs( expectedBloodPrimeVolume_mL - getBloodPrimeVolume() ) > MAX_BLOOD_PRIME_VOLUME_ERROR_ML ) Index: firmware/App/Modes/ModeFault.c =================================================================== diff -u -r4e4ab946c0bc4b668cf5b197c7f841355814ccf5 -rfb1673d2282822995ed233f3e9ea5dfb0567780d --- firmware/App/Modes/ModeFault.c (.../ModeFault.c) (revision 4e4ab946c0bc4b668cf5b197c7f841355814ccf5) +++ firmware/App/Modes/ModeFault.c (.../ModeFault.c) (revision fb1673d2282822995ed233f3e9ea5dfb0567780d) @@ -60,8 +60,8 @@ * @brief * The transitionToFaultMode function prepares for transition to fault mode. * @details Inputs: none - * @details Outputs: - * @return initial state + * @details Outputs: none + * @return initial state of the fault mode state machine *************************************************************************/ U32 transitionToFaultMode( void ) { @@ -102,8 +102,8 @@ * @brief * The execFaultMode function executes the Fault Mode state machine. * @details Inputs: none - * @details Outputs: - * @return current state (sub-mode) + * @details Outputs: none + * @return current state of the fault mode *************************************************************************/ U32 execFaultMode( void ) { Index: firmware/App/Modes/SelfTests.c =================================================================== diff -u -r173e4fbf9bd750bccb2e758eb1c7ef36ed8db5a0 -rfb1673d2282822995ed233f3e9ea5dfb0567780d --- firmware/App/Modes/SelfTests.c (.../SelfTests.c) (revision 173e4fbf9bd750bccb2e758eb1c7ef36ed8db5a0) +++ firmware/App/Modes/SelfTests.c (.../SelfTests.c) (revision fb1673d2282822995ed233f3e9ea5dfb0567780d) @@ -1401,8 +1401,8 @@ * @brief * The handleWetSelfTestFirstDisplacementVerifyState function checks the load cell * readings and FMD integrated volume after the first dialysate displacement. - * @details Inputs: settleStartTime, reservoirVolume[], reservoirs' weights - * @details Outputs: verify correctness of dialysate flow meter and load cell + * @details Inputs: settleStartTime, fmdIntegratedVolume + * @details Outputs: none * @return the next state of wet self-tests state machine *************************************************************************/ static WET_SELF_TESTS_STATE_T handleWetSelfTestFirstDisplacementVerifyState( void ) @@ -1592,8 +1592,8 @@ * @brief * The handleWetSelfTestStoppedState function handles the stopped wet self-tests * operation. - * @details Inputs: none - * @details Outputs: none + * @details Inputs: selfTestsResumeRequested + * @details Outputs: selfTestsResumeRequested * @return the next state of wet self-tests state machine *************************************************************************/ static WET_SELF_TESTS_STATE_T handleWetSelfTestStoppedState( void ) Index: firmware/App/Services/AlarmMgmt.c =================================================================== diff -u -r1519b5d150fd913f596715f0eacce7d5c5e0d56c -rfb1673d2282822995ed233f3e9ea5dfb0567780d --- firmware/App/Services/AlarmMgmt.c (.../AlarmMgmt.c) (revision 1519b5d150fd913f596715f0eacce7d5c5e0d56c) +++ firmware/App/Services/AlarmMgmt.c (.../AlarmMgmt.c) (revision fb1673d2282822995ed233f3e9ea5dfb0567780d) @@ -709,7 +709,7 @@ * The handleResendActiveAlarmsRequest function processes the request to re-send * all active alarms. * @details Inputs: alarmIsActive[] -* @details Outputs: re-send active alarms to UI +* @details Outputs: none * @return none *************************************************************************/ void handleResendActiveAlarmsRequest( void ) @@ -929,8 +929,8 @@ * @brief * The setAlarmAudio function sets the alarm audio pattern according to * the current state of alarms. - * @details Inputs: none - * @details Outputs: Alarm audio patter set according to current alarms status. + * @details Inputs: alarmAudioTestToneRequested + * @details Outputs: alarmAudioTestToneRequested * @return none *************************************************************************/ static void setAlarmAudio( void ) Index: firmware/App/Services/Reservoirs.c =================================================================== diff -u -rf9570a9717805d0759622da836a33ee04f3fa40f -rfb1673d2282822995ed233f3e9ea5dfb0567780d --- firmware/App/Services/Reservoirs.c (.../Reservoirs.c) (revision f9570a9717805d0759622da836a33ee04f3fa40f) +++ firmware/App/Services/Reservoirs.c (.../Reservoirs.c) (revision fb1673d2282822995ed233f3e9ea5dfb0567780d) @@ -18,8 +18,8 @@ // ********** private definitions ********** -#define RESERVOIR_SETTLE_TIME_MS 5000 ///< Allocated time to settle the filled reservoir in milliseconds. -#define RESERVOIR_CYCLE_EXTRA_MARGIN_TIME_MS 8000 ///< Reservoir extra time in during the cycle for error in milliseconds. +#define RESERVOIR_SETTLE_TIME_MS 5000 ///< Allocated time to settle the filled reservoir in milliseconds. +#define RESERVOIR_CYCLE_EXTRA_MARGIN_TIME_MS 8000 ///< Reservoir extra time in during the cycle for error in milliseconds. #define MAX_RESERVOIR_VOLUME_ML 1950.0 ///< Maximum allowed fluid in a reservoir in milliliters. #define MAX_RESERVOIR_DILUTION 0.15F ///< Maximum reservoir dilution limit. @@ -64,7 +64,7 @@ static F32 dilutionLevelPct = 0.0; ///< Reservoir dilution level. static DG_OP_MODE_T dgOpMode = DG_MODE_INIT; ///< DG operation mode. static U32 dgSubMode = 0; ///< DG operation submode. -static U32 timeReservoirInUse = 0; ///< Reservoir time in use in milliseconds. +static U32 timeReservoirInUse = 0; ///< Reservoir time in use in milliseconds. static F32 volSpentUFML = 0.0; ///< Ultrafiltration volume in milliliters. static DG_RESERVOIR_ID_T activeReservoir; ///< Active reservoir. static F32 recirculationLevelPct = 0.0; ///< Recirculation level in percent. @@ -152,8 +152,8 @@ * @brief * The execReservoirs function executes the state machine for the treatment * reservoir management during treatment mode. - * @details Inputs: reservoirsStatus - * @details Outputs: reservoirsStatus + * @details Inputs: reservoirsState + * @details Outputs: reservoirsState, timeReservoirInUse, volSpentML * @return none *************************************************************************/ void execReservoirs( void ) @@ -178,7 +178,6 @@ if ( TREATMENT_DIALYSIS_STATE == getTreatmentState()) { - ++timeReservoirInUse; } } @@ -566,7 +565,6 @@ { SET_ALARM_WITH_1_F32_DATA( ALARM_ID_HD_ACTIVE_RESERVOIR_RECIRCULATION_OUT_OF_RANGE, recirculationLevelPct ) } - } // Check if DG has moved out of the fill mode Index: firmware/App/Services/SystemComm.c =================================================================== diff -u -r36175a36368115bdd8d1a22e99320292c16eb8db -rfb1673d2282822995ed233f3e9ea5dfb0567780d --- firmware/App/Services/SystemComm.c (.../SystemComm.c) (revision 36175a36368115bdd8d1a22e99320292c16eb8db) +++ firmware/App/Services/SystemComm.c (.../SystemComm.c) (revision fb1673d2282822995ed233f3e9ea5dfb0567780d) @@ -222,7 +222,7 @@ /*********************************************************************//** * @brief * The uiCommunicated function determines whether the UI has communicated. - * @details Inputs: uiDidCommunicate + * @details Inputs: none * @details Outputs: none * @return TRUE if UI has communicated since power up, FALSE if not *************************************************************************/ @@ -525,8 +525,9 @@ * @brief * The processIncomingData function parses out messages from the Input * Comm Buffers and adds them to the Received Message Queue. - * @details Inputs: Input Comm Buffers - * @details Outputs: Parsed message(s) added to Received Message Queue + * @details Inputs: none + * @details Outputs:hdIsOnlyCANNode, rcvMsg, dgIsCommunicating, + * timeOfLastDGCheckIn * @return none *************************************************************************/ static void processIncomingData( void ) @@ -571,8 +572,8 @@ // Blank the new message record blankMessageInWrapper( &rcvMsg ); // Copy message header portion of message data to the new message - memcpy( &(rcvMsg.msg.hdr), dataPtr, sizeof(MESSAGE_HEADER_T) ); - dataPtr += sizeof(MESSAGE_HEADER_T); + memcpy( &(rcvMsg.msg.hdr), dataPtr, sizeof( MESSAGE_HEADER_T ) ); + dataPtr += sizeof( MESSAGE_HEADER_T ); // Copy message payload portion of message data to the new message memcpy( &(rcvMsg.msg.payload), dataPtr, rcvMsg.msg.hdr.payloadLen ); dataPtr += rcvMsg.msg.hdr.payloadLen;