Index: firmware/App/Controllers/BloodFlow.c =================================================================== diff -u -r9f0aa5aeba7cd2cb3e823a78957f3c96e7c97a6e -r79a5884a9d7d6123dab6504940ec92f72093665c --- firmware/App/Controllers/BloodFlow.c (.../BloodFlow.c) (revision 9f0aa5aeba7cd2cb3e823a78957f3c96e7c97a6e) +++ firmware/App/Controllers/BloodFlow.c (.../BloodFlow.c) (revision 79a5884a9d7d6123dab6504940ec92f72093665c) @@ -1248,6 +1248,8 @@ static void checkBloodFlowSensorSignalStrength( void ) { #ifndef DISABLE_PUMP_FLOW_CHECKS + HD_OP_MODE_T opMode = getCurrentOperationMode(); + // check flow sensor signal strength when appropriate TODO - in pre-treatment, must be far enough along for fluid to be in tubing if ( MODE_TREA == opMode || ( MODE_PRET == opMode && FALSE ) ) { Index: firmware/App/Controllers/DialInFlow.c =================================================================== diff -u -r7b823539be3fde41aa676263188d1af679b2f411 -r79a5884a9d7d6123dab6504940ec92f72093665c --- firmware/App/Controllers/DialInFlow.c (.../DialInFlow.c) (revision 7b823539be3fde41aa676263188d1af679b2f411) +++ firmware/App/Controllers/DialInFlow.c (.../DialInFlow.c) (revision 79a5884a9d7d6123dab6504940ec92f72093665c) @@ -1205,6 +1205,8 @@ static void checkDialInFlowSensorSignalStrength( void ) { #ifndef DISABLE_PUMP_FLOW_CHECKS + HD_OP_MODE_T opMode = getCurrentOperationMode(); + // check flow sensor signal strength when appropriate TODO - in pre-treatment, must be far enough along for fluid to be in tubing if ( MODE_TREA == opMode || ( MODE_PRET == opMode && FALSE ) ) { @@ -1214,7 +1216,6 @@ checkPersistentAlarm( PERSISTENT_ALARM_DIALYSATE_FLOW_SIGNAL_STRENGTH, outOfRange, sigStrength ); } #endif - } /*********************************************************************//** Index: firmware/App/Controllers/Valves.c =================================================================== diff -u -r5a04a1445b684aedd199e0294311db468635c152 -r79a5884a9d7d6123dab6504940ec92f72093665c --- firmware/App/Controllers/Valves.c (.../Valves.c) (revision 5a04a1445b684aedd199e0294311db468635c152) +++ firmware/App/Controllers/Valves.c (.../Valves.c) (revision 79a5884a9d7d6123dab6504940ec92f72093665c) @@ -683,7 +683,9 @@ valvesStatus[ valve ].hasValveBeenHomed = FALSE; valvesStatus[ valve ].hasHomingFailed = TRUE; state = VALVE_STATE_HOMING_NOT_STARTED; +#ifndef DISABLE_VALVE_ALARMS SET_ALARM_WITH_1_U32_DATA( ALARM_ID_HD_VALVE_HOMING_FAILED, (U32)valve ); +#endif } else { @@ -802,7 +804,9 @@ valvesStatus[ valve ].hasTransitionBeenRequested = FALSE; // Go back to Idle state state = VALVE_STATE_IDLE; +#ifndef DISABLE_VALVE_ALARMS SET_ALARM_WITH_1_U32_DATA( ALARM_ID_HD_VALVE_TRANSITION_TIMEOUT, (U32)valve ); +#endif } // Check if the valve is close to the temporary target position and if it is, assign the next target position else if ( abs( currentPosition - targetPosition ) < MAX_DEVIATION_FROM_TARGET_IN_COUNTS ) @@ -1049,7 +1053,9 @@ // Check if the current is over the threshold for the defined amount of time if ( valvesStatus[ valve ].overCurrentCounter > MAX_OVER_CURRENT_TIME_INTERVAL_COUNTER ) { +#ifndef DISABLE_VALVE_ALARMS SET_ALARM_WITH_2_F32_DATA( ALARM_ID_HD_VALVE_CURRENT_OUT_OF_RANGE, (F32)valve, current ); +#endif } // If the current is below the threshold again and the counter for the time is greater than else if ( current < VALVES_CURRENT_THRESHOLD_AMPS && @@ -1112,7 +1118,9 @@ if ( valvesStatus[ valve ].positionOutOfRangeCounter > MAX_POS_DEVIATION_TIME_INTERVAL_COUNTER ) { +#ifndef DISABLE_VALVE_ALARMS SET_ALARM_WITH_2_U32_DATA( ALARM_ID_HD_VALVE_POSITION_OUT_OF_RANGE, (U32)valve, currentPostion ); +#endif } else if ( abs( currentPostion - commandedPoistion ) < MAX_DEVIATION_FROM_TARGET_IN_COUNTS && valvesStatus[ valve ].positionOutOfRangeCounter > 0 ) Index: firmware/App/HDCommon.h =================================================================== diff -u -r5a04a1445b684aedd199e0294311db468635c152 -r79a5884a9d7d6123dab6504940ec92f72093665c --- firmware/App/HDCommon.h (.../HDCommon.h) (revision 5a04a1445b684aedd199e0294311db468635c152) +++ firmware/App/HDCommon.h (.../HDCommon.h) (revision 79a5884a9d7d6123dab6504940ec92f72093665c) @@ -37,8 +37,6 @@ // #define BREADBOARD_TARGET 1 // old breadboard system build - no longer used? #define SIMULATE_UI 1 // build w/o requirement that UI be there // #define TASK_TIMING_OUTPUT_ENABLED 1 // re-purposes alarm lamp pins for task timing -// #define SKIP_POST 1 // skip POST tests - all pass - #define LIMITED_NVDATA_CRC_CHECKS 1 // only perform POST CRC checks on nv-data records that are implemented so far #define SKIP_POST 1 // skip POST tests - all pass // #define LIMITED_NVDATA_CRC_CHECKS 1 // only perform POST CRC checks on nv-data records that are implemented so far #define DISABLE_ACCELS 1 // disable accelerometer POST and monitoring Index: firmware/App/Tasks/TaskPriority.c =================================================================== diff -u -r1fb58baf6e7e3d1f054b2a3634e233da7609dad9 -r79a5884a9d7d6123dab6504940ec92f72093665c --- firmware/App/Tasks/TaskPriority.c (.../TaskPriority.c) (revision 1fb58baf6e7e3d1f054b2a3634e233da7609dad9) +++ firmware/App/Tasks/TaskPriority.c (.../TaskPriority.c) (revision 79a5884a9d7d6123dab6504940ec92f72093665c) @@ -77,8 +77,10 @@ // monitor accelerometer execAccel(); #endif +#ifndef DISABLE_VALVE_ALARMS // Exec and monitor valves execValves(); +#endif #endif // 2nd pass for FPGA execFPGAOut();