Index: firmware/App/Controllers/Valves.c =================================================================== diff -u -r0740e7887bf345f77c9421a4f64716307e74abb8 -r9488cd55cd4ed1680a6e2d87c178a994e35b8c78 --- firmware/App/Controllers/Valves.c (.../Valves.c) (revision 0740e7887bf345f77c9421a4f64716307e74abb8) +++ firmware/App/Controllers/Valves.c (.../Valves.c) (revision 9488cd55cd4ed1680a6e2d87c178a994e35b8c78) @@ -33,7 +33,7 @@ #define ENERGIZED 1 ///< 1 for energized valve. #define ALL_VALVES_DEENERGIZED 0x0000 ///< 0 in U16 bit field for all valves. -#define MAX_VALVE_STATE_MISMATCH_COUNT (100 / TASK_PRIORITY_INTERVAL ) ///< Maximum number of times commanded valves state can fail to match read back valve states in a row. +#define MAX_VALVE_STATE_MISMATCH_TIMER_COUNT (100 / TASK_PRIORITY_INTERVAL ) ///< Maximum time commanded valves state can fail to match read back valve states in a row. #define VALVES_STATE_PUB_INTERVAL ( MS_PER_SECOND / TASK_PRIORITY_INTERVAL ) ///< Interval ( ms / task time) at which valves states are published on CAN bus. #define DATA_PUBLISH_COUNTER_START_COUNT 50 ///< Data publish counter start count. @@ -53,7 +53,7 @@ static U32 valvesStatesPublicationTimerCounter; ///< Timer counter used to schedule valve state publication to CAN bus. static U16 commandedValvesStates = ALL_VALVES_DEENERGIZED; ///< Initialize commanded valves states bit field. -static U32 valveStateMismatchTimerCounter; ///< Initialize valve state mismatch counter. +static U32 valveStateMismatchTimerCounter; ///< Initialize valve state mismatch timer. static U32 pendingValveStateChanges[ NUM_OF_VALVES ]; ///< Delayed (pending) valve state changes. static U32 pendingValveStateChangeCountDowns[ NUM_OF_VALVES ]; ///< Delayed (pending) valve state change count down timers (in task intervals). @@ -125,7 +125,7 @@ if ( readValvesStates != commandedValvesStates ) { valveStateMismatchTimerCounter++; // increment valve state mismatch counter by 1 - if ( valveStateMismatchTimerCounter > MAX_VALVE_STATE_MISMATCH_COUNT ) + if ( valveStateMismatchTimerCounter > MAX_VALVE_STATE_MISMATCH_TIMER_COUNT ) { activateAlarmNoData( ALARM_ID_DG_VALVE_CONTROL_FAILURE ); }