Index: firmware/App/Controllers/BloodLeak.c =================================================================== diff -u -r0444258d6627e442d76ae6519802a334c73a141d -ra053cecf0673654e2bc03e9a34ff15845c8cff93 --- firmware/App/Controllers/BloodLeak.c (.../BloodLeak.c) (revision 0444258d6627e442d76ae6519802a334c73a141d) +++ firmware/App/Controllers/BloodLeak.c (.../BloodLeak.c) (revision a053cecf0673654e2bc03e9a34ff15845c8cff93) @@ -1,6 +1,6 @@ /************************************************************************** * -* Copyright (c) 2021-2022 Diality Inc. - All Rights Reserved. +* Copyright (c) 2021-2023 Diality Inc. - All Rights Reserved. * * THIS CODE MAY NOT BE COPIED OR REPRODUCED IN ANY FORM, IN PART OR IN * WHOLE, WITHOUT THE EXPLICIT PERMISSION OF THE COPYRIGHT OWNER. Index: firmware/App/Controllers/BloodLeak.h =================================================================== diff -u -r0a4dcd288d4347b85baaa0b07da568b6add5eac7 -ra053cecf0673654e2bc03e9a34ff15845c8cff93 --- firmware/App/Controllers/BloodLeak.h (.../BloodLeak.h) (revision 0a4dcd288d4347b85baaa0b07da568b6add5eac7) +++ firmware/App/Controllers/BloodLeak.h (.../BloodLeak.h) (revision a053cecf0673654e2bc03e9a34ff15845c8cff93) @@ -60,7 +60,7 @@ SELF_TEST_STATUS_T execBloodLeakSelfTest( void ); BLOOD_LEAK_STATUS_T getBloodLeakStatus( void ); -SELF_TEST_STATUS_T getBloodLeakSelfTestStatus( void ); +SELF_TEST_STATUS_T getBloodLeakSelfTestStatus( void ); BOOL testSetBloodLeakDataPublishIntervalOverride( U32 value ); BOOL testResetBloodLeakDataPublishIntervalOverride( void ); Index: firmware/App/Controllers/DGInterface.c =================================================================== diff -u -r0a4dcd288d4347b85baaa0b07da568b6add5eac7 -ra053cecf0673654e2bc03e9a34ff15845c8cff93 --- firmware/App/Controllers/DGInterface.c (.../DGInterface.c) (revision 0a4dcd288d4347b85baaa0b07da568b6add5eac7) +++ firmware/App/Controllers/DGInterface.c (.../DGInterface.c) (revision a053cecf0673654e2bc03e9a34ff15845c8cff93) @@ -235,7 +235,7 @@ void execDGInterfaceMonitor( void ) { // Trigger alarm if not receiving new load cell data message in timely manner - checkDGDataFreshness( ALARM_ID_HD_NEW_LOAD_CELL_DATA_MESSAGE_NOT_RECEIVE, &dgLoadCellDataFreshFlag ); + /*checkDGDataFreshness( ALARM_ID_HD_NEW_LOAD_CELL_DATA_MESSAGE_NOT_RECEIVE, &dgLoadCellDataFreshFlag ); // Trigger alarm if not receiving new dialysate temperature data message in timely manner checkDGDataFreshness( ALARM_ID_HD_NEW_DIALYSATE_TEMPERATURE_DATA_MESSAGE_NOT_RECEIVE, &dgDialysateTemperatureDataFreshFlag ); @@ -246,7 +246,7 @@ // Trigger alarm if not receiving new DG op mode message in timely manner checkDGDataFreshness( ALARM_ID_HD_NEW_DG_OPERATION_MODE_MESSAGE_NOT_RECEIVE, &dgOpModeDataFreshFlag ); - // Check to see if DG has restarted + // Check to see if DG has restarted*/ checkDGRestart(); // Check the status of the trimmer heater @@ -452,14 +452,14 @@ /*********************************************************************//** * @brief - * The getDialysateTemperature function gets the latest dialysate temperature. - * @details Inputs: dgDialysateTemp + * The getDGDisinfectsStates function returns the DG disinfects readings. + * @details Inputs: none * @details Outputs: none - * @return the current dialysate temperature + * @return the current DG disinfects readings *************************************************************************/ -F32 getDialysateTemperature( void ) +DG_DISINFECT_UI_STATES_T getDGDisinfectsStates( void ) { - return dgDialysateTemp; + return disinfectsStatus; } /*********************************************************************//** @@ -480,11 +480,11 @@ * The getDGDisinfectsStates function returns the DG disinfects readings. * @details Inputs: none * @details Outputs: none - * @return the current DG disinfects readings + * @return the current dialysate temperature *************************************************************************/ -DG_DISINFECT_UI_STATES_T getDGDisinfectsStates( void ) +F32 getDialysateTemperature( void ) { - return disinfectsStatus; + return dgDialysateTemp; } /*********************************************************************//** Index: firmware/App/Controllers/DGInterface.h =================================================================== diff -u -r0a4dcd288d4347b85baaa0b07da568b6add5eac7 -ra053cecf0673654e2bc03e9a34ff15845c8cff93 --- firmware/App/Controllers/DGInterface.h (.../DGInterface.h) (revision 0a4dcd288d4347b85baaa0b07da568b6add5eac7) +++ firmware/App/Controllers/DGInterface.h (.../DGInterface.h) (revision a053cecf0673654e2bc03e9a34ff15845c8cff93) @@ -131,6 +131,7 @@ F32 getDialysateTemperature( void ); F32 getHeatDisinfectTemperatureSensorValue( void ); DG_DISINFECT_UI_STATES_T getDGDisinfectsStates( void ); +F32 getDialysateTemperature( void ); DG_MIXING_RATIOS_T getDGMixingRatios( void ); void getHDVersionDGServiceAndUsageData( DG_SERVICE_AND_USAGE_DATA_T* data ); Index: firmware/App/Controllers/DialInFlow.c =================================================================== diff -u -r4add9605a250a0b953217c8673204b705128561b -ra053cecf0673654e2bc03e9a34ff15845c8cff93 --- firmware/App/Controllers/DialInFlow.c (.../DialInFlow.c) (revision 4add9605a250a0b953217c8673204b705128561b) +++ firmware/App/Controllers/DialInFlow.c (.../DialInFlow.c) (revision a053cecf0673654e2bc03e9a34ff15845c8cff93) @@ -75,6 +75,7 @@ /// Persist time (task intervals) for flow vs. motor speed error condition. static const U32 DIP_FLOW_VS_SPEED_PERSIST = ((5 * MS_PER_SECOND) / TASK_PRIORITY_INTERVAL); +//static const U32 DIP_FLOW_VS_SPEED_PERSIST = ((60 * MS_PER_SECOND) / TASK_PRIORITY_INTERVAL); //DN-03NOV2022 - Make it 1 minutes for testing /// Persist time (task intervals) for motor off error condition. static const U32 DIP_OFF_ERROR_PERSIST = ((5 * MS_PER_SECOND) / TASK_PRIORITY_INTERVAL); /// Persist time (task intervals) motor speed error condition. Index: firmware/App/Controllers/PresOccl.c =================================================================== diff -u -rda7e8c1b71db9273f83e9d0ba7d20e74e758a8ad -ra053cecf0673654e2bc03e9a34ff15845c8cff93 --- firmware/App/Controllers/PresOccl.c (.../PresOccl.c) (revision da7e8c1b71db9273f83e9d0ba7d20e74e758a8ad) +++ firmware/App/Controllers/PresOccl.c (.../PresOccl.c) (revision a053cecf0673654e2bc03e9a34ff15845c8cff93) @@ -73,6 +73,7 @@ #define PSI_TO_MMHG ( 51.7149F ) ///< Conversion factor for converting PSI to mmHg. +// The new arterial pressure sensor is the same as the venous pressure sensor #define VENOUS_PRESSURE_NORMAL_OP 0 ///< Venous pressure status bits indicate normal operation. #define VENOUS_PRESSURE_CMD_MODE 1 ///< Venous pressure status bits indicate sensor in command mode. #define VENOUS_PRESSURE_STALE_DATA 2 ///< Venous pressure status bits indicate data is stale (no new data since last fpga read). @@ -644,7 +645,7 @@ // and setOcclusionInstallLevel has been called. if ( MODE_PRET == getCurrentOperationMode() ) { - if ( getPreTreatmentSubState() > HD_PRE_TREATMENT_CART_INSTALL_STATE && getDrySelfTestsState() > DRY_SELF_TESTS_START_STATE ) + if( getPreTreatmentSubState() > HD_PRE_TREATMENT_CART_INSTALL_STATE && getDrySelfTestsState() > DRY_SELF_TESTS_START_STATE ) { // Check for occlusion if ( bpOccl > ( OCCLUSION_THRESHOLD_OFFSET + bloodPumpOcclusionAfterCartridgeInstall ) ) @@ -654,7 +655,6 @@ } } } - // Check for occlusion in Treatment modes where pumps are moving else if ( MODE_TREA == getCurrentOperationMode() ) { Index: firmware/App/Controllers/SyringePump.c =================================================================== diff -u -r0a4dcd288d4347b85baaa0b07da568b6add5eac7 -ra053cecf0673654e2bc03e9a34ff15845c8cff93 --- firmware/App/Controllers/SyringePump.c (.../SyringePump.c) (revision 0a4dcd288d4347b85baaa0b07da568b6add5eac7) +++ firmware/App/Controllers/SyringePump.c (.../SyringePump.c) (revision a053cecf0673654e2bc03e9a34ff15845c8cff93) @@ -93,6 +93,7 @@ /// Expected position of empty in relation to home position. #define SYRINGE_PUMP_EMPTY_POS ( SYRINGE_ENCODER_COUNTS_PER_ML * 10.84F ) + /// Margin of error for empty position determination. #define SYRINGE_PUMP_EMPTY_POS_MARGIN ( SYRINGE_ENCODER_COUNTS_PER_ML * 0.5F ) /// Minimum retract position. @@ -156,8 +157,10 @@ #define SYRINGE_PUMP_STALL_SPEED_THRESHOLD 0.05F ///< Minimum syringe pump speed to be considered not stalled. #define SYRINGE_PUMP_ADC_FPGA_ERROR_TIMEOUT_MS ( 2 * MS_PER_SECOND ) ///< Syringe pump ADC FPGA error timeout in milliseconds. + #define SYRINGE_PUMP_DAC_MAX_RETRIES 5 ///< Syringe pump DAC retries to write. #define SYRINGE_PUMP_DAC_TIMER ( 200 / TASK_PRIORITY_INTERVAL ) ///< Syringe pump DAC timer between retries. + /// Defined states for the syringe pump control state machine. typedef enum SyringePump_States { Index: firmware/App/Controllers/Temperatures.c =================================================================== diff -u -r4df8828df03ee996540084c57f9b46c0febc1e03 -ra053cecf0673654e2bc03e9a34ff15845c8cff93 --- firmware/App/Controllers/Temperatures.c (.../Temperatures.c) (revision 4df8828df03ee996540084c57f9b46c0febc1e03) +++ firmware/App/Controllers/Temperatures.c (.../Temperatures.c) (revision a053cecf0673654e2bc03e9a34ff15845c8cff93) @@ -288,9 +288,10 @@ if ( ( temperature > MAX_ALLOWED_TEMPERATURE ) || ( temperature < MIN_ALLOWED_TEMPERATURE ) ) { - isTempOutOfRange |= TRUE; - lastFaultSensor = sensor; + isTempOutOfRange = TRUE; + lastFaultSensor = sensor; } + } checkPersistentAlarm( ALARM_ID_HD_TEMPERATURES_OUT_OF_RANGE, isTempOutOfRange, lastFaultSensor, MAX_ALLOWED_TEMPERATURE ); Index: firmware/App/Drivers/Battery.c =================================================================== diff -u -r0a4dcd288d4347b85baaa0b07da568b6add5eac7 -ra053cecf0673654e2bc03e9a34ff15845c8cff93 --- firmware/App/Drivers/Battery.c (.../Battery.c) (revision 0a4dcd288d4347b85baaa0b07da568b6add5eac7) +++ firmware/App/Drivers/Battery.c (.../Battery.c) (revision a053cecf0673654e2bc03e9a34ff15845c8cff93) @@ -194,6 +194,7 @@ if ( TRUE == didTimeout( lastBatteryMonitorTime, BATTERY_MONITOR_INTERVAL_MS ) ) { lastBatteryMonitorTime = getMSTimerCount(); + getBatteryManagementData(); } } Index: firmware/App/HDCommon.h =================================================================== diff -u -r1fb9a0a4378143d7ea8d2c4de8b7731e417dd4a6 -ra053cecf0673654e2bc03e9a34ff15845c8cff93 --- firmware/App/HDCommon.h (.../HDCommon.h) (revision 1fb9a0a4378143d7ea8d2c4de8b7731e417dd4a6) +++ firmware/App/HDCommon.h (.../HDCommon.h) (revision a053cecf0673654e2bc03e9a34ff15845c8cff93) @@ -10,8 +10,8 @@ * @author (last) Sean Nash * @date (last) 21-Dec-2022 * -* @author (original) Sean -* @date (original) 27-Feb-2020 +* @author (original) Sean +* @date (original) 27-Feb-2020 * ***************************************************************************/ @@ -25,7 +25,7 @@ #define HD_VERSION_MAJOR 0 #define HD_VERSION_MINOR 6 #define HD_VERSION_MICRO 0 -#define HD_VERSION_BUILD 78 +#define HD_VERSION_BUILD 422 // ********** development build switches ********** Index: firmware/App/Modes/ConsumableSelfTest.c =================================================================== diff -u -r0a4dcd288d4347b85baaa0b07da568b6add5eac7 -ra053cecf0673654e2bc03e9a34ff15845c8cff93 --- firmware/App/Modes/ConsumableSelfTest.c (.../ConsumableSelfTest.c) (revision 0a4dcd288d4347b85baaa0b07da568b6add5eac7) +++ firmware/App/Modes/ConsumableSelfTest.c (.../ConsumableSelfTest.c) (revision a053cecf0673654e2bc03e9a34ff15845c8cff93) @@ -106,6 +106,7 @@ if ( TRUE == consumableInstallConfirmed ) { consumableInstallConfirmed = FALSE; + #ifndef _RELEASE_ if ( SW_CONFIG_ENABLE_VALUE == getSoftwareConfigStatus( SW_CONFIG_DISABLE_CONSUMABLES_TESTS ) ) { Index: firmware/App/Modes/ModePreTreat.c =================================================================== diff -u -rda7e8c1b71db9273f83e9d0ba7d20e74e758a8ad -ra053cecf0673654e2bc03e9a34ff15845c8cff93 --- firmware/App/Modes/ModePreTreat.c (.../ModePreTreat.c) (revision da7e8c1b71db9273f83e9d0ba7d20e74e758a8ad) +++ firmware/App/Modes/ModePreTreat.c (.../ModePreTreat.c) (revision a053cecf0673654e2bc03e9a34ff15845c8cff93) @@ -629,8 +629,7 @@ signalBloodPumpHardStop(); signalDialOutPumpHardStop(); - //setDialInPumpTargetFlowRate( DIP_PATIENT_CONNECTION_FLOW_RATE_ML_MIN, MOTOR_DIR_FORWARD, PUMP_CONTROL_MODE_OPEN_LOOP ); - setDialInPumpTargetFlowRate( 250, MOTOR_DIR_FORWARD, PUMP_CONTROL_MODE_OPEN_LOOP ); // TODO remove this line once the new flow control is implemented + setDialInPumpTargetFlowRate( DIP_PATIENT_CONNECTION_FLOW_RATE_ML_MIN, MOTOR_DIR_FORWARD, PUMP_CONTROL_MODE_OPEN_LOOP ); cmdStartDGTrimmerHeater(); } @@ -1184,6 +1183,7 @@ rsrvrCmd.reservoirID = (U32)DG_RESERVOIR_1; rsrvrCmd.useLastTrimmerHeaterDC = FALSE; reservoirFlushedStatus[ DG_RESERVOIR_1 ] = TRUE; + cmdSetDGActiveReservoir( &rsrvrCmd ); } } @@ -1194,6 +1194,7 @@ rsrvrCmd.reservoirID = (U32)DG_RESERVOIR_2; rsrvrCmd.useLastTrimmerHeaterDC = FALSE; reservoirFlushedStatus[ DG_RESERVOIR_2 ] = TRUE; + cmdSetDGActiveReservoir( &rsrvrCmd ); } } Index: firmware/App/Modes/ModeStandby.c =================================================================== diff -u -r4df8828df03ee996540084c57f9b46c0febc1e03 -ra053cecf0673654e2bc03e9a34ff15845c8cff93 --- firmware/App/Modes/ModeStandby.c (.../ModeStandby.c) (revision 4df8828df03ee996540084c57f9b46c0febc1e03) +++ firmware/App/Modes/ModeStandby.c (.../ModeStandby.c) (revision a053cecf0673654e2bc03e9a34ff15845c8cff93) @@ -68,6 +68,7 @@ static OVERRIDE_U32_T standbyModePublishInterval = { DISINFECTS_DATA_PUB_INTERVAL, DISINFECTS_DATA_PUB_INTERVAL, DISINFECTS_DATA_PUB_INTERVAL, 0 }; static const U32 SERVICE_TIME_INTERVAL_S = (U32)( 365 * 0.5 * SECONDS_IN_A_DAY ); ///< HD/DG 6-month service interval in seconds. +static BOOL homingInitiated; ///< Flag indicates actuator homing has been initiated from standby mode. // ********** private function prototypes ********** @@ -111,6 +112,7 @@ heatDisinfectStartReqReceived = FALSE; chemDisinfectStartReqReceived = FALSE; disinfectCancelReqID = GENERIC_CONFIRM_ID_NONE; + homingInitiated = FALSE; dgDisinfectState = DG_DISINFECT_NOT_RUNNING_STATE; homingInitiated = FALSE; } Index: firmware/App/Modes/ModeStandby.h =================================================================== diff -u -r0a4dcd288d4347b85baaa0b07da568b6add5eac7 -ra053cecf0673654e2bc03e9a34ff15845c8cff93 --- firmware/App/Modes/ModeStandby.h (.../ModeStandby.h) (revision 0a4dcd288d4347b85baaa0b07da568b6add5eac7) +++ firmware/App/Modes/ModeStandby.h (.../ModeStandby.h) (revision a053cecf0673654e2bc03e9a34ff15845c8cff93) @@ -48,15 +48,11 @@ BOOL signalUserInitiateTreatment( void ); // User has initiated a treatment - go to treatment parameters mode void signalAlarmActionToStandbyMode( ALARM_ACTION_T action ); // Execute alarm action as appropriate for Standby mode +BOOL signalUserInitiateFlushMode( void ); // User has requested to start flush +BOOL signalUserInitiateHeatDisinfectMode( void ); // User has requested to start heat disinfection +BOOL signalUserInitiateChemicalDisinfectMode( void ); // User has requested to start chem disinfection +BOOL signalInitiateStandbyDisinfectSubmode( U32 cmd ); // UI has signaled user will be selecting a cleaning operation to perform -BOOL signalUserInitiateFlushMode( void ); - -BOOL signalUserInitiateHeatDisinfectMode( void ); - -BOOL signalUserInitiateChemicalDisinfectMode( void ); - -BOOL signalInitiateStandbyDisinfectSubmode( U32 cmd ); - BOOL testSetStandbyModePublishIntervalOverride( U32 ms ); BOOL testResetStandbyModePublishIntervalOverride( void ); Index: firmware/App/Modes/SelfTests.c =================================================================== diff -u -r4add9605a250a0b953217c8673204b705128561b -ra053cecf0673654e2bc03e9a34ff15845c8cff93 --- firmware/App/Modes/SelfTests.c (.../SelfTests.c) (revision 4add9605a250a0b953217c8673204b705128561b) +++ firmware/App/Modes/SelfTests.c (.../SelfTests.c) (revision a053cecf0673654e2bc03e9a34ff15845c8cff93) @@ -69,7 +69,6 @@ #define DIP_FLOW_RATE_FIRST_DISPLACEMENT_ML_MIN 100 ///< Dialysate inlet pump flow rate during the first displacement in wet self-test. #define DIP_FLOW_RATE_SECOND_DISPLACEMENT_ML_MIN 600 ///< Dialysate inlet pump flow rate during the second displacement in wet self-test. -#define WET_SELF_TEST_RESERVOIR_ONE_SETUP_VOLUME_ML 1200.0F ///< Setup volume for reservoir one before wet self-test in ml. #define WET_SELF_TEST_FIRST_DISPLACEMENT_TARGET_VOLUME_ML 100.0F ///< Target of first displacement volume in ml. #define WET_SELF_TEST_SECOND_DISPLACEMENT_TARGET_VOLUME_ML 600.0F ///< Target of second displacement volume in ml. #define WET_SELF_TEST_INTEGRATED_VOLUME_PCT_TOLERANCE 0.05F ///< Tolerance on integrated volume as a percentage (5%). @@ -87,9 +86,6 @@ #define PRESSURE_CHECK_START_PRESSURE_TOLERANCE_MMHG 10.0F ///< Prior to dry pressure leak test, arterial and venous pressure sensors should read zero +/- this tolerance. #define MAX_EMPTY_RESERVOIR_WEIGHT_G 15.0F ///< Maximum reservoir weight to be considered empty for cartridge pressure leak test. -/// Multiplier to conver flow (mL/min) into volume (mL) for period of general task interval. -static const F32 SELF_TEST_FLOW_INTEGRATOR = ( ( 1.0F * TASK_GENERAL_INTERVAL ) / ( SEC_PER_MIN * MS_PER_SECOND ) ); - // ********** private data ********** static NO_CART_SELF_TESTS_STATE_T currentNoCartSelfTestsState; ///< Current state of the no cartridge self-tests state machine. @@ -116,7 +112,6 @@ static U32 displacementStartTime; ///< Dialysate displacement starting time. static F32 fmdIntegratedVolume; ///< FMD integrated volume over displacement time. static F32 reservoirVolume[ NUM_OF_DG_RESERVOIRS ]; ///< Hold the current volume of all reservoirs. -static F32 setupDisplacementVolume; ///< Hold the setup displacement volume to get reservoir one to target volume. static BOOL isValvesSettingSent; ///< Flag indicates valve setting change has been send to DG. static U32 selfTestStartTime; ///< Starting time of self-test (in ms). @@ -357,7 +352,7 @@ } else { - SET_ALARM_WITH_1_U32_DATA( ALARM_ID_HD_NO_CART_SELF_TEST_TIMEOUT, currentNoCartSelfTestsState ); +// SET_ALARM_WITH_1_U32_DATA( ALARM_ID_HD_NO_CART_SELF_TEST_TIMEOUT, currentNoCartSelfTestsState ); } } } @@ -1488,24 +1483,20 @@ *************************************************************************/ static WET_SELF_TESTS_STATE_T handleWetSelfTestStartState( void ) { - WET_SELF_TESTS_STATE_T state = WET_SELF_TESTS_START_STATE; + WET_SELF_TESTS_STATE_T state = WET_SELF_TESTS_SETUP_STATE; F32 resOneWeight = getReservoirWeightLargeFilter( DG_RESERVOIR_1 ); - setupDisplacementVolume = fabs( resOneWeight - WET_SELF_TEST_RESERVOIR_ONE_SETUP_VOLUME_ML ); F32 bolusVol = getTreatmentParameterF32( TREATMENT_PARAM_HEPARIN_BOLUS_VOLUME ); isValvesSettingSent = TRUE; setValvePosition( VDI, VALVE_POSITION_C_CLOSE ); setValvePosition( VDO, VALVE_POSITION_C_CLOSE ); - setDialInPumpTargetFlowRate( DIP_FLOW_RATE_SETUP_ML_MIN, MOTOR_DIR_FORWARD, PUMP_CONTROL_MODE_OPEN_LOOP ); fmdIntegratedVolume = 0.0F; if ( ( bolusVol > 0.0F ) && ( getSyringePumpVolumeDelivered() < bolusVol ) ) { startHeparinBolus(); // moved here from startHeparinPump() in Dialysis.c } - state = WET_SELF_TESTS_SETUP_STATE; - if ( TRUE == doesAlarmStatusIndicateStop() ) { state = WET_SELF_TESTS_STOPPED_STATE; @@ -1525,17 +1516,10 @@ *************************************************************************/ static WET_SELF_TESTS_STATE_T handleWetSelfTestSetupState( void ) { - WET_SELF_TESTS_STATE_T state = WET_SELF_TESTS_SETUP_STATE; + WET_SELF_TESTS_STATE_T state = WET_SELF_TESTS_BUBBLES_STATE; - setupDisplacementVolume -= ( SELF_TEST_FLOW_INTEGRATOR * getMeasuredDialInFlowRate() ); + selfTestBubble( ADV ); - if ( setupDisplacementVolume <= 0.0 ) - { - signalDialInPumpHardStop(); - selfTestBubble( ADV ); - state = WET_SELF_TESTS_BUBBLES_STATE; - } - if ( TRUE == doesAlarmStatusIndicateStop() ) { state = WET_SELF_TESTS_STOPPED_STATE; Index: firmware/App/Services/SystemCommMessages.c =================================================================== diff -u -rda7e8c1b71db9273f83e9d0ba7d20e74e758a8ad -ra053cecf0673654e2bc03e9a34ff15845c8cff93 --- firmware/App/Services/SystemCommMessages.c (.../SystemCommMessages.c) (revision da7e8c1b71db9273f83e9d0ba7d20e74e758a8ad) +++ firmware/App/Services/SystemCommMessages.c (.../SystemCommMessages.c) (revision a053cecf0673654e2bc03e9a34ff15845c8cff93) @@ -802,7 +802,7 @@ } else { - sendAckResponseMsg( (MSG_ID_T)message->hdr.msgID, COMM_BUFFER_OUT_CAN_HD_2_UI, FALSE ); + sendAckResponseMsg( (MSG_ID_T)message->hdr.msgID, COMM_BUFFER_OUT_CAN_HD_2_UI, ACK_NOT_REQUIRED ); } } @@ -999,7 +999,7 @@ } else { - sendAckResponseMsg( (MSG_ID_T)message->hdr.msgID, COMM_BUFFER_OUT_CAN_HD_2_UI, FALSE ); + sendAckResponseMsg( (MSG_ID_T)message->hdr.msgID, COMM_BUFFER_OUT_CAN_HD_2_UI, ACK_NOT_REQUIRED ); } } @@ -1147,7 +1147,7 @@ } else { - sendAckResponseMsg( (MSG_ID_T)message->hdr.msgID, COMM_BUFFER_OUT_CAN_HD_2_UI, FALSE ); + sendAckResponseMsg( (MSG_ID_T)message->hdr.msgID, COMM_BUFFER_OUT_CAN_HD_2_UI, ACK_NOT_REQUIRED ); } } @@ -1185,7 +1185,7 @@ } else { - sendAckResponseMsg( (MSG_ID_T)message->hdr.msgID, COMM_BUFFER_OUT_CAN_HD_2_UI, FALSE ); + sendAckResponseMsg( (MSG_ID_T)message->hdr.msgID, COMM_BUFFER_OUT_CAN_HD_2_UI, ACK_NOT_REQUIRED ); } } @@ -1206,7 +1206,7 @@ } else { - sendAckResponseMsg( (MSG_ID_T)message->hdr.msgID, COMM_BUFFER_OUT_CAN_HD_2_UI, FALSE ); + sendAckResponseMsg( (MSG_ID_T)message->hdr.msgID, COMM_BUFFER_OUT_CAN_HD_2_UI, ACK_NOT_REQUIRED ); } } @@ -1242,7 +1242,7 @@ } else { - sendAckResponseMsg( (MSG_ID_T)message->hdr.msgID, COMM_BUFFER_OUT_CAN_HD_2_UI, FALSE ); + sendAckResponseMsg( (MSG_ID_T)message->hdr.msgID, COMM_BUFFER_OUT_CAN_HD_2_UI, ACK_NOT_REQUIRED ); } } @@ -1263,7 +1263,7 @@ } else { - sendAckResponseMsg( (MSG_ID_T)message->hdr.msgID, COMM_BUFFER_OUT_CAN_HD_2_UI, FALSE ); + sendAckResponseMsg( (MSG_ID_T)message->hdr.msgID, COMM_BUFFER_OUT_CAN_HD_2_UI, ACK_NOT_REQUIRED ); } } @@ -1299,7 +1299,7 @@ } else { - sendAckResponseMsg( (MSG_ID_T)message->hdr.msgID, COMM_BUFFER_OUT_CAN_HD_2_UI, FALSE ); + sendAckResponseMsg( (MSG_ID_T)message->hdr.msgID, COMM_BUFFER_OUT_CAN_HD_2_UI, ACK_NOT_REQUIRED ); } } @@ -1335,7 +1335,7 @@ } else { - sendAckResponseMsg( (MSG_ID_T)message->hdr.msgID, COMM_BUFFER_OUT_CAN_HD_2_UI, FALSE ); + sendAckResponseMsg( (MSG_ID_T)message->hdr.msgID, COMM_BUFFER_OUT_CAN_HD_2_UI, ACK_NOT_REQUIRED ); } } @@ -1370,7 +1370,7 @@ } else { - sendAckResponseMsg( (MSG_ID_T)message->hdr.msgID, COMM_BUFFER_OUT_CAN_HD_2_UI, FALSE ); + sendAckResponseMsg( (MSG_ID_T)message->hdr.msgID, COMM_BUFFER_OUT_CAN_HD_2_UI, ACK_NOT_REQUIRED ); } } @@ -2113,7 +2113,7 @@ } else { - sendAckResponseMsg( (MSG_ID_T)message->hdr.msgID, COMM_BUFFER_OUT_CAN_HD_2_UI, FALSE ); + sendAckResponseMsg( (MSG_ID_T)message->hdr.msgID, COMM_BUFFER_OUT_CAN_HD_2_UI, ACK_NOT_REQUIRED ); } } @@ -2141,7 +2141,7 @@ } else { - sendAckResponseMsg( (MSG_ID_T)message->hdr.msgID, COMM_BUFFER_OUT_CAN_HD_2_UI, FALSE ); + sendAckResponseMsg( (MSG_ID_T)message->hdr.msgID, COMM_BUFFER_OUT_CAN_HD_2_UI, ACK_NOT_REQUIRED ); } } @@ -2226,7 +2226,7 @@ } else { - sendAckResponseMsg( (MSG_ID_T)message->hdr.msgID, COMM_BUFFER_OUT_CAN_HD_2_UI, FALSE ); + sendAckResponseMsg( (MSG_ID_T)message->hdr.msgID, COMM_BUFFER_OUT_CAN_HD_2_UI, ACK_NOT_REQUIRED ); } } @@ -2276,7 +2276,7 @@ } else { - sendAckResponseMsg( (MSG_ID_T)message->hdr.msgID, COMM_BUFFER_OUT_CAN_HD_2_UI, FALSE ); + sendAckResponseMsg( (MSG_ID_T)message->hdr.msgID, COMM_BUFFER_OUT_CAN_HD_2_UI, ACK_NOT_REQUIRED ); } } @@ -2682,7 +2682,7 @@ } else { - sendAckResponseMsg( (MSG_ID_T)message->hdr.msgID, COMM_BUFFER_OUT_CAN_HD_2_UI, FALSE ); + sendAckResponseMsg( (MSG_ID_T)message->hdr.msgID, COMM_BUFFER_OUT_CAN_HD_2_UI, ACK_NOT_REQUIRED ); } } @@ -2707,7 +2707,7 @@ } else { - sendAckResponseMsg( (MSG_ID_T)message->hdr.msgID, COMM_BUFFER_OUT_CAN_HD_2_UI, FALSE ); + sendAckResponseMsg( (MSG_ID_T)message->hdr.msgID, COMM_BUFFER_OUT_CAN_HD_2_UI, ACK_NOT_REQUIRED ); } } @@ -2731,7 +2731,7 @@ } else { - sendAckResponseMsg( (MSG_ID_T)message->hdr.msgID, COMM_BUFFER_OUT_CAN_HD_2_UI, FALSE ); + sendAckResponseMsg( (MSG_ID_T)message->hdr.msgID, COMM_BUFFER_OUT_CAN_HD_2_UI, ACK_NOT_REQUIRED ); } } @@ -2760,7 +2760,7 @@ } else { - sendAckResponseMsg( (MSG_ID_T)message->hdr.msgID, COMM_BUFFER_OUT_CAN_HD_2_UI, FALSE ); + sendAckResponseMsg( (MSG_ID_T)message->hdr.msgID, COMM_BUFFER_OUT_CAN_HD_2_UI, ACK_NOT_REQUIRED ); } } @@ -2785,7 +2785,7 @@ } else { - sendAckResponseMsg( (MSG_ID_T)message->hdr.msgID, COMM_BUFFER_OUT_CAN_HD_2_UI, FALSE ); + sendAckResponseMsg( (MSG_ID_T)message->hdr.msgID, COMM_BUFFER_OUT_CAN_HD_2_UI, ACK_NOT_REQUIRED ); } } @@ -2810,7 +2810,7 @@ } else { - sendAckResponseMsg( (MSG_ID_T)message->hdr.msgID, COMM_BUFFER_OUT_CAN_HD_2_UI, FALSE ); + sendAckResponseMsg( (MSG_ID_T)message->hdr.msgID, COMM_BUFFER_OUT_CAN_HD_2_UI, ACK_NOT_REQUIRED ); } } @@ -2835,7 +2835,7 @@ } else { - sendAckResponseMsg( (MSG_ID_T)message->hdr.msgID, COMM_BUFFER_OUT_CAN_HD_2_UI, FALSE ); + sendAckResponseMsg( (MSG_ID_T)message->hdr.msgID, COMM_BUFFER_OUT_CAN_HD_2_UI, ACK_NOT_REQUIRED ); } } @@ -2867,7 +2867,7 @@ } else { - sendAckResponseMsg( (MSG_ID_T)message->hdr.msgID, COMM_BUFFER_OUT_CAN_HD_2_UI, FALSE ); + sendAckResponseMsg( (MSG_ID_T)message->hdr.msgID, COMM_BUFFER_OUT_CAN_HD_2_UI, ACK_NOT_REQUIRED ); } } @@ -2926,7 +2926,7 @@ } else { - sendAckResponseMsg( (MSG_ID_T)message->hdr.msgID, COMM_BUFFER_OUT_CAN_HD_2_UI, FALSE ); + sendAckResponseMsg( (MSG_ID_T)message->hdr.msgID, COMM_BUFFER_OUT_CAN_HD_2_UI, ACK_NOT_REQUIRED ); } } @@ -2982,7 +2982,7 @@ } else { - sendAckResponseMsg( (MSG_ID_T)message->hdr.msgID, COMM_BUFFER_OUT_CAN_HD_2_UI, FALSE ); + sendAckResponseMsg( (MSG_ID_T)message->hdr.msgID, COMM_BUFFER_OUT_CAN_HD_2_UI, ACK_NOT_REQUIRED ); } } @@ -3039,7 +3039,7 @@ } else { - sendAckResponseMsg( (MSG_ID_T)message->hdr.msgID, COMM_BUFFER_OUT_CAN_HD_2_UI, FALSE ); + sendAckResponseMsg( (MSG_ID_T)message->hdr.msgID, COMM_BUFFER_OUT_CAN_HD_2_UI, ACK_NOT_REQUIRED ); } } @@ -3272,7 +3272,6 @@ *************************************************************************/ void handleUIConfirmationResponse( MESSAGE_T *message ) { - BOOL result = FALSE; U08* payloadPtr = message->payload; if ( message->hdr.payloadLen == 2 * sizeof(U32) ) @@ -3291,7 +3290,7 @@ } } - sendAckResponseMsg( (MSG_ID_T)message->hdr.msgID, COMM_BUFFER_OUT_CAN_HD_2_UI, result ); + sendAckResponseMsg( (MSG_ID_T)message->hdr.msgID, COMM_BUFFER_OUT_CAN_HD_2_UI, ACK_NOT_REQUIRED ); } /*********************************************************************//** @@ -5251,6 +5250,7 @@ if ( sizeof( TEST_OVERRIDE_PAYLOAD_T ) == message->hdr.payloadLen ) { memcpy( &payload, message->payload, sizeof( TEST_OVERRIDE_PAYLOAD_T ) ); + if ( FALSE == payload.reset ) { result = testSetBatteryRemainingPercentOverride( payload.state.f32 ); @@ -7520,11 +7520,12 @@ * the blood leak embedded mode command response. * @details Inputs: none * @details Outputs: blood leak embedded mode command response msg constructed and queued + * @param cmd: the command its response is being sent * @param responseLen: the length of the buffer * @param response: pointer to the response buffer * @return TRUE if msg successfully queued for transmit, FALSE if not *************************************************************************/ -BOOL sendBloodLeakEmbeddedModeCommandResponse( U32 responseLen, U08* response ) +BOOL sendBloodLeakEmbeddedModeCommandResponse( U08 cmd, U32 responseLen, U08* response ) { BOOL result; MESSAGE_T msg; @@ -7533,8 +7534,10 @@ // Create a message record blankMessage( &msg ); msg.hdr.msgID = MSG_ID_HD_SEND_BLOOD_LEAK_EMB_MODE_RESPONSE; - msg.hdr.payloadLen = sizeof( U32 ) + responseLen; + msg.hdr.payloadLen = sizeof( U08 ) + sizeof( U32 ) + responseLen; + memcpy( payloadPtr, &cmd, sizeof( U08 ) ); + payloadPtr += sizeof( U08 ); memcpy( payloadPtr, &responseLen, sizeof( U32 ) ); payloadPtr += sizeof( U32 ); memcpy( payloadPtr, response, responseLen ); Index: firmware/App/Services/SystemCommMessages.h =================================================================== diff -u -rda7e8c1b71db9273f83e9d0ba7d20e74e758a8ad -ra053cecf0673654e2bc03e9a34ff15845c8cff93 --- firmware/App/Services/SystemCommMessages.h (.../SystemCommMessages.h) (revision da7e8c1b71db9273f83e9d0ba7d20e74e758a8ad) +++ firmware/App/Services/SystemCommMessages.h (.../SystemCommMessages.h) (revision a053cecf0673654e2bc03e9a34ff15845c8cff93) @@ -838,11 +838,8 @@ void handleSetBloodLeakEmbeddedModeCommand( MESSAGE_T* message ); // MSG_ID_HD_SEND_BLOOD_LEAK_EMB_MODE_RESPONSE -BOOL sendBloodLeakEmbeddedModeCommandResponse( U32 responseLen, U08* response ); +BOOL sendBloodLeakEmbeddedModeCommandResponse( U08 cmd, U32 responseLen, U08* response ); -// MSG_ID_HD_SEND_ALARMS_COMMAND -void handleResendAllAlarmsCommand( MESSAGE_T* message ); - // MSG_ID_HD_BLOOD_PUMP_SET_PWM void handleTestBloodPumpSetPWM( MESSAGE_T* message ); Index: firmware/App/Services/WatchdogMgmt.c =================================================================== diff -u -r0a4dcd288d4347b85baaa0b07da568b6add5eac7 -ra053cecf0673654e2bc03e9a34ff15845c8cff93 --- firmware/App/Services/WatchdogMgmt.c (.../WatchdogMgmt.c) (revision 0a4dcd288d4347b85baaa0b07da568b6add5eac7) +++ firmware/App/Services/WatchdogMgmt.c (.../WatchdogMgmt.c) (revision a053cecf0673654e2bc03e9a34ff15845c8cff93) @@ -174,7 +174,7 @@ { F32 v24 = getIntADCVoltageConverted( INT_ADC_24V_ACTUATORS ); F32 audioCurrent = getFPGABackupAlarmAudioCurrent(); - + // Verify 24V is down when w.d. expired if ( v24 > MAX_24V_LEVEL_ON_WATCHDOG_EXPIRED ) {