[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")