Merge remote-tracking branch 'origin/dev_robobus-m1-p-app-module_1.1.0_230112_1.1.0' into dev_robobus-m1-p-app-module_1.1.0_230112_1.1.0

This commit is contained in:
yangyakun
2023-03-13 16:55:02 +08:00
8 changed files with 33 additions and 9 deletions

View File

@@ -104,7 +104,7 @@ class PM2DrivingModel private constructor() {
CallerAutoPilotStatusListenerManager.addListener(TAG, mAutoPilotStatusListener)
// 定位监听
CallerChassisLocationGCJ02ListenerManager.addListener(TAG, mMapLocationListener)
CallerChassisLocationGCJ02ListenerManager.addListener(TAG,20, mMapLocationListener)
// CallerChassisLocationGCJ02ListenerManager.setListenerHz(TAG,2)//设置2hz, 1s返回2次
//司乘屏通信监听

View File

@@ -38,9 +38,9 @@ class PM2DrivingPresenter(view: PM2DrivingInfoFragment?) :
}
override fun updateSpeed(speed: Int) {
CallerLogger.d(
SceneConstant.M_BUS_P + "speed = ",speed.toString()
)
// CallerLogger.d(
// SceneConstant.M_BUS_P + "speed = ",speed.toString()
// )
ThreadUtils.runOnUiThread {
mView?.updateSpeed(speed)
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 83 KiB

After

Width:  |  Height:  |  Size: 528 KiB

View File

@@ -156,7 +156,7 @@ public class OrderModel {
mContext = AbsMogoApplication.getApp();
loginService = (LoginService) ARouter.getInstance().build(OchCommonConst.LOGINSERVICE).navigation();
// 定位监听
CallerChassisLocationGCJ02ListenerManager.INSTANCE.addListener(TAG, mMapLocationListener);
CallerChassisLocationGCJ02ListenerManager.INSTANCE.addListener(TAG, 20,mMapLocationListener);
// CallerChassisLocationGCJ02ListenerManager.INSTANCE.setListenerHz(TAG,2);//设置5hz, 1s返回一次
MogoStatusManager.getInstance().registerStatusChangedListener(TAG, StatusDescriptor.VR_MODE, mMogoStatusChangedListener);

View File

@@ -44,7 +44,7 @@ public class MogoRouteOverlayManager implements
public void init() {
CallerPlanningTrajectoryListenerManager.INSTANCE.addListener(TAG, this);
CallerAutoPilotStatusListenerManager.INSTANCE.addListener(TAG, this);
CallerChassisLocationGCJ02ListenerManager.INSTANCE.addListener(TAG, this);
CallerChassisLocationGCJ02ListenerManager.INSTANCE.addListener(TAG, 20,this);
}
public static MogoRouteOverlayManager getInstance() {

View File

@@ -32,7 +32,7 @@ class MapBizView(context: Context?, attrs: AttributeSet?) : MogoMapView(context,
initMapView()
CallerSkinModeListenerManager.addListener(TAG, this)
CallerChassisLocationWGS84ListenerManager.addListener(TAG, this)
CallerChassisLocationWGS84ListenerManager.addListener(TAG, 20,this)
CallerChassisLamplightListenerManager.addListener(TAG, this)
}

View File

@@ -74,7 +74,19 @@ object CallerChassisLocationGCJ02ListenerManager : CallerBase<IMoGoChassisLocati
syncLocationCallback(tag, it, mGnssInfo!!, sourceType)
}
} else {
syncLocationCallback(tag, it, mGnssInfo!!, sourceType)
//Logger.d(TAG, "没设置监听频率使用默认5HZ")
val hzTime = (1.0 / 5) * 1000
// 获取最后一次回调的时间
val hzLastSendTime = M_LISTENERS_HZ_LAST_SEND_TIME[tag]
if (hzLastSendTime != null && hzLastSendTime > 0) {
// 计算是否进入下一次回调周期
val nowTime = TimeUtils.getNowMills()
if (nowTime - hzLastSendTime > hzTime) {
syncLocationCallback(tag, it, mGnssInfo!!, sourceType)
}
} else {
syncLocationCallback(tag, it, mGnssInfo!!, sourceType)
}
}
}
}

View File

@@ -59,7 +59,19 @@ object CallerChassisLocationWGS84ListenerManager : CallerBase<IMoGoChassisLocati
syncLocationCallback(tag, it, mGnssInfo, sourceType)
}
} else {
syncLocationCallback(tag, it, mGnssInfo, sourceType)
//Logger.d(TAG, "没设置监听频率使用默认5HZ")
val hzTime = (1.0 / 5) * 1000
// 获取最后一次回调的时间
val hzLastSendTime = M_LISTENERS_HZ_LAST_SEND_TIME[tag]
if (hzLastSendTime != null && hzLastSendTime > 0) {
// 计算是否进入下一次回调周期
val nowTime = TimeUtils.getNowMills()
if (nowTime - hzLastSendTime > hzTime) {
syncLocationCallback(tag, it, mGnssInfo, sourceType)
}
} else {
syncLocationCallback(tag, it, mGnssInfo, sourceType)
}
}
}
}