:wq
`erge branch 'dev_robotaxi-d-app-module_240_230131_2.14.0' into test_robotaxi-d-app-module_240_230131_2.14.0.1
This commit is contained in:
@@ -1185,25 +1185,27 @@ class MoGoHmiFragment : MvpFragment<MoGoHmiContract.View?, HmiPresenter?>(),
|
||||
* 控制展示限速标志及内容
|
||||
*/
|
||||
override fun showLimitingVelocity(limitingSpeed: Int, limitSpeedSource: Int) {
|
||||
// 控制 限速UI 展示
|
||||
if (HmiBuildConfig.isShowLimitingVelocityView) {
|
||||
if (limitingSpeed > 0) {
|
||||
mViewLimitingVelocity?.visibility = View.VISIBLE
|
||||
mViewLimitingVelocity?.updateLimitingSpeed(limitingSpeed, limitSpeedSource)
|
||||
tvLimitingSource?.visibility = View.VISIBLE
|
||||
if (limitSpeedSource == 1) {
|
||||
tvLimitingSource.text = "MAP"
|
||||
} else if (limitSpeedSource == 2) {
|
||||
tvLimitingSource.text = "RSU"
|
||||
ThreadUtils.runOnUiThread {
|
||||
// 控制 限速UI 展示
|
||||
if (HmiBuildConfig.isShowLimitingVelocityView) {
|
||||
if (limitingSpeed > 0) {
|
||||
mViewLimitingVelocity?.visibility = View.VISIBLE
|
||||
mViewLimitingVelocity?.updateLimitingSpeed(limitingSpeed, limitSpeedSource)
|
||||
tvLimitingSource?.visibility = View.VISIBLE
|
||||
if (limitSpeedSource == 1) {
|
||||
tvLimitingSource.text = "MAP"
|
||||
} else if (limitSpeedSource == 2) {
|
||||
tvLimitingSource.text = "RSU"
|
||||
}
|
||||
} else {
|
||||
mViewLimitingVelocity?.visibility = View.INVISIBLE
|
||||
mViewLimitingVelocity?.updateLimitingSpeed(0, limitSpeedSource)
|
||||
tvLimitingSource?.visibility = View.INVISIBLE
|
||||
}
|
||||
} else {
|
||||
mViewLimitingVelocity?.visibility = View.INVISIBLE
|
||||
mViewLimitingVelocity?.updateLimitingSpeed(0, limitSpeedSource)
|
||||
tvLimitingSource?.visibility = View.INVISIBLE
|
||||
disableLimitingVelocity()
|
||||
tvLimitingSource?.visibility = View.GONE
|
||||
}
|
||||
} else {
|
||||
disableLimitingVelocity()
|
||||
tvLimitingSource?.visibility = View.GONE
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -103,24 +103,28 @@ class SOPSettingView @JvmOverloads constructor(
|
||||
* 限速数据来源开关
|
||||
*/
|
||||
tbRoadLimitSpeedSop.setOnCheckedChangeListener { _, isChecked ->
|
||||
//默认关闭
|
||||
//默认开启
|
||||
HmiBuildConfig.isShowObuLimitSpeedView = isChecked
|
||||
}
|
||||
|
||||
/**
|
||||
* obu V2V开关
|
||||
*/
|
||||
tbObuV2vView.isChecked = HmiBuildConfig.isShowObuV2vView
|
||||
tbObuV2vView.setOnCheckedChangeListener { _, isChecked ->
|
||||
//默认关闭
|
||||
//默认开启
|
||||
HmiBuildConfig.isShowObuV2vView = isChecked
|
||||
// Log.e("liyz", "---2222-- v2v = ${HmiBuildConfig.isShowObuV2vView}")
|
||||
}
|
||||
|
||||
/**
|
||||
* obu V2i开关
|
||||
*/
|
||||
tbObuV2iView.isChecked = HmiBuildConfig.isShowObuV2iView
|
||||
tbObuV2iView.setOnCheckedChangeListener { _, isChecked ->
|
||||
//默认关闭
|
||||
HmiBuildConfig.isShowObuV2iView = isChecked
|
||||
// Log.d("liyz", "---2--- v2i = ${HmiBuildConfig.isShowObuV2iView}")
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -187,13 +191,8 @@ class SOPSettingView @JvmOverloads constructor(
|
||||
//OBU控制总开关
|
||||
tbObu.isChecked = CallerOBUManager.isConnected()
|
||||
tbObu.setOnCheckedChangeListener { _, isChecked ->
|
||||
if (!isChecked) {
|
||||
if (isChecked) {
|
||||
CallerOBUManager.resetObuIpAddress("192.168.1.199")
|
||||
// if (AppIdentityModeUtils.isTaxi(FunctionBuildConfig.appIdentityMode)) {
|
||||
// CallerOBUManager.resetObuIpAddress("192.168.1.199")
|
||||
// } else if (AppIdentityModeUtils.isBus(FunctionBuildConfig.appIdentityMode)) {
|
||||
// CallerOBUManager.resetObuIpAddress("192.168.8.199")
|
||||
// }
|
||||
} else {
|
||||
//断开链接
|
||||
CallerOBUManager.disConnectObu()
|
||||
|
||||
@@ -208,6 +208,7 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="@dimen/dp_20"
|
||||
android:visibility="gone"
|
||||
android:background="@drawable/radio_button_normal_background_right"
|
||||
android:textColor="#000"
|
||||
android:textOff="获取路侧限速提醒"
|
||||
|
||||
@@ -164,7 +164,7 @@ class MogoPrivateObuNewManager private constructor() {
|
||||
*/
|
||||
override fun onMogoObuRvWarning(data: MogoObuRvWarningData) {
|
||||
super.onMogoObuRvWarning(data)
|
||||
// if (HmiBuildConfig.isShowObuV2vView) { //TODO 临时需要关闭v2v开关
|
||||
if (HmiBuildConfig.isShowObuV2vView) {
|
||||
mObuStatusInfo.obuRvStatus = true
|
||||
CallerObuListenerManager.invokeListener(mObuStatusInfo)
|
||||
if (!data.warningMsg.warningData.isNullOrEmpty()) {
|
||||
@@ -218,7 +218,7 @@ class MogoPrivateObuNewManager private constructor() {
|
||||
}
|
||||
}
|
||||
}
|
||||
// }
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -227,13 +227,13 @@ class MogoPrivateObuNewManager private constructor() {
|
||||
override fun onMogoObuSpatWarning(data: MogoObuSpatWarningData) {
|
||||
super.onMogoObuSpatWarning(data)
|
||||
if (data != null) {
|
||||
// if (HmiBuildConfig.isShowObuV2iView) {
|
||||
if (HmiBuildConfig.isShowObuV2iView) {
|
||||
handlerTrafficLight(
|
||||
data.warningType,
|
||||
data.status,
|
||||
data.lights
|
||||
)
|
||||
// }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -247,7 +247,7 @@ class MogoPrivateObuNewManager private constructor() {
|
||||
*/
|
||||
override fun onMogoObuRsiWarning(data: MogoObuRsiWarningData) {
|
||||
super.onMogoObuRsiWarning(data)
|
||||
// if (HmiBuildConfig.isShowObuV2iView) {
|
||||
if (HmiBuildConfig.isShowObuV2iView) {
|
||||
if (data != null && data.warningMsg != null && data.warningMsg.size > 0) {
|
||||
var alertContent = ""
|
||||
var ttsContent = ""
|
||||
@@ -493,7 +493,7 @@ class MogoPrivateObuNewManager private constructor() {
|
||||
}
|
||||
}
|
||||
}
|
||||
// }
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -513,7 +513,7 @@ class MogoPrivateObuNewManager private constructor() {
|
||||
"$M_OBU${MogoObuConst.TAG_MOGO_NEW_OBU}",
|
||||
"onMogoObuRsmWarning ------> ${data.toString()}"
|
||||
)
|
||||
// if (HmiBuildConfig.isShowObuV2iView) {
|
||||
if (HmiBuildConfig.isShowObuV2iView) {
|
||||
if (HmiBuildConfig.isShowObuWeaknessTrafficView) {
|
||||
// 交通参与者类型 0x0:未知 UNKNOWN | 1机动车 2:非机动车 NON_MOTOR | 3:行人 PEDESTRIAN 4:obu
|
||||
if (data != null && data.participant != null) {
|
||||
@@ -666,7 +666,7 @@ class MogoPrivateObuNewManager private constructor() {
|
||||
}
|
||||
}
|
||||
}
|
||||
// }
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1049,6 +1049,10 @@ class MogoPrivateObuNewManager private constructor() {
|
||||
if (minSpeedTemp == maxSpeedTemp) {
|
||||
minSpeedTemp -= 5
|
||||
}
|
||||
if (minSpeedTemp < 0) {
|
||||
minSpeedTemp = 1
|
||||
}
|
||||
|
||||
val adviceSpeed = "$minSpeedTemp - $maxSpeedTemp"
|
||||
val adviceSpeedTts = "$minSpeedTemp 到 $maxSpeedTemp"
|
||||
|
||||
|
||||
@@ -152,7 +152,6 @@ class TrafficLightDispatcher : IMoGoAutopilotIdentifyListener, IMoGoTrafficLight
|
||||
* obu 红绿灯数据
|
||||
*/
|
||||
override fun onObuTrafficLight(light: Int) {
|
||||
super.onObuTrafficLight(light)
|
||||
hasObuLightStatus = true
|
||||
CallerHmiManager.showWarningTrafficLight(light, 3)
|
||||
}
|
||||
|
||||
@@ -105,14 +105,14 @@ object HmiBuildConfig {
|
||||
*/
|
||||
@JvmField
|
||||
@Volatile
|
||||
var isShowObuV2vView = false
|
||||
var isShowObuV2vView = true
|
||||
|
||||
/**
|
||||
* 是否展示obu的v2i
|
||||
*/
|
||||
@JvmField
|
||||
@Volatile
|
||||
var isShowObuV2iView = false
|
||||
var isShowObuV2iView = true
|
||||
|
||||
/**
|
||||
* 是否展示obu通过工控机展示的v2i
|
||||
|
||||
@@ -8,8 +8,6 @@ object CallerObuTrafficLightListenerManager {
|
||||
private val M_OBU_TRAFFIC_LIGHT_LISTENER: ConcurrentHashMap<String, IMoGoObuTrafficLightListener> =
|
||||
ConcurrentHashMap()
|
||||
|
||||
var mLight: Int = 0
|
||||
|
||||
/**
|
||||
* 添加监听
|
||||
* @param tag 标记,用来注销监听使用
|
||||
@@ -52,7 +50,6 @@ object CallerObuTrafficLightListenerManager {
|
||||
}
|
||||
|
||||
fun invokeObuTrafficLight(light: Int) {
|
||||
this.mLight = light
|
||||
M_OBU_TRAFFIC_LIGHT_LISTENER.forEach {
|
||||
val tag = it.key
|
||||
val listener = it.value
|
||||
|
||||
Reference in New Issue
Block a user