[2.13.0-arch-opt] merg

This commit is contained in:
zhongchao
2023-01-30 22:29:40 +08:00
parent d46c11767d
commit 66db271f6c
17 changed files with 52 additions and 58 deletions

View File

@@ -10,7 +10,6 @@ import com.mogo.eagle.function.biz.dispatch.DispatchAutoPilotManager.Companion.d
import com.mogo.eagle.function.biz.monitoring.CronTaskManager.Companion.cronTaskManager
import com.mogo.eagle.function.biz.notice.NoticeSocketManager.Companion.noticeSocketManager
import com.mogo.eagle.function.biz.notice.network.NoticeNetWorkManager
import com.mogo.eagle.function.biz.v2x.speedlimit.SpeedLimitDataManager
import com.mogo.eagle.function.biz.v2x.speedlimit.SpeedLimitDispatcher
import com.mogo.eagle.function.biz.v2x.trafficlight.core.MogoTrafficLightManager
import com.mogo.eagle.function.biz.v2x.trafficlight.core.TrafficLightDispatcher
@@ -28,10 +27,9 @@ class FuncBizProvider : IMoGoFuncBizProvider {
cronTaskManager.startCronTask()
MogoTrafficLightManager.INSTANCE.initServer(context)
TrafficLightDispatcher.INSTANCE.initServer(context) //todo 红绿灯中心模块放入dataCenter
VipCarManager.INSTANCE.initServer(context)
SpeedLimitDataManager.getInstance().start()
SpeedLimitDispatcher.INSTANCE.initLimit(context)
TrafficLightDispatcher.INSTANCE.initServer(context) //todo 宏宇 放入dataCenter
SpeedLimitDispatcher.INSTANCE.initLimit(context) //todo 宏宇放入dataCenter
// RedLightWarningManager.INSTANCE.listenTrafficLight()
}

View File

@@ -1,81 +0,0 @@
package com.mogo.eagle.function.biz.v2x.speedlimit;
import static com.mogo.eagle.core.data.deva.bizconfig.FuncBizConfig.BIZ_SLW;
import static com.mogo.eagle.core.data.deva.bizconfig.FuncBizConfig.V2I;
import androidx.annotation.Nullable;
import com.mogo.eagle.core.function.api.autopilot.IMoGoChassisLocationGCJ02Listener;
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationGCJ20ListenerManager;
import com.mogo.eagle.core.function.call.map.CallerMapUIServiceManager;
import com.mogo.eagle.core.function.call.v2x.CallerLimitingVelocityListenerManager;
import com.mogo.eagle.core.utilcode.util.UiThreadHandler;
import com.zhjt.service_biz.BizConfig;
import java.util.Timer;
import java.util.TimerTask;
import mogo.telematics.pad.MessagePad;
/**
* 限速
*
* @author mogoauto
*/
public class SpeedLimitDataManager implements IMoGoChassisLocationGCJ02Listener {
private final static String TAG = "SpeedLimitDataManager";
private static SpeedLimitDataManager instance;
private MessagePad.GnssInfo mLocation;
private SpeedLimitDataManager() {
}
public static SpeedLimitDataManager getInstance() {
if (instance == null) {
synchronized (SpeedLimitDataManager.class) {
if (instance == null) {
instance = new SpeedLimitDataManager();
}
}
}
return instance;
}
@Override
public void onChassisLocationGCJ02(@Nullable MessagePad.GnssInfo gnssInfo) {
mLocation = gnssInfo;
}
private class SpeedTimerTask extends TimerTask {
@Override
public void run() {
if (mLocation != null) {
if(CallerMapUIServiceManager.INSTANCE.getMapUIController()!=null){
getSpeedLimit();
}
}
}
@BizConfig(biz = V2I, dependentBizNode = "", bizNode = BIZ_SLW)
private void getSpeedLimit() {
// if (!isShowObuLimitSpeedView) {
int speedLimit = CallerMapUIServiceManager.INSTANCE.getMapUIController().getLimitSpeed(mLocation.getLongitude(), mLocation.getLatitude(), (float) mLocation.getHeading());
UiThreadHandler.post(() -> {
if (speedLimit > 0) {
// CallerHmiManager.INSTANCE.showLimitingVelocity(speedLimit, 1);
CallerLimitingVelocityListenerManager.INSTANCE.invokeOnLimitingVelocityChange(speedLimit);
}
});
// }
}
}
public void start() {
CallerChassisLocationGCJ20ListenerManager.INSTANCE.addListener(TAG, this);
Timer mTimer = new Timer();
mTimer.schedule(new SpeedTimerTask(), 3000, 1000);
}
}

View File

@@ -34,7 +34,7 @@ class SpeedLimitDispatcher : ILimitingVelocityListener {
/**
* 地图限速数据
*/
@BizConfig(FuncBizConfig.V2I, "", FuncBizConfig.BIZ_SLW)
// @BizConfig(FuncBizConfig.V2I, "", FuncBizConfig.BIZ_SLW) //todo arrow 重新考虑放的位置
override fun onLimitingVelocityChange(limitingVelocity: Int, sourceType: DataSourceType) {
when (sourceType) { // obu 优先级高于 map体现链路能力
DataSourceType.OBU -> {