[dev_arch_opt_3.0]

[Change]
[1、修复车辆灯数据没有监听bug]

Signed-off-by: donghongyu <donghongyu@zhidaoauto.com>
This commit is contained in:
donghongyu
2023-01-04 20:43:45 +08:00
parent 06810f339c
commit 2b679720bc
3 changed files with 9 additions and 0 deletions

View File

@@ -11,6 +11,7 @@ import com.mogo.eagle.core.function.api.autopilot.IMoGoChassisLamplightListener
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotManager
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager
import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotVehicleStateListenerManager
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLamplightListenerManager
import com.mogo.eagle.core.utilcode.kotlin.safeCancel
import com.zhjt.mogo_core_function_devatools.status.entity.CanStatus
import com.zhjt.mogo_core_function_devatools.status.flow.IFlow
@@ -39,6 +40,7 @@ internal class CanImpl(ctx: Context):
send(CanStatus(CallerAutoPilotManager.isConnected()))
CallerAutopilotVehicleStateListenerManager.addListener(TAG, this)
CallerAutoPilotStatusListenerManager.addListener(TAG, this)
CallerChassisLamplightListenerManager.addListener(TAG, this)
}
override fun onAutopilotLightSwitchData(lightSwitch: LightSwitch?) {
@@ -125,5 +127,6 @@ internal class CanImpl(ctx: Context):
job?.safeCancel()
CallerAutopilotVehicleStateListenerManager.removeListener(TAG)
CallerAutoPilotStatusListenerManager.removeListener(TAG)
CallerChassisLamplightListenerManager.removeListener(TAG)
}
}