fixed some more bugs
This commit is contained in:
parent
f96440b82c
commit
e46b9643ea
@ -37,9 +37,7 @@ export class MapComponent {
|
||||
duration: 5000,
|
||||
panelClass: 'bg-warning,text-white'
|
||||
}).onAction().subscribe(() => this.calibrate());
|
||||
})
|
||||
|
||||
physicsService.requireCalibration.emit();
|
||||
});
|
||||
}
|
||||
|
||||
mapReady(map) {
|
||||
@ -51,6 +49,7 @@ export class MapComponent {
|
||||
liveCalibration.subscribe(calibration => this.physicsService.calibrate = calibration);
|
||||
this.bottomSheet.open(CalibtrateComponent, {
|
||||
hasBackdrop: false,
|
||||
disableClose: true,
|
||||
data: {
|
||||
in: this.physicsService.info.pipe(map(coords => coords.heading)),
|
||||
out: liveCalibration
|
||||
|
@ -51,7 +51,7 @@ export class PhysicsService {
|
||||
speed: data[0].coords.speed
|
||||
};
|
||||
|
||||
if(info.heading == null && !!data[1]) {
|
||||
if(info.heading == null && !!data[1] && data[1].alpha) {
|
||||
if(!data[1].absolute && this.calibrate == null) this.requireCalibration.emit();
|
||||
this.calibrate = 0;
|
||||
info.heading = data[1].alpha + this.calibrate;
|
||||
|
Loading…
Reference in New Issue
Block a user