[6.6.0] union the chassis state in one caller
This commit is contained in:
@@ -7,12 +7,10 @@ import androidx.lifecycle.LifecycleObserver
|
||||
import chassis.Chassis
|
||||
import com.mogo.eagle.core.data.config.FunctionBuildConfig.accThreshold
|
||||
import com.mogo.eagle.core.data.map.MogoLocation
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoChassisLamplightListener
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoChassisLocationWGS84Listener
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLamplightListenerManager
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoChassisStatesListener
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationWGS84ListenerManager
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_MAP
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerChassisStatesListenerManager
|
||||
import com.mogo.map.MogoMap
|
||||
import com.mogo.map.MogoMapView
|
||||
import com.mogo.map.overlay.line.Polyline
|
||||
@@ -24,7 +22,7 @@ import kotlin.properties.Delegates
|
||||
|
||||
|
||||
class MapBizView(context: Context?, attrs: AttributeSet?) : MogoMapView(context, attrs),
|
||||
IMoGoChassisLocationWGS84Listener, IMoGoChassisLamplightListener, LifecycleObserver {
|
||||
IMoGoChassisLocationWGS84Listener, IMoGoChassisStatesListener, LifecycleObserver {
|
||||
|
||||
companion object {
|
||||
private const val TAG = "MapBizView"
|
||||
@@ -35,7 +33,7 @@ class MapBizView(context: Context?, attrs: AttributeSet?) : MogoMapView(context,
|
||||
map?.uiController?.showMyLocation(true)
|
||||
initMapView()
|
||||
CallerChassisLocationWGS84ListenerManager.addListener(TAG, 20, this)
|
||||
CallerChassisLamplightListenerManager.addListener(TAG, this)
|
||||
CallerChassisStatesListenerManager.addListener(TAG, this)
|
||||
|
||||
}
|
||||
|
||||
@@ -138,7 +136,7 @@ class MapBizView(context: Context?, attrs: AttributeSet?) : MogoMapView(context,
|
||||
override fun onDestroy() {
|
||||
// 先取消注册数据,再onDestroy
|
||||
CallerChassisLocationWGS84ListenerManager.removeListener(TAG)
|
||||
CallerChassisLamplightListenerManager.removeListener(TAG)
|
||||
CallerChassisStatesListenerManager.removeListener(TAG)
|
||||
super.onDestroy()
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user