[6.6.0] union the chassis state in one caller
This commit is contained in:
@@ -8,15 +8,16 @@ import android.view.LayoutInflater
|
||||
import android.view.ViewGroup
|
||||
import androidx.constraintlayout.widget.ConstraintLayout
|
||||
import chassis.ChassisStatesOuterClass
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoBatteryManagementSystemListener
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoChassisStatesListener
|
||||
import com.mogo.eagle.core.function.api.hmi.view.IViewControlListener
|
||||
import com.mogo.eagle.core.function.api.setting.IMoGoSkinModeChangeListener
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerBatteryManagementSystemListenerManager
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerChassisStatesListenerManager
|
||||
import com.mogo.eagle.core.function.call.devatools.CallerDevaToolsManager
|
||||
import com.mogo.eagle.core.function.call.hmi.CallerHmiViewControlListenerManager
|
||||
import com.mogo.eagle.core.function.call.setting.CallerSkinModeListenerManager
|
||||
import com.mogo.eagle.core.utilcode.kotlin.*
|
||||
import com.mogo.eagle.core.utilcode.util.ClickUtils
|
||||
import com.mogo.eagle.core.utilcode.util.ThreadUtils
|
||||
import com.mogo.och.bus.passenger.R
|
||||
import kotlinx.android.synthetic.main.bus_p_m2_view_status_bar.view.progress
|
||||
import kotlinx.android.synthetic.main.bus_p_m2_view_status_bar.view.tv_power_cos
|
||||
@@ -30,7 +31,7 @@ import me.jessyan.autosize.utils.AutoSizeUtils
|
||||
class M2StatusBarView @JvmOverloads constructor(
|
||||
context: Context, attrs: AttributeSet? = null
|
||||
) : ConstraintLayout(context, attrs), IViewControlListener, IMoGoSkinModeChangeListener,
|
||||
IMoGoBatteryManagementSystemListener {
|
||||
IMoGoChassisStatesListener {
|
||||
|
||||
companion object {
|
||||
const val TAG = "M2StatusBarView"
|
||||
@@ -60,7 +61,7 @@ class M2StatusBarView @JvmOverloads constructor(
|
||||
// 添加换肤监听
|
||||
CallerSkinModeListenerManager.addListener(TAG, this)
|
||||
//电量
|
||||
CallerBatteryManagementSystemListenerManager.addListener(TAG,this)
|
||||
CallerChassisStatesListenerManager.addListener(TAG,this)
|
||||
|
||||
progress?.also {
|
||||
it.progress = 50
|
||||
@@ -81,30 +82,33 @@ class M2StatusBarView @JvmOverloads constructor(
|
||||
super.onDetachedFromWindow()
|
||||
CallerHmiViewControlListenerManager.removeListener(TAG)
|
||||
CallerSkinModeListenerManager.removeListener(TAG)
|
||||
CallerChassisStatesListenerManager.removeListener(TAG)
|
||||
CallerDevaToolsManager.hideStatusBar()
|
||||
}
|
||||
|
||||
@SuppressLint("SetTextI18n")
|
||||
override fun onBatteryManagementSystemStates(states: ChassisStatesOuterClass.BMSSystemStates) {
|
||||
if (ClickUtils.isClickTooFrequent(this,1000)) {
|
||||
return
|
||||
}
|
||||
val bmsSoc = states.bmsSoc
|
||||
try {
|
||||
if (oldBmsSoc != bmsSoc ) {
|
||||
scope.launch {
|
||||
if(bmsSoc >1){
|
||||
progress?.also { it.progress = bmsSoc.toInt() }
|
||||
tv_power_cos?.also { it.text = "${bmsSoc.toInt()}%" }
|
||||
}else{
|
||||
val power = (bmsSoc * 100).toInt()
|
||||
progress?.also { it.progress = power }
|
||||
tv_power_cos?.also {it.text = "$power%" }
|
||||
ThreadUtils.runOnUiThread({
|
||||
if (ClickUtils.isClickTooFrequent(this,1000)) {
|
||||
return@runOnUiThread
|
||||
}
|
||||
val bmsSoc = states.bmsSoc
|
||||
try {
|
||||
if (oldBmsSoc != bmsSoc ) {
|
||||
scope.launch {
|
||||
if(bmsSoc >1){
|
||||
progress?.also { it.progress = bmsSoc.toInt() }
|
||||
tv_power_cos?.also { it.text = "${bmsSoc.toInt()}%" }
|
||||
}else{
|
||||
val power = (bmsSoc * 100).toInt()
|
||||
progress?.also { it.progress = power }
|
||||
tv_power_cos?.also {it.text = "$power%" }
|
||||
}
|
||||
}
|
||||
}
|
||||
} finally {
|
||||
oldBmsSoc = bmsSoc
|
||||
}
|
||||
} finally {
|
||||
oldBmsSoc = bmsSoc
|
||||
}
|
||||
},ThreadUtils.MODE.QUEUE)
|
||||
}
|
||||
}
|
||||
@@ -11,7 +11,6 @@ import android.view.animation.Animation
|
||||
import android.widget.ImageView
|
||||
import androidx.constraintlayout.widget.ConstraintLayout
|
||||
import com.mogo.eagle.core.function.api.datacenter.union.IMoGoTurnLightListener
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLamplightListenerManager
|
||||
import com.mogo.eagle.core.function.call.v2x.CallerTurnLightListenerManager
|
||||
import com.mogo.eagle.core.utilcode.util.ThreadUtils
|
||||
import com.mogo.och.bus.passenger.R
|
||||
@@ -50,13 +49,11 @@ class M2TurnLightView @JvmOverloads constructor(
|
||||
override fun onAttachedToWindow() {
|
||||
super.onAttachedToWindow()
|
||||
CallerTurnLightListenerManager.addListener(TAG,this)
|
||||
|
||||
TurnLightManager.addTurnLightStatusChangeListener(TAG,this)
|
||||
}
|
||||
|
||||
override fun onDetachedFromWindow() {
|
||||
super.onDetachedFromWindow()
|
||||
CallerChassisLamplightListenerManager.removeListener(TAG)
|
||||
CallerTurnLightListenerManager.removeListener(TAG)
|
||||
TurnLightManager.removeTurnLightStatusChangeListener(TAG)
|
||||
}
|
||||
|
||||
@@ -286,7 +286,7 @@
|
||||
app:layout_constraintLeft_toLeftOf="@+id/speed_tv"
|
||||
app:layout_constraintBottom_toBottomOf="parent" />
|
||||
|
||||
<!-- 转向灯 IMoGoChassisLamplightListener-->
|
||||
<!-- 转向灯 -->
|
||||
<com.mogo.och.bus.passenger.passenger.ui.widget.M2TurnLightView
|
||||
android:id="@+id/turn_light_view"
|
||||
android:layout_width="@dimen/dp_86"
|
||||
|
||||
@@ -12,9 +12,9 @@ import androidx.core.content.ContextCompat
|
||||
import chassis.ChassisStatesOuterClass
|
||||
import com.mogo.eagle.core.data.config.FunctionBuildConfig
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotStatusListener
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoBatteryManagementSystemListener
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoChassisStatesListener
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerBatteryManagementSystemListenerManager
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerChassisStatesListenerManager
|
||||
import com.mogo.eagle.core.function.call.devatools.CallerDevaToolsManager
|
||||
import com.mogo.eagle.core.function.call.telematic.CallerTelematicManager
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
|
||||
@@ -47,7 +47,7 @@ class StatusBarView @JvmOverloads constructor(
|
||||
context: Context,
|
||||
attrs: AttributeSet? = null,
|
||||
defStyleAttr: Int = 0
|
||||
) : ConstraintLayout(context, attrs, defStyleAttr), IMoGoBatteryManagementSystemListener,
|
||||
) : ConstraintLayout(context, attrs, defStyleAttr), IMoGoChassisStatesListener,
|
||||
IOchAutopilotStatusListener,
|
||||
IBeautifyModeCallback {
|
||||
|
||||
@@ -91,7 +91,7 @@ class StatusBarView @JvmOverloads constructor(
|
||||
layoutParams = params
|
||||
}
|
||||
//电池电量监听
|
||||
CallerBatteryManagementSystemListenerManager.addListener(TAG,this)
|
||||
CallerChassisStatesListenerManager.addListener(TAG,this)
|
||||
//自动驾驶状态监听
|
||||
OchAutoPilotStatusListenerManager.addListener(TAG, this)
|
||||
|
||||
@@ -188,21 +188,21 @@ class StatusBarView @JvmOverloads constructor(
|
||||
//定时任务
|
||||
BizLoopManager.removeLoopFunction(TAG)
|
||||
//电池电量监听
|
||||
CallerBatteryManagementSystemListenerManager.removeListener(TAG)
|
||||
CallerChassisStatesListenerManager.removeListener(TAG)
|
||||
//自动驾驶状态监听
|
||||
CallerAutoPilotStatusListenerManager.removeListener(TAG)
|
||||
BeautifyManager.setStatusChangeListener(TAG,null)
|
||||
}
|
||||
|
||||
override fun onBatteryManagementSystemStates(states: ChassisStatesOuterClass.BMSSystemStates) {
|
||||
if (ClickUtils.isClickTooFrequent(this,1000)) {
|
||||
return
|
||||
}
|
||||
UiThreadHandler.post {
|
||||
UiThreadHandler.post ({
|
||||
if (ClickUtils.isClickTooFrequent(this,1000)) {
|
||||
return@post
|
||||
}
|
||||
val bmsSoc = states.bmsSoc
|
||||
progress.progress = bmsSoc.toInt()
|
||||
tv_power_cos.text = "${bmsSoc.roundToInt()}%"
|
||||
}
|
||||
},UiThreadHandler.MODE.QUEUE)
|
||||
}
|
||||
|
||||
override fun dispatchStatus(typeEnum: BeautifyManager.ChangeTypeEnum) {
|
||||
|
||||
@@ -20,8 +20,8 @@ import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListener
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotStatisticsListenerManager
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerChassisDoorStateListenerManager
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerChassisGnssListenerManager
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLamplightListenerManager
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationGCJ02ListenerManager
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerChassisStatesListenerManager
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerPlanningActionsListenerManager
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerPlanningRottingListenerManager
|
||||
import com.mogo.eagle.core.function.call.hmi.CallerHmiManager
|
||||
@@ -133,7 +133,7 @@ object DebugDataDispatch {
|
||||
// LIGHT_MANUAL = 4;
|
||||
// LIGHT_AUTO = 5;
|
||||
val lightPostion = intent.getIntExtra("lightPostion",0)
|
||||
CallerChassisLamplightListenerManager.invokeAutopilotLightSwitchData(Chassis.LightSwitch.forNumber(lightPostion))
|
||||
CallerChassisStatesListenerManager.invokeAutopilotLightSwitchData(Chassis.LightSwitch.forNumber(lightPostion))
|
||||
}
|
||||
trajectoryStation -> {
|
||||
val startLon = intent.getFloatExtra("startLon", -1.0f)
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
package com.mogo.och.common.module.manager.light
|
||||
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoChassisLamplightListener
|
||||
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.CallerChassisStatesListenerManager
|
||||
|
||||
object BreakLightManager : IMoGoChassisLamplightListener {
|
||||
object BreakLightManager : IMoGoChassisStatesListener {
|
||||
private const val TAG = "BreakLightManager"
|
||||
init {
|
||||
CallerChassisLamplightListenerManager.addListener(TAG, this)
|
||||
CallerChassisStatesListenerManager.addListener(TAG, this)
|
||||
}
|
||||
|
||||
// 刹车灯
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
package com.mogo.och.common.module.manager.light
|
||||
|
||||
import chassis.Chassis
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoChassisLamplightListener
|
||||
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.CallerChassisStatesListenerManager
|
||||
import java.util.concurrent.ConcurrentHashMap
|
||||
import kotlin.properties.Delegates
|
||||
|
||||
object TurnLightManager : IMoGoChassisLamplightListener {
|
||||
object TurnLightManager : IMoGoChassisStatesListener {
|
||||
private const val TAG = "TurnLightManager"
|
||||
|
||||
private val lightStatusChange: ConcurrentHashMap<String, TurnLightListener> =
|
||||
@@ -23,7 +23,7 @@ object TurnLightManager : IMoGoChassisLamplightListener {
|
||||
}
|
||||
|
||||
init {
|
||||
CallerChassisLamplightListenerManager.addListener(TAG, this)
|
||||
CallerChassisStatesListenerManager.addListener(TAG, this)
|
||||
}
|
||||
|
||||
fun addTurnLightStatusChangeListener(tag: String, listener: TurnLightListener) {
|
||||
|
||||
@@ -11,7 +11,6 @@ import android.view.animation.Animation
|
||||
import android.widget.ImageView
|
||||
import androidx.constraintlayout.widget.ConstraintLayout
|
||||
import com.mogo.eagle.core.function.api.datacenter.union.IMoGoTurnLightListener
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLamplightListenerManager
|
||||
import com.mogo.eagle.core.function.call.v2x.CallerTurnLightListenerManager
|
||||
import com.mogo.eagle.core.utilcode.util.ThreadUtils
|
||||
import com.mogo.och.shuttle.passenger.R
|
||||
@@ -50,13 +49,11 @@ class BusPTurnLightView @JvmOverloads constructor(
|
||||
override fun onAttachedToWindow() {
|
||||
super.onAttachedToWindow()
|
||||
CallerTurnLightListenerManager.addListener(TAG,this)
|
||||
|
||||
TurnLightManager.addTurnLightStatusChangeListener(TAG,this)
|
||||
}
|
||||
|
||||
override fun onDetachedFromWindow() {
|
||||
super.onDetachedFromWindow()
|
||||
CallerChassisLamplightListenerManager.removeListener(TAG)
|
||||
CallerTurnLightListenerManager.removeListener(TAG)
|
||||
TurnLightManager.removeTurnLightStatusChangeListener(TAG)
|
||||
}
|
||||
|
||||
@@ -11,7 +11,6 @@ import android.view.animation.Animation
|
||||
import android.widget.ImageView
|
||||
import androidx.constraintlayout.widget.ConstraintLayout
|
||||
import com.mogo.eagle.core.function.api.datacenter.union.IMoGoTurnLightListener
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLamplightListenerManager
|
||||
import com.mogo.eagle.core.function.call.v2x.CallerTurnLightListenerManager
|
||||
import com.mogo.eagle.core.utilcode.util.ThreadUtils
|
||||
import com.mogo.och.shuttle.passenger.R
|
||||
@@ -50,13 +49,11 @@ class M2TurnLightView @JvmOverloads constructor(
|
||||
override fun onAttachedToWindow() {
|
||||
super.onAttachedToWindow()
|
||||
CallerTurnLightListenerManager.addListener(TAG,this)
|
||||
|
||||
TurnLightManager.addTurnLightStatusChangeListener(TAG,this)
|
||||
}
|
||||
|
||||
override fun onDetachedFromWindow() {
|
||||
super.onDetachedFromWindow()
|
||||
CallerChassisLamplightListenerManager.removeListener(TAG)
|
||||
CallerTurnLightListenerManager.removeListener(TAG)
|
||||
TurnLightManager.removeTurnLightStatusChangeListener(TAG)
|
||||
}
|
||||
|
||||
@@ -285,7 +285,7 @@
|
||||
app:layout_constraintLeft_toLeftOf="@+id/speed_tv"
|
||||
app:layout_constraintBottom_toBottomOf="parent" />
|
||||
|
||||
<!-- 转向灯 IMoGoChassisLamplightListener-->
|
||||
<!-- 转向灯-->
|
||||
<com.mogo.och.shuttle.passenger.ui.widget.M2TurnLightView
|
||||
android:id="@+id/turn_light_view"
|
||||
android:layout_width="@dimen/dp_86"
|
||||
|
||||
@@ -11,7 +11,6 @@ import android.view.animation.Animation
|
||||
import android.widget.ImageView
|
||||
import androidx.constraintlayout.widget.ConstraintLayout
|
||||
import com.mogo.eagle.core.function.api.datacenter.union.IMoGoTurnLightListener
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLamplightListenerManager
|
||||
import com.mogo.eagle.core.function.call.v2x.CallerTurnLightListenerManager
|
||||
import com.mogo.eagle.core.utilcode.util.ThreadUtils
|
||||
import com.mogo.och.shuttle.passenger.R
|
||||
@@ -50,13 +49,11 @@ class BusPTurnLightView @JvmOverloads constructor(
|
||||
override fun onAttachedToWindow() {
|
||||
super.onAttachedToWindow()
|
||||
CallerTurnLightListenerManager.addListener(TAG,this)
|
||||
|
||||
TurnLightManager.addTurnLightStatusChangeListener(TAG,this)
|
||||
}
|
||||
|
||||
override fun onDetachedFromWindow() {
|
||||
super.onDetachedFromWindow()
|
||||
CallerChassisLamplightListenerManager.removeListener(TAG)
|
||||
CallerTurnLightListenerManager.removeListener(TAG)
|
||||
TurnLightManager.removeTurnLightStatusChangeListener(TAG)
|
||||
}
|
||||
|
||||
@@ -8,15 +8,16 @@ import android.view.LayoutInflater
|
||||
import android.view.ViewGroup
|
||||
import androidx.constraintlayout.widget.ConstraintLayout
|
||||
import chassis.ChassisStatesOuterClass
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoBatteryManagementSystemListener
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoChassisStatesListener
|
||||
import com.mogo.eagle.core.function.api.hmi.view.IViewControlListener
|
||||
import com.mogo.eagle.core.function.api.setting.IMoGoSkinModeChangeListener
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerBatteryManagementSystemListenerManager
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerChassisStatesListenerManager
|
||||
import com.mogo.eagle.core.function.call.devatools.CallerDevaToolsManager
|
||||
import com.mogo.eagle.core.function.call.hmi.CallerHmiViewControlListenerManager
|
||||
import com.mogo.eagle.core.function.call.setting.CallerSkinModeListenerManager
|
||||
import com.mogo.eagle.core.utilcode.kotlin.*
|
||||
import com.mogo.eagle.core.utilcode.util.ClickUtils
|
||||
import com.mogo.eagle.core.utilcode.util.ThreadUtils
|
||||
import com.mogo.och.shuttle.passenger.R
|
||||
import kotlinx.android.synthetic.main.shuttle_p_m2_view_status_bar.view.progress
|
||||
import kotlinx.android.synthetic.main.shuttle_p_m2_view_status_bar.view.tv_power_cos
|
||||
@@ -30,7 +31,7 @@ import me.jessyan.autosize.utils.AutoSizeUtils
|
||||
class M2StatusBarView @JvmOverloads constructor(
|
||||
context: Context, attrs: AttributeSet? = null
|
||||
) : ConstraintLayout(context, attrs), IViewControlListener, IMoGoSkinModeChangeListener,
|
||||
IMoGoBatteryManagementSystemListener {
|
||||
IMoGoChassisStatesListener {
|
||||
|
||||
companion object {
|
||||
const val TAG = "M2StatusBarView"
|
||||
@@ -60,7 +61,7 @@ class M2StatusBarView @JvmOverloads constructor(
|
||||
// 添加换肤监听
|
||||
CallerSkinModeListenerManager.addListener(TAG, this)
|
||||
//电量
|
||||
CallerBatteryManagementSystemListenerManager.addListener(TAG,this)
|
||||
CallerChassisStatesListenerManager.addListener(TAG,this)
|
||||
|
||||
progress?.also {
|
||||
it.progress = 50
|
||||
@@ -81,30 +82,33 @@ class M2StatusBarView @JvmOverloads constructor(
|
||||
super.onDetachedFromWindow()
|
||||
CallerHmiViewControlListenerManager.removeListener(TAG)
|
||||
CallerSkinModeListenerManager.removeListener(TAG)
|
||||
CallerChassisStatesListenerManager.removeListener(TAG)
|
||||
CallerDevaToolsManager.hideStatusBar()
|
||||
}
|
||||
|
||||
@SuppressLint("SetTextI18n")
|
||||
override fun onBatteryManagementSystemStates(states: ChassisStatesOuterClass.BMSSystemStates) {
|
||||
if (ClickUtils.isClickTooFrequent(this,1000)) {
|
||||
return
|
||||
}
|
||||
val bmsSoc = states.bmsSoc
|
||||
try {
|
||||
if (oldBmsSoc != bmsSoc ) {
|
||||
scope.launch {
|
||||
if(bmsSoc >1){
|
||||
progress?.also { it.progress = bmsSoc.toInt() }
|
||||
tv_power_cos?.also { it.text = "${bmsSoc.toInt()}%" }
|
||||
}else{
|
||||
val power = (bmsSoc * 100).toInt()
|
||||
progress?.also { it.progress = power }
|
||||
tv_power_cos?.also {it.text = "$power%" }
|
||||
ThreadUtils.runOnUiThread({
|
||||
if (ClickUtils.isClickTooFrequent(this,1000)) {
|
||||
return@runOnUiThread
|
||||
}
|
||||
val bmsSoc = states.bmsSoc
|
||||
try {
|
||||
if (oldBmsSoc != bmsSoc ) {
|
||||
scope.launch {
|
||||
if(bmsSoc >1){
|
||||
progress?.also { it.progress = bmsSoc.toInt() }
|
||||
tv_power_cos?.also { it.text = "${bmsSoc.toInt()}%" }
|
||||
}else{
|
||||
val power = (bmsSoc * 100).toInt()
|
||||
progress?.also { it.progress = power }
|
||||
tv_power_cos?.also {it.text = "$power%" }
|
||||
}
|
||||
}
|
||||
}
|
||||
} finally {
|
||||
oldBmsSoc = bmsSoc
|
||||
}
|
||||
} finally {
|
||||
oldBmsSoc = bmsSoc
|
||||
}
|
||||
},ThreadUtils.MODE.QUEUE)
|
||||
}
|
||||
}
|
||||
@@ -11,7 +11,6 @@ import android.view.animation.Animation
|
||||
import android.widget.ImageView
|
||||
import androidx.constraintlayout.widget.ConstraintLayout
|
||||
import com.mogo.eagle.core.function.api.datacenter.union.IMoGoTurnLightListener
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLamplightListenerManager
|
||||
import com.mogo.eagle.core.function.call.v2x.CallerTurnLightListenerManager
|
||||
import com.mogo.eagle.core.utilcode.util.ThreadUtils
|
||||
import com.mogo.och.shuttle.passenger.R
|
||||
@@ -50,13 +49,11 @@ class M2TurnLightView @JvmOverloads constructor(
|
||||
override fun onAttachedToWindow() {
|
||||
super.onAttachedToWindow()
|
||||
CallerTurnLightListenerManager.addListener(TAG,this)
|
||||
|
||||
TurnLightManager.addTurnLightStatusChangeListener(TAG,this)
|
||||
}
|
||||
|
||||
override fun onDetachedFromWindow() {
|
||||
super.onDetachedFromWindow()
|
||||
CallerChassisLamplightListenerManager.removeListener(TAG)
|
||||
CallerTurnLightListenerManager.removeListener(TAG)
|
||||
TurnLightManager.removeTurnLightStatusChangeListener(TAG)
|
||||
}
|
||||
|
||||
@@ -285,7 +285,7 @@
|
||||
app:layout_constraintLeft_toLeftOf="@+id/speed_tv"
|
||||
app:layout_constraintBottom_toBottomOf="parent" />
|
||||
|
||||
<!-- 转向灯 IMoGoChassisLamplightListener-->
|
||||
<!-- 转向灯-->
|
||||
<com.mogo.och.shuttle.passenger.ui.widget.M2TurnLightView
|
||||
android:id="@+id/turn_light_view"
|
||||
android:layout_width="@dimen/dp_86"
|
||||
|
||||
@@ -11,7 +11,6 @@ import android.view.animation.Animation
|
||||
import android.widget.ImageView
|
||||
import androidx.constraintlayout.widget.ConstraintLayout
|
||||
import com.mogo.eagle.core.function.api.datacenter.union.IMoGoTurnLightListener
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLamplightListenerManager
|
||||
import com.mogo.eagle.core.function.call.v2x.CallerTurnLightListenerManager
|
||||
import com.mogo.eagle.core.utilcode.util.ThreadUtils
|
||||
import com.mogo.och.shuttle.passenger.R
|
||||
@@ -50,13 +49,11 @@ class BusPTurnLightView @JvmOverloads constructor(
|
||||
override fun onAttachedToWindow() {
|
||||
super.onAttachedToWindow()
|
||||
CallerTurnLightListenerManager.addListener(TAG,this)
|
||||
|
||||
TurnLightManager.addTurnLightStatusChangeListener(TAG,this)
|
||||
}
|
||||
|
||||
override fun onDetachedFromWindow() {
|
||||
super.onDetachedFromWindow()
|
||||
CallerChassisLamplightListenerManager.removeListener(TAG)
|
||||
CallerTurnLightListenerManager.removeListener(TAG)
|
||||
TurnLightManager.removeTurnLightStatusChangeListener(TAG)
|
||||
}
|
||||
|
||||
@@ -8,15 +8,16 @@ import android.view.LayoutInflater
|
||||
import android.view.ViewGroup
|
||||
import androidx.constraintlayout.widget.ConstraintLayout
|
||||
import chassis.ChassisStatesOuterClass
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoBatteryManagementSystemListener
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoChassisStatesListener
|
||||
import com.mogo.eagle.core.function.api.hmi.view.IViewControlListener
|
||||
import com.mogo.eagle.core.function.api.setting.IMoGoSkinModeChangeListener
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerBatteryManagementSystemListenerManager
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerChassisStatesListenerManager
|
||||
import com.mogo.eagle.core.function.call.devatools.CallerDevaToolsManager
|
||||
import com.mogo.eagle.core.function.call.hmi.CallerHmiViewControlListenerManager
|
||||
import com.mogo.eagle.core.function.call.setting.CallerSkinModeListenerManager
|
||||
import com.mogo.eagle.core.utilcode.kotlin.*
|
||||
import com.mogo.eagle.core.utilcode.util.ClickUtils
|
||||
import com.mogo.eagle.core.utilcode.util.ThreadUtils
|
||||
import com.mogo.och.shuttle.passenger.R
|
||||
import kotlinx.android.synthetic.main.shuttle_p_m2_view_status_bar.view.progress
|
||||
import kotlinx.android.synthetic.main.shuttle_p_m2_view_status_bar.view.tv_power_cos
|
||||
@@ -30,7 +31,7 @@ import me.jessyan.autosize.utils.AutoSizeUtils
|
||||
class M2StatusBarView @JvmOverloads constructor(
|
||||
context: Context, attrs: AttributeSet? = null
|
||||
) : ConstraintLayout(context, attrs), IViewControlListener, IMoGoSkinModeChangeListener,
|
||||
IMoGoBatteryManagementSystemListener {
|
||||
IMoGoChassisStatesListener {
|
||||
|
||||
companion object {
|
||||
const val TAG = "M2StatusBarView"
|
||||
@@ -60,7 +61,7 @@ class M2StatusBarView @JvmOverloads constructor(
|
||||
// 添加换肤监听
|
||||
CallerSkinModeListenerManager.addListener(TAG, this)
|
||||
//电量
|
||||
CallerBatteryManagementSystemListenerManager.addListener(TAG,this)
|
||||
CallerChassisStatesListenerManager.addListener(TAG,this)
|
||||
|
||||
progress?.also {
|
||||
it.progress = 50
|
||||
@@ -81,30 +82,33 @@ class M2StatusBarView @JvmOverloads constructor(
|
||||
super.onDetachedFromWindow()
|
||||
CallerHmiViewControlListenerManager.removeListener(TAG)
|
||||
CallerSkinModeListenerManager.removeListener(TAG)
|
||||
CallerChassisStatesListenerManager.removeListener(TAG)
|
||||
CallerDevaToolsManager.hideStatusBar()
|
||||
}
|
||||
|
||||
@SuppressLint("SetTextI18n")
|
||||
override fun onBatteryManagementSystemStates(states: ChassisStatesOuterClass.BMSSystemStates) {
|
||||
if (ClickUtils.isClickTooFrequent(this,1000)) {
|
||||
return
|
||||
}
|
||||
val bmsSoc = states.bmsSoc
|
||||
try {
|
||||
if (oldBmsSoc != bmsSoc ) {
|
||||
scope.launch {
|
||||
if(bmsSoc >1){
|
||||
progress?.also { it.progress = bmsSoc.toInt() }
|
||||
tv_power_cos?.also { it.text = "${bmsSoc.toInt()}%" }
|
||||
}else{
|
||||
val power = (bmsSoc * 100).toInt()
|
||||
progress?.also { it.progress = power }
|
||||
tv_power_cos?.also {it.text = "$power%" }
|
||||
ThreadUtils.runOnUiThread({
|
||||
if (ClickUtils.isClickTooFrequent(this,1000)) {
|
||||
return@runOnUiThread
|
||||
}
|
||||
val bmsSoc = states.bmsSoc
|
||||
try {
|
||||
if (oldBmsSoc != bmsSoc ) {
|
||||
scope.launch {
|
||||
if(bmsSoc >1){
|
||||
progress?.also { it.progress = bmsSoc.toInt() }
|
||||
tv_power_cos?.also { it.text = "${bmsSoc.toInt()}%" }
|
||||
}else{
|
||||
val power = (bmsSoc * 100).toInt()
|
||||
progress?.also { it.progress = power }
|
||||
tv_power_cos?.also {it.text = "$power%" }
|
||||
}
|
||||
}
|
||||
}
|
||||
} finally {
|
||||
oldBmsSoc = bmsSoc
|
||||
}
|
||||
} finally {
|
||||
oldBmsSoc = bmsSoc
|
||||
}
|
||||
},ThreadUtils.MODE.QUEUE)
|
||||
}
|
||||
}
|
||||
@@ -11,7 +11,6 @@ import android.view.animation.Animation
|
||||
import android.widget.ImageView
|
||||
import androidx.constraintlayout.widget.ConstraintLayout
|
||||
import com.mogo.eagle.core.function.api.datacenter.union.IMoGoTurnLightListener
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLamplightListenerManager
|
||||
import com.mogo.eagle.core.function.call.v2x.CallerTurnLightListenerManager
|
||||
import com.mogo.eagle.core.utilcode.util.ThreadUtils
|
||||
import com.mogo.och.shuttle.passenger.R
|
||||
@@ -50,13 +49,11 @@ class M2TurnLightView @JvmOverloads constructor(
|
||||
override fun onAttachedToWindow() {
|
||||
super.onAttachedToWindow()
|
||||
CallerTurnLightListenerManager.addListener(TAG,this)
|
||||
|
||||
TurnLightManager.addTurnLightStatusChangeListener(TAG,this)
|
||||
}
|
||||
|
||||
override fun onDetachedFromWindow() {
|
||||
super.onDetachedFromWindow()
|
||||
CallerChassisLamplightListenerManager.removeListener(TAG)
|
||||
CallerTurnLightListenerManager.removeListener(TAG)
|
||||
TurnLightManager.removeTurnLightStatusChangeListener(TAG)
|
||||
}
|
||||
|
||||
@@ -285,7 +285,7 @@
|
||||
app:layout_constraintLeft_toLeftOf="@+id/speed_tv"
|
||||
app:layout_constraintBottom_toBottomOf="parent" />
|
||||
|
||||
<!-- 转向灯 IMoGoChassisLamplightListener-->
|
||||
<!-- 转向灯-->
|
||||
<com.mogo.och.shuttle.passenger.ui.widget.M2TurnLightView
|
||||
android:id="@+id/turn_light_view"
|
||||
android:layout_width="@dimen/dp_86"
|
||||
|
||||
@@ -25,8 +25,7 @@ import kotlin.math.roundToInt
|
||||
* 车辆基本信息:方向盘下方的档位 转向灯 限速 速度 电量 水量
|
||||
*/
|
||||
class SweeperCloudTrafficDataView : ConstraintLayout,
|
||||
IMoGoBatteryManagementSystemListener,
|
||||
IMoGoChassisGearStateListener,
|
||||
IMoGoChassisStatesListener,
|
||||
IMoGoSweeperFutianCleanSystemListener {
|
||||
private var tapPositionView //方向盘下方的档位
|
||||
: TapPositionView? = null
|
||||
@@ -74,18 +73,14 @@ class SweeperCloudTrafficDataView : ConstraintLayout,
|
||||
|
||||
override fun onAttachedToWindow() {
|
||||
super.onAttachedToWindow()
|
||||
//电量
|
||||
CallerBatteryManagementSystemListenerManager.addListener(TAG, this)
|
||||
//档位
|
||||
CallerChassisGearStateListenerManager.addListener(TAG, this)
|
||||
CallerChassisStatesListenerManager.addListener(TAG, this)
|
||||
//清扫车相关数据接口
|
||||
CallerSweeperFutianCleanSystemListenerManager.addListener(TAG, this)
|
||||
}
|
||||
|
||||
override fun onDetachedFromWindow() {
|
||||
super.onDetachedFromWindow()
|
||||
CallerBatteryManagementSystemListenerManager.removeListener(TAG)
|
||||
CallerChassisGearStateListenerManager.removeListener(TAG)
|
||||
CallerChassisStatesListenerManager.removeListener(TAG)
|
||||
CallerSweeperFutianCleanSystemListenerManager.removeListener(TAG)
|
||||
}
|
||||
|
||||
|
||||
@@ -12,9 +12,7 @@ import chassis.Chassis.LightSwitch
|
||||
import chassis.ChassisStatesOuterClass.BMSSystemStates
|
||||
import chassis.ChassisStatesOuterClass.SweeperFuTianTaskSystemStates
|
||||
import com.elegant.utils.UiThreadHandler
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoBatteryManagementSystemListener
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoChassisGearStateListener
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoChassisLamplightListener
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoChassisStatesListener
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoSweeperFutianCleanSystemListener
|
||||
import com.mogo.eagle.core.function.call.autopilot.*
|
||||
import com.mogo.eagle.core.function.hmi.ui.widget.TapPositionView
|
||||
@@ -30,9 +28,7 @@ import kotlin.math.roundToInt
|
||||
* 车辆基本信息:方向盘下方的档位 转向灯 限速 速度 电量 水量
|
||||
*/
|
||||
class SweeperOperateTrafficDataView : ConstraintLayout,
|
||||
IMoGoBatteryManagementSystemListener,
|
||||
IMoGoChassisLamplightListener,
|
||||
IMoGoChassisGearStateListener,
|
||||
IMoGoChassisStatesListener,
|
||||
IMoGoSweeperFutianCleanSystemListener
|
||||
{
|
||||
private var tapPositionView //方向盘下方的档位
|
||||
@@ -81,21 +77,14 @@ class SweeperOperateTrafficDataView : ConstraintLayout,
|
||||
|
||||
override fun onAttachedToWindow() {
|
||||
super.onAttachedToWindow()
|
||||
//电量
|
||||
CallerBatteryManagementSystemListenerManager.addListener(TAG, this)
|
||||
//转向灯
|
||||
CallerChassisLamplightListenerManager.addListener(TAG, this)
|
||||
//档位
|
||||
CallerChassisGearStateListenerManager.addListener(TAG, this)
|
||||
CallerChassisStatesListenerManager.addListener(TAG, this)
|
||||
//清扫车相关数据接口
|
||||
CallerSweeperFutianCleanSystemListenerManager.addListener(TAG, this)
|
||||
}
|
||||
|
||||
override fun onDetachedFromWindow() {
|
||||
super.onDetachedFromWindow()
|
||||
CallerBatteryManagementSystemListenerManager.removeListener(TAG )
|
||||
CallerChassisLamplightListenerManager.removeListener(TAG)
|
||||
CallerChassisGearStateListenerManager.removeListener(TAG)
|
||||
CallerChassisStatesListenerManager.removeListener(TAG )
|
||||
CallerSweeperFutianCleanSystemListenerManager.removeListener(TAG)
|
||||
}
|
||||
|
||||
|
||||
@@ -11,10 +11,8 @@ import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotStatusListener
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotControlManager
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotActionsListenerManager
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerChassisBrakeStateListenerManager
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerChassisGearStateListenerManager
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationGCJ02ListenerManager
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerChassisThrottleStateListenerManager
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerChassisStatesListenerManager
|
||||
import com.mogo.eagle.core.function.main.MainLauncherActivity
|
||||
import com.mogo.eagle.core.utilcode.util.ToastUtils
|
||||
import com.zhjt.mogo.adas.data.bean.MogoReport
|
||||
@@ -129,9 +127,9 @@ class TestAutoPilotBeforeLaunch {
|
||||
}
|
||||
launch(Dispatchers.IO) {
|
||||
while (true) {
|
||||
CallerChassisBrakeStateListenerManager.invokeAutopilotBrake(Random.nextInt(10 .. 100).toFloat())
|
||||
CallerChassisThrottleStateListenerManager.invokeAutopilotThrottle(Random.nextInt(10..100).toFloat())
|
||||
CallerChassisGearStateListenerManager.invokeAutopilotGearData(GEAR_R)
|
||||
CallerChassisStatesListenerManager.invokeAutopilotBrake(Random.nextInt(10 .. 100).toFloat())
|
||||
CallerChassisStatesListenerManager.invokeAutopilotThrottle(Random.nextInt(10..100).toFloat())
|
||||
CallerChassisStatesListenerManager.invokeAutopilotGearData(GEAR_R)
|
||||
val current = CallerChassisLocationGCJ02ListenerManager.getChassisLocationGCJ02()
|
||||
CallerChassisLocationGCJ02ListenerManager.invokeChassisLocationGCJ02(current.also { it.gnssSpeed = Random.nextInt(0 ..20).toFloat(); it.setAcceleration(Random.nextInt(-100, 100).toDouble()) }, DEFAULT)
|
||||
delay(Random.nextInt(10..50).toLong())
|
||||
|
||||
@@ -47,17 +47,10 @@ import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotRecordListener
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotRecordListenerManager.invokeAutopilotRecordConfig
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotRecordListenerManager.invokeAutopilotRecordResult
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotStatisticsListenerManager.invokeAutopilotStatistics
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotVehicleStateListenerManager
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerBackCameraVideoListenerManager
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerBatteryManagementSystemListenerManager
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerChassisAccStateListenerManager
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerChassisBrakeStateListenerManager
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerChassisDoorStateListenerManager
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerChassisGearStateListenerManager
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerChassisGnssListenerManager
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLamplightListenerManager
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerChassisSteeringStateListenerManager
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerChassisThrottleStateListenerManager
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerChassisStatesListenerManager
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerFaultManagementStateListenerManager
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerFsm2024ListenerManager
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerLocalizationStateListenerManager
|
||||
@@ -194,27 +187,10 @@ class MoGoAdasListenerImpl : OnAdasListener {
|
||||
) {
|
||||
CallerAutopilotActionsListenerManager.setVehicleState(vehicleState)
|
||||
if (vehicleState != null) {
|
||||
//刹车灯数据
|
||||
CallerChassisLamplightListenerManager.invokeAutopilotBrakeLightData(vehicleState.brakeLightStatus)
|
||||
//方向盘转向角数据
|
||||
CallerChassisSteeringStateListenerManager.invokeAutopilotSteeringData(vehicleState.steering)
|
||||
//挂档档位数据
|
||||
CallerChassisGearStateListenerManager.invokeAutopilotGearData(vehicleState.gear)
|
||||
//加速度
|
||||
CallerChassisAccStateListenerManager.invokeAutopilotAcc(vehicleState.accel)
|
||||
//油门
|
||||
CallerChassisThrottleStateListenerManager.invokeAutopilotThrottle(vehicleState.throttle)
|
||||
//刹车
|
||||
CallerChassisBrakeStateListenerManager.invokeAutopilotBrake(vehicleState.brake)
|
||||
// 处理车辆状态
|
||||
CallerChassisStatesListenerManager.invokeStates(vehicleState)
|
||||
//车门
|
||||
CallerChassisDoorStateListenerManager.invokeAutopilotDoorState(vehicleState.doorStateList)
|
||||
//电量
|
||||
if (vehicleState.hasBmsSoc()) {
|
||||
CallerBatteryManagementSystemListenerManager.invokeBatteryManagementSystemStates(
|
||||
ChassisStatesOuterClass.BMSSystemStates.newBuilder()
|
||||
.setBmsSoc(vehicleState.bmsSoc).build()
|
||||
)
|
||||
}
|
||||
//清扫车(福田)清扫控制系统状态
|
||||
vehicleState.sweeperFutianCleanSystemState?.also { sweeperState ->
|
||||
val bytes: ByteArray = sweeperState.toByteArray()
|
||||
@@ -233,7 +209,7 @@ class MoGoAdasListenerImpl : OnAdasListener {
|
||||
}
|
||||
}
|
||||
} else {
|
||||
CallerAutopilotVehicleStateListenerManager.invokeAutopilotDataException(header.timestamp.toLong())
|
||||
CallerChassisStatesListenerManager.invokeStatesDataException(header.timestamp.toLong())
|
||||
}
|
||||
}
|
||||
|
||||
@@ -255,36 +231,7 @@ class MoGoAdasListenerImpl : OnAdasListener {
|
||||
) {
|
||||
CallerAutopilotActionsListenerManager.setChassisStates(chassisStates)
|
||||
if (chassisStates != null) {
|
||||
chassisStates.bcmSystemStates?.let { bcmSystemStates ->
|
||||
//刹车灯数据
|
||||
CallerChassisLamplightListenerManager.invokeAutopilotBrakeLightData(bcmSystemStates.brakeLightState != 0)
|
||||
}
|
||||
chassisStates.steerSystemStates?.let {
|
||||
//方向盘转向角数据
|
||||
CallerChassisSteeringStateListenerManager.invokeAutopilotSteeringData(it.steeringWheelAngle)
|
||||
}
|
||||
chassisStates.gearSystemStates?.let { gearSystemStates ->
|
||||
gearSystemStates.gearPosition?.let {
|
||||
//挂档档位数据
|
||||
CallerChassisGearStateListenerManager.invokeAutopilotGearData(it)
|
||||
}
|
||||
}
|
||||
chassisStates.vehicleMotionStates?.let {
|
||||
//加速度
|
||||
CallerChassisAccStateListenerManager.invokeAutopilotAcc(it.acceleration)
|
||||
}
|
||||
chassisStates.drivingSystemStates?.let {
|
||||
//油门
|
||||
CallerChassisThrottleStateListenerManager.invokeAutopilotThrottle(it.throttleResponsePosition)
|
||||
}
|
||||
chassisStates.brakeSystemStates?.let {
|
||||
//刹车
|
||||
CallerChassisBrakeStateListenerManager.invokeAutopilotBrake(it.brakePedalResponsePosition)
|
||||
}
|
||||
chassisStates.bmsSystemStates?.let {
|
||||
//电量
|
||||
CallerBatteryManagementSystemListenerManager.invokeBatteryManagementSystemStates(it)
|
||||
}
|
||||
CallerChassisStatesListenerManager.invokeNewStates(chassisStates)
|
||||
chassisStates.taskSystemStates?.let { taskSystemStates ->
|
||||
taskSystemStates.sweeperFutianTaskSystemStates?.let {
|
||||
//清扫车(福田)清扫控制系统状态
|
||||
@@ -294,7 +241,7 @@ class MoGoAdasListenerImpl : OnAdasListener {
|
||||
}
|
||||
}
|
||||
} else {
|
||||
CallerAutopilotVehicleStateListenerManager.invokeAutopilotDataException(header.timestamp.toLong())
|
||||
CallerChassisStatesListenerManager.invokeStatesDataException(header.timestamp.toLong())
|
||||
}
|
||||
}
|
||||
|
||||
@@ -308,7 +255,7 @@ class MoGoAdasListenerImpl : OnAdasListener {
|
||||
*/
|
||||
override fun onLightSwitch(light: Chassis.LightSwitch) {
|
||||
//转向灯数据
|
||||
CallerChassisLamplightListenerManager.invokeAutopilotLightSwitchData(light)
|
||||
CallerChassisStatesListenerManager.invokeAutopilotLightSwitchData(light)
|
||||
}
|
||||
|
||||
//自动驾驶状态
|
||||
@@ -324,7 +271,6 @@ class MoGoAdasListenerImpl : OnAdasListener {
|
||||
) {
|
||||
if (autopilotState != null) {
|
||||
//工控机模拟时间
|
||||
CallerAutopilotVehicleStateListenerManager.invokeAutopilotTime(header.timestamp.toLong())
|
||||
updateAutoPilotStatus(autopilotState.state, autopilotState.autopilotMode)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,16 +2,17 @@ package com.zhjt.mogo_core_function_devatools.status.flow.autopilot
|
||||
|
||||
import android.content.Context
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotActionsListener
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoChassisThrottleStateListener
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoChassisStatesListener
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotActionsListenerManager
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerChassisThrottleStateListenerManager
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerChassisStatesListenerManager
|
||||
import com.zhjt.mogo.adas.data.bean.LaunchConditionData
|
||||
import com.zhjt.mogo.adas.data.bean.UnableLaunchReason
|
||||
import com.zhjt.mogo.adas.data.bean.UnableLaunchReason.UnableType.CHASSIS_THROTTLE
|
||||
import com.zhjt.mogo_core_function_devatools.status.entity.AcceleratorStatus
|
||||
import com.zhjt.mogo_core_function_devatools.status.flow.IFlow
|
||||
|
||||
internal class AcceleratorImpl(ctx: Context): IFlow<AcceleratorStatus>(ctx), IMoGoChassisThrottleStateListener, IMoGoAutopilotActionsListener {
|
||||
internal class AcceleratorImpl(ctx: Context): IFlow<AcceleratorStatus>(ctx),
|
||||
IMoGoChassisStatesListener, IMoGoAutopilotActionsListener {
|
||||
|
||||
|
||||
companion object {
|
||||
@@ -28,13 +29,13 @@ internal class AcceleratorImpl(ctx: Context): IFlow<AcceleratorStatus>(ctx), IMo
|
||||
private var extra: Any? = null
|
||||
|
||||
override fun onCreate() {
|
||||
CallerChassisThrottleStateListenerManager.addListener(TAG, this)
|
||||
CallerChassisStatesListenerManager.addListener(TAG, this)
|
||||
CallerAutopilotActionsListenerManager.addListener(TAG, this)
|
||||
}
|
||||
|
||||
override fun onDestroy() {
|
||||
super.onDestroy()
|
||||
CallerChassisThrottleStateListenerManager.removeListener(TAG)
|
||||
CallerChassisStatesListenerManager.removeListener(TAG)
|
||||
CallerAutopilotActionsListenerManager.removeListener(TAG)
|
||||
}
|
||||
|
||||
|
||||
@@ -2,16 +2,16 @@ package com.zhjt.mogo_core_function_devatools.status.flow.autopilot
|
||||
|
||||
import android.content.Context
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotActionsListener
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoChassisBrakeStateListener
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoChassisStatesListener
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotActionsListenerManager
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerChassisBrakeStateListenerManager
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerChassisStatesListenerManager
|
||||
import com.zhjt.mogo.adas.data.bean.LaunchConditionData
|
||||
import com.zhjt.mogo.adas.data.bean.UnableLaunchReason
|
||||
import com.zhjt.mogo.adas.data.bean.UnableLaunchReason.UnableType.CHASSIS_BRAKE
|
||||
import com.zhjt.mogo_core_function_devatools.status.entity.BrakeStatus
|
||||
import com.zhjt.mogo_core_function_devatools.status.flow.IFlow
|
||||
|
||||
internal class BrakeImpl(ctx: Context): IFlow<BrakeStatus>(ctx), IMoGoChassisBrakeStateListener, IMoGoAutopilotActionsListener {
|
||||
internal class BrakeImpl(ctx: Context): IFlow<BrakeStatus>(ctx), IMoGoChassisStatesListener, IMoGoAutopilotActionsListener {
|
||||
|
||||
companion object {
|
||||
private const val TAG = "BrakeImpl"
|
||||
@@ -27,13 +27,13 @@ internal class BrakeImpl(ctx: Context): IFlow<BrakeStatus>(ctx), IMoGoChassisBra
|
||||
private var extra: Any? = null
|
||||
|
||||
override fun onCreate() {
|
||||
CallerChassisBrakeStateListenerManager.addListener(TAG, this)
|
||||
CallerChassisStatesListenerManager.addListener(TAG, this)
|
||||
CallerAutopilotActionsListenerManager.addListener(TAG, this)
|
||||
}
|
||||
|
||||
override fun onDestroy() {
|
||||
super.onDestroy()
|
||||
CallerChassisBrakeStateListenerManager.removeListener(TAG)
|
||||
CallerChassisStatesListenerManager.removeListener(TAG)
|
||||
CallerAutopilotActionsListenerManager.removeListener(TAG)
|
||||
}
|
||||
|
||||
|
||||
@@ -4,17 +4,19 @@ import android.content.Context
|
||||
import chassis.Chassis.LightSwitch
|
||||
import chassis.Chassis.LightSwitch.LIGHT_FLASH
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotActionsListener
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoChassisLamplightListener
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoChassisStatesListener
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotActionsListenerManager
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLamplightListenerManager
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.Logger
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerChassisStatesListenerManager
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_DEVA
|
||||
import com.zhjt.mogo.adas.data.bean.LaunchConditionData
|
||||
import com.zhjt.mogo.adas.data.bean.UnableLaunchReason
|
||||
import com.zhjt.mogo.adas.data.bean.UnableLaunchReason.UnableType.CHASSIS_HAZARD_LIGHTS
|
||||
import com.zhjt.mogo_core_function_devatools.status.entity.DoubleFlashStatus
|
||||
import com.zhjt.mogo_core_function_devatools.status.flow.IFlow
|
||||
|
||||
internal class DoubleFlashImpl(ctx: Context): IFlow<DoubleFlashStatus>(ctx), IMoGoChassisLamplightListener, IMoGoAutopilotActionsListener {
|
||||
internal class DoubleFlashImpl(ctx: Context): IFlow<DoubleFlashStatus>(ctx),
|
||||
IMoGoChassisStatesListener, IMoGoAutopilotActionsListener {
|
||||
|
||||
companion object {
|
||||
private const val TAG = "DoubleFlashImpl"
|
||||
@@ -30,19 +32,19 @@ internal class DoubleFlashImpl(ctx: Context): IFlow<DoubleFlashStatus>(ctx), IMo
|
||||
private var extra: Any? = null
|
||||
|
||||
override fun onCreate() {
|
||||
CallerChassisLamplightListenerManager.addListener(TAG, this)
|
||||
CallerChassisStatesListenerManager.addListener(TAG, this)
|
||||
CallerAutopilotActionsListenerManager.addListener(TAG, this)
|
||||
}
|
||||
|
||||
override fun onDestroy() {
|
||||
super.onDestroy()
|
||||
CallerChassisLamplightListenerManager.removeListener(TAG)
|
||||
CallerChassisStatesListenerManager.removeListener(TAG)
|
||||
CallerAutopilotActionsListenerManager.removeListener(TAG)
|
||||
}
|
||||
|
||||
override fun onAutopilotLightSwitchData(lightSwitch: LightSwitch?) {
|
||||
super.onAutopilotLightSwitchData(lightSwitch)
|
||||
Logger.d(TAG, "-- onAutopilotLightSwitchData --: $lightSwitch")
|
||||
CallerLogger.d("$M_DEVA$TAG", "-- onAutopilotLightSwitchData --: $lightSwitch")
|
||||
if (last != lightSwitch) {
|
||||
last = lightSwitch
|
||||
if (lightSwitch == LIGHT_FLASH) {
|
||||
|
||||
@@ -4,16 +4,17 @@ import android.content.Context
|
||||
import chassis.Chassis.GearPosition
|
||||
import chassis.Chassis.GearPosition.GEAR_NONE
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotActionsListener
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoChassisGearStateListener
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoChassisStatesListener
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotActionsListenerManager
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerChassisGearStateListenerManager
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerChassisStatesListenerManager
|
||||
import com.zhjt.mogo.adas.data.bean.LaunchConditionData
|
||||
import com.zhjt.mogo.adas.data.bean.UnableLaunchReason
|
||||
import com.zhjt.mogo.adas.data.bean.UnableLaunchReason.UnableType.CHASSIS_GEAR
|
||||
import com.zhjt.mogo_core_function_devatools.status.entity.GearStatus
|
||||
import com.zhjt.mogo_core_function_devatools.status.flow.IFlow
|
||||
|
||||
internal class GearImpl(ctx: Context): IFlow<GearStatus>(ctx), IMoGoChassisGearStateListener, IMoGoAutopilotActionsListener {
|
||||
internal class GearImpl(ctx: Context): IFlow<GearStatus>(ctx), IMoGoAutopilotActionsListener,
|
||||
IMoGoChassisStatesListener {
|
||||
|
||||
companion object {
|
||||
private const val TAG = "GeerImpl"
|
||||
@@ -29,13 +30,13 @@ internal class GearImpl(ctx: Context): IFlow<GearStatus>(ctx), IMoGoChassisGearS
|
||||
private var extra: Any? = null
|
||||
|
||||
override fun onCreate() {
|
||||
CallerChassisGearStateListenerManager.addListener(TAG, this)
|
||||
CallerChassisStatesListenerManager.addListener(TAG, this)
|
||||
CallerAutopilotActionsListenerManager.addListener(TAG, this)
|
||||
}
|
||||
|
||||
override fun onDestroy() {
|
||||
super.onDestroy()
|
||||
CallerChassisGearStateListenerManager.removeListener(TAG)
|
||||
CallerChassisStatesListenerManager.removeListener(TAG)
|
||||
CallerAutopilotActionsListenerManager.removeListener(TAG)
|
||||
}
|
||||
|
||||
|
||||
@@ -2,9 +2,9 @@ package com.zhjt.mogo_core_function_devatools.status.flow.autopilot
|
||||
|
||||
import android.content.Context
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotActionsListener
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoChassisSteeringStateListener
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoChassisStatesListener
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotActionsListenerManager
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerChassisSteeringStateListenerManager
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerChassisStatesListenerManager
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.Logger
|
||||
import com.zhjt.mogo.adas.data.bean.LaunchConditionData
|
||||
import com.zhjt.mogo.adas.data.bean.UnableLaunchReason
|
||||
@@ -12,7 +12,7 @@ import com.zhjt.mogo.adas.data.bean.UnableLaunchReason.UnableType.CHASSIS_STEERI
|
||||
import com.zhjt.mogo_core_function_devatools.status.entity.SteerStatus
|
||||
import com.zhjt.mogo_core_function_devatools.status.flow.IFlow
|
||||
|
||||
internal class SteerImpl(ctx: Context): IFlow<SteerStatus>(ctx), IMoGoChassisSteeringStateListener, IMoGoAutopilotActionsListener {
|
||||
internal class SteerImpl(ctx: Context): IFlow<SteerStatus>(ctx), IMoGoChassisStatesListener, IMoGoAutopilotActionsListener {
|
||||
|
||||
companion object {
|
||||
private const val TAG = "SteerImpl"
|
||||
@@ -28,13 +28,13 @@ internal class SteerImpl(ctx: Context): IFlow<SteerStatus>(ctx), IMoGoChassisSte
|
||||
private var extra: Any? = null
|
||||
|
||||
override fun onCreate() {
|
||||
CallerChassisSteeringStateListenerManager.addListener(TAG, this)
|
||||
CallerChassisStatesListenerManager.addListener(TAG, this)
|
||||
CallerAutopilotActionsListenerManager.addListener(TAG, this)
|
||||
}
|
||||
|
||||
override fun onDestroy() {
|
||||
super.onDestroy()
|
||||
CallerChassisSteeringStateListenerManager.removeListener(TAG)
|
||||
CallerChassisStatesListenerManager.removeListener(TAG)
|
||||
CallerAutopilotActionsListenerManager.removeListener(TAG)
|
||||
}
|
||||
|
||||
|
||||
@@ -5,8 +5,11 @@ import android.util.Log
|
||||
import chassis.Chassis.GearPosition
|
||||
import chassis.Chassis.LightSwitch
|
||||
import chassis.ChassisStatesOuterClass
|
||||
import com.mogo.eagle.core.function.api.autopilot.*
|
||||
import com.mogo.eagle.core.function.call.autopilot.*
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotStatusListener
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoChassisStatesListener
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoSweeperFutianCleanSystemListener
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerChassisStatesListenerManager
|
||||
import com.mogo.eagle.core.utilcode.kotlin.safeCancel
|
||||
import com.zhjt.mogo.adas.data.AdasConstants
|
||||
import com.zhjt.mogo_core_function_devatools.status.entity.CanStatus
|
||||
@@ -19,19 +22,10 @@ import system_master.SystemStatusInfo.StatusInfo
|
||||
import java.util.concurrent.atomic.AtomicInteger
|
||||
|
||||
internal class CanImpl(ctx: Context) :
|
||||
IFlow<CanStatus>(ctx),
|
||||
|
||||
IMoGoAutopilotVehicleStateListener,
|
||||
|
||||
IMoGoChassisAccStateListener,
|
||||
IMoGoChassisSteeringStateListener,
|
||||
IMoGoChassisGearStateListener,
|
||||
IMoGoChassisBrakeStateListener,
|
||||
IMoGoChassisThrottleStateListener,
|
||||
|
||||
IMoGoAutopilotStatusListener,
|
||||
IMoGoChassisLamplightListener,
|
||||
IMoGoSweeperFutianCleanSystemListener {
|
||||
IFlow<CanStatus>(ctx),
|
||||
IMoGoChassisStatesListener,
|
||||
IMoGoAutopilotStatusListener,
|
||||
IMoGoSweeperFutianCleanSystemListener {
|
||||
|
||||
companion object {
|
||||
const val TAG = "CanImpl"
|
||||
@@ -43,14 +37,8 @@ internal class CanImpl(ctx: Context) :
|
||||
override fun onCreate() {
|
||||
send(CanStatus(CallerAutoPilotStatusListenerManager.isConnect()))
|
||||
|
||||
CallerChassisAccStateListenerManager.addListener(TAG, this)
|
||||
CallerChassisBrakeStateListenerManager.addListener(TAG, this)
|
||||
CallerChassisGearStateListenerManager.addListener(TAG, this)
|
||||
CallerChassisSteeringStateListenerManager.addListener(TAG, this)
|
||||
CallerChassisThrottleStateListenerManager.addListener(TAG, this)
|
||||
|
||||
CallerChassisStatesListenerManager.addListener(TAG, this)
|
||||
CallerAutoPilotStatusListenerManager.addListener(TAG, this)
|
||||
CallerChassisLamplightListenerManager.addListener(TAG, this)
|
||||
}
|
||||
|
||||
override fun onAutopilotLightSwitchData(lightSwitch: LightSwitch?) {
|
||||
@@ -75,7 +63,10 @@ internal class CanImpl(ctx: Context) :
|
||||
send(CanStatus(isCanEnabled()))
|
||||
}
|
||||
|
||||
override fun onAutopilotIpcConnectStatusChanged(status: AdasConstants.IpcConnectionStatus, reason: String?) {
|
||||
override fun onAutopilotIpcConnectStatusChanged(
|
||||
status: AdasConstants.IpcConnectionStatus,
|
||||
reason: String?
|
||||
) {
|
||||
super.onAutopilotIpcConnectStatusChanged(status, reason)
|
||||
send(CanStatus(isCanEnabled()))
|
||||
}
|
||||
@@ -101,16 +92,19 @@ internal class CanImpl(ctx: Context) :
|
||||
override fun onSweeperFutianCleanSystemState(cleanSystemState: ChassisStatesOuterClass.SweeperFuTianTaskSystemStates) {
|
||||
send(CanStatus(isCanEnabled()))
|
||||
}
|
||||
|
||||
override fun onSweeperFutianTaskIndexData(roboSweeperTaskIndex: RoboSweeperTaskIndexOuterClass.RoboSweeperTaskIndex) {
|
||||
|
||||
}
|
||||
|
||||
override fun onAutopilotGuardian(guardianInfo: MogoReportMessage?) {
|
||||
super.onAutopilotGuardian(guardianInfo)
|
||||
send(CanStatus(isCanEnabled()))
|
||||
}
|
||||
|
||||
override fun onAutopilotStatusRespByQuery(status: StatusInfo) {
|
||||
val state = status.healthInfoList?.find { "can_adapter".equals(it.name, true) }?.state?.ordinal
|
||||
val state =
|
||||
status.healthInfoList?.find { "can_adapter".equals(it.name, true) }?.state?.ordinal
|
||||
Log.d(TAG, "state: $state")
|
||||
if (state != null) {
|
||||
this.state.set(state)
|
||||
@@ -118,7 +112,8 @@ internal class CanImpl(ctx: Context) :
|
||||
}
|
||||
|
||||
override fun onSystemStatus(statusInf: SsmInfo.SsmStatusInf) {
|
||||
val state = statusInf.healthInfoList?.find { "can_adapter".equals(it.name, true) }?.state?.ordinal
|
||||
val state =
|
||||
statusInf.healthInfoList?.find { "can_adapter".equals(it.name, true) }?.state?.ordinal
|
||||
Log.d(TAG, "state: $state")
|
||||
if (state != null) {
|
||||
this.state.set(state)
|
||||
@@ -128,12 +123,7 @@ internal class CanImpl(ctx: Context) :
|
||||
override fun onDestroy() {
|
||||
super.onDestroy()
|
||||
job?.safeCancel()
|
||||
CallerChassisAccStateListenerManager.removeListener(TAG)
|
||||
CallerChassisBrakeStateListenerManager.removeListener(TAG)
|
||||
CallerChassisGearStateListenerManager.removeListener(TAG)
|
||||
CallerChassisSteeringStateListenerManager.removeListener(TAG)
|
||||
CallerChassisThrottleStateListenerManager.removeListener(TAG)
|
||||
CallerChassisStatesListenerManager.removeListener(TAG)
|
||||
CallerAutoPilotStatusListenerManager.removeListener(TAG)
|
||||
CallerChassisLamplightListenerManager.removeListener(TAG)
|
||||
}
|
||||
}
|
||||
@@ -24,7 +24,7 @@ import kotlinx.coroutines.flow.*
|
||||
import java.util.concurrent.atomic.AtomicReference
|
||||
import kotlin.math.*
|
||||
|
||||
class M1LookAroundView: SurfaceView, SurfaceHolder.Callback, Runnable, IMoGoChassisSteeringStateListener {
|
||||
class M1LookAroundView: SurfaceView, SurfaceHolder.Callback, Runnable, IMoGoChassisStatesListener {
|
||||
|
||||
constructor(context: Context?) : super(context)
|
||||
constructor(context: Context?, attrs: AttributeSet?) : super(context, attrs)
|
||||
@@ -279,7 +279,7 @@ class M1LookAroundView: SurfaceView, SurfaceHolder.Callback, Runnable, IMoGoChas
|
||||
|
||||
override fun onAttachedToWindow() {
|
||||
super.onAttachedToWindow()
|
||||
CallerChassisSteeringStateListenerManager.addListener(TAG, this)
|
||||
CallerChassisStatesListenerManager.addListener(TAG, this)
|
||||
CallerAutoPilotControlManager.setIsSubscribeM1StitchedVideo(true)
|
||||
scope.launch(ThreadUtils.getCpuPool().asCoroutineDispatcher()) {
|
||||
CallerDevaToolsManager.lookAroundProvider()?.flow()?.also { flow ->
|
||||
@@ -306,7 +306,7 @@ class M1LookAroundView: SurfaceView, SurfaceHolder.Callback, Runnable, IMoGoChas
|
||||
|
||||
override fun onDetachedFromWindow() {
|
||||
super.onDetachedFromWindow()
|
||||
CallerChassisSteeringStateListenerManager.removeListener(TAG)
|
||||
CallerChassisStatesListenerManager.removeListener(TAG)
|
||||
CallerAutoPilotControlManager.setIsSubscribeM1StitchedVideo(false)
|
||||
handler.get()?.looper?.quitSafely()
|
||||
}
|
||||
|
||||
@@ -27,7 +27,6 @@ import androidx.core.view.MenuCompat
|
||||
import androidx.core.view.isVisible
|
||||
import androidx.lifecycle.lifecycleScope
|
||||
import chassis.Chassis
|
||||
import com.alibaba.android.arouter.launcher.ARouter
|
||||
import com.mogo.cloud.network.cronet.NetworkQualityListener
|
||||
import com.mogo.cloud.network.cronet.QuicConfig
|
||||
import com.mogo.cloud.passport.MoGoAiCloudClient
|
||||
@@ -41,7 +40,6 @@ import com.mogo.commons.voice.AIAssist
|
||||
import com.mogo.eagle.core.data.app.AppConfigInfo
|
||||
import com.mogo.eagle.core.data.config.FunctionBuildConfig
|
||||
import com.mogo.eagle.core.data.config.HmiBuildConfig
|
||||
import com.mogo.eagle.core.data.config.JunkConfig
|
||||
import com.mogo.eagle.core.data.constants.MoGoConfig
|
||||
import com.mogo.eagle.core.data.deva.bizconfig.FuncBizConfig
|
||||
import com.mogo.eagle.core.data.deva.bizconfig.FuncBizConfig.Companion.BIZ_BAG_RECORD
|
||||
@@ -58,7 +56,13 @@ import com.mogo.eagle.core.data.map.MogoLocation
|
||||
import com.mogo.eagle.core.data.multidisplay.TelematicConstant
|
||||
import com.mogo.eagle.core.data.obu.MogoObuConst
|
||||
import com.mogo.eagle.core.data.obu.ObuStatusInfo
|
||||
import com.mogo.eagle.core.function.api.autopilot.*
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotIdentifyListener
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotStatusListener
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoChassisLocationWGS84Listener
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoChassisStatesListener
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoPlanningRottingListener
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoPlanningTrajectoryListener
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoSweeperFutianCleanSystemListener
|
||||
import com.mogo.eagle.core.function.api.cloud.IMoGoCloudListener
|
||||
import com.mogo.eagle.core.function.api.datacenter.obu.IMoGoObuConnectListener
|
||||
import com.mogo.eagle.core.function.api.datacenter.obu.IMoGoObuInfoListener
|
||||
@@ -68,14 +72,20 @@ import com.mogo.eagle.core.function.api.hmi.view.IViewControlListener
|
||||
import com.mogo.eagle.core.function.api.hmi.view.IViewControlListener.Companion.FUNC_MODE_DEMO
|
||||
import com.mogo.eagle.core.function.api.hmi.view.IViewControlListener.Companion.FUNC_MODE_RAIN
|
||||
import com.mogo.eagle.core.function.api.setting.ISopSettingListener
|
||||
import com.mogo.eagle.core.function.call.autopilot.*
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotControlManager
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotIdentifyListenerManager
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationGCJ02ListenerManager
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationWGS84ListenerManager
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerChassisStatesListenerManager
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerPlanningRottingListenerManager
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerPlanningTrajectoryListenerManager
|
||||
import com.mogo.eagle.core.function.call.cloud.CallerCloudCertManager
|
||||
import com.mogo.eagle.core.function.call.cloud.CallerCloudListenerManager
|
||||
import com.mogo.eagle.core.function.call.devatools.CallerDevaToolsFuncConfigListenerManager
|
||||
import com.mogo.eagle.core.function.call.devatools.CallerDevaToolsListenerManager
|
||||
import com.mogo.eagle.core.function.call.devatools.CallerDevaToolsManager
|
||||
import com.mogo.eagle.core.function.call.hmi.CallerHmiViewControlListenerManager
|
||||
import com.mogo.eagle.core.function.call.map.CallerMapRoadListenerManager
|
||||
import com.mogo.eagle.core.function.call.map.CallerMapUIServiceManager
|
||||
import com.mogo.eagle.core.function.call.obu.CallerObuApiManager
|
||||
import com.mogo.eagle.core.function.call.obu.CallerObuConnectListenerManager
|
||||
@@ -98,22 +108,213 @@ import com.mogo.eagle.core.utilcode.mogo.logger.Logger
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant
|
||||
import com.mogo.eagle.core.utilcode.mogo.permissions.BackgrounderPermission
|
||||
import com.mogo.eagle.core.utilcode.mogo.toast.TipToast
|
||||
import com.mogo.eagle.core.utilcode.util.*
|
||||
import com.mogo.eagle.core.utilcode.util.ActivityUtils
|
||||
import com.mogo.eagle.core.utilcode.util.AppUtils
|
||||
import com.mogo.eagle.core.utilcode.util.BarUtils
|
||||
import com.mogo.eagle.core.utilcode.util.CommonUtils
|
||||
import com.mogo.eagle.core.utilcode.util.DeviceUtils
|
||||
import com.mogo.eagle.core.utilcode.util.KeyboardUtils
|
||||
import com.mogo.eagle.core.utilcode.util.NetworkUtils
|
||||
import com.mogo.eagle.core.utilcode.util.ParseVersionUtils
|
||||
import com.mogo.eagle.core.utilcode.util.ScreenUtils
|
||||
import com.mogo.eagle.core.utilcode.util.StringUtils
|
||||
import com.mogo.eagle.core.utilcode.util.ThreadUtils
|
||||
import com.mogo.eagle.core.utilcode.util.TimeUtils
|
||||
import com.mogo.eagle.core.utilcode.util.ToastUtils
|
||||
import com.mogo.eagle.core.utilcode.util.UiThreadHandler
|
||||
import com.mogo.eagle.core.utilcode.util.Utils
|
||||
import com.mogo.map.MogoData.Companion.mogoMapData
|
||||
import com.mogo.map.uicontroller.VisualAngleMode
|
||||
import com.mogo.map.uicontroller.VisualAngleMode.*
|
||||
import com.mogo.test.crashreport.CrashReportConstants
|
||||
import com.mogo.test.crashreport.ITestCrashReportProvider
|
||||
import com.mogo.map.uicontroller.VisualAngleMode.MAP_STYLE_VR_ANGLE_300
|
||||
import com.mogo.map.uicontroller.VisualAngleMode.MAP_STYLE_VR_ANGLE_CROSS
|
||||
import com.mogo.map.uicontroller.VisualAngleMode.MAP_STYLE_VR_ANGLE_TOP
|
||||
import com.mogo.map.uicontroller.VisualAngleMode.MODE_LONG_SIGHT
|
||||
import com.mogo.tts.base.IMogoTTSCallback
|
||||
import com.zhidaoauto.map.data.road.RoadCross
|
||||
import com.zhjt.mogo.adas.data.AdasConstants
|
||||
import com.zhjt.service.chain.ChainLog
|
||||
import kotlinx.android.synthetic.main.view_debug_setting.view.*
|
||||
import kotlinx.coroutines.*
|
||||
import kotlinx.android.synthetic.main.view_debug_setting.view.appVersionInfoLayout
|
||||
import kotlinx.android.synthetic.main.view_debug_setting.view.brakeThresholdDivider
|
||||
import kotlinx.android.synthetic.main.view_debug_setting.view.btChangeEnv
|
||||
import kotlinx.android.synthetic.main.view_debug_setting.view.btnAppReboot
|
||||
import kotlinx.android.synthetic.main.view_debug_setting.view.btnBrakeThreshold
|
||||
import kotlinx.android.synthetic.main.view_debug_setting.view.btnConnectServerIp
|
||||
import kotlinx.android.synthetic.main.view_debug_setting.view.btnDisconnectIpc
|
||||
import kotlinx.android.synthetic.main.view_debug_setting.view.btnDrawFusion
|
||||
import kotlinx.android.synthetic.main.view_debug_setting.view.btnIpcReboot
|
||||
import kotlinx.android.synthetic.main.view_debug_setting.view.btnPointCloudColor
|
||||
import kotlinx.android.synthetic.main.view_debug_setting.view.btnPointCloudSize
|
||||
import kotlinx.android.synthetic.main.view_debug_setting.view.btnRecordBag
|
||||
import kotlinx.android.synthetic.main.view_debug_setting.view.btnRecordPackage
|
||||
import kotlinx.android.synthetic.main.view_debug_setting.view.btnSetAutopilotIP
|
||||
import kotlinx.android.synthetic.main.view_debug_setting.view.btnSetFifty
|
||||
import kotlinx.android.synthetic.main.view_debug_setting.view.btnSetObuIP
|
||||
import kotlinx.android.synthetic.main.view_debug_setting.view.btnSetOneHundred
|
||||
import kotlinx.android.synthetic.main.view_debug_setting.view.btnStartTTS
|
||||
import kotlinx.android.synthetic.main.view_debug_setting.view.btnThresholdDefine
|
||||
import kotlinx.android.synthetic.main.view_debug_setting.view.btn_cache_hd_map
|
||||
import kotlinx.android.synthetic.main.view_debug_setting.view.cbAdasAutoPilot
|
||||
import kotlinx.android.synthetic.main.view_debug_setting.view.cbAdasDataTrack
|
||||
import kotlinx.android.synthetic.main.view_debug_setting.view.cbAdasLog
|
||||
import kotlinx.android.synthetic.main.view_debug_setting.view.cbAdasTrafficlight
|
||||
import kotlinx.android.synthetic.main.view_debug_setting.view.cbAdasTrajectory
|
||||
import kotlinx.android.synthetic.main.view_debug_setting.view.cbAdasVehicle
|
||||
import kotlinx.android.synthetic.main.view_debug_setting.view.cbBusLog
|
||||
import kotlinx.android.synthetic.main.view_debug_setting.view.cbDevaLog
|
||||
import kotlinx.android.synthetic.main.view_debug_setting.view.cbHmiLog
|
||||
import kotlinx.android.synthetic.main.view_debug_setting.view.cbMapLog
|
||||
import kotlinx.android.synthetic.main.view_debug_setting.view.cbNetworkLog
|
||||
import kotlinx.android.synthetic.main.view_debug_setting.view.cbObuLog
|
||||
import kotlinx.android.synthetic.main.view_debug_setting.view.cbSsl
|
||||
import kotlinx.android.synthetic.main.view_debug_setting.view.cbSweeperPLog
|
||||
import kotlinx.android.synthetic.main.view_debug_setting.view.cbTaxiLog
|
||||
import kotlinx.android.synthetic.main.view_debug_setting.view.cbTaxiPLog
|
||||
import kotlinx.android.synthetic.main.view_debug_setting.view.cbTraceLog
|
||||
import kotlinx.android.synthetic.main.view_debug_setting.view.cbV2xLog
|
||||
import kotlinx.android.synthetic.main.view_debug_setting.view.changesight_back_btn
|
||||
import kotlinx.android.synthetic.main.view_debug_setting.view.changesight_cross_btn
|
||||
import kotlinx.android.synthetic.main.view_debug_setting.view.changesight_far_btn
|
||||
import kotlinx.android.synthetic.main.view_debug_setting.view.changesight_top_btn
|
||||
import kotlinx.android.synthetic.main.view_debug_setting.view.clDebugContain
|
||||
import kotlinx.android.synthetic.main.view_debug_setting.view.commonLayout
|
||||
import kotlinx.android.synthetic.main.view_debug_setting.view.controlCenterLayout
|
||||
import kotlinx.android.synthetic.main.view_debug_setting.view.deviceBindLayout
|
||||
import kotlinx.android.synthetic.main.view_debug_setting.view.domainControllerLayout
|
||||
import kotlinx.android.synthetic.main.view_debug_setting.view.eagleEyeControllerLayout
|
||||
import kotlinx.android.synthetic.main.view_debug_setting.view.etAutopilotIP
|
||||
import kotlinx.android.synthetic.main.view_debug_setting.view.etConnectServerIp
|
||||
import kotlinx.android.synthetic.main.view_debug_setting.view.etInputBrakeThreshold
|
||||
import kotlinx.android.synthetic.main.view_debug_setting.view.etInputRecordBagTime
|
||||
import kotlinx.android.synthetic.main.view_debug_setting.view.etInputRecordTime
|
||||
import kotlinx.android.synthetic.main.view_debug_setting.view.etLogCatch
|
||||
import kotlinx.android.synthetic.main.view_debug_setting.view.etObuIP
|
||||
import kotlinx.android.synthetic.main.view_debug_setting.view.etPointCloudColor
|
||||
import kotlinx.android.synthetic.main.view_debug_setting.view.etPointCloudSize
|
||||
import kotlinx.android.synthetic.main.view_debug_setting.view.etTTSContent
|
||||
import kotlinx.android.synthetic.main.view_debug_setting.view.etThreshold
|
||||
import kotlinx.android.synthetic.main.view_debug_setting.view.exportAllLogs
|
||||
import kotlinx.android.synthetic.main.view_debug_setting.view.hdMapControllerLayout
|
||||
import kotlinx.android.synthetic.main.view_debug_setting.view.hmiControllerLayout
|
||||
import kotlinx.android.synthetic.main.view_debug_setting.view.logLoadingView
|
||||
import kotlinx.android.synthetic.main.view_debug_setting.view.logcatCenterLayout
|
||||
import kotlinx.android.synthetic.main.view_debug_setting.view.obuConnectStatusTv
|
||||
import kotlinx.android.synthetic.main.view_debug_setting.view.obuControllerLayout
|
||||
import kotlinx.android.synthetic.main.view_debug_setting.view.reportMsgLayout
|
||||
import kotlinx.android.synthetic.main.view_debug_setting.view.reset_changesight
|
||||
import kotlinx.android.synthetic.main.view_debug_setting.view.rgGpsProvider
|
||||
import kotlinx.android.synthetic.main.view_debug_setting.view.statusCenterLayout
|
||||
import kotlinx.android.synthetic.main.view_debug_setting.view.swDevelopMode
|
||||
import kotlinx.android.synthetic.main.view_debug_setting.view.tbADASLog
|
||||
import kotlinx.android.synthetic.main.view_debug_setting.view.tbAppUpgrade
|
||||
import kotlinx.android.synthetic.main.view_debug_setting.view.tbAppVersionInfo
|
||||
import kotlinx.android.synthetic.main.view_debug_setting.view.tbBeautyMode
|
||||
import kotlinx.android.synthetic.main.view_debug_setting.view.tbBusStationStrategyBorderPoint
|
||||
import kotlinx.android.synthetic.main.view_debug_setting.view.tbCarAperture
|
||||
import kotlinx.android.synthetic.main.view_debug_setting.view.tbChangeAutoPilotStatus
|
||||
import kotlinx.android.synthetic.main.view_debug_setting.view.tbChangeCurrentCarIcon
|
||||
import kotlinx.android.synthetic.main.view_debug_setting.view.tbChangeCurrentSkinMode
|
||||
import kotlinx.android.synthetic.main.view_debug_setting.view.tbControlCenter
|
||||
import kotlinx.android.synthetic.main.view_debug_setting.view.tbControlPassengerDriverMonitor
|
||||
import kotlinx.android.synthetic.main.view_debug_setting.view.tbCronet
|
||||
import kotlinx.android.synthetic.main.view_debug_setting.view.tbDeviceBind
|
||||
import kotlinx.android.synthetic.main.view_debug_setting.view.tbDomainController
|
||||
import kotlinx.android.synthetic.main.view_debug_setting.view.tbDrawPointCloudData
|
||||
import kotlinx.android.synthetic.main.view_debug_setting.view.tbEagleEyeController
|
||||
import kotlinx.android.synthetic.main.view_debug_setting.view.tbHdMapController
|
||||
import kotlinx.android.synthetic.main.view_debug_setting.view.tbHdMapLog
|
||||
import kotlinx.android.synthetic.main.view_debug_setting.view.tbHmiController
|
||||
import kotlinx.android.synthetic.main.view_debug_setting.view.tbIsDemoMode
|
||||
import kotlinx.android.synthetic.main.view_debug_setting.view.tbIsDrawAutopilotTrajectoryData
|
||||
import kotlinx.android.synthetic.main.view_debug_setting.view.tbIsDrawIdentifyData
|
||||
import kotlinx.android.synthetic.main.view_debug_setting.view.tbIsDrawPath
|
||||
import kotlinx.android.synthetic.main.view_debug_setting.view.tbIsDrawUnknownIdentifyData
|
||||
import kotlinx.android.synthetic.main.view_debug_setting.view.tbIsRainMode
|
||||
import kotlinx.android.synthetic.main.view_debug_setting.view.tbIsStrictMode
|
||||
import kotlinx.android.synthetic.main.view_debug_setting.view.tbLogCatch
|
||||
import kotlinx.android.synthetic.main.view_debug_setting.view.tbLogDebugView
|
||||
import kotlinx.android.synthetic.main.view_debug_setting.view.tbLogcatCenter
|
||||
import kotlinx.android.synthetic.main.view_debug_setting.view.tbNetLog
|
||||
import kotlinx.android.synthetic.main.view_debug_setting.view.tbObuController
|
||||
import kotlinx.android.synthetic.main.view_debug_setting.view.tbObuLog
|
||||
import kotlinx.android.synthetic.main.view_debug_setting.view.tbObuWarningFusionUnion
|
||||
import kotlinx.android.synthetic.main.view_debug_setting.view.tbOpenAcceleration
|
||||
import kotlinx.android.synthetic.main.view_debug_setting.view.tbOpenSnBinding
|
||||
import kotlinx.android.synthetic.main.view_debug_setting.view.tbReportMore
|
||||
import kotlinx.android.synthetic.main.view_debug_setting.view.tbReportWarning
|
||||
import kotlinx.android.synthetic.main.view_debug_setting.view.tbRouteDynamicEffect
|
||||
import kotlinx.android.synthetic.main.view_debug_setting.view.tbSelfLog
|
||||
import kotlinx.android.synthetic.main.view_debug_setting.view.tbStartAutopilotCommand
|
||||
import kotlinx.android.synthetic.main.view_debug_setting.view.tbStatusCenter
|
||||
import kotlinx.android.synthetic.main.view_debug_setting.view.tbTTSCenter
|
||||
import kotlinx.android.synthetic.main.view_debug_setting.view.tbTraceEnable
|
||||
import kotlinx.android.synthetic.main.view_debug_setting.view.tbVehicleStateController
|
||||
import kotlinx.android.synthetic.main.view_debug_setting.view.trackerIPCProvider
|
||||
import kotlinx.android.synthetic.main.view_debug_setting.view.trackerProvider
|
||||
import kotlinx.android.synthetic.main.view_debug_setting.view.ttsCenterContainer
|
||||
import kotlinx.android.synthetic.main.view_debug_setting.view.tvAppBuildTimeInfo
|
||||
import kotlinx.android.synthetic.main.view_debug_setting.view.tvAppContent
|
||||
import kotlinx.android.synthetic.main.view_debug_setting.view.tvAppHost
|
||||
import kotlinx.android.synthetic.main.view_debug_setting.view.tvAppVersionName
|
||||
import kotlinx.android.synthetic.main.view_debug_setting.view.tvAppVersionNameKey
|
||||
import kotlinx.android.synthetic.main.view_debug_setting.view.tvAutopilotConnectStatus
|
||||
import kotlinx.android.synthetic.main.view_debug_setting.view.tvAutopilotInfo
|
||||
import kotlinx.android.synthetic.main.view_debug_setting.view.tvAutopilotProtocolVersionInfo
|
||||
import kotlinx.android.synthetic.main.view_debug_setting.view.tvBackgroundOperation
|
||||
import kotlinx.android.synthetic.main.view_debug_setting.view.tvCarInfo
|
||||
import kotlinx.android.synthetic.main.view_debug_setting.view.tvCarInfoCopy
|
||||
import kotlinx.android.synthetic.main.view_debug_setting.view.tvCarInfoCopyClip
|
||||
import kotlinx.android.synthetic.main.view_debug_setting.view.tvCertFile
|
||||
import kotlinx.android.synthetic.main.view_debug_setting.view.tvCmdbCarInfoContent
|
||||
import kotlinx.android.synthetic.main.view_debug_setting.view.tvCurEnv
|
||||
import kotlinx.android.synthetic.main.view_debug_setting.view.tvDriverServerStartupStatus
|
||||
import kotlinx.android.synthetic.main.view_debug_setting.view.tvGearInfo
|
||||
import kotlinx.android.synthetic.main.view_debug_setting.view.tvGitBranchInfo
|
||||
import kotlinx.android.synthetic.main.view_debug_setting.view.tvIPCMac
|
||||
import kotlinx.android.synthetic.main.view_debug_setting.view.tvIdentifyInfo
|
||||
import kotlinx.android.synthetic.main.view_debug_setting.view.tvIdentifyInfoCopy
|
||||
import kotlinx.android.synthetic.main.view_debug_setting.view.tvInternetEnvironment
|
||||
import kotlinx.android.synthetic.main.view_debug_setting.view.tvIpcConnectStatus
|
||||
import kotlinx.android.synthetic.main.view_debug_setting.view.tvIpcInfo
|
||||
import kotlinx.android.synthetic.main.view_debug_setting.view.tvIpcInfoKey
|
||||
import kotlinx.android.synthetic.main.view_debug_setting.view.tvIpcProtocolVersionInfo
|
||||
import kotlinx.android.synthetic.main.view_debug_setting.view.tvIpcVersionInfo
|
||||
import kotlinx.android.synthetic.main.view_debug_setting.view.tvIpcVersionInfoClip
|
||||
import kotlinx.android.synthetic.main.view_debug_setting.view.tvIpcVersionInfoKey
|
||||
import kotlinx.android.synthetic.main.view_debug_setting.view.tvLocationEnabled
|
||||
import kotlinx.android.synthetic.main.view_debug_setting.view.tvMoGoMapVersion
|
||||
import kotlinx.android.synthetic.main.view_debug_setting.view.tvMoGoMapVersionKey
|
||||
import kotlinx.android.synthetic.main.view_debug_setting.view.tvObuConnectStatus
|
||||
import kotlinx.android.synthetic.main.view_debug_setting.view.tvObuInfoContent
|
||||
import kotlinx.android.synthetic.main.view_debug_setting.view.tvPadCopyrightId
|
||||
import kotlinx.android.synthetic.main.view_debug_setting.view.tvPadSn
|
||||
import kotlinx.android.synthetic.main.view_debug_setting.view.tvPadSnClip
|
||||
import kotlinx.android.synthetic.main.view_debug_setting.view.tvPadSnKey
|
||||
import kotlinx.android.synthetic.main.view_debug_setting.view.tvPlateNumber
|
||||
import kotlinx.android.synthetic.main.view_debug_setting.view.tvReportActions
|
||||
import kotlinx.android.synthetic.main.view_debug_setting.view.tvReportCode
|
||||
import kotlinx.android.synthetic.main.view_debug_setting.view.tvReportLevel
|
||||
import kotlinx.android.synthetic.main.view_debug_setting.view.tvReportMsg
|
||||
import kotlinx.android.synthetic.main.view_debug_setting.view.tvReportResult
|
||||
import kotlinx.android.synthetic.main.view_debug_setting.view.tvReportSrc
|
||||
import kotlinx.android.synthetic.main.view_debug_setting.view.tvRouteInfoSize
|
||||
import kotlinx.android.synthetic.main.view_debug_setting.view.tvRouteInfoSizeCopy
|
||||
import kotlinx.android.synthetic.main.view_debug_setting.view.tvServerEnvironment
|
||||
import kotlinx.android.synthetic.main.view_debug_setting.view.tvServerSocketStatus
|
||||
import kotlinx.android.synthetic.main.view_debug_setting.view.tvSteeringInfo
|
||||
import kotlinx.android.synthetic.main.view_debug_setting.view.tvTelematicTimeStamp
|
||||
import kotlinx.android.synthetic.main.view_debug_setting.view.tvTrajectoryInfoSize
|
||||
import kotlinx.android.synthetic.main.view_debug_setting.view.tvTrajectoryInfoSizeCopy
|
||||
import kotlinx.android.synthetic.main.view_debug_setting.view.tvUniqueDeviceId
|
||||
import kotlinx.android.synthetic.main.view_debug_setting.view.vehicleStateLayout
|
||||
import kotlinx.coroutines.Dispatchers
|
||||
import kotlinx.coroutines.delay
|
||||
import kotlinx.coroutines.launch
|
||||
import kotlinx.coroutines.withContext
|
||||
import mogo.telematics.pad.MessagePad
|
||||
import mogo_msg.MogoReportMsg
|
||||
import java.text.SimpleDateFormat
|
||||
import java.util.*
|
||||
import java.util.Date
|
||||
import java.util.Timer
|
||||
import java.util.TimerTask
|
||||
import java.util.concurrent.TimeUnit
|
||||
import kotlin.collections.component1
|
||||
import kotlin.collections.component2
|
||||
@@ -142,13 +343,8 @@ internal class DebugSettingView @JvmOverloads constructor(
|
||||
IMoGoPlanningRottingListener,
|
||||
IMoGoPlanningTrajectoryListener,
|
||||
IMoGoDevaToolsFuncConfigListener,
|
||||
IMoGoChassisLamplightListener,
|
||||
IMoGoDevaToolsListener,
|
||||
IMoGoChassisAccStateListener,
|
||||
IMoGoChassisSteeringStateListener,
|
||||
IMoGoChassisGearStateListener,
|
||||
IMoGoChassisBrakeStateListener,
|
||||
IMoGoChassisThrottleStateListener,
|
||||
IMoGoChassisStatesListener,
|
||||
IMoGoSweeperFutianCleanSystemListener,
|
||||
IMoGoObuInfoListener,
|
||||
ISopSettingListener, IViewControlListener, IMoGoCloudListener {
|
||||
@@ -255,16 +451,10 @@ internal class DebugSettingView @JvmOverloads constructor(
|
||||
// 添加 规划路径相关回调 监听
|
||||
CallerPlanningRottingListenerManager.addListener(TAG, this)
|
||||
CallerPlanningTrajectoryListenerManager.addListener(TAG, this)
|
||||
//添加 车辆底盘数据回调 监听
|
||||
CallerChassisAccStateListenerManager.addListener(TAG, this)
|
||||
CallerChassisBrakeStateListenerManager.addListener(TAG, this)
|
||||
CallerChassisGearStateListenerManager.addListener(TAG, this)
|
||||
CallerChassisSteeringStateListenerManager.addListener(TAG, this)
|
||||
CallerChassisThrottleStateListenerManager.addListener(TAG, this)
|
||||
//添加 开发套件工具接口 监听
|
||||
CallerDevaToolsListenerManager.addListener(TAG, this)
|
||||
//添加 底盘灯光数据 监听
|
||||
CallerChassisLamplightListenerManager.addListener(TAG, this)
|
||||
//添加 底盘数据 监听
|
||||
CallerChassisStatesListenerManager.addListener(TAG, this)
|
||||
//雨天、美化、点云设置同步
|
||||
CallerSopSettingManager.addListener(TAG, this)
|
||||
|
||||
@@ -304,16 +494,10 @@ internal class DebugSettingView @JvmOverloads constructor(
|
||||
// 移除 规划路径相关回调 监听
|
||||
CallerPlanningRottingListenerManager.removeListener(TAG)
|
||||
CallerPlanningTrajectoryListenerManager.removeListener(TAG)
|
||||
// 移除 车辆底盘数据回调 监听
|
||||
CallerChassisAccStateListenerManager.removeListener(TAG)
|
||||
CallerChassisBrakeStateListenerManager.removeListener(TAG)
|
||||
CallerChassisGearStateListenerManager.removeListener(TAG)
|
||||
CallerChassisSteeringStateListenerManager.removeListener(TAG)
|
||||
CallerChassisThrottleStateListenerManager.removeListener(TAG)
|
||||
// 移除 开发套件工具接口 监听
|
||||
CallerDevaToolsListenerManager.removeListener(TAG)
|
||||
// 移除 底盘灯光数据 监听
|
||||
CallerChassisLamplightListenerManager.removeListener(TAG)
|
||||
// 移除 底盘数据 监听
|
||||
CallerChassisStatesListenerManager.removeListener(TAG)
|
||||
// 移除 obu获取信息 监听
|
||||
CallerObuInfoListenerManager.removeListener(TAG)
|
||||
//雨天、美化、点云设置同步
|
||||
|
||||
@@ -8,14 +8,14 @@ import androidx.constraintlayout.widget.ConstraintLayout
|
||||
import chassis.Chassis
|
||||
import com.mogo.eagle.core.data.constants.MoGoConfig
|
||||
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.call.autopilot.CallerChassisLocationWGS84ListenerManager
|
||||
import com.mogo.eagle.core.function.hmi.R
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_HMI
|
||||
import com.mogo.commons.storage.SharedPrefsMgr
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoChassisStatesListener
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerChassisStatesListenerManager
|
||||
import com.mogo.eagle.core.utilcode.util.ThreadUtils
|
||||
import com.mogo.eagle.core.utilcode.util.Utils
|
||||
import kotlinx.android.synthetic.main.view_steering_brake.view.*
|
||||
@@ -25,7 +25,7 @@ import kotlinx.android.synthetic.main.view_steering_brake.view.*
|
||||
* 刹车,调用模型的逻辑暂时放入view。 转向不受影响
|
||||
*/
|
||||
class SteeringBrakeView(context: Context, attrs: AttributeSet?) : ConstraintLayout(context, attrs),
|
||||
IMoGoChassisLamplightListener, IMoGoChassisLocationWGS84Listener {
|
||||
IMoGoChassisStatesListener, IMoGoChassisLocationWGS84Listener {
|
||||
|
||||
companion object {
|
||||
private const val TAG = "SteeringBrakeView"
|
||||
@@ -41,7 +41,7 @@ class SteeringBrakeView(context: Context, attrs: AttributeSet?) : ConstraintLayo
|
||||
|
||||
override fun onAttachedToWindow() {
|
||||
super.onAttachedToWindow()
|
||||
CallerChassisLamplightListenerManager.addListener(TAG, this)
|
||||
CallerChassisStatesListenerManager.addListener(TAG, this)
|
||||
CallerChassisLocationWGS84ListenerManager.addListener(TAG, this)
|
||||
}
|
||||
|
||||
@@ -91,7 +91,7 @@ class SteeringBrakeView(context: Context, attrs: AttributeSet?) : ConstraintLayo
|
||||
|
||||
override fun onDetachedFromWindow() {
|
||||
super.onDetachedFromWindow()
|
||||
CallerChassisLamplightListenerManager.removeListener(TAG)
|
||||
CallerChassisStatesListenerManager.removeListener(TAG)
|
||||
CallerChassisLocationWGS84ListenerManager.removeListener(TAG)
|
||||
}
|
||||
|
||||
|
||||
@@ -12,9 +12,9 @@ import android.widget.ImageView
|
||||
import androidx.constraintlayout.widget.ConstraintLayout
|
||||
import chassis.Chassis
|
||||
import com.mogo.eagle.core.data.config.HmiBuildConfig
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoChassisLamplightListener
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoChassisStatesListener
|
||||
import com.mogo.eagle.core.function.api.datacenter.union.IMoGoTurnLightListener
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLamplightListenerManager
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerChassisStatesListenerManager
|
||||
import com.mogo.eagle.core.function.call.v2x.CallerTurnLightListenerManager
|
||||
import com.mogo.eagle.core.function.hmi.R
|
||||
import com.mogo.eagle.core.utilcode.util.ThreadUtils
|
||||
@@ -30,7 +30,7 @@ open class TurnLightViewStatus @JvmOverloads constructor(
|
||||
context: Context,
|
||||
attrs: AttributeSet? = null,
|
||||
defStyleAttr: Int = 0
|
||||
) : ConstraintLayout(context, attrs, defStyleAttr), IMoGoChassisLamplightListener,
|
||||
) : ConstraintLayout(context, attrs, defStyleAttr), IMoGoChassisStatesListener,
|
||||
IMoGoTurnLightListener {
|
||||
|
||||
companion object {
|
||||
@@ -72,13 +72,13 @@ open class TurnLightViewStatus @JvmOverloads constructor(
|
||||
|
||||
override fun onAttachedToWindow() {
|
||||
super.onAttachedToWindow()
|
||||
CallerChassisLamplightListenerManager.addListener(TAG, this)
|
||||
CallerChassisStatesListenerManager.addListener(TAG, this)
|
||||
CallerTurnLightListenerManager.addListener(TAG,this)
|
||||
}
|
||||
|
||||
override fun onDetachedFromWindow() {
|
||||
super.onDetachedFromWindow()
|
||||
CallerChassisLamplightListenerManager.removeListener(TAG)
|
||||
CallerChassisStatesListenerManager.removeListener(TAG)
|
||||
CallerTurnLightListenerManager.removeListener(TAG)
|
||||
}
|
||||
|
||||
|
||||
@@ -13,11 +13,9 @@ import chassis.Chassis.GearPosition
|
||||
import com.mogo.eagle.core.data.autopilot.AutopilotStatusInfo
|
||||
import com.mogo.eagle.core.data.config.FunctionBuildConfig
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotStatusListener
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoChassisGearStateListener
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoChassisSteeringStateListener
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoChassisStatesListener
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerChassisGearStateListenerManager
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerChassisSteeringStateListenerManager
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerChassisStatesListenerManager
|
||||
import com.mogo.eagle.core.function.hmi.R
|
||||
import com.mogo.eagle.core.utilcode.mogo.AppIdentityModeUtils
|
||||
import com.mogo.eagle.core.utilcode.mogo.AppIdentityModeUtils.isBus
|
||||
@@ -35,8 +33,7 @@ import kotlin.math.abs
|
||||
* 档位随CAN数据做切换和高亮显示
|
||||
* @since: 4/7/22
|
||||
*/
|
||||
class SteeringWheelView : ConstraintLayout, IMoGoChassisSteeringStateListener,
|
||||
IMoGoChassisGearStateListener {
|
||||
class SteeringWheelView : ConstraintLayout, IMoGoChassisStatesListener {
|
||||
private var autopilotIV: ImageView? = null
|
||||
private var steeringTVL: TextView? = null
|
||||
private var steeringTVR: TextView? = null
|
||||
@@ -57,8 +54,7 @@ class SteeringWheelView : ConstraintLayout, IMoGoChassisSteeringStateListener,
|
||||
}
|
||||
initView()
|
||||
CallerAutoPilotStatusListenerManager.addListener(TAG, mGoAutopilotStatusListener)
|
||||
CallerChassisGearStateListenerManager.addListener(TAG, this)
|
||||
CallerChassisSteeringStateListenerManager.addListener(TAG, this)
|
||||
CallerChassisStatesListenerManager.addListener(TAG, this)
|
||||
tapPositionView?.updateWithGear(GearPosition.GEAR_R)
|
||||
}
|
||||
|
||||
|
||||
@@ -1,169 +0,0 @@
|
||||
package com.mogo.eagle.core.function.hmi.ui.widget;
|
||||
|
||||
import static com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_RUNNING;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.content.Context;
|
||||
import android.os.Handler;
|
||||
import android.os.Message;
|
||||
import android.util.AttributeSet;
|
||||
import android.view.LayoutInflater;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.constraintlayout.widget.ConstraintLayout;
|
||||
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotPlanningActionsListener;
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoChassisBrakeStateListener;
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoChassisGearStateListener;
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoChassisThrottleStateListener;
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager;
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerPlanningActionsListenerManager;
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerChassisBrakeStateListenerManager;
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerChassisGearStateListenerManager;
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerChassisThrottleStateListenerManager;
|
||||
import com.mogo.eagle.core.function.hmi.R;
|
||||
import com.mogo.eagle.core.utilcode.util.ThreadUtils;
|
||||
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import chassis.Chassis;
|
||||
import mogo.telematics.pad.MessagePad;
|
||||
|
||||
/**
|
||||
* @author Jing
|
||||
* @description 速度 加速度 档位 刹车 油门状态值
|
||||
* @since: 6/24/22
|
||||
*/
|
||||
public class TrafficDataView extends ConstraintLayout implements
|
||||
IMoGoChassisGearStateListener ,
|
||||
IMoGoChassisBrakeStateListener,
|
||||
IMoGoChassisThrottleStateListener,
|
||||
IMoGoAutopilotPlanningActionsListener {
|
||||
private static final String TAG = "TrafficDataView";
|
||||
private TapPositionView tapPositionView;
|
||||
private TextView speedTextView;
|
||||
private TextView accTextView;
|
||||
private ImageView speedImage;
|
||||
private ImageView brakeStatus;
|
||||
|
||||
private static final int MSG_SEND_UPDATE = 1;
|
||||
private volatile double acceleration;
|
||||
private volatile float mBrake;
|
||||
private volatile float mThrottle;
|
||||
|
||||
@SuppressLint("HandlerLeak")
|
||||
private final Handler handler = new Handler() {
|
||||
@Override
|
||||
public void handleMessage(@NonNull Message msg) {
|
||||
super.handleMessage(msg);
|
||||
if (msg.what == MSG_SEND_UPDATE) {
|
||||
java.text.DecimalFormat mFormat = new java.text.DecimalFormat("0.0");
|
||||
String accStr = mFormat.format(Math.abs(acceleration));
|
||||
if (acceleration > 0f) {
|
||||
accTextView.setText(accStr);
|
||||
} else {
|
||||
accTextView.setText("- " + accStr);
|
||||
}
|
||||
int state = CallerAutoPilotStatusListenerManager.INSTANCE.getState();
|
||||
if (state < STATUS_AUTOPILOT_RUNNING) {
|
||||
if (mBrake > 0) {
|
||||
brakeStatus.setImageResource(R.drawable.traffic_data_brake);
|
||||
} else if (mThrottle >= 0 && mBrake == 0) {
|
||||
brakeStatus.setImageResource(R.drawable.traffic_data_accelerator);
|
||||
} else {
|
||||
brakeStatus.setImageResource(R.drawable.traffic_data_empty);
|
||||
}
|
||||
}
|
||||
if (state == 2) {
|
||||
brakeStatus.setImageResource(R.drawable.traffic_data_empty);
|
||||
}
|
||||
}
|
||||
handler.sendEmptyMessageDelayed(MSG_SEND_UPDATE, 1000L);
|
||||
}
|
||||
};
|
||||
|
||||
public TrafficDataView(@NonNull Context context) {
|
||||
super(context);
|
||||
}
|
||||
|
||||
public TrafficDataView(@NonNull Context context, @Nullable AttributeSet attrs) {
|
||||
super(context, attrs);
|
||||
initView(context);
|
||||
}
|
||||
|
||||
public TrafficDataView(@NonNull Context context, @Nullable AttributeSet attrs, int defStyleAttr) {
|
||||
super(context, attrs, defStyleAttr);
|
||||
}
|
||||
|
||||
public TrafficDataView(@NonNull Context context, @Nullable AttributeSet attrs, int defStyleAttr, int defStyleRes) {
|
||||
super(context, attrs, defStyleAttr, defStyleRes);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onAttachedToWindow() {
|
||||
super.onAttachedToWindow();
|
||||
handler.sendEmptyMessageDelayed(MSG_SEND_UPDATE, 1000L);
|
||||
CallerChassisGearStateListenerManager.INSTANCE.addListener(TAG, this);
|
||||
CallerChassisBrakeStateListenerManager.INSTANCE.addListener(TAG, this);
|
||||
CallerChassisThrottleStateListenerManager.INSTANCE.addListener(TAG, this);
|
||||
CallerPlanningActionsListenerManager.INSTANCE.addListener(TAG, this);
|
||||
}
|
||||
|
||||
private void initView(@NonNull Context context) {
|
||||
LayoutInflater.from(context).inflate(R.layout.hmi_traffic_data, this);
|
||||
tapPositionView = findViewById(R.id.traffic_position);
|
||||
speedImage = findViewById(R.id.speedImage);
|
||||
speedTextView = findViewById(R.id.speedTextView);
|
||||
accTextView = findViewById(R.id.speedAccTextView);
|
||||
brakeStatus = findViewById(R.id.brakeStatus);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onDetachedFromWindow() {
|
||||
super.onDetachedFromWindow();
|
||||
CallerChassisGearStateListenerManager.INSTANCE.removeListener(TAG);
|
||||
CallerChassisBrakeStateListenerManager.INSTANCE.removeListener(TAG);
|
||||
CallerChassisThrottleStateListenerManager.INSTANCE.removeListener(TAG);
|
||||
CallerPlanningActionsListenerManager.INSTANCE.removeListener(TAG);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void pncActions(@NonNull MessagePad.PlanningActionMsg planningActionMsg) {
|
||||
acceleration = planningActionMsg.getDestinationAcc();
|
||||
}
|
||||
|
||||
/**
|
||||
* 档位
|
||||
*/
|
||||
@Override
|
||||
public void onAutopilotGearData(@NotNull Chassis.GearPosition gear) {
|
||||
ThreadUtils.runOnUiThread(() -> {
|
||||
if (tapPositionView != null) {
|
||||
tapPositionView.updateWithGear(gear);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAutopilotBrake(float brake) {
|
||||
mBrake = brake;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAutopilotThrottle(float throttle) {
|
||||
mThrottle = throttle;
|
||||
}
|
||||
|
||||
/**
|
||||
* value呈现
|
||||
*/
|
||||
public void updateSpeedWithValue(int newSpeed) {
|
||||
if (speedTextView != null) {
|
||||
speedTextView.setText(String.valueOf(newSpeed));
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,148 @@
|
||||
package com.mogo.eagle.core.function.hmi.ui.widget
|
||||
|
||||
import android.annotation.SuppressLint
|
||||
import android.content.Context
|
||||
import android.os.Handler
|
||||
import android.os.Looper
|
||||
import android.os.Message
|
||||
import android.util.AttributeSet
|
||||
import android.view.LayoutInflater
|
||||
import android.widget.ImageView
|
||||
import android.widget.TextView
|
||||
import androidx.constraintlayout.widget.ConstraintLayout
|
||||
import chassis.Chassis.GearPosition
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotPlanningActionsListener
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotStatusListener
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoChassisStatesListener
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager.getState
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerChassisStatesListenerManager
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerPlanningActionsListenerManager
|
||||
import com.mogo.eagle.core.function.hmi.R
|
||||
import com.mogo.eagle.core.utilcode.util.ThreadUtils
|
||||
import mogo.telematics.pad.MessagePad.PlanningActionMsg
|
||||
import java.text.DecimalFormat
|
||||
import kotlin.math.abs
|
||||
|
||||
/**
|
||||
* @author Jing
|
||||
* @description 速度 加速度 档位 刹车 油门状态值
|
||||
* @since: 6/24/22
|
||||
*/
|
||||
open class TrafficDataView : ConstraintLayout, IMoGoChassisStatesListener,
|
||||
IMoGoAutopilotPlanningActionsListener {
|
||||
private var tapPositionView: TapPositionView? = null
|
||||
private var speedTextView: TextView? = null
|
||||
private var accTextView: TextView? = null
|
||||
private var speedImage: ImageView? = null
|
||||
private var brakeStatus: ImageView? = null
|
||||
|
||||
@Volatile
|
||||
private var acceleration = 0.0
|
||||
|
||||
@Volatile
|
||||
private var mBrake = 0f
|
||||
|
||||
@Volatile
|
||||
private var mThrottle = 0f
|
||||
|
||||
@SuppressLint("HandlerLeak")
|
||||
private val handler: Handler = object : Handler(Looper.getMainLooper()) {
|
||||
override fun handleMessage(msg: Message) {
|
||||
super.handleMessage(msg)
|
||||
if (msg.what == MSG_SEND_UPDATE) {
|
||||
val mFormat = DecimalFormat("0.0")
|
||||
val accStr = mFormat.format(abs(acceleration))
|
||||
if (acceleration > 0f) {
|
||||
accTextView?.text = accStr
|
||||
} else {
|
||||
accTextView?.text = "- $accStr"
|
||||
}
|
||||
val state = getState()
|
||||
if (state < IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_RUNNING) {
|
||||
if (mBrake > 0) {
|
||||
brakeStatus?.setImageResource(R.drawable.traffic_data_brake)
|
||||
} else if (mThrottle >= 0 && mBrake == 0f) {
|
||||
brakeStatus?.setImageResource(R.drawable.traffic_data_accelerator)
|
||||
} else {
|
||||
brakeStatus?.setImageResource(R.drawable.traffic_data_empty)
|
||||
}
|
||||
}
|
||||
if (state == 2) {
|
||||
brakeStatus?.setImageResource(R.drawable.traffic_data_empty)
|
||||
}
|
||||
}
|
||||
sendEmptyMessageDelayed(MSG_SEND_UPDATE, 1000L)
|
||||
}
|
||||
}
|
||||
|
||||
constructor(context: Context) : super(context)
|
||||
|
||||
constructor(context: Context, attrs: AttributeSet?) : super(context, attrs) {
|
||||
initView(context)
|
||||
}
|
||||
|
||||
constructor(context: Context, attrs: AttributeSet?, defStyleAttr: Int) : super(
|
||||
context,
|
||||
attrs,
|
||||
defStyleAttr
|
||||
)
|
||||
|
||||
constructor(
|
||||
context: Context,
|
||||
attrs: AttributeSet?,
|
||||
defStyleAttr: Int,
|
||||
defStyleRes: Int
|
||||
) : super(context, attrs, defStyleAttr, defStyleRes)
|
||||
|
||||
override fun onAttachedToWindow() {
|
||||
super.onAttachedToWindow()
|
||||
handler.sendEmptyMessageDelayed(MSG_SEND_UPDATE, 1000L)
|
||||
CallerChassisStatesListenerManager.addListener(TAG, this)
|
||||
CallerPlanningActionsListenerManager.addListener(TAG, this)
|
||||
}
|
||||
|
||||
private fun initView(context: Context) {
|
||||
LayoutInflater.from(context).inflate(R.layout.hmi_traffic_data, this)
|
||||
tapPositionView = findViewById(R.id.traffic_position)
|
||||
speedImage = findViewById(R.id.speedImage)
|
||||
speedTextView = findViewById(R.id.speedTextView)
|
||||
accTextView = findViewById(R.id.speedAccTextView)
|
||||
brakeStatus = findViewById(R.id.brakeStatus)
|
||||
}
|
||||
|
||||
override fun onDetachedFromWindow() {
|
||||
super.onDetachedFromWindow()
|
||||
CallerChassisStatesListenerManager.removeListener(TAG)
|
||||
CallerPlanningActionsListenerManager.removeListener(TAG)
|
||||
}
|
||||
|
||||
override fun pncActions(planningActionMsg: PlanningActionMsg) {
|
||||
acceleration = planningActionMsg.destinationAcc
|
||||
}
|
||||
|
||||
override fun onAutopilotGearData(gear: GearPosition) {
|
||||
ThreadUtils.runOnUiThread {
|
||||
tapPositionView?.updateWithGear(gear)
|
||||
}
|
||||
}
|
||||
|
||||
override fun onAutopilotBrake(brake: Float) {
|
||||
mBrake = brake
|
||||
}
|
||||
|
||||
override fun onAutopilotThrottle(throttle: Float) {
|
||||
mThrottle = throttle
|
||||
}
|
||||
|
||||
/**
|
||||
* value呈现
|
||||
*/
|
||||
fun updateSpeedWithValue(newSpeed: Int) {
|
||||
speedTextView?.text = newSpeed.toString()
|
||||
}
|
||||
|
||||
companion object {
|
||||
private const val TAG = "TrafficDataView"
|
||||
private const val MSG_SEND_UPDATE = 1
|
||||
}
|
||||
}
|
||||
@@ -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()
|
||||
}
|
||||
|
||||
|
||||
@@ -1,13 +0,0 @@
|
||||
package com.mogo.eagle.core.function.api.autopilot
|
||||
|
||||
/**
|
||||
* 车辆底盘 数据 回调监听
|
||||
*/
|
||||
interface IMoGoAutopilotVehicleStateListener {
|
||||
|
||||
|
||||
/**
|
||||
* 没有自车状态数据
|
||||
*/
|
||||
fun onAutopilotDataException(timestamp: Long) {}
|
||||
}
|
||||
@@ -1,13 +0,0 @@
|
||||
package com.mogo.eagle.core.function.api.autopilot
|
||||
|
||||
import chassis.ChassisStatesOuterClass
|
||||
|
||||
/**
|
||||
* 电池管理系统
|
||||
*/
|
||||
interface IMoGoBatteryManagementSystemListener {
|
||||
/**
|
||||
* 电池管理系统
|
||||
*/
|
||||
fun onBatteryManagementSystemStates(states: ChassisStatesOuterClass.BMSSystemStates)
|
||||
}
|
||||
@@ -1,13 +0,0 @@
|
||||
package com.mogo.eagle.core.function.api.autopilot
|
||||
|
||||
/**
|
||||
* 车辆加速度 数据 回调监听
|
||||
*/
|
||||
interface IMoGoChassisAccStateListener {
|
||||
|
||||
/**
|
||||
* 车辆加速度
|
||||
*/
|
||||
fun onAutopilotAcc(carAcc: Float){}
|
||||
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
package com.mogo.eagle.core.function.api.autopilot
|
||||
|
||||
/**
|
||||
* 刹车 数据 回调监听
|
||||
*/
|
||||
interface IMoGoChassisBrakeStateListener {
|
||||
|
||||
/**
|
||||
* 刹车
|
||||
*/
|
||||
fun onAutopilotBrake(brake: Float){}
|
||||
}
|
||||
@@ -1,16 +0,0 @@
|
||||
package com.mogo.eagle.core.function.api.autopilot
|
||||
|
||||
import chassis.Chassis
|
||||
|
||||
/**
|
||||
* 车辆挂档档位 数据 回调监听
|
||||
*/
|
||||
interface IMoGoChassisGearStateListener {
|
||||
|
||||
/**
|
||||
* 车辆挂档档位
|
||||
* @param gear 档位
|
||||
*/
|
||||
fun onAutopilotGearData(gear: Chassis.GearPosition)
|
||||
|
||||
}
|
||||
@@ -1,22 +0,0 @@
|
||||
package com.mogo.eagle.core.function.api.autopilot
|
||||
|
||||
import chassis.Chassis
|
||||
|
||||
/**
|
||||
* 车辆底盘 灯光数据 回调监听
|
||||
*/
|
||||
interface IMoGoChassisLamplightListener {
|
||||
|
||||
/**
|
||||
* 车辆转向灯 数据
|
||||
* @param lightSwitch
|
||||
*/
|
||||
fun onAutopilotLightSwitchData(lightSwitch: Chassis.LightSwitch?){}
|
||||
|
||||
/**
|
||||
* 车辆刹车灯 数据
|
||||
* @param brakeLight
|
||||
*/
|
||||
fun onAutopilotBrakeLightData(brakeLight: Boolean){}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,59 @@
|
||||
package com.mogo.eagle.core.function.api.autopilot
|
||||
|
||||
import chassis.Chassis
|
||||
import chassis.ChassisStatesOuterClass
|
||||
import planning.RoboSweeperTaskIndexOuterClass
|
||||
|
||||
interface IMoGoChassisStatesListener {
|
||||
|
||||
/**
|
||||
* 车辆转向灯 数据
|
||||
* @param lightSwitch
|
||||
*/
|
||||
fun onAutopilotLightSwitchData(lightSwitch: Chassis.LightSwitch?){}
|
||||
|
||||
/**
|
||||
* 车辆刹车灯 数据
|
||||
* @param brakeLight
|
||||
*/
|
||||
fun onAutopilotBrakeLightData(brakeLight: Boolean){}
|
||||
|
||||
|
||||
/**
|
||||
* 车辆方向盘转向角回调
|
||||
* @param steering 方向盘转向角
|
||||
*/
|
||||
fun onAutopilotSteeringData(steering: Float){}
|
||||
|
||||
/**
|
||||
* 车辆挂档档位
|
||||
* @param gear 档位
|
||||
*/
|
||||
fun onAutopilotGearData(gear: Chassis.GearPosition){}
|
||||
|
||||
/**
|
||||
* 车辆加速度
|
||||
*/
|
||||
fun onAutopilotAcc(carAcc: Float){}
|
||||
|
||||
/**
|
||||
* 油门
|
||||
*/
|
||||
fun onAutopilotThrottle(throttle: Float){}
|
||||
|
||||
/**
|
||||
* 刹车
|
||||
*/
|
||||
fun onAutopilotBrake(brake: Float){}
|
||||
|
||||
/**
|
||||
* 电池管理系统
|
||||
*/
|
||||
fun onBatteryManagementSystemStates(states: ChassisStatesOuterClass.BMSSystemStates){}
|
||||
|
||||
/**
|
||||
* 没有自车底盘状态数据
|
||||
*/
|
||||
fun onAutopilotDataException(timestamp: Long) {}
|
||||
|
||||
}
|
||||
@@ -1,14 +0,0 @@
|
||||
package com.mogo.eagle.core.function.api.autopilot
|
||||
|
||||
/**
|
||||
* 车辆方向盘转向角 数据 回调监听
|
||||
*/
|
||||
interface IMoGoChassisSteeringStateListener {
|
||||
|
||||
/**
|
||||
* 车辆方向盘转向角回调
|
||||
* @param steering 方向盘转向角
|
||||
*/
|
||||
fun onAutopilotSteeringData(steering: Float)
|
||||
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
package com.mogo.eagle.core.function.api.autopilot
|
||||
|
||||
/**
|
||||
* 油门 数据 回调监听
|
||||
*/
|
||||
interface IMoGoChassisThrottleStateListener {
|
||||
|
||||
/**
|
||||
* 油门
|
||||
*/
|
||||
fun onAutopilotThrottle(throttle: Float){}
|
||||
}
|
||||
@@ -1,37 +0,0 @@
|
||||
package com.mogo.eagle.core.function.call.autopilot
|
||||
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotVehicleStateListener
|
||||
import com.mogo.eagle.core.function.call.base.CallerBase
|
||||
import planning.RoboSweeperTaskIndexOuterClass
|
||||
import java.util.concurrent.ConcurrentHashMap
|
||||
|
||||
/**
|
||||
* 车辆底盘数据 回调监听
|
||||
*/
|
||||
object CallerAutopilotVehicleStateListenerManager : CallerBase<IMoGoAutopilotVehicleStateListener>() {
|
||||
|
||||
@Volatile
|
||||
private var timeStamp: Long = 0L
|
||||
|
||||
/**
|
||||
* 工控机时间回调
|
||||
*/
|
||||
fun invokeAutopilotTime(time: Long) {
|
||||
this.timeStamp = time
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取工控机的时间, 单位是秒
|
||||
*/
|
||||
fun getAutopilotTimeStamp(): Long {
|
||||
return this.timeStamp
|
||||
}
|
||||
|
||||
fun invokeAutopilotDataException(timestamp: Long) {
|
||||
M_LISTENERS.forEach{
|
||||
val listener = it.value
|
||||
listener.onAutopilotDataException(timestamp)
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,21 +0,0 @@
|
||||
package com.mogo.eagle.core.function.call.autopilot
|
||||
|
||||
import chassis.ChassisStatesOuterClass
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoBatteryManagementSystemListener
|
||||
import com.mogo.eagle.core.function.call.base.CallerBase
|
||||
|
||||
/**
|
||||
* 电池管理系统 包含 电量剩余百分比 电压 电流等
|
||||
*/
|
||||
object CallerBatteryManagementSystemListenerManager : CallerBase<IMoGoBatteryManagementSystemListener>() {
|
||||
|
||||
/**
|
||||
* 电池管理系统
|
||||
*/
|
||||
fun invokeBatteryManagementSystemStates(states: ChassisStatesOuterClass.BMSSystemStates) {
|
||||
M_LISTENERS.forEach {
|
||||
val listener = it.value
|
||||
listener.onBatteryManagementSystemStates(states)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,21 +0,0 @@
|
||||
package com.mogo.eagle.core.function.call.autopilot
|
||||
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoChassisAccStateListener
|
||||
import com.mogo.eagle.core.function.call.base.CallerBase
|
||||
|
||||
/**
|
||||
* 车辆加速度 回调监听
|
||||
*/
|
||||
object CallerChassisAccStateListenerManager : CallerBase<IMoGoChassisAccStateListener>() {
|
||||
|
||||
/**
|
||||
* 车辆加速度
|
||||
* acc 加速度
|
||||
*/
|
||||
fun invokeAutopilotAcc(carAcc: Float) {
|
||||
M_LISTENERS.forEach {
|
||||
val listener = it.value
|
||||
listener.onAutopilotAcc(carAcc)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,20 +0,0 @@
|
||||
package com.mogo.eagle.core.function.call.autopilot
|
||||
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoChassisBrakeStateListener
|
||||
import com.mogo.eagle.core.function.call.base.CallerBase
|
||||
|
||||
/**
|
||||
* 车辆刹车 回调监听
|
||||
*/
|
||||
object CallerChassisBrakeStateListenerManager : CallerBase<IMoGoChassisBrakeStateListener>() {
|
||||
|
||||
/**
|
||||
* brake 刹车
|
||||
*/
|
||||
fun invokeAutopilotBrake(brake: Float){
|
||||
M_LISTENERS.forEach{
|
||||
val listener = it.value
|
||||
listener.onAutopilotBrake(brake)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,22 +0,0 @@
|
||||
package com.mogo.eagle.core.function.call.autopilot
|
||||
|
||||
import chassis.Chassis
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoChassisGearStateListener
|
||||
import com.mogo.eagle.core.function.call.base.CallerBase
|
||||
|
||||
/**
|
||||
* 车辆挂档档位 回调监听
|
||||
*/
|
||||
object CallerChassisGearStateListenerManager : CallerBase<IMoGoChassisGearStateListener>() {
|
||||
|
||||
/**
|
||||
* 车辆挂档档位
|
||||
* @param gear 档位
|
||||
*/
|
||||
fun invokeAutopilotGearData(gear: Chassis.GearPosition) {
|
||||
M_LISTENERS.forEach {
|
||||
val listener = it.value
|
||||
listener.onAutopilotGearData(gear)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,34 +0,0 @@
|
||||
package com.mogo.eagle.core.function.call.autopilot
|
||||
|
||||
import chassis.Chassis
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoChassisLamplightListener
|
||||
import com.mogo.eagle.core.function.call.base.CallerBase
|
||||
|
||||
/**
|
||||
* 车辆底盘灯光数据 回调监听
|
||||
*/
|
||||
object CallerChassisLamplightListenerManager : CallerBase<IMoGoChassisLamplightListener>() {
|
||||
|
||||
/**
|
||||
* 车辆转向灯数据回调
|
||||
* @param lightSwitch
|
||||
*/
|
||||
fun invokeAutopilotLightSwitchData(lightSwitch: Chassis.LightSwitch) {
|
||||
M_LISTENERS.forEach {
|
||||
val listener = it.value
|
||||
listener.onAutopilotLightSwitchData(lightSwitch)
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 车辆刹车灯数据回调
|
||||
* @param brakeLight
|
||||
*/
|
||||
fun invokeAutopilotBrakeLightData(brakeLight: Boolean) {
|
||||
M_LISTENERS.forEach {
|
||||
val listener = it.value
|
||||
listener.onAutopilotBrakeLightData(brakeLight)
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,172 @@
|
||||
package com.mogo.eagle.core.function.call.autopilot
|
||||
|
||||
import chassis.Chassis
|
||||
import chassis.ChassisStatesOuterClass
|
||||
import chassis.VehicleStateOuterClass
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoChassisStatesListener
|
||||
import com.mogo.eagle.core.function.call.base.CallerBase
|
||||
import kotlin.properties.Delegates
|
||||
|
||||
object CallerChassisStatesListenerManager: CallerBase<IMoGoChassisStatesListener>() {
|
||||
|
||||
fun invokeStates(vehicleState: VehicleStateOuterClass.VehicleState){
|
||||
//刹车灯数据
|
||||
invokeAutopilotBrakeLightData(vehicleState.brakeLightStatus)
|
||||
//方向盘转向角数据
|
||||
invokeAutopilotSteeringData(vehicleState.steering)
|
||||
//挂档档位数据
|
||||
invokeAutopilotGearData(vehicleState.gear)
|
||||
//加速度
|
||||
invokeAutopilotAcc(vehicleState.accel)
|
||||
//油门
|
||||
invokeAutopilotThrottle(vehicleState.throttle)
|
||||
//刹车
|
||||
invokeAutopilotBrake(vehicleState.brake)
|
||||
//电量
|
||||
if (vehicleState.hasBmsSoc()) {
|
||||
invokeBatteryManagementSystemStates(
|
||||
ChassisStatesOuterClass.BMSSystemStates.newBuilder()
|
||||
.setBmsSoc(vehicleState.bmsSoc).build()
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
fun invokeNewStates(chassisStates: ChassisStatesOuterClass.ChassisStates){
|
||||
//刹车灯数据
|
||||
chassisStates.bcmSystemStates?.let { bcmSystemStates ->
|
||||
invokeAutopilotBrakeLightData(bcmSystemStates.brakeLightState != 0)
|
||||
}
|
||||
//方向盘转向角数据
|
||||
chassisStates.steerSystemStates?.let {
|
||||
invokeAutopilotSteeringData(it.steeringWheelAngle)
|
||||
}
|
||||
//挂档档位数据
|
||||
chassisStates.gearSystemStates?.let { gearSystemStates ->
|
||||
gearSystemStates.gearPosition?.let {
|
||||
//挂档档位数据
|
||||
invokeAutopilotGearData(it)
|
||||
}
|
||||
}
|
||||
//加速度
|
||||
chassisStates.vehicleMotionStates?.let {
|
||||
//加速度
|
||||
invokeAutopilotAcc(it.acceleration)
|
||||
}
|
||||
//油门
|
||||
chassisStates.drivingSystemStates?.let {
|
||||
invokeAutopilotThrottle(it.throttleResponsePosition)
|
||||
}
|
||||
//刹车
|
||||
chassisStates.brakeSystemStates?.let {
|
||||
//刹车
|
||||
invokeAutopilotBrake(it.brakePedalResponsePosition)
|
||||
}
|
||||
//电量
|
||||
chassisStates.bmsSystemStates?.let {
|
||||
//电量
|
||||
invokeBatteryManagementSystemStates(it)
|
||||
}
|
||||
}
|
||||
|
||||
private var steering: Float? by Delegates.observable(0.0f) { _, oldValue, newValue ->
|
||||
if (newValue == null) {
|
||||
return@observable
|
||||
}
|
||||
if (oldValue == newValue) {
|
||||
return@observable
|
||||
}
|
||||
M_LISTENERS.forEach {
|
||||
val listener = it.value
|
||||
listener.onAutopilotSteeringData(newValue)
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 车辆转向灯数据回调
|
||||
* @param lightSwitch
|
||||
*/
|
||||
fun invokeAutopilotLightSwitchData(lightSwitch: Chassis.LightSwitch) {
|
||||
M_LISTENERS.forEach {
|
||||
val listener = it.value
|
||||
listener.onAutopilotLightSwitchData(lightSwitch)
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 车辆刹车灯数据回调
|
||||
* @param brakeLight
|
||||
*/
|
||||
private fun invokeAutopilotBrakeLightData(brakeLight: Boolean) {
|
||||
M_LISTENERS.forEach {
|
||||
val listener = it.value
|
||||
listener.onAutopilotBrakeLightData(brakeLight)
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 车辆方向盘转向角回调
|
||||
* @param steering 方向盘转向角
|
||||
*/
|
||||
private fun invokeAutopilotSteeringData(steering: Float) {
|
||||
this.steering = steering
|
||||
}
|
||||
|
||||
/**
|
||||
* 车辆挂档档位
|
||||
* @param gear 档位
|
||||
*/
|
||||
fun invokeAutopilotGearData(gear: Chassis.GearPosition) {
|
||||
M_LISTENERS.forEach {
|
||||
val listener = it.value
|
||||
listener.onAutopilotGearData(gear)
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 车辆加速度
|
||||
* acc 加速度
|
||||
*/
|
||||
private fun invokeAutopilotAcc(carAcc: Float) {
|
||||
M_LISTENERS.forEach {
|
||||
val listener = it.value
|
||||
listener.onAutopilotAcc(carAcc)
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* throttle 油门
|
||||
*/
|
||||
fun invokeAutopilotThrottle(throttle: Float) {
|
||||
M_LISTENERS.forEach {
|
||||
val listener = it.value
|
||||
listener.onAutopilotThrottle(throttle)
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* brake 刹车
|
||||
*/
|
||||
fun invokeAutopilotBrake(brake: Float){
|
||||
M_LISTENERS.forEach{
|
||||
val listener = it.value
|
||||
listener.onAutopilotBrake(brake)
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 电池管理系统
|
||||
*/
|
||||
private fun invokeBatteryManagementSystemStates(states: ChassisStatesOuterClass.BMSSystemStates) {
|
||||
M_LISTENERS.forEach {
|
||||
val listener = it.value
|
||||
listener.onBatteryManagementSystemStates(states)
|
||||
}
|
||||
}
|
||||
|
||||
fun invokeStatesDataException(timestamp: Long) {
|
||||
M_LISTENERS.forEach{
|
||||
val listener = it.value
|
||||
listener.onAutopilotDataException(timestamp)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,32 +0,0 @@
|
||||
package com.mogo.eagle.core.function.call.autopilot
|
||||
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoChassisSteeringStateListener
|
||||
import com.mogo.eagle.core.function.call.base.CallerBase
|
||||
import kotlin.properties.Delegates
|
||||
|
||||
/**
|
||||
* 车辆方向盘转向角 回调监听
|
||||
*/
|
||||
object CallerChassisSteeringStateListenerManager : CallerBase<IMoGoChassisSteeringStateListener>() {
|
||||
|
||||
private var steering: Float? by Delegates.observable(0.0f) { _, oldValue, newValue ->
|
||||
if (newValue == null) {
|
||||
return@observable
|
||||
}
|
||||
if (oldValue == newValue) {
|
||||
return@observable
|
||||
}
|
||||
M_LISTENERS.forEach {
|
||||
val listener = it.value
|
||||
listener.onAutopilotSteeringData(newValue)
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 车辆方向盘转向角回调
|
||||
* @param steering 方向盘转向角
|
||||
*/
|
||||
fun invokeAutopilotSteeringData(steering: Float) {
|
||||
this.steering = steering
|
||||
}
|
||||
}
|
||||
@@ -1,20 +0,0 @@
|
||||
package com.mogo.eagle.core.function.call.autopilot
|
||||
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoChassisThrottleStateListener
|
||||
import com.mogo.eagle.core.function.call.base.CallerBase
|
||||
|
||||
/**
|
||||
* throttle 油门 回调监听
|
||||
*/
|
||||
object CallerChassisThrottleStateListenerManager : CallerBase<IMoGoChassisThrottleStateListener>() {
|
||||
|
||||
/**
|
||||
* throttle 油门
|
||||
*/
|
||||
fun invokeAutopilotThrottle(throttle: Float) {
|
||||
M_LISTENERS.forEach {
|
||||
val listener = it.value
|
||||
listener.onAutopilotThrottle(throttle)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -37,16 +37,8 @@ CallerAutopilotPointCloudListenerManager
|
||||
CallerAutopilotRecordListenerManager
|
||||
CallerAutopilotStatisticsListenerManager
|
||||
CallerAutoPilotStatusListenerManager
|
||||
CallerAutopilotVehicleStateListenerManager
|
||||
CallerBatteryManagementSystemListenerManager
|
||||
CallerChassisAccStateListenerManager
|
||||
CallerChassisBrakeStateListenerManager
|
||||
CallerChassisGearStateListenerManager
|
||||
CallerChassisLamplightListenerManager
|
||||
CallerChassisLocationGCJ20ListenerManager
|
||||
CallerChassisLocationWGS84ListenerManager
|
||||
CallerChassisSteeringStateListenerManager
|
||||
CallerChassisThrottleStateListenerManager
|
||||
CallerPlanningActionsListenerManager
|
||||
CallerPlanningRottingListenerManager
|
||||
CallerPlanningTrajectoryListenerManager
|
||||
|
||||
Reference in New Issue
Block a user