Index: firmware/App/Controllers/Valves.c =================================================================== diff -u -r1a685471524555a374854c0c9ec8e208e71fe2df -r30f049651877229042e3f8700c8596e5b9a1e0f4 --- firmware/App/Controllers/Valves.c (.../Valves.c) (revision 1a685471524555a374854c0c9ec8e208e71fe2df) +++ firmware/App/Controllers/Valves.c (.../Valves.c) (revision 30f049651877229042e3f8700c8596e5b9a1e0f4) @@ -235,7 +235,7 @@ static void setFPGAValveSetPoint( VALVE_T valve, S16 position, BOOL enableCurrentRelaxation ); static void convertAndMonitorValvesCurrent( void ); static void getAndMonitorValvesCurrentPosition( void ); -static DATA_GET_PROTOTYPE( U32, getPublishValvesDataInterval ); +static U32 getPublishValvesDataInterval( void ); static void publishValvesData( VALVE_T valve ); static void setValveNextStep( VALVE_T valve, U32 stepChange ); @@ -273,7 +273,7 @@ valvesStatus[ valve ].execState = VALVE_STATE_WAIT_FOR_POST; } - // close air trap valve + // Close air trap valve setValveAirTrap( STATE_CLOSED ); } @@ -444,7 +444,7 @@ VALVE_T valve; // Monitoring should be done once POST is complete and the valves are - // set correctly + // Set correctly if ( valveSelfTestState == VALVE_SELF_TEST_COMPLETE ) { execMonitorValves(); @@ -584,7 +584,7 @@ BOOL isDoorClosed = TRUE; // If homing has been requested or POST is completed and the door has been close for the specified - // period of time, start the homing + // Period of time, start the homing if ( valveSelfTestState == VALVE_SELF_TEST_COMPLETE && ( valvesStatus[ valve ].hasHomingBeenRequested || isDoorClosed ) && ( ! valvesStatus[ valve ].hasHomingFailed ) ) { @@ -953,6 +953,7 @@ VALVE_MODE_T mode; BOOL result = TRUE; +#ifndef DISABLE_3WAY_VALVES // Get the status of the valves from FPGA U16 status = getFPGAValvesStatus(); @@ -997,6 +998,7 @@ result = FALSE; } } +#endif return result; } @@ -1143,7 +1145,7 @@ } // 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 + // 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 ) { @@ -1254,9 +1256,9 @@ case VALVE_POSITION_A_INSERT_EJECT: // If the valve is currently in position A and its commanded position is position B, - // add the defined number of steps for the next transition + // Add the defined number of steps for the next transition // If the valve is currently in position A and its commanded position is position C, - // subtract the defined number of steps for the next transition + // Subtract the defined number of steps for the next transition if ( commandedPositionEnum == VALVE_POSITION_B_OPEN ) { valvesStatus[ valve ].targetPositionInCounts = valvesStatus[ valve ].currentPositionInCounts + nextStep; @@ -1283,7 +1285,7 @@ } // Call the function to send the set point to FPGA. Current relaxation is not - // enabled here, so it is always false + // Enabled here, so it is always false setFPGAValveSetPoint( valve, valvesStatus[ valve ].targetPositionInCounts, FALSE ); } @@ -1499,13 +1501,13 @@ BOOL homingStatus = valvesStatus[ valve ].hasValveBeenHomed; // The PWM should be in range and also the valve direction should be legal and the valve must have been homed - // prior to running this command + // Prior to running this command if ( pwm <= VALVE_MAX_ALLOWED_PWM_PERCENT && direction < NUM_OF_VALVE_DIRECTION && homingStatus ) { valvesStatus[ (VALVE_T)valve ].bypassModeStatus.commandedPWMInPercent = (U16)pwm; valvesStatus[ (VALVE_T)valve ].bypassModeStatus.direction = (VALVE_DIRECTION_T)direction; // This flag sets the valves to bypass mode in the idle state. After that the valve will be sitting in the - // bypass mode until this flag is set to FALSE in the reset function. + // Bypass mode until this flag is set to FALSE in the reset function. valvesStatus[ (VALVE_T)valve ].bypassModeStatus.hasBypassModeBeenRequeseted = TRUE; // This flag is used to check if a change in PWM has been requested so the new PWM is processed and set valvesStatus[ (VALVE_T)valve ].bypassModeStatus.hasChangeBeenRequested = TRUE;