Stop calibrate overflow
This commit is contained in:
parent
1b6f98f283
commit
bc4c5f7dff
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user