fixed calibration buggs started findiing constants for controller
mergeing code to new edits