[6.6.0][FSM] refactor: 移除测试代码;
This commit is contained in:
@@ -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<FSMStatus>(ctx), IMoGoAutopilotStatusListener,
|
||||
IMoGoFsm2024Listener, IMoGoNodeStateListener {
|
||||
@@ -76,31 +73,6 @@ internal class FSMImpl(ctx: Context) : IFlow<FSMStatus>(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(
|
||||
|
||||
Reference in New Issue
Block a user