Implemented a new system to managed the opening and closing of valves
the new system replaces the old updatePositionTask and uses a conditional variable in combination with the wait_until method to wake up a max priority thread when a valve needs to be opened or closed.