Fixes bug relatea to assigning PID constants

Bug: Setting constant value in the menu does nothing to change the actual value.
Fix: Move the declaration and assignment of variables into code that is ran AFTER the desired values are given.