Added a statement to check that the motor movement isn't above the maximum value, and scales the requirement if it is.