抽离自车状态回调监听

Signed-off-by: 董宏宇 <martindhy@gmail.com>
This commit is contained in:
董宏宇
2021-11-02 14:21:03 +08:00
parent 246998e46c
commit 7fd5b7e9d6
9 changed files with 115 additions and 39 deletions

View File

@@ -28,11 +28,6 @@ public class MoGoAutopilotStatusListenerImpl implements IMoGoAutopilotStatusList
}
@Override
public void onAutopilotCarStateData(@Nullable AutopilotCarStateInfo autoPilotCarStateInfo) {
}
@Override
public void onAutopilotSNRequest() {

View File

@@ -14,10 +14,12 @@ import com.mogo.eagle.core.data.autopilot.AutopilotStatusInfo
import com.mogo.eagle.core.data.config.FunctionBuildConfig
import com.mogo.eagle.core.data.constants.MoGoConfig
import com.mogo.eagle.core.data.obu.ObuStatusInfo
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotCarStateListener
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotStatusListener
import com.mogo.eagle.core.function.api.obu.IMoGoObuStatusListener
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.CallerAutopilotCarStatusListenerManager
import com.mogo.eagle.core.function.call.obu.CallerOBUManager
import com.mogo.eagle.core.function.call.obu.CallerObuListenerManager
import com.mogo.eagle.core.function.hmi.R
@@ -42,7 +44,7 @@ class DebugSettingView @JvmOverloads constructor(
attrs: AttributeSet? = null,
defStyleAttr: Int = 0
) : ConstraintLayout(context, attrs, defStyleAttr), IMoGoObuStatusListener,
IMoGoAutopilotStatusListener {
IMoGoAutopilotStatusListener, IMoGoAutopilotCarStateListener {
private val TAG = "DebugSettingView"
@@ -55,12 +57,14 @@ class DebugSettingView @JvmOverloads constructor(
super.onAttachedToWindow()
CallerObuListenerManager.addListener(TAG, this)
CallerAutoPilotStatusListenerManager.addListener(TAG, this)
CallerAutopilotCarStatusListenerManager.addListener(TAG, this)
}
override fun onDetachedFromWindow() {
super.onDetachedFromWindow()
CallerObuListenerManager.removeListener(TAG)
CallerAutoPilotStatusListenerManager.removeListener(TAG)
CallerAutopilotCarStatusListenerManager.removeListener(TAG)
}
private fun initView() {

View File

@@ -5,7 +5,10 @@ import android.util.AttributeSet
import android.view.LayoutInflater
import android.view.View
import androidx.constraintlayout.widget.ConstraintLayout
import com.mogo.eagle.core.data.autopilot.*
import com.mogo.eagle.core.data.autopilot.AutopilotControlParameters
import com.mogo.eagle.core.data.autopilot.AutopilotGuardianStatusInfo
import com.mogo.eagle.core.data.autopilot.AutopilotStationInfo
import com.mogo.eagle.core.data.autopilot.AutopilotStatusInfo
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotStatusListener
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotManager
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager
@@ -123,9 +126,6 @@ class AutoPilotStatusView @JvmOverloads constructor(
}
override fun onAutopilotCarStateData(autoPilotCarStateInfo: AutopilotCarStateInfo?) {
}
override fun onAutopilotGuardian(guardianInfo: AutopilotGuardianStatusInfo?) {