Index: firmware/App/Controllers/BloodFlow.c =================================================================== diff -u -r8466e63f95f65a3ffb18c3af85ac99328e41167b -r685e17a553a4fdf7dd8b3715e95d151eeff3c866 --- firmware/App/Controllers/BloodFlow.c (.../BloodFlow.c) (revision 8466e63f95f65a3ffb18c3af85ac99328e41167b) +++ firmware/App/Controllers/BloodFlow.c (.../BloodFlow.c) (revision 685e17a553a4fdf7dd8b3715e95d151eeff3c866) @@ -56,7 +56,8 @@ #define BP_I_COEFFICIENT 0.00075 ///< I term for blood pump control #define BP_HOME_RATE 100 ///< Target pump speed (in estimate mL/min) for homing. -#define BP_HOME_TIMEOUT_MS 10000 ///< Maximum time allowed for homing to complete (in ms). +#define BP_HOME_TIMEOUT_MS 10000 ///< Maximum time (in ms) allowed for homing to complete. +#define BP_MAX_ROTOR_HALL_INTERVAL_MS 20000 ///< Maximum time (in ms) allowed between rotor hall sensor detects (50 mL/min worst case). /// Interval (ms/task time) at which the blood pump speed is calculated (every 40 ms). #define BP_SPEED_CALC_INTERVAL ( 40 / TASK_PRIORITY_INTERVAL ) /// Number of hall sensor counts kept in buffer to hold last 1 second of count data. @@ -76,7 +77,7 @@ /// Persist time (task intervals) motor speed error condition. static const U32 BP_MOTOR_SPEED_ERROR_PERSIST = ( 5 * MS_PER_SECOND ); /// Persist time (task intervals) rotor speed error condition. -static const U32 BP_ROTOR_SPEED_ERROR_PERSIST = ( 12 * MS_PER_SECOND ); +static const U32 BP_ROTOR_SPEED_ERROR_PERSIST = ( 22 * MS_PER_SECOND ); /// Persist time (task intervals) pump direction error condition. static const U32 BP_DIRECTION_ERROR_PERSIST = ( 250 ); /// Persist time period blood pump rotor speed too fast error condition. @@ -1033,7 +1034,7 @@ } // If pump is stopped or running very slowly, set rotor speed to zero - if ( TRUE == didTimeout( bpRotorRevStartTime, BP_HOME_TIMEOUT_MS ) ) + if ( TRUE == didTimeout( bpRotorRevStartTime, BP_MAX_ROTOR_HALL_INTERVAL_MS ) ) { bloodPumpRotorSpeedRPM.data = 0.0; } Index: firmware/App/Modes/BloodPrime.c =================================================================== diff -u -r8466e63f95f65a3ffb18c3af85ac99328e41167b -r685e17a553a4fdf7dd8b3715e95d151eeff3c866 --- firmware/App/Modes/BloodPrime.c (.../BloodPrime.c) (revision 8466e63f95f65a3ffb18c3af85ac99328e41167b) +++ firmware/App/Modes/BloodPrime.c (.../BloodPrime.c) (revision 685e17a553a4fdf7dd8b3715e95d151eeff3c866) @@ -272,6 +272,7 @@ setBloodIsPrimed( TRUE ); signalDialInPumpHardStop(); signalBloodPrimeToDialysis(); + cmdStopDGTrimmerHeater(); } } #ifndef DISABLE_PUMP_FLOW_CHECKS Index: firmware/App/Modes/ModeInitPOST.c =================================================================== diff -u -r6287441e188e7a245f59d3d0d47cdc77808cdb91 -r685e17a553a4fdf7dd8b3715e95d151eeff3c866 --- firmware/App/Modes/ModeInitPOST.c (.../ModeInitPOST.c) (revision 6287441e188e7a245f59d3d0d47cdc77808cdb91) +++ firmware/App/Modes/ModeInitPOST.c (.../ModeInitPOST.c) (revision 685e17a553a4fdf7dd8b3715e95d151eeff3c866) @@ -136,7 +136,6 @@ case POST_STATE_FW_INTEGRITY: testStatus = execIntegrityTest(); - testStatus = SELF_TEST_STATUS_PASSED; postState = handlePOSTStatus( testStatus ); break; Index: firmware/App/Modes/TreatmentRecirc.c =================================================================== diff -u -rc021768acf8408116a87585e21c2237713d6c825 -r685e17a553a4fdf7dd8b3715e95d151eeff3c866 --- firmware/App/Modes/TreatmentRecirc.c (.../TreatmentRecirc.c) (revision c021768acf8408116a87585e21c2237713d6c825) +++ firmware/App/Modes/TreatmentRecirc.c (.../TreatmentRecirc.c) (revision 685e17a553a4fdf7dd8b3715e95d151eeff3c866) @@ -34,8 +34,10 @@ // ********** private definitions ********** -/// Alarm if re-circulation is running for this much time. TODO - finalize these times w/ Systems +/// Maximum time allowed to be in recirculation sub-mode. static const U32 RECIRC_TIMEOUT = ( ( 15 * SEC_PER_MIN * MS_PER_SECOND ) / TASK_GENERAL_INTERVAL ); +/// Warn user they need to reconnect to system and resume their treatment soon. +static const U32 RECIRC_WARNING_TIMEOUT = ( ( 10 * SEC_PER_MIN * MS_PER_SECOND ) / TASK_GENERAL_INTERVAL ); /// Re-circulation status broadcast interval. static const U32 RECIRC_DATA_PUBLISH_INTERVAL = ( MS_PER_SECOND / TASK_GENERAL_INTERVAL ); /// Target flow rate for re-circulation of saline on blood-side circuit. @@ -47,6 +49,7 @@ static U32 recircTimerCtr; ///< Timer counter (in GP task intervals) counts time spent in re-circulation sub-mode. static U32 recircPublishTimerCtr; ///< Timer counter (in GP task intervals) counts time to next status broadcast. +static BOOL recircTimeoutWarningGiven; ///< Flag indicates 10 minute warning has been given to user. static BOOL recircReconnectRequested; ///< Flag indicates user requesting re-circulate stop so they can re-connect. static BOOL recircBackToTreatmenRequested; ///< Flag indicates user requesting to go back to treatment (confirming re-connected). @@ -84,6 +87,7 @@ recircTimerCtr = 0; recircPublishTimerCtr = 0; resetTreatmentRecircFlags(); + recircTimeoutWarningGiven = FALSE; } /*********************************************************************//** @@ -238,6 +242,11 @@ signalGoToTreatmentStopped(); activateAlarmNoData( ALARM_ID_TREATMENT_RECIRC_TIMEOUT_ALARM ); } + else if ( ( recircTimeoutWarningGiven != TRUE ) && ( recircTimerCtr > RECIRC_WARNING_TIMEOUT ) ) + { + recircTimeoutWarningGiven = TRUE; + activateAlarmNoData( ALARM_ID_HD_TREATMENT_RECIRC_TIMEOUT_WARNING ); + } return result; } @@ -276,6 +285,11 @@ signalGoToTreatmentStopped(); activateAlarmNoData( ALARM_ID_TREATMENT_RECIRC_TIMEOUT_ALARM ); } + else if ( ( recircTimeoutWarningGiven != TRUE ) && ( recircTimerCtr > RECIRC_WARNING_TIMEOUT ) ) + { + recircTimeoutWarningGiven = TRUE; + activateAlarmNoData( ALARM_ID_HD_TREATMENT_RECIRC_TIMEOUT_WARNING ); + } return result; }