From 2e84aac415cfe286f2e9edf7194fcbea74208abf Mon Sep 17 00:00:00 2001 From: aibingbing Date: Thu, 29 Aug 2024 11:09:11 +0800 Subject: [PATCH] =?UTF-8?q?[6.6.0][FSM]=20refactor:=20=E7=A7=BB=E9=99=A4?= =?UTF-8?q?=E6=B5=8B=E8=AF=95=E4=BB=A3=E7=A0=81=EF=BC=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../status/flow/fsm/FSMImpl.kt | 28 ------------------- 1 file changed, 28 deletions(-) diff --git a/core/function-impl/mogo-core-function-devatools/src/main/java/com/zhjt/mogo_core_function_devatools/status/flow/fsm/FSMImpl.kt b/core/function-impl/mogo-core-function-devatools/src/main/java/com/zhjt/mogo_core_function_devatools/status/flow/fsm/FSMImpl.kt index 7c25ea9791..ee4fdbe893 100644 --- a/core/function-impl/mogo-core-function-devatools/src/main/java/com/zhjt/mogo_core_function_devatools/status/flow/fsm/FSMImpl.kt +++ b/core/function-impl/mogo-core-function-devatools/src/main/java/com/zhjt/mogo_core_function_devatools/status/flow/fsm/FSMImpl.kt @@ -10,8 +10,6 @@ import com.mogo.eagle.core.function.call.autopilot.CallerFsm2024ListenerManager import com.mogo.eagle.core.function.call.autopilot.CallerNodeStateListenerManager import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_DEVA -import com.mogo.eagle.core.utilcode.util.DateTimeUtils -import com.mogo.eagle.core.utilcode.util.UiThreadHandler import com.zhjt.mogo.adas.data.AdasConstants import com.zhjt.mogo.adas.data.bean.NodeStateInfo import com.zhjt.mogo_core_function_devatools.status.entity.FSMStateCode @@ -21,7 +19,6 @@ import fsm.Fsm2024 import kotlinx.coroutines.Dispatchers import kotlinx.coroutines.launch import java.util.concurrent.atomic.AtomicReference -import kotlin.random.Random internal class FSMImpl(ctx: Context) : IFlow(ctx), IMoGoAutopilotStatusListener, IMoGoFsm2024Listener, IMoGoNodeStateListener { @@ -76,31 +73,6 @@ internal class FSMImpl(ctx: Context) : IFlow(ctx), IMoGoAutopilotStat CallerAutoPilotStatusListenerManager.addListener(TAG, this) CallerFsm2024ListenerManager.addListener(TAG, this) CallerNodeStateListenerManager.addNodeStateListener(TAG, setOf(AdasConstants.NodeName.FSM2024), this) - - //TODO - UiThreadHandler.postDelayed({ - test() - test1() - }, 3000L) - } - - fun test() { - send( - FSMStatus( - FSMStateCode.ExistError, - "检查到异常,不能启动自驾,time=${DateTimeUtils.getCurrentDateTime()}" - ) - ) - UiThreadHandler.postDelayed({ - test() - }, Random.nextInt(10, 20) * 1000L) - } - - fun test1() { - send(FSMStatus(FSMStateCode.ExistNormal, "状态正常")) - UiThreadHandler.postDelayed({ - test1() - }, Random.nextInt(1, 10) * 1000L) } override fun onAutopilotIpcConnectStatusChanged(