[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

@@ -68,6 +68,7 @@
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/hmi_traffic_light_layout_margin_top"
android:layout_marginEnd="@dimen/hmi_traffic_light_layout_margin_right"
android:visibility="gone"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent" />

View File

@@ -1,5 +1,10 @@
apply plugin: 'com.android.library'
apply plugin: 'com.alibaba.arouter'
plugins {
id 'com.android.library'
id 'kotlin-android'
id 'kotlin-android-extensions'
id 'kotlin-kapt'
id 'com.alibaba.arouter'
}
android {
compileSdkVersion rootProject.ext.android.compileSdkVersion
@@ -13,10 +18,11 @@ android {
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
consumerProguardFiles "consumer-rules.pro"
javaCompileOptions {
annotationProcessorOptions {
arguments = [AROUTER_MODULE_NAME: project.getName()]
//ARouter apt 参数
kapt {
useBuildCache = false
arguments {
arg("AROUTER_MODULE_NAME", project.getName())
}
}
}
@@ -43,6 +49,7 @@ dependencies {
implementation rootProject.ext.dependencies.arouter
annotationProcessor rootProject.ext.dependencies.aroutercompiler
kapt rootProject.ext.dependencies.aroutercompiler
if (Boolean.valueOf(USE_MAVEN_PACKAGE)) {
implementation rootProject.ext.dependencies.mogoutils

View File

@@ -12,5 +12,5 @@ class OCHConstants {
/**
* arouter 路由地址
*/
public static final String PATH = "/och/noop/api";
public static final String PATH = "/noop/api";
}

View File

@@ -3,7 +3,7 @@ package com.mogo.och.noop
import android.view.View
import com.mogo.commons.mvp.MvpFragment
import com.mogo.eagle.core.function.hmi.ui.setting.ToggleDebugView
import kotlinx.android.synthetic.main.fragment_hmi.*
import kotlinx.android.synthetic.main.och_noop_fragment_hmi.*
class OchNoopFragment : MvpFragment<OchNoopContract.View?, OchNoopPresenter?>(),
OchNoopContract.View {
@@ -25,7 +25,6 @@ class OchNoopFragment : MvpFragment<OchNoopContract.View?, OchNoopPresenter?>(),
}
override fun initViews() {
viewShowDebugView.setOnLongClickListener {
ToggleDebugView.toggleDebugView.toggle(requireContext())
true

View File

@@ -67,8 +67,7 @@
android:layout_marginTop="@dimen/module_mogo_autopilot_status_margin_top"
android:elevation="@dimen/dp_10"
app:layout_constraintLeft_toLeftOf="@+id/viewSpeedChart"
app:layout_constraintTop_toBottomOf="@+id/viewSpeedChart"
app:layout_goneMarginStart="@dimen/module_mogo_autopilot_status_margin_left" />
app:layout_constraintTop_toBottomOf="@+id/viewSpeedChart"/>
<!--超视距-->
<com.mogo.eagle.core.function.hmi.ui.widget.CameraView
@@ -86,6 +85,7 @@
android:id="@+id/viewTrafficLightVr"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:visibility="gone"
android:layout_marginTop="@dimen/hmi_traffic_light_layout_margin_top"
android:layout_marginEnd="@dimen/hmi_traffic_light_layout_margin_right"
app:layout_constraintRight_toRightOf="parent"
@@ -164,18 +164,14 @@
android:layout_height="120dp"
android:layout_marginTop="30dp"
android:layout_marginEnd="40dp"
android:background="@drawable/bg_waring_limiting_velocity"
android:elevation="@dimen/dp_10"
android:gravity="center"
android:text="60"
android:textColor="#FFFFFF"
android:textSize="60dp"
android:visibility="gone"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toBottomOf="@+id/ivCameraIcon"
app:layout_goneMarginEnd="40dp"
app:layout_goneMarginTop="40dp"
tools:visibility="gone" />
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toBottomOf="@+id/ivCameraIcon" />
<!--消息盒子司机端选择入口-->
<CheckBox

View File

@@ -126,6 +126,7 @@
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/hmi_traffic_light_layout_margin_top"
android:layout_marginEnd="@dimen/hmi_traffic_light_layout_margin_right"
android:visibility="gone"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent" />

View File

@@ -24,7 +24,7 @@ project.android.productFlavors {
buildConfigField 'int', 'GPS_PROVIDER', "1"
// 构建的应用身份类型,具体查看 README.md APP_IDENTITY_MODE规则
buildConfigField 'String', 'APP_IDENTITY_MODE', "\"Taxi_Driver_Base\""
buildConfigField 'String', 'APP_IDENTITY_MODE', "\"FPad_Noop_Base\""
// 连接的工控机IP地址
buildConfigField 'String', 'ADAS_CONNECT_IP', "\"192.168.1.104\""
// 构建的是否是演示(美化)模式

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

@@ -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 -> {

View File

@@ -108,7 +108,6 @@ dependencies {
api project(':core:function-impl:mogo-core-function-chat')
api project(':core:function-impl:mogo-core-function-datacenter')
api project(':core:function-impl:mogo-core-function-biz')
api project(':core:mogo-core-function-call')
api project(':libraries:mogo-adas')
api project(':libraries:map-usbcamera')

View File

@@ -4,6 +4,7 @@ import android.content.BroadcastReceiver
import android.content.Context
import android.content.Intent
import android.util.Log
import com.mogo.eagle.core.data.enums.DataSourceType
import com.mogo.eagle.core.data.enums.EventTypeEnumNew
import com.mogo.eagle.core.function.call.hmi.CallerHmiManager
import com.mogo.eagle.core.function.hmi.WaringConst
@@ -13,6 +14,7 @@ import com.mogo.eagle.core.data.msgbox.MsgBoxBean
import com.mogo.eagle.core.data.msgbox.MsgBoxType
import com.mogo.eagle.core.data.msgbox.V2XMsg
import com.mogo.eagle.core.function.call.msgbox.CallerMsgBoxManager
import com.mogo.eagle.core.function.call.v2x.CallerViewLimitingVelocityListenerManager
/**
* V2X 预警广播接收。用于跨应用,跨进程,内部也可以通过这种方式弹出预警提示框
@@ -76,7 +78,7 @@ class V2XWarningBroadcastReceiver : BroadcastReceiver() {
tag: String?
) {
if (EventTypeEnumNew.TYPE_USECASE_ID_IVP_RED.poiType == v2xType.toString()) {
CallerHmiManager.showLimitingVelocity(1, 1)
CallerViewLimitingVelocityListenerManager.invokeOnLimitingVelocityChange(1,DataSourceType.MAP)
}
if (alertContent.isNullOrEmpty() || ttsContent.isNullOrEmpty()) {
Log.d("MsgBox-V2XWarningBR", "alertContent或ttsContent为空!")

View File

@@ -10,9 +10,9 @@ class ToolsImageView(context: Context, attrs: AttributeSet?) :
override fun onAttachedToWindow() {
super.onAttachedToWindow()
scaleType = ScaleType.CENTER
setBackgroundResource(R.drawable.module_ext_check)
setImageResource(R.drawable.icon_tools_nor)
scaleType = ScaleType.CENTER
setOnClickListener{
toolsView.showToolsFloat(context)
}

View File

@@ -38,18 +38,13 @@ class AutoPilotStatusView constructor(
private var mAutopilotStatus: Int = 0
override fun onAttachedToWindow() {
super.onAttachedToWindow()
init{
initView(context)
}
private fun initView(context: Context) {
setBackgroundResource(R.drawable.module_hmi_autopilot_status_bg)
LayoutInflater.from(context).inflate(R.layout.view_autopilot_status, this, true)
val lp = LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT)
layoutParams = lp
// 设置点击监听
setOnClickListener(this)
// 自动驾驶状态监听

View File

@@ -149,10 +149,14 @@ public class MainLauncherActivity extends MainActivity implements IMogoIntentLis
ochProvider = (IMoGoFunctionProvider) ARouter.getInstance()
.build("/driver/api")
.navigation(getContext());
} else {
} else if(AppIdentityModeUtils.isPassenger(FunctionBuildConfig.appIdentityMode)){
ochProvider = (IMoGoFunctionProvider) ARouter.getInstance()
.build("/passenger/api")
.navigation(getContext());
} else {
ochProvider = (IMoGoFunctionProvider) ARouter.getInstance()
.build("/noop/api")
.navigation(getContext());
}
}
// 处理一个机器多个屏幕方案

View File

@@ -14,9 +14,7 @@
android:gravity="center"
android:text="60"
android:textColor="#FFFFFF"
android:textSize="@dimen/dp_60"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toBottomOf="@+id/ivCameraIcon" />
android:textSize="@dimen/dp_60"/>
<!--限速来源-->
<TextView
@@ -29,8 +27,6 @@
android:textColor="@color/color_FFFFFF"
android:textSize="@dimen/dp_30"
android:textStyle="bold"
android:visibility="gone"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toBottomOf="@+id/tvLimitingVelocity" />
android:visibility="gone" />
</LinearLayout>

View File

@@ -1,17 +1,15 @@
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;
package com.mogo.eagle.core.function.business;
import androidx.annotation.Nullable;
import com.mogo.eagle.core.data.enums.DataSourceType;
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.Objects;
import java.util.Timer;
import java.util.TimerTask;
@@ -25,8 +23,8 @@ import mogo.telematics.pad.MessagePad;
public class SpeedLimitDataManager implements IMoGoChassisLocationGCJ02Listener {
private final static String TAG = "SpeedLimitDataManager";
private static SpeedLimitDataManager instance;
private MessagePad.GnssInfo mLocation;
private static volatile SpeedLimitDataManager instance;
private MessagePad.GnssInfo mLocation;
private SpeedLimitDataManager() {
}
@@ -51,24 +49,19 @@ public class SpeedLimitDataManager implements IMoGoChassisLocationGCJ02Listener
@Override
public void run() {
if (mLocation != null) {
if(CallerMapUIServiceManager.INSTANCE.getMapUIController()!=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);
}
});
// }
int speedLimit = Objects.requireNonNull(CallerMapUIServiceManager.INSTANCE.getMapUIController()).getLimitSpeed(mLocation.getLongitude(), mLocation.getLatitude(), (float) mLocation.getHeading());
UiThreadHandler.post(() -> {
if (speedLimit > 0) {
CallerLimitingVelocityListenerManager.INSTANCE.invokeOnLimitingVelocityChange(speedLimit, DataSourceType.MAP);
}
});
}
}

View File

@@ -15,6 +15,7 @@ import com.mogo.eagle.core.function.api.autopilot.IMoGoPlanningRottingListener
import com.mogo.eagle.core.function.api.map.hd.IMoGoMapFragmentProvider
import com.mogo.eagle.core.function.api.setting.IMoGoSkinModeChangeListener
import com.mogo.eagle.core.function.business.MapPointCloudSubscriber
import com.mogo.eagle.core.function.business.SpeedLimitDataManager
import com.mogo.eagle.core.function.business.identify.MapIdentifySubscriber
import com.mogo.eagle.core.function.business.routeoverlay.MogoRouteOverlayManager
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationWGS84ListenerManager
@@ -199,6 +200,8 @@ class MapFragment : MvpFragment<MapView?, MapPresenter?>(),
MapIdentifySubscriber.instance
MogoRouteOverlayManager.getInstance().init()
MapPointCloudSubscriber.instance
SpeedLimitDataManager.getInstance().start()
// TODO GD地图业务需要与高精地图业务拆开 --- 扶风
queryInfStructure()
}