Refine sensor integration strategy
This commit is contained in:
@@ -50,7 +50,7 @@ type MapPageData = MapEngineViewState & {
|
||||
showRightButtonGroups: boolean
|
||||
showBottomDebugButton: boolean
|
||||
}
|
||||
const INTERNAL_BUILD_VERSION = 'map-build-213'
|
||||
const INTERNAL_BUILD_VERSION = 'map-build-232'
|
||||
const CLASSIC_REMOTE_GAME_CONFIG_URL = 'https://oss-mbh5.colormaprun.com/gotomars/event/classic-sequential.json'
|
||||
const SCORE_O_REMOTE_GAME_CONFIG_URL = 'https://oss-mbh5.colormaprun.com/gotomars/event/score-o.json'
|
||||
let mapEngine: MapEngine | null = null
|
||||
@@ -221,6 +221,12 @@ Page({
|
||||
panelAverageSpeedUnitText: 'km/h',
|
||||
panelAccuracyValueText: '--',
|
||||
panelAccuracyUnitText: '',
|
||||
deviceHeadingText: '--',
|
||||
devicePoseText: '竖持',
|
||||
headingConfidenceText: '低',
|
||||
accelerometerText: '--',
|
||||
gyroscopeText: '--',
|
||||
deviceMotionText: '--',
|
||||
punchButtonText: '打点',
|
||||
punchButtonEnabled: false,
|
||||
skipButtonEnabled: false,
|
||||
@@ -259,6 +265,11 @@ Page({
|
||||
const menuButtonRect = wx.getMenuButtonBoundingClientRect()
|
||||
const menuButtonBottom = menuButtonRect && typeof menuButtonRect.bottom === 'number' ? menuButtonRect.bottom : statusBarHeight
|
||||
|
||||
if (mapEngine) {
|
||||
mapEngine.destroy()
|
||||
mapEngine = null
|
||||
}
|
||||
|
||||
mapEngine = new MapEngine(INTERNAL_BUILD_VERSION, {
|
||||
onData: (patch) => {
|
||||
const nextPatch = patch as Partial<MapPageData>
|
||||
@@ -349,6 +360,12 @@ Page({
|
||||
panelAverageSpeedUnitText: 'km/h',
|
||||
panelAccuracyValueText: '--',
|
||||
panelAccuracyUnitText: '',
|
||||
deviceHeadingText: '--',
|
||||
devicePoseText: '竖持',
|
||||
headingConfidenceText: '低',
|
||||
accelerometerText: '--',
|
||||
gyroscopeText: '--',
|
||||
deviceMotionText: '--',
|
||||
punchButtonText: '打点',
|
||||
punchButtonEnabled: false,
|
||||
skipButtonEnabled: false,
|
||||
|
||||
@@ -435,6 +435,30 @@
|
||||
<text class="info-panel__label">Sensor Heading</text>
|
||||
<text class="info-panel__value">{{sensorHeadingText}}</text>
|
||||
</view>
|
||||
<view class="info-panel__row">
|
||||
<text class="info-panel__label">Device Heading</text>
|
||||
<text class="info-panel__value">{{deviceHeadingText}}</text>
|
||||
</view>
|
||||
<view class="info-panel__row">
|
||||
<text class="info-panel__label">Pose</text>
|
||||
<text class="info-panel__value">{{devicePoseText}}</text>
|
||||
</view>
|
||||
<view class="info-panel__row">
|
||||
<text class="info-panel__label">Heading Confidence</text>
|
||||
<text class="info-panel__value">{{headingConfidenceText}}</text>
|
||||
</view>
|
||||
<view class="info-panel__row info-panel__row--stack">
|
||||
<text class="info-panel__label">Accel</text>
|
||||
<text class="info-panel__value">{{accelerometerText}}</text>
|
||||
</view>
|
||||
<view class="info-panel__row info-panel__row--stack">
|
||||
<text class="info-panel__label">Gyro</text>
|
||||
<text class="info-panel__value">{{gyroscopeText}}</text>
|
||||
</view>
|
||||
<view class="info-panel__row info-panel__row--stack">
|
||||
<text class="info-panel__label">Motion</text>
|
||||
<text class="info-panel__value">{{deviceMotionText}}</text>
|
||||
</view>
|
||||
<view class="info-panel__row info-panel__row--stack">
|
||||
<text class="info-panel__label">North Ref</text>
|
||||
<text class="info-panel__value">{{northReferenceText}}</text>
|
||||
|
||||
Reference in New Issue
Block a user