moved dc calibration to separate function.
cleanup/speed improvement of hall sensor to state conversion. No functionality change.