reversed set n
This commit is contained in:
parent
210584c9bb
commit
5055fa159a
@ -16,8 +16,6 @@ export class CalibrateComponent {
|
|||||||
this.physicsService.calibrate.next(c);
|
this.physicsService.calibrate.next(c);
|
||||||
}
|
}
|
||||||
|
|
||||||
log = e => console.log(e);
|
|
||||||
|
|
||||||
constructor(private bottomSheetRef: MatBottomSheetRef, public physicsService: PhysicsService) {
|
constructor(private bottomSheetRef: MatBottomSheetRef, public physicsService: PhysicsService) {
|
||||||
this._calibration = this.physicsService.calibrate.value;
|
this._calibration = this.physicsService.calibrate.value;
|
||||||
}
|
}
|
||||||
@ -28,7 +26,7 @@ export class CalibrateComponent {
|
|||||||
|
|
||||||
setN() {
|
setN() {
|
||||||
let currentHeading = Math.round(this.physicsService.orientation.value.alpha);
|
let currentHeading = Math.round(this.physicsService.orientation.value.alpha);
|
||||||
if(currentHeading < 180) {
|
if(currentHeading > 180) {
|
||||||
this.calibration = -currentHeading;
|
this.calibration = -currentHeading;
|
||||||
} else {
|
} else {
|
||||||
this.calibration = 360 - currentHeading;
|
this.calibration = 360 - currentHeading;
|
||||||
|
Loading…
Reference in New Issue
Block a user