Index: firmware/App/Controllers/BloodLeak.c =================================================================== diff -u -r343d62b39097f4353d28939247eb8bc360dade25 -r68584e79186719b5113d103bc946ea40ab4c7d98 --- firmware/App/Controllers/BloodLeak.c (.../BloodLeak.c) (revision 343d62b39097f4353d28939247eb8bc360dade25) +++ firmware/App/Controllers/BloodLeak.c (.../BloodLeak.c) (revision 68584e79186719b5113d103bc946ea40ab4c7d98) @@ -15,9 +15,9 @@ * ***************************************************************************/ -#include // For sprintf and strlen -#include -#include // For sprintf +#include // For pow function +#include // For memset and strlen +#include // For sprintf #include "AlarmMgmt.h" #include "BloodLeak.h" Index: firmware/App/Controllers/PresOccl.c =================================================================== diff -u -rf0c16ca7223ad48b7bdb86b8f010b74b550c0051 -r68584e79186719b5113d103bc946ea40ab4c7d98 --- firmware/App/Controllers/PresOccl.c (.../PresOccl.c) (revision f0c16ca7223ad48b7bdb86b8f010b74b550c0051) +++ firmware/App/Controllers/PresOccl.c (.../PresOccl.c) (revision 68584e79186719b5113d103bc946ea40ab4c7d98) @@ -84,6 +84,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). @@ -888,7 +889,6 @@ } } } - // Check for occlusion in Treatment modes where pumps are moving else if ( MODE_TREA == getCurrentOperationMode() ) { Index: firmware/App/Controllers/SyringePump.c =================================================================== diff -u -rf0c16ca7223ad48b7bdb86b8f010b74b550c0051 -r68584e79186719b5113d103bc946ea40ab4c7d98 --- firmware/App/Controllers/SyringePump.c (.../SyringePump.c) (revision f0c16ca7223ad48b7bdb86b8f010b74b550c0051) +++ firmware/App/Controllers/SyringePump.c (.../SyringePump.c) (revision 68584e79186719b5113d103bc946ea40ab4c7d98) @@ -14,8 +14,9 @@ * @date (original) 04-Mar-2021 * ***************************************************************************/ -#include +#include // Used for fabs() functions + #include "AlarmMgmt.h" #include "FPGA.h" #include "ModeTreatmentParams.h" @@ -163,10 +164,12 @@ #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. #define SYRINGE_PUMP_OCCLUSION_PERSISTENCE 50 ///< Syringe pump occlusion persistence timer in milliseconds. #define SYRINGE_PUMP_EMPTY_FORCE_COUNT 5 ///< Syringe pump empty force voltage count persistence. + /// Defined states for the syringe pump control state machine. typedef enum SyringePump_States { @@ -342,6 +345,7 @@ initPersistentAlarm( ALARM_ID_HD_SYRINGE_PUMP_CONTROLLER_DIRECTION_ERROR, 0, SYRINGE_PUMP_DIR_ALARM_PERSISTENCE ); initPersistentAlarm( ALARM_ID_HD_SYRINGE_PUMP_RUNNING_WHILE_BP_OFF_ERROR, 0, SYRINGE_PUMP_OFF_ALARM_PERSISTENCE ); initPersistentAlarm( ALARM_ID_HD_SYRINGE_PUMP_SPEED_ERROR, 0, SYRINGE_PUMP_RATE_ALARM_PERSISTENCE ); + initPersistentAlarm( ALARM_ID_HD_SYRINGE_PUMP_OCCLUSION, 0, SYRINGE_PUMP_OCCLUSION_PERSISTENCE); initTimeWindowedCount( TIME_WINDOWED_COUNT_SYRINGE_PUMP_OFF_ERROR, SYRINGE_PUMP_OFF_ERROR_MAX_CNT, SYRINGE_PUMP_OFF_ERROR_TIME_WIN_MS ); initFPGAPersistentAlarm( FPGA_PERS_ERROR_SYRINGE_PUMP_ADC, ALARM_ID_HD_SYRINGE_PUMP_FPGA_ADC_FAULT, Index: firmware/App/Modes/Dialysis.c =================================================================== diff -u -rf0c16ca7223ad48b7bdb86b8f010b74b550c0051 -r68584e79186719b5113d103bc946ea40ab4c7d98 --- firmware/App/Modes/Dialysis.c (.../Dialysis.c) (revision f0c16ca7223ad48b7bdb86b8f010b74b550c0051) +++ firmware/App/Modes/Dialysis.c (.../Dialysis.c) (revision 68584e79186719b5113d103bc946ea40ab4c7d98) @@ -889,7 +889,6 @@ // Reset bolus data before we start bolusSalineVolumeDelivered_mL = 0.0; bolusSalineLastVolumeTimeStamp = getMSTimerCount(); - // Bypass dialyzer setValvePosition( VDI, VALVE_POSITION_C_CLOSE ); setValvePosition( VDO, VALVE_POSITION_C_CLOSE ); Index: firmware/App/Services/SystemCommMessages.c =================================================================== diff -u -r0826b00090b65c16a3e52e006cc3c016a6bf6a08 -r68584e79186719b5113d103bc946ea40ab4c7d98 --- firmware/App/Services/SystemCommMessages.c (.../SystemCommMessages.c) (revision 0826b00090b65c16a3e52e006cc3c016a6bf6a08) +++ firmware/App/Services/SystemCommMessages.c (.../SystemCommMessages.c) (revision 68584e79186719b5113d103bc946ea40ab4c7d98) @@ -2109,7 +2109,7 @@ if ( (ALARM_ID_T)alarmID < NUM_OF_ALARM_IDS ) { - activateAlarm2Data( (ALARM_ID_T)alarmID, alm1, alm2 ); + activateAlarm2Data( (ALARM_ID_T)alarmID, alm1, alm2, TRUE ); } } } @@ -5505,6 +5505,7 @@ if ( sizeof( TEST_OVERRIDE_PAYLOAD_T ) == message->hdr.payloadLen ) { memcpy( &payload, message->payload, sizeof( TEST_OVERRIDE_PAYLOAD_T ) ); + if ( FALSE == payload.reset ) { result = testSetBatteryRemainingCapacityOverride( payload.state.f32 ); @@ -8333,11 +8334,8 @@ *************************************************************************/ void handleTestHDDialinCheckIn( MESSAGE_T* message ) { - BOOL status = FALSE; - if ( 0 == message->hdr.payloadLen ) { - status = TRUE; setDialinCheckInTimeStamp(); } } Index: firmware/App/Services/SystemCommMessages.h =================================================================== diff -u -r0826b00090b65c16a3e52e006cc3c016a6bf6a08 -r68584e79186719b5113d103bc946ea40ab4c7d98 --- firmware/App/Services/SystemCommMessages.h (.../SystemCommMessages.h) (revision 0826b00090b65c16a3e52e006cc3c016a6bf6a08) +++ firmware/App/Services/SystemCommMessages.h (.../SystemCommMessages.h) (revision 68584e79186719b5113d103bc946ea40ab4c7d98) @@ -944,9 +944,6 @@ // MSG_ID_HD_SEND_BLOOD_LEAK_EMB_MODE_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 );