From 9b8474a037cc0cebb9a53f18770d00a1234716ee Mon Sep 17 00:00:00 2001 From: ztimson Date: Thu, 11 Jul 2019 16:54:16 -0400 Subject: [PATCH] disabled an icon to make space --- src/app/map/map.component.html | 6 +++--- src/app/map/map.component.ts | 4 ++-- src/app/physics/physics.service.ts | 4 +++- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/src/app/map/map.component.html b/src/app/map/map.component.html index 6fb3478..7e0c85a 100644 --- a/src/app/map/map.component.html +++ b/src/app/map/map.component.html @@ -8,7 +8,7 @@ - + @@ -32,8 +32,8 @@ No GPS
Heading: - No Heading - {{position.heading | number : '0.0-0'}}° + No Heading + {{position.heading | number : '1.0-0'}}°
Latitude: {{position.latitude | number : '0.0-5'}}
diff --git a/src/app/map/map.component.ts b/src/app/map/map.component.ts index 62de25c..64ed801 100644 --- a/src/app/map/map.component.ts +++ b/src/app/map/map.component.ts @@ -24,12 +24,12 @@ export class MapComponent { style: 'satellite' | 'terrain' | 'roadmap' | 'hybrid' = 'terrain'; version = version; + Infinity = Infinity; isNaN = isNaN; constructor(private bpObserver: BreakpointObserver, public physicsService: PhysicsService, private snackBar: MatSnackBar, private bottomSheet: MatBottomSheet) { bpObserver.observe([Breakpoints.Handset]).subscribe(results => this.mobile = results.matches); - physicsService.info.pipe(filter(coord => !!coord), debounceTime(50)).subscribe(pos => { - console.log('fire'); + physicsService.info.pipe(filter(coord => !!coord)).subscribe(pos => { if(this.mapApi) { if(!this.position) this.center(pos); this.position = pos; diff --git a/src/app/physics/physics.service.ts b/src/app/physics/physics.service.ts index f4f637c..f34ddfa 100644 --- a/src/app/physics/physics.service.ts +++ b/src/app/physics/physics.service.ts @@ -40,8 +40,11 @@ export class PhysicsService { this.motionTimestamp = currentTime; }); + this.orientation.subscribe(() => console.log('orientation')); + // Combine data into one nice package combineLatest(this.position, this.orientation, this.calibrate, this.speed).subscribe(data => { + console.log('combine'); if(!data[0]) return; let info = { @@ -54,7 +57,6 @@ export class PhysicsService { speed: data[0].coords.speed }; - // TODO-debug if(info.heading == null && data[1]) { if(!data[1].absolute && data[2] == Infinity) { this.calibrate.next(0);