Index: firmware/App/Controllers/Valves.c =================================================================== diff -u -r1145e9197855b4f2cb79eb407d3899059b0ca410 -re5c6383e93940c2722d3bf73beb1d13a6d3eae6e --- firmware/App/Controllers/Valves.c (.../Valves.c) (revision 1145e9197855b4f2cb79eb407d3899059b0ca410) +++ firmware/App/Controllers/Valves.c (.../Valves.c) (revision e5c6383e93940c2722d3bf73beb1d13a6d3eae6e) @@ -7,8 +7,8 @@ * * @file Valves.c * -* @author (last) Bill Bracken -* @date (last) 19-Apr-2023 +* @author (last) Sean Nash +* @date (last) 03-May-2023 * * @author (original) Dara Navaei * @date (original) 07-Aug-2020 @@ -334,15 +334,17 @@ * @details Inputs: valvesStatus * @details Outputs: valvesStatus * @param valve that is set to be homed + * @param force flag indicating whether homing should be forced even if already homed + * @param cartridge flag indicating whether a cartridge may be present requiring a more lax homing * @return TRUE if the homing command accepted otherwise, FALSE *************************************************************************/ -BOOL homeValve( VALVE_T valve ) +BOOL homeValve( VALVE_T valve, BOOL force, BOOL cartridge ) { BOOL result = FALSE; if ( valve < NUM_OF_VALVES ) { // If haven't already homed the valves, home the valves - if ( valvesStatus[ valve ].hasValveBeenHomed != TRUE ) + if ( ( valvesStatus[ valve ].hasValveBeenHomed != TRUE ) || ( VALVE_FORCE_HOME == force ) ) { valvesStatus[ valve ].hasHomingBeenRequested = TRUE; }