[6.0.0]运营面板增加融合模式
This commit is contained in:
@@ -11,12 +11,14 @@ import com.mogo.eagle.core.data.config.HmiBuildConfig
|
||||
import com.mogo.eagle.core.data.deva.bizconfig.FuncBizConfig
|
||||
import com.mogo.eagle.core.data.multidisplay.TelematicConstant
|
||||
import com.mogo.eagle.core.data.obu.MogoObuConst
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoGetParamResponseListener
|
||||
import com.mogo.eagle.core.function.api.devatools.IMoGoDevaToolsFuncConfigListener
|
||||
import com.mogo.eagle.core.function.api.devatools.mofang.*
|
||||
import com.mogo.eagle.core.function.api.hmi.view.IViewControlListener
|
||||
import com.mogo.eagle.core.function.api.hmi.view.IViewControlListener.Companion.FUNC_MODE_DEMO
|
||||
import com.mogo.eagle.core.function.api.hmi.view.IViewControlListener.Companion.FUNC_MODE_RAIN
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotControlManager
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotGetParamResponseDispatcher
|
||||
import com.mogo.eagle.core.function.call.devatools.*
|
||||
import com.mogo.eagle.core.function.call.hmi.CallerHmiManager
|
||||
import com.mogo.eagle.core.function.call.obu.CallerObuApiManager
|
||||
@@ -25,11 +27,13 @@ import com.mogo.eagle.core.utilcode.mogo.AppIdentityModeUtils
|
||||
import com.mogo.eagle.core.utilcode.util.ToastUtils
|
||||
import com.mogo.eagle.core.function.call.hmi.CallerHmiViewControlListenerManager
|
||||
import com.mogo.eagle.core.function.call.telematic.CallerTelematicManager
|
||||
import com.mogo.eagle.core.function.call.v2x.CallerTrafficLightListenerManager
|
||||
import com.mogo.eagle.core.function.hmi.ui.utils.HmiActionLog.Companion.hmiAction
|
||||
import com.mogo.eagle.core.function.hmi.ui.widget.DemoModeView
|
||||
import com.mogo.eagle.core.utilcode.util.ThreadUtils
|
||||
import com.zhjt.mogo.adas.data.AdasConstants
|
||||
import com.zhjt.mogo.adas.data.bean.AdasParam
|
||||
import kotlinx.android.synthetic.main.view_sop_setting.view.*
|
||||
import kotlinx.android.synthetic.main.view_sop_setting.view.tbRouteDynamicEffect
|
||||
import mogo.telematics.pad.MessagePad
|
||||
|
||||
/**
|
||||
* SOP设置窗口
|
||||
@@ -39,7 +43,8 @@ internal class SOPSettingView @JvmOverloads constructor(
|
||||
attrs: AttributeSet? = null,
|
||||
defStyleAttr: Int = 0
|
||||
) : ConstraintLayout(context, attrs, defStyleAttr), IMoGoDevaToolsFuncConfigListener,
|
||||
IViewControlListener, IMoGoMoFangProvider.OnMoFangStatusListener {
|
||||
IViewControlListener, IMoGoMoFangProvider.OnMoFangStatusListener,
|
||||
IMoGoGetParamResponseListener {
|
||||
|
||||
companion object {
|
||||
const val TAG = "SOPSettingView"
|
||||
@@ -277,6 +282,33 @@ internal class SOPSettingView @JvmOverloads constructor(
|
||||
FunctionBuildConfig.isShowBagRecordWindow = isChecked
|
||||
hmiAction("SOP 是否展示被动触发的录包弹窗, ",isChecked)
|
||||
}
|
||||
//融合模式
|
||||
rgFusionMode.setOnCheckedChangeListener { _, p1 ->
|
||||
when(p1){
|
||||
//全融合模式
|
||||
R.id.rbFullIntegration ->{
|
||||
FunctionBuildConfig.fusionMode = 1
|
||||
}
|
||||
//盲区模式
|
||||
R.id.rbBlind ->{
|
||||
FunctionBuildConfig.fusionMode = 2
|
||||
}
|
||||
//超视距模式
|
||||
R.id.rbBeyondSight ->{
|
||||
FunctionBuildConfig.fusionMode = 3
|
||||
}
|
||||
//透传模式
|
||||
R.id.rbTransparent ->{
|
||||
FunctionBuildConfig.fusionMode = 4
|
||||
}
|
||||
//纯路侧模式
|
||||
R.id.rbPureRoad ->{
|
||||
FunctionBuildConfig.fusionMode = 5
|
||||
}
|
||||
}
|
||||
CallerAutoPilotControlManager.sendFusionMode(FunctionBuildConfig.fusionMode)
|
||||
}
|
||||
|
||||
|
||||
//变道绕障的目标障碍物速度阈值
|
||||
tvSpeed.text = "${FunctionBuildConfig.detouringSpeed} m/s"
|
||||
@@ -370,8 +402,9 @@ internal class SOPSettingView @JvmOverloads constructor(
|
||||
FuncBizConfig.FOUNDATION, TAG, true, this
|
||||
)
|
||||
CallerHmiViewControlListenerManager.addListener(TAG,this)
|
||||
// 开启定时查询速度
|
||||
// Timer().schedule(timerTaskRefresh, Date(), 500)
|
||||
CallerAutopilotGetParamResponseDispatcher.addListener(TAG, this)
|
||||
//查询融合模式
|
||||
CallerAutoPilotControlManager.sendGetParamReq(AdasConstants.MapSystemParamType.FUSION_MODE)
|
||||
}
|
||||
|
||||
override fun updateFuncMode(tag: String, boolean: Boolean) {
|
||||
@@ -389,12 +422,7 @@ internal class SOPSettingView @JvmOverloads constructor(
|
||||
// 移除 业务配置监听
|
||||
CallerDevaToolsFuncConfigListenerManager.unRegisterDevaToolsFuncConfigListener(FuncBizConfig.FOUNDATION, TAG)
|
||||
CallerHmiViewControlListenerManager.removeListener(TAG)
|
||||
// try {
|
||||
// timerTaskRefresh.cancel()
|
||||
// } catch (e: Exception) {
|
||||
// e.printStackTrace()
|
||||
// }
|
||||
|
||||
CallerAutopilotGetParamResponseDispatcher.removeListener(TAG)
|
||||
CallerDevaToolsManager.mofang()?.unRegisterMoFangStatusListener(this)
|
||||
}
|
||||
|
||||
@@ -465,4 +493,40 @@ internal class SOPSettingView @JvmOverloads constructor(
|
||||
override fun onMoFangCombineClicked(vararg keyCodes: Int) {}
|
||||
|
||||
override fun onMoFangStatusError(msg: String) {}
|
||||
|
||||
/**
|
||||
* 工控机配置参数获取
|
||||
*/
|
||||
override fun onGetParamResp(
|
||||
header: MessagePad.Header,
|
||||
getParamResp: MessagePad.SetParamReq,
|
||||
adasParam: AdasParam
|
||||
) {
|
||||
//融合模式
|
||||
ThreadUtils.runOnUiThread {
|
||||
FunctionBuildConfig.fusionMode = adasParam.fusionMode
|
||||
when(FunctionBuildConfig.fusionMode){
|
||||
1->{
|
||||
//全融合模式
|
||||
rgFusionMode.check(R.id.rbFullIntegration)
|
||||
}
|
||||
2->{
|
||||
//盲区模式
|
||||
rgFusionMode.check(R.id.rbBlind)
|
||||
}
|
||||
3->{
|
||||
//超视距模式
|
||||
rgFusionMode.check(R.id.rbBeyondSight)
|
||||
}
|
||||
4->{
|
||||
//透传模式
|
||||
rgFusionMode.check(R.id.rbTransparent)
|
||||
}
|
||||
5->{
|
||||
//纯路侧模式
|
||||
rgFusionMode.check(R.id.rbPureRoad)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -399,6 +399,7 @@
|
||||
/>
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:id="@+id/llMFLayout"
|
||||
android:layout_width="0dip"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintTop_toBottomOf="@+id/tvSpeedThresholdTitle"
|
||||
@@ -426,6 +427,65 @@
|
||||
android:paddingBottom="25dp" />
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
<!--融合模式-->
|
||||
<RadioGroup
|
||||
android:id="@+id/rgFusionMode"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/llMFLayout"
|
||||
android:layout_marginStart="20dp"
|
||||
>
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/rbFullIntegration"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="全融合模式"
|
||||
android:textSize="32dp"
|
||||
android:layout_margin="10dp"
|
||||
/>
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/rbBlind"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="盲区模式"
|
||||
android:textSize="32dp"
|
||||
android:layout_margin="10dp"
|
||||
/>
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/rbBeyondSight"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="超视距模式"
|
||||
android:textSize="32dp"
|
||||
android:layout_margin="10dp"
|
||||
/>
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/rbTransparent"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="透传模式"
|
||||
android:textSize="32dp"
|
||||
android:layout_margin="10dp"
|
||||
/>
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/rbPureRoad"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="纯路侧模式"
|
||||
android:textSize="32dp"
|
||||
android:layout_margin="10dp"
|
||||
/>
|
||||
|
||||
</RadioGroup>
|
||||
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
|
||||
@@ -204,6 +204,14 @@ object FunctionBuildConfig {
|
||||
@JvmField
|
||||
var isShowBagRecordWindow = true
|
||||
|
||||
/**
|
||||
* 融合模式(int) 1:全融合模式 2:盲区模式 3:超视距模式 4:透传模式 5:纯路侧模式,默认1
|
||||
* /telematics/fusion/fusion_mode
|
||||
*/
|
||||
@Volatile
|
||||
@JvmField
|
||||
var fusionMode = 1
|
||||
|
||||
/**
|
||||
* 是否是V2N新链路(云->工控机->App)
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user