[8.2.6][] 平行驾驶介入及退出提醒以及提醒控制开关
This commit is contained in:
@@ -115,6 +115,12 @@ class BridgeProvider : BridgeService, CallerBase<BridgeListener>() {
|
||||
}
|
||||
}
|
||||
|
||||
fun inVokeAutopilotData(oldStatus:Int,newStatus:Int) {
|
||||
M_LISTENERS.forEach {
|
||||
it.value.onAutopilotChangeListener(oldStatus,newStatus)
|
||||
}
|
||||
}
|
||||
|
||||
fun invokePncData(pncAction:String){
|
||||
M_LISTENERS.forEach {
|
||||
it.value.onPncInfoListener(pncAction)
|
||||
|
||||
@@ -46,6 +46,10 @@ object BridgeServiceManager {
|
||||
this.bridgeService?.inVokeNdeData(title,desc,sortedList)
|
||||
}
|
||||
|
||||
fun invokeAutopilotData(oldStatus:Int,newStatus:Int) {
|
||||
this.bridgeService?.inVokeAutopilotData(oldStatus,newStatus)
|
||||
}
|
||||
|
||||
fun invokePncData(pncAction:String){
|
||||
this.bridgeService?.invokePncData(pncAction)
|
||||
}
|
||||
|
||||
@@ -12,6 +12,7 @@ import com.mogo.eagle.core.function.call.autopilot.CallerReceiveReceivedAckListe
|
||||
import com.mogo.eagle.core.utilcode.mogo.AppIdentityModeUtils
|
||||
import com.mogo.eagle.core.utilcode.util.StringUtils
|
||||
import com.mogo.eagle.core.utilcode.util.ToastUtils
|
||||
import com.mogo.och.bridge.BridgeServiceManager
|
||||
import com.mogo.och.common.module.R
|
||||
import com.mogo.och.bridge.autopilot.autopilot.bean.ArrivedStation
|
||||
import com.mogo.och.bridge.autopilot.line.LineManager
|
||||
@@ -82,6 +83,7 @@ object OchAutoPilotStatusListenerManager : CallerBase<IOchAutopilotStatusListene
|
||||
LineManager.triggerStartServiceEvent(true, 0,"")
|
||||
}
|
||||
|
||||
BridgeServiceManager.invokeAutopilotData(oldValue,newValue)
|
||||
|
||||
M_LISTENERS.forEach {
|
||||
val listener = it.value
|
||||
|
||||
@@ -23,6 +23,8 @@ interface BridgeListener {
|
||||
|
||||
fun onNdeDataListener(title: String, desc: String, sortedList: List<RoadMsg>) {}
|
||||
|
||||
fun onAutopilotChangeListener(oldStatus:Int,newStatus:Int) {}
|
||||
|
||||
fun onPncInfoListener(pncAction: String) {}
|
||||
|
||||
fun onCollisionRisk() {}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package com.mogo.och.common.module.biz.lansocket
|
||||
|
||||
import android.util.Log
|
||||
import com.mogo.eagle.core.function.call.hmi.CallerHmiManager
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_OCHCOMMON
|
||||
import com.mogo.och.common.module.BuildConfig
|
||||
@@ -18,6 +19,7 @@ import com.mogo.och.common.module.manager.socket.lan.bean.BusinessType
|
||||
import com.mogo.och.common.module.manager.socket.lan.bean.ChangeBusinessType
|
||||
import com.mogo.och.common.module.manager.socket.lan.bean.DPMsgType
|
||||
import com.mogo.och.common.module.manager.socket.lan.bean.EnvCheck
|
||||
import com.mogo.och.common.module.manager.socket.lan.bean.RemoteNoticeModel2Client
|
||||
import com.mogo.och.common.module.manager.socket.lan.bean.ScreenType
|
||||
import com.mogo.och.common.module.utils.DateTimeUtil
|
||||
import com.mogo.och.common.module.utils.FlavorUtils
|
||||
@@ -54,6 +56,7 @@ object LoginLanDriverSocket : ILoginCallback {
|
||||
LanSocketManager.sendMsgToClient(msg)
|
||||
}
|
||||
LoginStatusManager.sendLogin2Client()
|
||||
LanSocketManager.sendMsgToClient(RemoteNoticeModel2Client(CallerHmiManager.isRemoteNoticeMode()))
|
||||
}
|
||||
|
||||
}
|
||||
@@ -92,6 +95,7 @@ object LoginLanDriverSocket : ILoginCallback {
|
||||
}else{
|
||||
BizLoopManager.setLoopFunction(TAG, LoopInfo(60*10, ::loopCheck))
|
||||
}
|
||||
LanSocketManager.sendMsgToClient(RemoteNoticeModel2Client(CallerHmiManager.isRemoteNoticeMode()))
|
||||
}
|
||||
else -> {
|
||||
BizLoopManager.removeLoopFunction(TAG)
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package com.mogo.och.common.module.biz.lansocket
|
||||
|
||||
import com.mogo.eagle.core.function.api.telematic.IReceivedMsgListener
|
||||
import com.mogo.eagle.core.function.call.hmi.CallerHmiManager
|
||||
import com.mogo.eagle.core.function.call.telematic.CallerTelematicListenerManager
|
||||
import com.mogo.eagle.core.function.call.telematic.CallerTelematicManager
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
|
||||
@@ -14,6 +15,7 @@ import com.mogo.och.common.module.manager.socket.lan.LanSocketManager
|
||||
import com.mogo.och.common.module.manager.socket.lan.bean.BaseDPMsg
|
||||
import com.mogo.och.common.module.manager.socket.lan.bean.DPMsgType
|
||||
import com.mogo.och.common.module.manager.socket.lan.bean.EnvCheck
|
||||
import com.mogo.och.common.module.manager.socket.lan.bean.RemoteNoticeModel2Client
|
||||
import com.mogo.och.common.module.utils.CallerBase
|
||||
import kotlin.properties.Delegates
|
||||
|
||||
@@ -79,6 +81,20 @@ object LoginLanPassengerSocket : IReceivedMsgListener, CallerBase<IOchLanPasseng
|
||||
|
||||
}
|
||||
|
||||
// 环境监测
|
||||
private val remoteNoticeModel2Client = object : ILanMessageListener<RemoteNoticeModel2Client> {
|
||||
override fun targetLan(): Class<RemoteNoticeModel2Client> {
|
||||
return RemoteNoticeModel2Client::class.java
|
||||
}
|
||||
|
||||
override fun onLanMsgReceived(first: RemoteNoticeModel2Client?) {
|
||||
first?.let {
|
||||
CallerHmiManager.setRemoteNoticeMode(first.showNotice)
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
fun load() {
|
||||
OchChainLogManager.writeChainLogInit("初始化信息","初始局乘客屏局域网内部分信息")
|
||||
}
|
||||
@@ -93,7 +109,9 @@ object LoginLanPassengerSocket : IReceivedMsgListener, CallerBase<IOchLanPasseng
|
||||
DPMsgType.TYPE_ENV_CHECK.type,
|
||||
checkListener
|
||||
)
|
||||
|
||||
LanSocketManager.registerSocketMessageListener(DPMsgType.TYPE_REMOTENOTICE.type,
|
||||
remoteNoticeModel2Client
|
||||
)
|
||||
}
|
||||
|
||||
override fun onReceivedMsg(type: Int, byteArray: ByteArray) {}
|
||||
|
||||
@@ -4,6 +4,11 @@ import com.mogo.eagle.core.data.config.FunctionBuildConfig
|
||||
import com.mogo.eagle.core.utilcode.mogo.AppIdentityModeUtils
|
||||
|
||||
object EnvManager {
|
||||
|
||||
fun isDriver():Boolean{
|
||||
return AppIdentityModeUtils.isDriver(FunctionBuildConfig.appIdentityMode)
|
||||
}
|
||||
|
||||
fun isB1(): Boolean {
|
||||
return AppIdentityModeUtils.isB1(FunctionBuildConfig.appIdentityMode)
|
||||
}
|
||||
|
||||
@@ -19,9 +19,10 @@ enum class DPMsgType(val type: Int) {
|
||||
TYPE_WRITEOFF_DEVICES_INFO(9), //核销设备信息
|
||||
TYPE_CHANGE_BUSINESS_TYPE(10), //业务模式切换
|
||||
TYPE_ENV_CHECK(11), //环境核验
|
||||
TYPE_CLIENT_REGISTER(12), //客户端注册 服务端需要
|
||||
TYPE_WRITEOFF_INFO_DETAIL(13), //核销信息
|
||||
TYPE_WRITEOFF_INFO_RESULT(14), //核销结果
|
||||
TYPE_OUTOF_VOICE(15), //转发给乘客屏播放
|
||||
TYPE_LOGIN_INFO(16), //转发给乘客屏播放
|
||||
TYPE_CLIENT_REGISTER(12); //客户端注册 服务端需要
|
||||
TYPE_REMOTENOTICE(17), //转发给乘客屏播放
|
||||
}
|
||||
@@ -141,6 +141,10 @@ data class LoginInfo2Client(
|
||||
val isOffline:Boolean
|
||||
) : BaseDPMsg(DPMsgType.TYPE_LOGIN_INFO.type,targetScreenTypes = mutableListOf(ScreenType.Passenger))
|
||||
|
||||
data class RemoteNoticeModel2Client(
|
||||
val showNotice:Boolean
|
||||
) : BaseDPMsg(DPMsgType.TYPE_REMOTENOTICE.type,targetScreenTypes = mutableListOf(ScreenType.Passenger))
|
||||
|
||||
// 车辆类型
|
||||
enum class VehicleType {
|
||||
T1T2,
|
||||
|
||||
@@ -0,0 +1,105 @@
|
||||
package com.mogo.och.common.module.wigets.remote
|
||||
|
||||
import android.animation.ObjectAnimator
|
||||
import android.content.Context
|
||||
import android.util.AttributeSet
|
||||
import android.util.Log
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.widget.RelativeLayout
|
||||
import android.widget.TextView
|
||||
import androidx.core.animation.addListener
|
||||
import androidx.lifecycle.ViewModelProvider
|
||||
import androidx.lifecycle.findViewTreeLifecycleOwner
|
||||
import androidx.lifecycle.findViewTreeViewModelStoreOwner
|
||||
import androidx.lifecycle.lifecycleScope
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
|
||||
import com.mogo.och.common.module.R
|
||||
import com.mogo.och.common.module.manager.loop.BizLoopManager
|
||||
import com.mogo.och.common.module.utils.RxUtils
|
||||
import com.mogo.och.common.module.utils.SoundPoolHelper
|
||||
import kotlinx.android.synthetic.main.common_enter_remote_driver_view.view.startAutopilotTip
|
||||
import java.lang.Exception
|
||||
|
||||
|
||||
class EnterExitRemoteDriverView @JvmOverloads constructor(
|
||||
context: Context,
|
||||
attrs: AttributeSet? = null,
|
||||
defStyleAttr: Int = 0
|
||||
) : RelativeLayout(context, attrs, defStyleAttr),
|
||||
EnterExitRemoteViewModel.RemoteStatusViewCallback {
|
||||
|
||||
companion object {
|
||||
private const val TAG = "EnterExitRemoteView"
|
||||
}
|
||||
|
||||
private val mContext: Context = context
|
||||
|
||||
private var viewModel: EnterExitRemoteViewModel? = null
|
||||
|
||||
private var animator: ObjectAnimator? = null
|
||||
|
||||
init {
|
||||
LayoutInflater.from(context).inflate(R.layout.common_enter_remote_driver_view, this, true)
|
||||
}
|
||||
|
||||
fun playDI() {
|
||||
try {
|
||||
SoundPoolHelper.getSoundPoolHelper().playSoundWithRedId(mContext, R.raw.startautopilot)
|
||||
} catch (e: Exception) {
|
||||
e.printStackTrace()
|
||||
}
|
||||
}
|
||||
|
||||
override fun onAttachedToWindow() {
|
||||
super.onAttachedToWindow()
|
||||
viewModel = findViewTreeViewModelStoreOwner()?.let {
|
||||
ViewModelProvider(it)[EnterExitRemoteViewModel::class.java]
|
||||
}
|
||||
viewModel?.setSwitchBizCallback(this)
|
||||
}
|
||||
|
||||
override fun onDetachedFromWindow() {
|
||||
super.onDetachedFromWindow()
|
||||
}
|
||||
|
||||
override fun setViewGone() {
|
||||
RxUtils.createSubscribe(1_000) {
|
||||
visibility = View.GONE
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
override fun setCountDownText(isRemote: Boolean) {
|
||||
val title = if (isRemote) {
|
||||
"平行驾驶已介入,请持续关注自车及周边交通状况,如有异常可随时接管"
|
||||
} else {
|
||||
"平行驾驶已退出"
|
||||
}
|
||||
|
||||
startAutopilotTip.text = title
|
||||
animator?.cancel()
|
||||
animator = ObjectAnimator.ofFloat(startAutopilotTip, "alpha", 0f, 1f).apply {
|
||||
this.duration = 1000
|
||||
this.repeatCount = 2
|
||||
this.addListener(
|
||||
onStart = {
|
||||
visibility = View.VISIBLE
|
||||
},
|
||||
onEnd = {
|
||||
CallerLogger.d(TAG, "动画结束 标识")
|
||||
this@EnterExitRemoteDriverView.visibility = View.GONE
|
||||
BizLoopManager.runInIoThread {
|
||||
playDI()
|
||||
}
|
||||
}, onRepeat = {
|
||||
BizLoopManager.runInIoThread {
|
||||
playDI()
|
||||
}
|
||||
}
|
||||
)
|
||||
}
|
||||
animator?.start()
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,83 @@
|
||||
package com.mogo.och.common.module.wigets.remote
|
||||
|
||||
import android.animation.ObjectAnimator
|
||||
import android.content.Context
|
||||
import android.util.AttributeSet
|
||||
import android.util.Log
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.widget.RelativeLayout
|
||||
import android.widget.TextView
|
||||
import androidx.core.animation.addListener
|
||||
import androidx.lifecycle.ViewModelProvider
|
||||
import androidx.lifecycle.findViewTreeLifecycleOwner
|
||||
import androidx.lifecycle.findViewTreeViewModelStoreOwner
|
||||
import androidx.lifecycle.lifecycleScope
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
|
||||
import com.mogo.och.common.module.R
|
||||
import kotlinx.android.synthetic.main.common_enter_remote_passenger_view.view.actv_remote_mode_title
|
||||
import kotlinx.coroutines.launch
|
||||
import kotlinx.coroutines.suspendCancellableCoroutine
|
||||
|
||||
|
||||
class EnterExitRemotePassengerView @JvmOverloads constructor(
|
||||
context: Context,
|
||||
attrs: AttributeSet? = null,
|
||||
defStyleAttr: Int = 0
|
||||
) : RelativeLayout(context, attrs, defStyleAttr),
|
||||
EnterExitRemoteViewModel.RemoteStatusViewCallback {
|
||||
|
||||
companion object {
|
||||
private const val TAG = "EnterExitRemoteView"
|
||||
}
|
||||
|
||||
private var viewModel: EnterExitRemoteViewModel?=null
|
||||
|
||||
private var animator:ObjectAnimator? = null
|
||||
|
||||
init {
|
||||
LayoutInflater.from(context).inflate(R.layout.common_enter_remote_passenger_view, this, true)
|
||||
}
|
||||
|
||||
override fun onAttachedToWindow() {
|
||||
super.onAttachedToWindow()
|
||||
viewModel = findViewTreeViewModelStoreOwner()?.let {
|
||||
ViewModelProvider(it)[EnterExitRemoteViewModel::class.java]
|
||||
}
|
||||
viewModel?.setSwitchBizCallback(this)
|
||||
}
|
||||
|
||||
override fun onDetachedFromWindow() {
|
||||
super.onDetachedFromWindow()
|
||||
}
|
||||
|
||||
override fun setViewGone() {
|
||||
visibility = View.GONE
|
||||
}
|
||||
|
||||
override fun setCountDownText(isRemote: Boolean) {
|
||||
val title = if(isRemote){
|
||||
"平行驾驶已介入"
|
||||
}else{
|
||||
"平行驾驶已退出"
|
||||
}
|
||||
// 倒计时
|
||||
|
||||
actv_remote_mode_title.text = title
|
||||
animator?.cancel()
|
||||
animator = ObjectAnimator.ofFloat(this, "alpha", 0f, 1f).apply {
|
||||
this.duration = 1000
|
||||
this.repeatCount = 2
|
||||
this.addListener(
|
||||
onStart = {
|
||||
visibility = View.VISIBLE
|
||||
},
|
||||
onEnd = {
|
||||
CallerLogger.d(TAG,"动画结束 标识")
|
||||
visibility = View.GONE
|
||||
alpha = 0f
|
||||
})
|
||||
}
|
||||
animator?.start()
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,90 @@
|
||||
package com.mogo.och.common.module.wigets.remote
|
||||
|
||||
import androidx.lifecycle.ViewModel
|
||||
import com.mogo.commons.module.status.IMogoStatusChangedListener
|
||||
import com.mogo.commons.module.status.MogoStatusManager
|
||||
import com.mogo.commons.module.status.StatusDescriptor
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotStatusListener
|
||||
import com.mogo.eagle.core.function.call.hmi.CallerHmiManager
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger.d
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_OCHCOMMON
|
||||
import com.mogo.och.common.module.biz.birdge.BridgeListener
|
||||
import com.mogo.och.common.module.biz.birdge.BridgeManager
|
||||
import com.mogo.och.common.module.biz.media.VoiceNotice
|
||||
import com.mogo.och.common.module.manager.EnvManager
|
||||
import com.mogo.och.common.module.manager.loop.BizLoopManager
|
||||
import com.mogo.och.common.module.manager.socket.lan.LanSocketManager
|
||||
import com.mogo.och.common.module.manager.socket.lan.bean.RemoteNoticeModel2Client
|
||||
import com.mogo.och.common.module.utils.RxUtils
|
||||
import io.reactivex.Observable
|
||||
import io.reactivex.android.schedulers.AndroidSchedulers
|
||||
import io.reactivex.disposables.Disposable
|
||||
import io.reactivex.schedulers.Schedulers
|
||||
import java.util.concurrent.TimeUnit
|
||||
|
||||
/**
|
||||
* @author XuXinChao
|
||||
* @description BadCase录包管理页面
|
||||
* @since: 2022/12/15
|
||||
*/
|
||||
class EnterExitRemoteViewModel : ViewModel(), BridgeListener, IMogoStatusChangedListener {
|
||||
|
||||
private val TAG = M_OCHCOMMON + EnterExitRemoteViewModel::class.java.simpleName
|
||||
|
||||
private var viewCallback: RemoteStatusViewCallback? = null
|
||||
|
||||
|
||||
override fun onCleared() {
|
||||
d(TAG, "onCleared")
|
||||
BridgeManager.removeBridgeListener(TAG)
|
||||
if (EnvManager.isDriver()) {
|
||||
MogoStatusManager.getInstance().unregisterStatusChangedListener(TAG, StatusDescriptor.REMOTE_NOTICE_MODE, this)
|
||||
}
|
||||
}
|
||||
|
||||
fun setSwitchBizCallback(viewCallback: RemoteStatusViewCallback) {
|
||||
d(TAG, "setSwitchBizCallback")
|
||||
this.viewCallback = viewCallback
|
||||
BridgeManager.addBridgeListener(TAG,this)
|
||||
if (EnvManager.isDriver()) {
|
||||
MogoStatusManager.getInstance().registerStatusChangedListener(TAG, StatusDescriptor.REMOTE_NOTICE_MODE, this)
|
||||
}
|
||||
}
|
||||
|
||||
override fun onAutopilotChangeListener(oldStatus: Int, newStatus: Int) {
|
||||
if (CallerHmiManager.isRemoteNoticeMode()) {
|
||||
// 离开平行驾驶
|
||||
if(oldStatus == IMoGoAutopilotStatusListener.STATUS_PARALLEL_DRIVING
|
||||
&&newStatus != IMoGoAutopilotStatusListener.STATUS_PARALLEL_DRIVING){
|
||||
VoiceNotice.showNotice("平行驾驶已退出")
|
||||
enterOrExitRemoteMode(false)
|
||||
}
|
||||
// 进入平行驾驶
|
||||
if(oldStatus != IMoGoAutopilotStatusListener.STATUS_PARALLEL_DRIVING
|
||||
&&newStatus == IMoGoAutopilotStatusListener.STATUS_PARALLEL_DRIVING){
|
||||
VoiceNotice.showNotice("平行驾驶已介入,请持续关注自车及周边交通状况,如有异常可随时接管")
|
||||
enterOrExitRemoteMode(true)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private fun enterOrExitRemoteMode(isRemote:Boolean){
|
||||
BizLoopManager.runInMainThread{
|
||||
viewCallback?.setCountDownText(isRemote)
|
||||
}
|
||||
}
|
||||
|
||||
interface RemoteStatusViewCallback {
|
||||
fun setCountDownText(title: Boolean){}
|
||||
fun setViewGone(){}
|
||||
}
|
||||
|
||||
override fun onStatusChanged(descriptor: StatusDescriptor?, isTrue: Boolean) {
|
||||
if (StatusDescriptor.REMOTE_NOTICE_MODE == descriptor) {
|
||||
LanSocketManager.sendMsgToClient(RemoteNoticeModel2Client(CallerHmiManager.isRemoteNoticeMode()))
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 1.1 KiB |
@@ -0,0 +1,29 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/startAutopilotTipImg"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_328"
|
||||
android:background="@drawable/start_autopilot_animation_bkg_top"
|
||||
tools:visibility="invisible" />
|
||||
|
||||
<!--上方闪烁且有文字-->
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/startAutopilotTip"
|
||||
android:layout_width="wrap_content"
|
||||
android:minWidth="@dimen/dp_756"
|
||||
android:paddingLeft="@dimen/dp_150"
|
||||
android:paddingRight="@dimen/dp_150"
|
||||
android:gravity="center"
|
||||
android:layout_height="@dimen/dp_186"
|
||||
android:layout_marginTop="@dimen/dp_40"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:textStyle="bold"
|
||||
android:textSize="@dimen/dp_42"
|
||||
android:textColor="@android:color/white"
|
||||
android:background="@drawable/start_autopilot_tip_bkg_top"/>
|
||||
</FrameLayout>
|
||||
@@ -0,0 +1,35 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:background="@drawable/start_autopilot_tip_bkg_top"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/aciv_remote_status"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
android:src="@drawable/common_remote_status"
|
||||
android:layout_marginStart="@dimen/dp_73"
|
||||
android:layout_marginBottom="@dimen/dp_12"
|
||||
android:layout_marginTop="@dimen/dp_12"
|
||||
android:layout_width="@dimen/dp_36"
|
||||
android:layout_height="@dimen/dp_36"/>
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/actv_remote_mode_title"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@+id/aciv_remote_status"
|
||||
android:layout_marginStart="@dimen/dp_10"
|
||||
android:layout_marginEnd="@dimen/dp_74"
|
||||
android:textSize="@dimen/dp_30"
|
||||
android:textColor="@color/common_ffffffff"
|
||||
android:text="平行驾驶已介入"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"/>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
@@ -30,6 +30,16 @@
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<com.mogo.och.common.module.wigets.remote.EnterExitRemoteDriverView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginTop="@dimen/dp_72"
|
||||
android:elevation="100dp"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<com.mogo.och.common.module.wigets.LoadingMapStatusView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" />
|
||||
|
||||
@@ -86,7 +86,14 @@
|
||||
android:layout_width="@dimen/dp_411"
|
||||
android:layout_height="@dimen/dp_650"/>
|
||||
|
||||
|
||||
<com.mogo.och.common.module.wigets.remote.EnterExitRemotePassengerView
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
android:visibility="gone"
|
||||
android:layout_marginBottom="@dimen/dp_30"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"/>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
|
||||
@@ -453,6 +453,14 @@ class MoGoHmiProvider : IMoGoHmiProvider {
|
||||
MogoStatusManager.getInstance().setTaxiUnmanedDriverLineRoutingVerifyMode(TAG, isMode)
|
||||
}
|
||||
|
||||
override fun setRemoteNoticeMode(isMode: Boolean) {
|
||||
MogoStatusManager.getInstance().setRemoteNoticeMode(TAG, isMode)
|
||||
}
|
||||
|
||||
override fun isRemoteNoticeMode(): Boolean {
|
||||
return MogoStatusManager.getInstance().isRemoteNoticeMode
|
||||
}
|
||||
|
||||
override fun registerXiaoZhiStatusChangeListener(listener: OnXiaoZhiStateChangeListener) {
|
||||
xiaozhi.addListener(listener)
|
||||
}
|
||||
|
||||
@@ -1088,6 +1088,7 @@ class OperatePanelLayout : LinearLayout {
|
||||
private const val KEY_WEATHER_EFFECT_SWITCH = "weather_effect_switch"
|
||||
private const val KEY_SYSTEM_BOOT_STATUS_SHOW = "system_boot_status_show"
|
||||
private const val KEY_SELF_ROUTING_VERIFY_MODE = "self_routing_verify_mode"
|
||||
private const val KEY_REMOTE_MODE_SHOW_NOTICE = "remote_mode_show_notice"
|
||||
private const val KEY_UNMANNED_DEMO_PULL_INTERVAL = "unmanned_demo_pull_interval"
|
||||
private const val KEY_SWEEPER_CLOUD_CONTROL = "sweeper_cloud_control"
|
||||
private const val KEY_LOOK_AROUND_360 = "look_around_360"
|
||||
@@ -1140,6 +1141,9 @@ class OperatePanelLayout : LinearLayout {
|
||||
KEY_SELF_ROUTING_VERIFY_MODE -> {
|
||||
return CallerHmiManager.isTaxiUnmanedDriverLineRoutingVerifyMode()
|
||||
}
|
||||
KEY_REMOTE_MODE_SHOW_NOTICE -> {
|
||||
return CallerHmiManager.isRemoteNoticeMode()
|
||||
}
|
||||
KEY_LOOK_AROUND_360 -> {
|
||||
return CallerHmiManager.isM1360LookAroundShowing()
|
||||
}
|
||||
@@ -1177,6 +1181,9 @@ class OperatePanelLayout : LinearLayout {
|
||||
||AppIdentityModeUtils.isShuttleDriver(FunctionBuildConfig.appIdentityMode)
|
||||
||AppIdentityModeUtils.isScheduled(FunctionBuildConfig.appIdentityMode)
|
||||
}
|
||||
KEY_REMOTE_MODE_SHOW_NOTICE -> {
|
||||
AppIdentityModeUtils.isDriver(FunctionBuildConfig.appIdentityMode)
|
||||
}
|
||||
KEY_LOOK_AROUND_360 -> {
|
||||
AppIdentityModeUtils.isM1(FunctionBuildConfig.appIdentityMode)
|
||||
}
|
||||
@@ -1285,6 +1292,12 @@ class OperatePanelLayout : LinearLayout {
|
||||
}
|
||||
return true
|
||||
}
|
||||
KEY_REMOTE_MODE_SHOW_NOTICE -> {
|
||||
val isChecked = newValue as? Boolean ?: true
|
||||
CallerHmiManager.setRemoteNoticeMode(isChecked)
|
||||
clickEventAnalytics("平行驾驶介入及退出提醒", isChecked)
|
||||
return true
|
||||
}
|
||||
KEY_SELF_ROUTING_VERIFY_MODE -> {
|
||||
val isChecked = newValue as? Boolean ?: false
|
||||
if (isChecked) {
|
||||
|
||||
@@ -792,6 +792,19 @@
|
||||
app:layout_constraintRight_toRightOf="@id/otherGuideLine"
|
||||
app:layout_constraintTop_toBottomOf="@id/scSweeperModeSwitch" />
|
||||
|
||||
<!--平行驾驶是否提醒开关 -->
|
||||
<androidx.appcompat.widget.SwitchCompat
|
||||
android:id="@+id/scRemoteModelNotice"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_25"
|
||||
android:scaleX="1.2"
|
||||
android:scaleY="1.2"
|
||||
android:text="平行驾驶介入及退出提醒"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="@id/otherGuideLine"
|
||||
app:layout_constraintTop_toBottomOf="@id/scSweeperModeSwitch" />
|
||||
|
||||
<!--天气效果开关-->
|
||||
<androidx.appcompat.widget.SwitchCompat
|
||||
android:id="@+id/scWeatherSwitch"
|
||||
|
||||
@@ -39,6 +39,13 @@
|
||||
android:title="自主算路验证模式"
|
||||
android:persistent="false"
|
||||
android:widgetLayout="@layout/layout_operate_panel_preference_widget_switch_compat" />
|
||||
<SwitchPreferenceCompat
|
||||
android:key="remote_mode_show_notice"
|
||||
android:layout="@layout/layout_operate_panel_preference_switch_compat"
|
||||
android:title="平行驾驶介入及退出提醒"
|
||||
android:persistent="false"
|
||||
android:defaultValue="true"
|
||||
android:widgetLayout="@layout/layout_operate_panel_preference_widget_switch_compat" />
|
||||
<SwitchPreferenceCompat
|
||||
android:key="sweeper_cloud_control"
|
||||
android:layout="@layout/layout_operate_panel_preference_switch_compat"
|
||||
|
||||
@@ -227,6 +227,13 @@ interface IMoGoHmiProvider :IProvider{
|
||||
*/
|
||||
fun setTaxiUnmanedDriverLineRoutingVerifyMode(isMode: Boolean)
|
||||
|
||||
/**
|
||||
* taxi无人化司机端 设置是否自主算路验证模式
|
||||
*/
|
||||
fun setRemoteNoticeMode(isMode: Boolean)
|
||||
|
||||
fun isRemoteNoticeMode():Boolean
|
||||
|
||||
/**
|
||||
* 添加小智形象展示的状态监听
|
||||
*/
|
||||
|
||||
@@ -341,6 +341,17 @@ object CallerHmiManager {
|
||||
hmiProviderApi?.setTaxiUnmanedDriverLineRoutingVerifyMode(isMode)
|
||||
}
|
||||
|
||||
/**
|
||||
* taxi无人化司机端 设置是否自主算路验证模式
|
||||
*/
|
||||
fun setRemoteNoticeMode(isMode: Boolean) {
|
||||
hmiProviderApi?.setRemoteNoticeMode(isMode)
|
||||
}
|
||||
|
||||
fun isRemoteNoticeMode(): Boolean{
|
||||
return hmiProviderApi?.isRemoteNoticeMode() ?: true
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加小智形象展示的状态监听
|
||||
*/
|
||||
|
||||
@@ -158,6 +158,10 @@ public interface IMogoStatusManager extends IProvider {
|
||||
*/
|
||||
void setTaxiUnmanedDriverLineRoutingVerifyMode( String tag, boolean isLineRoutingVerifyMode );
|
||||
|
||||
void setRemoteNoticeMode(String tag, boolean isLineRoutingVerifyMode );
|
||||
|
||||
boolean isRemoteNoticeMode();
|
||||
|
||||
boolean isTaxiUnmanedDriverLineRoutingVerifyMode();
|
||||
|
||||
/**
|
||||
|
||||
@@ -87,6 +87,13 @@ public class MogoStatusManager implements IMogoStatusManager {
|
||||
return val != null && val;
|
||||
}
|
||||
|
||||
private boolean get_bool_val_null(StatusDescriptor descriptor,boolean defaultValue) {
|
||||
if(mStatus.get(descriptor)==null){
|
||||
return defaultValue;
|
||||
}
|
||||
return Boolean.TRUE.equals(mStatus.get(descriptor));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setVrMode(String tag, boolean vrMode) {
|
||||
doSetStatus(tag, StatusDescriptor.VR_MODE, vrMode);
|
||||
@@ -167,6 +174,17 @@ public class MogoStatusManager implements IMogoStatusManager {
|
||||
return get_bool_val(StatusDescriptor.TAXI_UNMANED_DRIVER_LINE_ROUTING_VERIFY_MODE);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setRemoteNoticeMode(String tag, boolean isLineRoutingVerifyMode) {
|
||||
doSetStatus(tag,StatusDescriptor.REMOTE_NOTICE_MODE,isLineRoutingVerifyMode);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean isRemoteNoticeMode() {
|
||||
return get_bool_val_null(StatusDescriptor.REMOTE_NOTICE_MODE,true);
|
||||
}
|
||||
|
||||
private void doSetStatus(String tag, StatusDescriptor target, boolean value) {
|
||||
mStatus.put(target, value);
|
||||
invokeStatusChangedListener(target, value);
|
||||
|
||||
@@ -72,6 +72,8 @@ public enum StatusDescriptor {
|
||||
/**
|
||||
* taxi无人化 是否在自主算路验证模式
|
||||
*/
|
||||
TAXI_UNMANED_DRIVER_LINE_ROUTING_VERIFY_MODE
|
||||
TAXI_UNMANED_DRIVER_LINE_ROUTING_VERIFY_MODE,
|
||||
|
||||
REMOTE_NOTICE_MODE
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user