[dev_arch_opt_3.0]
[Change] [ 1、拆分Obu数据回调接口,等待凤坤pb提交后在统一数据调用 ] Signed-off-by: donghongyu <donghongyu@zhidaoauto.com>
This commit is contained in:
@@ -37,9 +37,8 @@ class MoGoObuProvider : IMoGoObuProvider {
|
||||
MogoObuDcCombineManager.INSTANCE.init(context)
|
||||
CallerLogger.d("$M_OBU$TAG", "初始化蘑菇自研OBU…… localIp = " + CommonUtils.getLocalIPAddress())
|
||||
//bus乘客版本obu功能去掉
|
||||
if (AppIdentityModeUtils.isBus(FunctionBuildConfig.appIdentityMode) && AppIdentityModeUtils.isPassenger(
|
||||
FunctionBuildConfig.appIdentityMode
|
||||
)
|
||||
if (AppIdentityModeUtils.isBus(FunctionBuildConfig.appIdentityMode)
|
||||
&& AppIdentityModeUtils.isPassenger(FunctionBuildConfig.appIdentityMode)
|
||||
) {
|
||||
//不处理
|
||||
} else {
|
||||
@@ -73,9 +72,8 @@ class MoGoObuProvider : IMoGoObuProvider {
|
||||
* 通过控制面板设置ip,进行传递
|
||||
*/
|
||||
override fun connect(ipAddress: String) {
|
||||
if (AppIdentityModeUtils.isBus(FunctionBuildConfig.appIdentityMode) && AppIdentityModeUtils.isPassenger(
|
||||
FunctionBuildConfig.appIdentityMode
|
||||
)
|
||||
if (AppIdentityModeUtils.isBus(FunctionBuildConfig.appIdentityMode)
|
||||
&& AppIdentityModeUtils.isPassenger(FunctionBuildConfig.appIdentityMode)
|
||||
) {
|
||||
//不处理
|
||||
} else {
|
||||
|
||||
@@ -15,13 +15,12 @@ import com.mogo.eagle.core.function.call.map.CallerVisualAngleManager
|
||||
import com.mogo.eagle.core.function.call.map.CallerVisualAngleManager.Scene.Default
|
||||
import com.mogo.eagle.core.function.call.map.CallerVisualAngleManager.Scene.TooClose
|
||||
import com.mogo.eagle.core.function.call.msgbox.CallerMsgBoxManager
|
||||
import com.mogo.eagle.core.function.call.obu.CallerObuListenerManager
|
||||
import com.mogo.eagle.core.function.call.obu.CallerObuConnectListenerManager
|
||||
import com.mogo.eagle.core.function.call.obu.CallerObuTrafficLightListenerManager
|
||||
import com.mogo.eagle.core.function.call.v2x.CallerLimitingVelocityListenerManager
|
||||
import com.mogo.eagle.core.function.datacenter.obu.utils.TrafficDataConvertUtilsNew
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_OBU
|
||||
import com.mogo.eagle.core.utilcode.mogo.storage.SharedPrefsMgr
|
||||
import com.mogo.eagle.core.utilcode.util.UiThreadHandler
|
||||
import com.mogo.support.obu.MogoObuManager
|
||||
import com.mogo.support.obu.OnMogoObuListener
|
||||
@@ -48,9 +47,7 @@ class MogoPrivateObuNewManager private constructor() {
|
||||
}
|
||||
}
|
||||
|
||||
private var mContext: Context? = null
|
||||
private var mObuStatusInfo = CallerObuListenerManager.getObuStatusInfo()
|
||||
|
||||
private var mObuStatusInfo = CallerObuConnectListenerManager.getObuStatusInfo()
|
||||
|
||||
fun connectObu(context: Context, obuIpAddress: String, padIpAddress: String) {
|
||||
MogoObuManager.getInstance().registerMogoObuListener(mogoObuListener)
|
||||
@@ -102,14 +99,10 @@ class MogoPrivateObuNewManager private constructor() {
|
||||
mObuStatusInfo.obuStatus = false
|
||||
mObuStatusInfo.obuHvStatus = false
|
||||
mObuStatusInfo.obuRvStatus = false
|
||||
CallerObuListenerManager.invokeListener(mObuStatusInfo)
|
||||
mContext?.let { SharedPrefsMgr.getInstance(it).putBoolean("OBU", false) }
|
||||
mContext?.let { SharedPrefsMgr.getInstance(it).putBoolean("OBU_HV", false) }
|
||||
mContext?.let { SharedPrefsMgr.getInstance(it).putBoolean("OBU_RV", false) }
|
||||
CallerObuConnectListenerManager.invokeObuConnectListener(mObuStatusInfo)
|
||||
} else if (connectStatus == 1) { //连接成功
|
||||
mObuStatusInfo.obuStatus = true
|
||||
CallerObuListenerManager.invokeListener(mObuStatusInfo)
|
||||
mContext?.let { SharedPrefsMgr.getInstance(it).putBoolean("OBU", true) }
|
||||
CallerObuConnectListenerManager.invokeObuConnectListener(mObuStatusInfo)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -118,7 +111,7 @@ class MogoPrivateObuNewManager private constructor() {
|
||||
*/
|
||||
override fun onMogoObuHvBasics(p0: MogoObuHvBasicsData?) {
|
||||
mObuStatusInfo.obuHvStatus = true
|
||||
CallerObuListenerManager.invokeListener(mObuStatusInfo)
|
||||
CallerObuConnectListenerManager.invokeObuConnectListener(mObuStatusInfo)
|
||||
|
||||
if (p0 != null && p0.vehBasicsMsg != null) {
|
||||
CallerLogger.d(
|
||||
@@ -169,7 +162,7 @@ class MogoPrivateObuNewManager private constructor() {
|
||||
super.onMogoObuRvWarning(data)
|
||||
// if (HmiBuildConfig.isShowObuV2vView) { //TODO 临时需要关闭v2v开关
|
||||
mObuStatusInfo.obuRvStatus = true
|
||||
CallerObuListenerManager.invokeListener(mObuStatusInfo)
|
||||
CallerObuConnectListenerManager.invokeObuConnectListener(mObuStatusInfo)
|
||||
if (!data.warningMsg.warningData.isNullOrEmpty()) {
|
||||
// 更新数据,远车数据,之前要匹配uuid
|
||||
TrafficDataConvertUtilsNew.cvxRvInfoIndInfo2TrafficData(data)?.let {
|
||||
@@ -192,9 +185,7 @@ class MogoPrivateObuNewManager private constructor() {
|
||||
appId = data.warningMsg.warningData[0].warningType.toString()
|
||||
status = data.warningMsg.warningData[0].status
|
||||
//拼凑数据
|
||||
if (appId != null) {
|
||||
handleSdkObu(appId, direction, status, level, data)
|
||||
}
|
||||
handleSdkObu(appId, direction, status, level, data)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -215,15 +206,11 @@ class MogoPrivateObuNewManager private constructor() {
|
||||
*/
|
||||
override fun onMogoObuSpatWarning(data: MogoObuSpatWarningData) {
|
||||
super.onMogoObuSpatWarning(data)
|
||||
if (data != null) {
|
||||
// if (HmiBuildConfig.isShowObuV2iView) {
|
||||
handlerTrafficLight(
|
||||
data.warningType,
|
||||
data.status,
|
||||
data.lights
|
||||
)
|
||||
// }
|
||||
}
|
||||
handlerTrafficLight(
|
||||
data.warningType,
|
||||
data.status,
|
||||
data.lights
|
||||
)
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -232,7 +219,7 @@ class MogoPrivateObuNewManager private constructor() {
|
||||
override fun onMogoObuRsiWarning(data: MogoObuRsiWarningData) {
|
||||
super.onMogoObuRsiWarning(data)
|
||||
// if (HmiBuildConfig.isShowObuV2iView) {
|
||||
if (data != null && data.warningMsg != null && data.warningMsg.size > 0) {
|
||||
if (data.warningMsg != null && data.warningMsg.size > 0) {
|
||||
var alertContent = ""
|
||||
var ttsContent = ""
|
||||
var appId = data.warningMsg[0].sceneType.toString()
|
||||
@@ -411,7 +398,7 @@ class MogoPrivateObuNewManager private constructor() {
|
||||
//显示警告红边
|
||||
// CallerHmiManager.showWarning(direction)
|
||||
//不显示弹框,语音提示,数据在消息盒子里面展示,此处不在处理弹框
|
||||
if (alertContent.isNullOrEmpty() || ttsContent.isNullOrEmpty()) {
|
||||
if (alertContent.isEmpty() || ttsContent.isEmpty()) {
|
||||
return
|
||||
}
|
||||
CallerMsgBoxManager.saveMsgBox(
|
||||
@@ -571,7 +558,7 @@ class MogoPrivateObuNewManager private constructor() {
|
||||
?.updateITrafficThreatLevelInfo(it)
|
||||
}
|
||||
|
||||
if (alertContent.isNullOrEmpty() || ttsContent.isNullOrEmpty()) {
|
||||
if (alertContent.isEmpty() || ttsContent.isEmpty()) {
|
||||
return
|
||||
}
|
||||
//显示警告红边
|
||||
@@ -650,7 +637,10 @@ class MogoPrivateObuNewManager private constructor() {
|
||||
|
||||
MogoObuConstants.STATUS.DELETE -> { // 删除
|
||||
UiThreadHandler.post {
|
||||
CallerLimitingVelocityListenerManager.invokeOnLimitingVelocityChange(-1,DataSourceType.OBU)
|
||||
CallerLimitingVelocityListenerManager.invokeOnLimitingVelocityChange(
|
||||
-1,
|
||||
DataSourceType.OBU
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,83 @@
|
||||
package com.mogo.eagle.core.function.datacenter.obu.adapter
|
||||
|
||||
import com.mogo.support.obu.OnMogoObuListener
|
||||
import com.mogo.support.obu.constants.Define.ConnectStatus
|
||||
import com.mogo.support.obu.model.*
|
||||
|
||||
/**
|
||||
* 适配 OBU 回调监听分发,这里不做业务,只做数据包装及分发处理
|
||||
* @author dong hong yu
|
||||
*/
|
||||
object MoGoObuListenerImpl : OnMogoObuListener() {
|
||||
|
||||
/**
|
||||
* 连接状态
|
||||
*
|
||||
* @param connectStatus 连接状态
|
||||
* @since 1.0.0
|
||||
*/
|
||||
override fun onConnectStatus(@ConnectStatus connectStatus: Int) {
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* HV车辆基础信息
|
||||
*
|
||||
* @param data 数据
|
||||
* @since 1.0.0
|
||||
*/
|
||||
override fun onMogoObuHvBasics(data: MogoObuHvBasicsData) {
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* V2V预警信息
|
||||
*
|
||||
* @param data 数据
|
||||
* @since 1.0.0
|
||||
*/
|
||||
override fun onMogoObuRvWarning(data: MogoObuRvWarningData) {
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 红绿灯预警信息
|
||||
*
|
||||
* @param data 数据
|
||||
* @since 1.0.0
|
||||
*/
|
||||
override fun onMogoObuSpatWarning(data: MogoObuSpatWarningData) {
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* RSI预警信息
|
||||
*
|
||||
* @param data 数据
|
||||
* @since 1.0.0
|
||||
*/
|
||||
override fun onMogoObuRsiWarning(data: MogoObuRsiWarningData) {
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* RSM预警信息
|
||||
*
|
||||
* @param data 数据
|
||||
* @since 1.0.0
|
||||
*/
|
||||
override fun onMogoObuRsmWarning(data: MogoObuRsmWarningData) {
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 地图匹配结果
|
||||
*
|
||||
* @param data 数据
|
||||
* @since 1.0.0
|
||||
*/
|
||||
override fun onMogoObuMapMath(data: MogoObuMapMathData) {
|
||||
|
||||
}
|
||||
}
|
||||
@@ -38,14 +38,12 @@ import com.mogo.eagle.core.data.deva.chain.ChainConstant
|
||||
import com.mogo.eagle.core.data.deva.scene.SceneModule
|
||||
import com.mogo.eagle.core.data.enums.TrafficTypeEnum
|
||||
import com.mogo.eagle.core.data.gnss.AccelerationEntity
|
||||
import com.mogo.eagle.core.data.map.MogoLocation
|
||||
import com.mogo.eagle.core.data.obu.ObuStatusInfo
|
||||
import com.mogo.eagle.core.data.report.ReportEntity
|
||||
import com.mogo.eagle.core.function.api.autopilot.*
|
||||
import com.mogo.eagle.core.function.api.devatools.IMoGoDevaToolsFuncConfigListener
|
||||
import com.mogo.eagle.core.function.api.devatools.IMoGoDevaToolsListener
|
||||
import com.mogo.eagle.core.function.api.map.listener.IMoGoMapLocationListener
|
||||
import com.mogo.eagle.core.function.api.obu.IMoGoObuStatusListener
|
||||
import com.mogo.eagle.core.function.api.obu.IMoGoObuConnectListener
|
||||
import com.mogo.eagle.core.function.business.routeoverlay.*
|
||||
import com.mogo.eagle.core.function.call.autopilot.*
|
||||
import com.mogo.eagle.core.function.call.devatools.CallerDevaToolsFuncConfigListenerManager
|
||||
@@ -55,8 +53,8 @@ import com.mogo.eagle.core.function.call.hmi.CallerHmiManager
|
||||
import com.mogo.eagle.core.function.call.map.CallerHDMapManager
|
||||
import com.mogo.eagle.core.function.call.map.CallerMapUIServiceManager
|
||||
import com.mogo.eagle.core.function.call.map.CallerSmpManager
|
||||
import com.mogo.eagle.core.function.call.obu.CallerOBUManager
|
||||
import com.mogo.eagle.core.function.call.obu.CallerObuListenerManager
|
||||
import com.mogo.eagle.core.function.call.obu.CallerObuApiManager
|
||||
import com.mogo.eagle.core.function.call.obu.CallerObuConnectListenerManager
|
||||
import com.mogo.eagle.core.function.call.setting.CallerMoGoUiSettingManager
|
||||
import com.mogo.eagle.core.function.call.telematic.CallerTelematicManager
|
||||
import com.mogo.eagle.core.function.hmi.R
|
||||
@@ -100,22 +98,21 @@ internal class DebugSettingView @JvmOverloads constructor(
|
||||
attrs: AttributeSet? = null,
|
||||
defStyleAttr: Int = 0
|
||||
) : ConstraintLayout(context, attrs, defStyleAttr),
|
||||
IMoGoObuStatusListener,
|
||||
IMoGoAutopilotStatusListener,
|
||||
IMoGoChassisLocationWGS84Listener,
|
||||
IMoGoMapLocationListener,
|
||||
IMoGoAutopilotIdentifyListener,
|
||||
IMoGoPlanningRottingListener,
|
||||
IMoGoPlanningTrajectoryListener,
|
||||
IMoGoDevaToolsFuncConfigListener,
|
||||
IMoGoChassisLamplightListener,
|
||||
IMoGoDevaToolsListener,
|
||||
IMoGoChassisAccStateListener,
|
||||
IMoGoChassisSteeringStateListener,
|
||||
IMoGoChassisGearStateListener,
|
||||
IMoGoChassisBrakeStateListener,
|
||||
IMoGoChassisThrottleStateListener,
|
||||
IMoGoSweeperFutianCleanSystemListener{
|
||||
IMoGoObuConnectListener,
|
||||
IMoGoAutopilotStatusListener,
|
||||
IMoGoChassisLocationWGS84Listener,
|
||||
IMoGoAutopilotIdentifyListener,
|
||||
IMoGoPlanningRottingListener,
|
||||
IMoGoPlanningTrajectoryListener,
|
||||
IMoGoDevaToolsFuncConfigListener,
|
||||
IMoGoChassisLamplightListener,
|
||||
IMoGoDevaToolsListener,
|
||||
IMoGoChassisAccStateListener,
|
||||
IMoGoChassisSteeringStateListener,
|
||||
IMoGoChassisGearStateListener,
|
||||
IMoGoChassisBrakeStateListener,
|
||||
IMoGoChassisThrottleStateListener,
|
||||
IMoGoSweeperFutianCleanSystemListener {
|
||||
|
||||
private val TAG = "DebugSettingView"
|
||||
|
||||
@@ -189,7 +186,7 @@ internal class DebugSettingView @JvmOverloads constructor(
|
||||
override fun onAttachedToWindow() {
|
||||
super.onAttachedToWindow()
|
||||
// 添加 OBU状态 监听
|
||||
CallerObuListenerManager.addListener(TAG, this)
|
||||
CallerObuConnectListenerManager.addListener(TAG, this)
|
||||
// 添加 ADAS状态 监听
|
||||
CallerAutoPilotStatusListenerManager.addListener(TAG, this)
|
||||
// 添加 ADAS车辆状态&定位 监听
|
||||
@@ -230,7 +227,7 @@ internal class DebugSettingView @JvmOverloads constructor(
|
||||
override fun onDetachedFromWindow() {
|
||||
super.onDetachedFromWindow()
|
||||
// 移除 OBU状态 监听
|
||||
CallerObuListenerManager.removeListener(TAG)
|
||||
CallerObuConnectListenerManager.removeListener(TAG)
|
||||
// 移除 ADAS状态 监听
|
||||
CallerAutoPilotStatusListenerManager.removeListener(TAG)
|
||||
// 移除 ADAS车辆状态&定位 监听
|
||||
@@ -254,7 +251,10 @@ internal class DebugSettingView @JvmOverloads constructor(
|
||||
CallerChassisLamplightListenerManager.removeListener(TAG)
|
||||
|
||||
// 移除 业务配置监听
|
||||
CallerDevaToolsFuncConfigListenerManager.unRegisterDevaToolsFuncConfigListener( FuncBizConfig.FOUNDATION, TAG)
|
||||
CallerDevaToolsFuncConfigListenerManager.unRegisterDevaToolsFuncConfigListener(
|
||||
FuncBizConfig.FOUNDATION,
|
||||
TAG
|
||||
)
|
||||
|
||||
if (logInfoView != null) {
|
||||
logInfoView!!.onEnterBackground()
|
||||
@@ -552,7 +552,7 @@ internal class DebugSettingView @JvmOverloads constructor(
|
||||
setLogCheckedChangeListener()
|
||||
|
||||
//OBU配置信息
|
||||
tvObuInfo.text = CallerObuListenerManager.getObuStatusInfoJsonString()
|
||||
tvObuInfo.text = CallerObuConnectListenerManager.getObuStatusInfoJsonString()
|
||||
|
||||
//工控机配置信息
|
||||
tvAutopilotInfo.text =
|
||||
@@ -572,14 +572,14 @@ internal class DebugSettingView @JvmOverloads constructor(
|
||||
btnSetObuIP.setOnClickListener {
|
||||
val obuIP = etObuIP.text.toString()
|
||||
if (StringUtils.isValidIPAddress(obuIP)) {
|
||||
CallerOBUManager.resetObuIpAddress(obuIP)
|
||||
CallerObuApiManager.resetObuIpAddress(obuIP)
|
||||
} else {
|
||||
ToastUtils.showShort("请输入正确的IP地址")
|
||||
}
|
||||
}
|
||||
|
||||
btnDrawFusion.isChecked = FunctionBuildConfig.isFusionColor
|
||||
btnDrawFusion.setOnCheckedChangeListener{_, isChecked ->
|
||||
btnDrawFusion.setOnCheckedChangeListener { _, isChecked ->
|
||||
FunctionBuildConfig.isFusionColor = isChecked
|
||||
}
|
||||
|
||||
@@ -589,7 +589,11 @@ internal class DebugSettingView @JvmOverloads constructor(
|
||||
// 演示模式
|
||||
tbIsDemoMode.setOnCheckedChangeListener { _, _ ->
|
||||
FunctionBuildConfig.isDemoMode = !FunctionBuildConfig.isDemoMode
|
||||
CallerHmiManager.updateStatusBarLeftView(FunctionBuildConfig.isDemoMode, "demoMode", DemoModeView(context))
|
||||
CallerHmiManager.updateStatusBarLeftView(
|
||||
FunctionBuildConfig.isDemoMode,
|
||||
"demoMode",
|
||||
DemoModeView(context)
|
||||
)
|
||||
CallerAutoPilotManager.setDemoMode(FunctionBuildConfig.isDemoMode)
|
||||
if (!FunctionBuildConfig.isDemoMode) {
|
||||
//关闭美化模式时,通知工控机
|
||||
@@ -1691,9 +1695,9 @@ internal class DebugSettingView @JvmOverloads constructor(
|
||||
mTrajectoryInfoSize = 0
|
||||
mRouteInfoSize = 0
|
||||
|
||||
if(FunctionBuildConfig.isDemoMode){
|
||||
if (FunctionBuildConfig.isDemoMode) {
|
||||
tbIsDemoMode.text = "关闭美化模式"
|
||||
}else{
|
||||
} else {
|
||||
tbIsDemoMode.text = "开启美化模式"
|
||||
}
|
||||
|
||||
@@ -1702,7 +1706,7 @@ internal class DebugSettingView @JvmOverloads constructor(
|
||||
/**
|
||||
* OBU状态回调
|
||||
*/
|
||||
override fun onObuStatusResponse(obuStatusInfo: ObuStatusInfo) {
|
||||
override fun onConnectStatus(obuStatusInfo: ObuStatusInfo) {
|
||||
lifecycleOwner.lifecycleScope.launch {
|
||||
tvObuInfo.text = GsonUtils.toJson(obuStatusInfo)
|
||||
|
||||
@@ -1782,7 +1786,7 @@ internal class DebugSettingView @JvmOverloads constructor(
|
||||
when (type) {
|
||||
BIZ_BEAUTY_MODE -> {
|
||||
tbIsDemoMode.isClickable = !lock
|
||||
val (left,top,right,bottom) = tbIsDemoMode.currentPadding()
|
||||
val (left, top, right, bottom) = tbIsDemoMode.currentPadding()
|
||||
if (lock) {
|
||||
tbIsDemoMode.background =
|
||||
resources.getDrawable(R.drawable.radio_button_lock_background)
|
||||
@@ -1790,11 +1794,11 @@ internal class DebugSettingView @JvmOverloads constructor(
|
||||
tbIsDemoMode.background =
|
||||
resources.getDrawable(R.drawable.radio_button_normal_background_right)
|
||||
}
|
||||
tbIsDemoMode.setPadding(left,top,right,bottom)
|
||||
tbIsDemoMode.setPadding(left, top, right, bottom)
|
||||
}
|
||||
BIZ_RAIN_MODE -> {
|
||||
tbIsRainMode.isClickable = !lock
|
||||
val (left,top,right,bottom) = tbIsRainMode.currentPadding()
|
||||
val (left, top, right, bottom) = tbIsRainMode.currentPadding()
|
||||
if (lock) {
|
||||
tbIsRainMode.background =
|
||||
resources.getDrawable(R.drawable.radio_button_lock_background)
|
||||
@@ -1802,21 +1806,21 @@ internal class DebugSettingView @JvmOverloads constructor(
|
||||
tbIsRainMode.background =
|
||||
resources.getDrawable(R.drawable.radio_button_normal_background_right)
|
||||
}
|
||||
tbIsRainMode.setPadding(left,top,right,bottom)
|
||||
tbIsRainMode.setPadding(left, top, right, bottom)
|
||||
}
|
||||
BIZ_WARNING_UPLOAD -> {
|
||||
tbReportWarning.isClickable = !lock
|
||||
val (left,top,right,bottom) = tbReportWarning.currentPadding()
|
||||
val (left, top, right, bottom) = tbReportWarning.currentPadding()
|
||||
if (lock) {
|
||||
tbReportWarning.background =
|
||||
resources.getDrawable(R.drawable.radio_button_lock_background)
|
||||
} else {
|
||||
tbReportWarning.background = null
|
||||
}
|
||||
tbReportWarning.setPadding(left,top,right,bottom)
|
||||
tbReportWarning.setPadding(left, top, right, bottom)
|
||||
}
|
||||
BIZ_BAG_RECORD -> {
|
||||
val (left,top,right,bottom) = btnRecordBag.currentPadding()
|
||||
val (left, top, right, bottom) = btnRecordBag.currentPadding()
|
||||
if (lock) {
|
||||
btnRecordBag.isClickable = false
|
||||
btnRecordBag.background =
|
||||
@@ -1826,10 +1830,10 @@ internal class DebugSettingView @JvmOverloads constructor(
|
||||
btnRecordBag.requestFocus()
|
||||
btnRecordBag.background = null
|
||||
}
|
||||
btnRecordBag.setPadding(left,top,right,bottom)
|
||||
btnRecordBag.setPadding(left, top, right, bottom)
|
||||
}
|
||||
BIZ_FULL_LOG -> {
|
||||
val (left,top,right,bottom) = tbLogCatch.currentPadding()
|
||||
val (left, top, right, bottom) = tbLogCatch.currentPadding()
|
||||
if (lock) {
|
||||
tbLogCatch.isClickable = false
|
||||
tbLogCatch.background =
|
||||
@@ -1839,7 +1843,7 @@ internal class DebugSettingView @JvmOverloads constructor(
|
||||
tbLogCatch.requestFocus()
|
||||
tbLogCatch.background = null
|
||||
}
|
||||
tbLogCatch.setPadding(left,top,right,bottom)
|
||||
tbLogCatch.setPadding(left, top, right, bottom)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1954,15 +1958,6 @@ internal class DebugSettingView @JvmOverloads constructor(
|
||||
}
|
||||
}
|
||||
|
||||
override fun onLocationChanged(location: MogoLocation?, from: Int, isGps: Boolean) {
|
||||
}
|
||||
|
||||
/**
|
||||
* 时延显示
|
||||
*/
|
||||
override fun onObuV2iDelayTime(delayTime: Long) {
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 车辆转向灯 数据
|
||||
|
||||
@@ -2,7 +2,6 @@ package com.mogo.eagle.core.function.hmi.ui.setting
|
||||
|
||||
import android.content.Context
|
||||
import android.util.AttributeSet
|
||||
import android.util.Log
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import androidx.constraintlayout.widget.ConstraintLayout
|
||||
@@ -14,7 +13,7 @@ import com.mogo.eagle.core.function.api.hmi.view.IViewControlListener
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotManager
|
||||
import com.mogo.eagle.core.function.call.devatools.CallerDevaToolsFuncConfigListenerManager
|
||||
import com.mogo.eagle.core.function.call.hmi.CallerHmiManager
|
||||
import com.mogo.eagle.core.function.call.obu.CallerOBUManager
|
||||
import com.mogo.eagle.core.function.call.obu.CallerObuApiManager
|
||||
import com.mogo.eagle.core.function.hmi.R
|
||||
import com.mogo.eagle.core.utilcode.kotlin.currentPadding
|
||||
import com.mogo.eagle.core.utilcode.mogo.AppIdentityModeUtils
|
||||
@@ -23,7 +22,6 @@ import com.mogo.eagle.core.function.business.routeoverlay.RouteStrategy
|
||||
import com.mogo.eagle.core.function.call.hmi.CallerHmiViewControlListenerManager
|
||||
import com.mogo.eagle.core.function.hmi.ui.widget.DemoModeView
|
||||
import com.mogo.eagle.core.utilcode.util.UiThreadHandler
|
||||
import kotlinx.android.synthetic.main.view_debug_setting.view.*
|
||||
import kotlinx.android.synthetic.main.view_sop_setting.view.*
|
||||
import kotlinx.android.synthetic.main.view_sop_setting.view.tbRouteDynamicEffect
|
||||
import java.util.*
|
||||
@@ -187,17 +185,17 @@ internal class SOPSettingView @JvmOverloads constructor(
|
||||
}
|
||||
|
||||
//OBU控制总开关
|
||||
tbObu.isChecked = CallerOBUManager.isConnected()
|
||||
tbObu.isChecked = CallerObuApiManager.isConnected()
|
||||
tbObu.setOnCheckedChangeListener { _, isChecked ->
|
||||
if (!isChecked) {
|
||||
if (AppIdentityModeUtils.isTaxi(FunctionBuildConfig.appIdentityMode)) {
|
||||
CallerOBUManager.resetObuIpAddress("192.168.1.199")
|
||||
CallerObuApiManager.resetObuIpAddress("192.168.1.199")
|
||||
} else if (AppIdentityModeUtils.isBus(FunctionBuildConfig.appIdentityMode)) {
|
||||
CallerOBUManager.resetObuIpAddress("192.168.8.199")
|
||||
CallerObuApiManager.resetObuIpAddress("192.168.8.199")
|
||||
}
|
||||
} else {
|
||||
//断开链接
|
||||
CallerOBUManager.disConnectObu()
|
||||
CallerObuApiManager.disConnectObu()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -9,12 +9,9 @@ import com.mogo.cloud.passport.MoGoAiCloudClientConfig
|
||||
import com.mogo.eagle.core.data.config.FunctionBuildConfig
|
||||
import com.mogo.eagle.core.data.constants.MogoServicePaths
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_MAP
|
||||
import com.mogo.eagle.core.data.map.MogoLocation
|
||||
import com.mogo.eagle.core.function.api.autopilot.*
|
||||
import com.mogo.eagle.core.function.api.map.collect.IMoGoMapDataCollectProvider
|
||||
import com.mogo.eagle.core.function.api.map.listener.IMoGoMapLocationListener
|
||||
import com.mogo.eagle.core.function.call.autopilot.*
|
||||
import com.mogo.eagle.core.function.call.map.CallerMapDataCollectorManager
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
|
||||
import com.mogo.eagle.core.function.call.map.CallerMapLocationListenerManager
|
||||
import com.zhidaoauto.map.operational.open.GatherApi
|
||||
|
||||
@@ -5,7 +5,7 @@ import android.os.Message
|
||||
import com.mogo.eagle.core.data.config.FunctionBuildConfig
|
||||
import com.mogo.eagle.core.data.traffic.TrafficData
|
||||
import com.mogo.eagle.core.function.api.obu.IMoGoObuStatusListener
|
||||
import com.mogo.eagle.core.function.call.obu.CallerObuListenerManager
|
||||
import com.mogo.eagle.core.function.call.obu.CallerObuWarningListenerManager
|
||||
import com.mogo.eagle.core.utilcode.mogo.thread.WorkThreadHandler
|
||||
import mogo.telematics.pad.MessagePad
|
||||
import mogo.telematics.pad.MessagePad.TrackedObject
|
||||
@@ -30,7 +30,7 @@ object IdentifyFactory : Identify, IMoGoObuStatusListener {
|
||||
} else {
|
||||
DriverIdentify.originDataDrawer
|
||||
}
|
||||
CallerObuListenerManager.addListener(TAG, this)
|
||||
CallerObuWarningListenerManager.addListener(TAG, this)
|
||||
}
|
||||
|
||||
private const val MSG_DATA_TRACK = 0
|
||||
|
||||
Reference in New Issue
Block a user