[6.6.0]座椅压力状态做内存保存

This commit is contained in:
xuxinchao
2024-09-09 16:21:44 +08:00
parent 7d3555039b
commit 429c9d69ac
2 changed files with 61 additions and 0 deletions

View File

@@ -12,6 +12,10 @@ import android.view.WindowManager
import android.widget.ImageView
import android.widget.TextView
import android.widget.ToggleButton
import com.mogo.eagle.core.data.config.HmiBuildConfig
import com.mogo.eagle.core.data.config.HmiBuildConfig.coDriverStatus
import com.mogo.eagle.core.data.config.HmiBuildConfig.mainDriverStatus
import com.mogo.eagle.core.data.config.HmiBuildConfig.rearRowStatus
import com.mogo.eagle.core.data.enums.EventTypeEnumNew
import com.mogo.eagle.core.data.msgbox.AutopilotMsg
import com.mogo.eagle.core.data.msgbox.MsgBoxBean
@@ -223,6 +227,35 @@ class ExamControlWindow constructor(activity: Activity): View.OnTouchListener{
ivEmergencyStop.setOnClickListener {
CallerAutoPilotControlManager.sendPlanningPullOverCmd(3)
}
//主驾
tbSeatMainDriver.isChecked = mainDriverStatus
tbSeatMainDriver.setOnCheckedChangeListener{compoundButton, isChecked ->
if(!compoundButton.isPressed){
return@setOnCheckedChangeListener
}
mainDriverStatus = isChecked
CallerAutoPilotControlManager.sendSeatPressure(mainDriverStatus,coDriverStatus,rearRowStatus)
}
//副驾
tbSeatPassenger.isChecked = coDriverStatus
tbSeatPassenger.setOnCheckedChangeListener{compoundButton, isChecked ->
if(!compoundButton.isPressed){
return@setOnCheckedChangeListener
}
coDriverStatus = isChecked
CallerAutoPilotControlManager.sendSeatPressure(mainDriverStatus,coDriverStatus,rearRowStatus)
}
//后排
tbSeatRear.isChecked = rearRowStatus
tbSeatRear.setOnCheckedChangeListener{compoundButton, isChecked ->
if(!compoundButton.isPressed){
return@setOnCheckedChangeListener
}
rearRowStatus = isChecked
CallerAutoPilotControlManager.sendSeatPressure(mainDriverStatus,coDriverStatus,rearRowStatus)
}
}
@SuppressLint("ClickableViewAccessibility")

View File

@@ -51,6 +51,13 @@ object HmiBuildConfig {
@Volatile
var isShowRouteStrategy = !AppIdentityModeUtils.isBus(FunctionBuildConfig.appIdentityMode)
/**
* 是否展示路沿、车道线
*/
@JvmField
@Volatile
var isShowLaneMark: Boolean = false
/**
* 是否展示obu的弱势交通
*/
@@ -107,4 +114,25 @@ object HmiBuildConfig {
@Volatile
var isShowBusStationStrategyBorderPoint = false
/**
* 主驾是否有人,默认没人
*/
@JvmField
@Volatile
var mainDriverStatus = false
/**
* 副驾是否有人,默认没人
*/
@JvmField
@Volatile
var coDriverStatus = false
/**
* 后排是否有人,默认没人
*/
@JvmField
@Volatile
var rearRowStatus = false
}