Commit ec4759b1 authored by 李玲燕's avatar 李玲燕

修改模式切换

parent 68bf58bd
......@@ -8,7 +8,7 @@ set (CMAKE_CXX_STANDARD 11)
# Version.
set (MAJOR_VERSION "1")
set (MINOR_VERSION "2")
set (PATCH_VERSION "2")
set (PATCH_VERSION "3")
# Import cmake modules.
list (APPEND CMAKE_MODULE_PATH "$ENV{HT_BUILDSYS_CMAKE_MODULES}")
......
......@@ -90,15 +90,19 @@
const target = evt.currentTarget
const {name} = target.dataset
const {debuginfo} = vehicleStoreToRefs
const {Current_Gear,loadBrakeStatus}=debuginfo.value;
const {Current_Gear,loadBrakeStatus, parkBrakeStatus}=debuginfo.value;
if (name === 'mode_switch' && isDisable.value === 'disabled') {
return
}
if(name=='mode_switch'){
if (!(['P', 126].includes(Current_Gear) || (['N', 0].includes(Current_Gear) && loadBrakeStatus != 0))) {
if (!(['N', 0].includes(Current_Gear) && (loadBrakeStatus || parkBrakeStatus))) {
Message.error('不能切换无人模式')
return
}
// if (!(['P', 126].includes(Current_Gear) || (['N', 0].includes(Current_Gear) && loadBrakeStatus != 0))) {
// Message.error('不能切换无人模式')
// return
// }
}
active.value = name
emit('changeTab', name)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment