Stop calibrate overflow

This commit is contained in:
Zakary Timson 2019-09-02 23:15:19 -04:00 committed by GitHub
parent 1b6f98f283
commit bc4c5f7dff
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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;
}