A、还原改动

Signed-off-by: donghongyu <donghongyu@zhidaoauto.com>
This commit is contained in:
donghongyu
2022-09-21 19:23:27 +08:00
parent c3dff0f748
commit 43ea5777e1
2 changed files with 13 additions and 15 deletions

View File

@@ -133,21 +133,6 @@ class MoGoAdasListenerImpl : OnAdasListener {
gnssInfo.longitude,
gnssInfo.latitude
)
// 直接将工控机惯导数据同步给各个模块
val sysLocation = Location("GNSS")
sysLocation.altitude = gnssInfo.altitude
sysLocation.latitude = gnssInfo.latitude
sysLocation.longitude = gnssInfo.longitude
sysLocation.provider = "GNSS"
sysLocation.accuracy = gnssInfo.acceleration.toFloat()
sysLocation.time = gnssInfo.satelliteTime.toLong()
sysLocation.bearing = gnssInfo.heading.toFloat()
sysLocation.speed = gnssInfo.gnssSpeed.toFloat()
if (MogoCarLocationChangedListenerRegister.getInstance().listener != null) {
MogoCarLocationChangedListenerRegister.getInstance().listener.onCarLocationChanged2(sysLocation)
}
}
}
}

View File

@@ -757,7 +757,20 @@ public class AMapViewWrapper implements IMogoMapView,
.putString(SharedPrefsConstants.LOCATION_LONGITUDE, String.valueOf(location.getLon()));
}
// 同步给各个模块
Location sysLocation = new Location(location.getProvider());
sysLocation.setAltitude(location.getAltitude());
sysLocation.setLatitude(location.getLat());
sysLocation.setLongitude(location.getLon());
sysLocation.setProvider(location.getProvider());
sysLocation.setAccuracy(location.getAcceleration());
sysLocation.setTime(location.duration);
sysLocation.setBearing((float) location.getHeading());
sysLocation.setSpeed(location.getSpeed());
if (MogoCarLocationChangedListenerRegister.getInstance().getListener() != null) {
MogoCarLocationChangedListenerRegister.getInstance().getListener().onCarLocationChanged2(sysLocation);
}
if (checkAMapView() && mMapLoaded) {
// 地图初始化完成后每隔5s自动判断当前地图的模式
if (mIsFirstLocated) {