Index: firmware/App/Controllers/DGInterface.c =================================================================== diff -u -r8a0632bf9908008ee8db18474bc914d990760986 -rd64ce68a34e7a2fc8cdc67cecb7269dec440305d --- firmware/App/Controllers/DGInterface.c (.../DGInterface.c) (revision 8a0632bf9908008ee8db18474bc914d990760986) +++ firmware/App/Controllers/DGInterface.c (.../DGInterface.c) (revision d64ce68a34e7a2fc8cdc67cecb7269dec440305d) @@ -38,10 +38,6 @@ #define SIZE_OF_SMALL_LOAD_CELL_AVG 8 ///< Small load cell moving average has 8 samples. #define SIZE_OF_LARGE_LOAD_CELL_AVG 32 ///< Large load cell moving average has 32 samples. -#define MAX_LOAD_CELL_CHANGE_G 1000.0 ///< Maximum delta between new load cell sample and its small moving average (in g). Can change quite a bit during tare. -#define MAX_ACTIVE_LOAD_CELL_CHANGE_G 30.0 ///< Maximum delta between new load cell sample and its small moving average (in g) when associated reservoir is active in treatment. -#define LOAD_CELL_CHANGE_PERSISTENCE 3 ///< Excessive load cell acceleration must persist for 3 samples (@ 10 Hz) to trigger alarm. - /// States of the treatment reservoir management state machine. typedef enum TreatmentReservoirMgmt_States { @@ -94,8 +90,6 @@ static F32 lgLoadCellReadings[ NUM_OF_DG_RESERVOIRS ][ SIZE_OF_LARGE_LOAD_CELL_AVG ]; static U32 lgLoadCellReadingsIdx = 0; ///< Index for next sample in large load cell rolling average sample array. static F32 lgLoadCellReadingsTotal[ NUM_OF_DG_RESERVOIRS ]; ///< Rolling total - used to calc large load cell moving average. -/// Persistence counters for excessive load cell acceleration alarm. -static U32 excessiveLoadCellAccelerationCtr[ NUM_OF_DG_RESERVOIRS ] = { 0, 0 }; // DG pumps data static F32 dgROPumpFlowRateMlMin = 0.0; ///< Latest RO water flow rate reported by the DG. @@ -673,34 +667,6 @@ for ( res = DG_RESERVOIR_1; res < NUM_OF_DG_RESERVOIRS; res++ ) { F32 wt = ( res == DG_RESERVOIR_1 ? res1Primary : res2Primary ); -#ifndef DISABLE_UF_ALARMS - F32 delta = fabs( smFilteredReservoirWeightInGrams[ res ] - wt ); - BOOL deltaAlarmDetected = FALSE; - ALARM_ID_T deltaAlarm = ( res == DG_RESERVOIR_1 ? ALARM_ID_HD_LOAD_CELL_ACCELERATION_RES_1_ALARM : ALARM_ID_HD_LOAD_CELL_ACCELERATION_RES_2_ALARM ); - - // Check for excessive load cell acceleration - if ( ( TRUE == inTreatment ) && ( res == activeRes ) && ( delta > MAX_ACTIVE_LOAD_CELL_CHANGE_G ) ) - { - deltaAlarmDetected = TRUE; - } - else if ( ( delta > MAX_LOAD_CELL_CHANGE_G ) && ( TRUE == isPOSTCompleted() ) ) - { - deltaAlarmDetected = TRUE; - } - // Trigger or clear excessive load cell acceleration condition - if ( TRUE == deltaAlarmDetected ) - { - if ( ++excessiveLoadCellAccelerationCtr[ res ] > LOAD_CELL_CHANGE_PERSISTENCE ) - { - SET_ALARM_WITH_2_F32_DATA( deltaAlarm, wt, smFilteredReservoirWeightInGrams[ res ] ); - } - } - else - { - excessiveLoadCellAccelerationCtr[ res ] = 0; - clearAlarmCondition( deltaAlarm ); - } -#endif smLoadCellReadingsTotal[ res ] -= smLoadCellReadings[ res ][ smLoadCellReadingsIdx ]; lgLoadCellReadingsTotal[ res ] -= lgLoadCellReadings[ res ][ lgLoadCellReadingsIdx ]; smLoadCellReadings[ res ][ smLoadCellReadingsIdx ] = wt;