Index: firmware/App/Controllers/Valves.c =================================================================== diff -u -r8466e63f95f65a3ffb18c3af85ac99328e41167b -r124b3745d056ac667280cfa0ae1fab8610d44ed2 --- firmware/App/Controllers/Valves.c (.../Valves.c) (revision 8466e63f95f65a3ffb18c3af85ac99328e41167b) +++ firmware/App/Controllers/Valves.c (.../Valves.c) (revision 124b3745d056ac667280cfa0ae1fab8610d44ed2) @@ -1157,8 +1157,8 @@ static void getAndMonitorValvesCurrentFPGAPosition( void ) { VALVE_T valve; - S16 currentPostion = 0; - S16 commandedPoistion = 0; + S16 currentPosition = 0; + S16 commandedPosition = 0; VALVE_POSITION_T commandedPositionEnum; // Get the position of the valves and update the structure of each valve @@ -1176,9 +1176,9 @@ { U32 maxDeviation = MAX_DEVIATION_FROM_TARGET_IN_COUNTS; - currentPostion = getValvePositionCounts( valve ); + currentPosition = getValvePositionCounts( valve ); commandedPositionEnum = valvesStatus[ valve ].commandedPosition; - commandedPoistion = valvesStatus[ valve ].positions[ commandedPositionEnum ]; + commandedPosition = valvesStatus[ valve ].positions[ commandedPositionEnum ]; // If the current position is B, current relaxation requires looser range check if ( VALVE_POSITION_B_OPEN == commandedPositionEnum ) @@ -1189,18 +1189,18 @@ // Check if the current position has deviated from the position it is supposed to be in // For more than a certain amount of time. If it has, raise an alarm // Absolute value is used for comparison to cover +/- from the commanded position - if ( abs( currentPostion - commandedPoistion ) > maxDeviation ) + if ( abs( currentPosition - commandedPosition ) > maxDeviation ) { valvesStatus[ valve ].positionOutOfRangeCounter++; } 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 ); + SET_ALARM_WITH_2_U32_DATA( ALARM_ID_HD_VALVE_POSITION_OUT_OF_RANGE, (U32)valve, currentPosition ); #endif } - else if ( abs( currentPostion - commandedPoistion ) < MAX_DEVIATION_FROM_TARGET_IN_COUNTS && + else if ( abs( currentPosition - commandedPosition ) < MAX_DEVIATION_FROM_TARGET_IN_COUNTS && valvesStatus[ valve ].positionOutOfRangeCounter > 0 ) { valvesStatus[ valve ].positionOutOfRangeCounter = 0;