[6.6.0]座椅压力状态做内存保存
This commit is contained in:
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user