implemented compass calibration functionality with button handling from GUI