完成了自动驾驶状态信息回传

Signed-off-by: 董宏宇 <martindhy@gmail.com>
This commit is contained in:
董宏宇
2021-10-12 21:24:58 +08:00
parent 870af04059
commit 9802124169
15 changed files with 309 additions and 37 deletions

View File

@@ -2,6 +2,8 @@ package com.mogo.module.common.datacenter;
import com.mogo.commons.FunctionBuildConfig;
import com.mogo.commons.debug.DebugConfig;
import com.mogo.eagle.core.data.autopilot.AutopilotStatusInfo;
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager;
import com.mogo.module.common.MogoApisHandler;
import com.mogo.service.cloud.location.CloudLocationInfo;
@@ -87,11 +89,16 @@ public class SnapshotLocationDataCenter {
double speed = data.optDouble("speed", -1);
long satelliteTime = data.optLong("satelliteTime");
long systemTime = data.optLong("systemTime");
int gpsProvider = data.optInt("gpsProvider",1);
int gpsProvider = data.optInt("gpsProvider", 1);
// 使用与渠道配置一样的gps提供者提供的数据
if (gpsProvider == FunctionBuildConfig.gpsProvider) {
//测试面板状态同步
AutopilotStatusInfo autopilotStatusInfo = CallerAutoPilotStatusListenerManager.INSTANCE.getAutoPilotStatusInfo();
autopilotStatusInfo.setLocationLat(lat);
autopilotStatusInfo.setLocationLon(lon);
CallerAutoPilotStatusListenerManager.INSTANCE.invokeAutoPilotStatusListener();
DebugConfig.setStatusData(DebugConfig.sLon, lon);
DebugConfig.setStatusData(DebugConfig.sLat, lat);
@@ -168,7 +175,7 @@ public class SnapshotLocationDataCenter {
return mCurLat;
}
public long getSatelliteTime(){
public long getSatelliteTime() {
return mSatelliteTime;
}
}