From bc4c5f7dff3df989ad616fd3c49762465929d836 Mon Sep 17 00:00:00 2001 From: Zakary Timson Date: Mon, 2 Sep 2019 23:15:19 -0400 Subject: [PATCH] Stop calibrate overflow --- src/app/components/calibrate/calibrate.component.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/components/calibrate/calibrate.component.ts b/src/app/components/calibrate/calibrate.component.ts index 0cd5eda..4b39c30 100644 --- a/src/app/components/calibrate/calibrate.component.ts +++ b/src/app/components/calibrate/calibrate.component.ts @@ -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; }