[6.6.0][FSM] feat: FSM 异常状态时 启动自驾按钮 更新为不能点击状态;

This commit is contained in:
aibingbing
2024-09-04 12:08:33 +08:00
parent b607cea708
commit aad2922d40
3 changed files with 6 additions and 3 deletions

View File

@@ -94,7 +94,6 @@ object StatusManager {
is GpsStatus -> GpsImpl(ctx)
is TracingStatus -> TracingImpl(ctx)
is RTKStatus -> RTKImpl(ctx)
is FSMStatus -> FSMImpl(ctx)
is OverViewStatus -> OverViewImpl(ctx)
is SteerStatus -> SteerImpl(ctx)
is AcceleratorStatus -> AcceleratorImpl(ctx)
@@ -102,6 +101,7 @@ object StatusManager {
is DoubleFlashStatus -> DoubleFlashImpl(ctx)
is GearStatus -> GearImpl(ctx)
is SpeedStatus -> SpeedImpl(ctx)
is FSMStatus -> FSMImpl(ctx)
is RouteDownloadStatus -> RouteDownloadImpl(ctx)
}
}.also { flows += it }

View File

@@ -141,7 +141,7 @@ enum class FSMStateCode {
/**
* FSM模块状态
*/
class FSMStatus(var state: FSMStateCode, var desc: String = ""): Status() {
class FSMStatus(var state: FSMStateCode, var desc: String = ""): Status(), IAutopilotPreLaunchStatus {
override fun equals(other: Any?): Boolean {
if (javaClass != other?.javaClass) return false

View File

@@ -119,7 +119,10 @@ object CallerAutoPilotControlManager {
if ((exceptionValue and (1 shl 4)) != 0) {
sb.append("档位$")
}
if ((exceptionValue and (1 shl 5)) != 0 || ((exceptionValue and (1 shl 6)) != 0)) {
if ((exceptionValue and (1 shl 5)) != 0) {
sb.append("FSM$")
}
if ((exceptionValue and (1 shl 6)) != 0 || ((exceptionValue and (1 shl 7)) != 0)) {
if (!sb.contains("$")) {
sb.setLength(0)
sb.append("轨迹未就绪,请稍后重试")