Stop calibrate overflow

This commit is contained in:
2019-09-02 23:15:19 -04:00
committed by GitHub
parent 1b6f98f283
commit bc4c5f7dff

View File

@ -27,7 +27,7 @@ export class CalibrateComponent {
setN() {
let currentHeading = Math.round(this.physicsService.orientation.value.alpha);
if(currentHeading > 0) {
this.calibration = currentHeading;
this.calibration = currentHeading - 360;
} else {
this.calibration = -currentHeading;
}