Merge remote-tracking branch 'origin/dev_robobus-m1-p-app-module_1.1.0_230112_1.1.0' into dev_robobus-m1-p-app-module_1.1.0_230112_1.1.0
This commit is contained in:
@@ -16,6 +16,7 @@ import com.mogo.eagle.core.data.deva.scene.SceneTAG
|
||||
import com.mogo.eagle.core.data.msgbox.MsgBoxBean
|
||||
import com.mogo.eagle.core.function.api.devatools.IDevaToolsProvider
|
||||
import com.mogo.eagle.core.function.api.devatools.apm.*
|
||||
import com.mogo.eagle.core.function.call.map.*
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
|
||||
import com.zhjt.mogo_core_function_devatools.apm.*
|
||||
import com.zhjt.mogo_core_function_devatools.badcase.BadCaseManager
|
||||
@@ -67,6 +68,9 @@ class DevaToolsProvider : IDevaToolsProvider {
|
||||
FuncConfigImpl.init()
|
||||
MogoLogCatchManager.init(mContext!!)
|
||||
|
||||
// 视角切换功能初始化,监听路口及停止线回调
|
||||
CallerVisualAngleManager.init()
|
||||
|
||||
//升级(鹰眼/工控)与监控服务
|
||||
iPCReportManager.initServer()
|
||||
moFangManager.init(mContext!!)
|
||||
|
||||
@@ -87,8 +87,7 @@ class MapBizView(context: Context?, attrs: AttributeSet?) : MogoMapView(context,
|
||||
setExtraGPSData(gnssInfo)
|
||||
}
|
||||
|
||||
@Volatile
|
||||
private var isVisualAngleChanged = false
|
||||
private var currentLevel:Int = 0
|
||||
|
||||
override fun onAutopilotLightSwitchData(lightSwitch: Chassis.LightSwitch?) {
|
||||
super.onAutopilotLightSwitchData(lightSwitch)
|
||||
@@ -96,35 +95,28 @@ class MapBizView(context: Context?, attrs: AttributeSet?) : MogoMapView(context,
|
||||
when (it.number) {
|
||||
Chassis.LightSwitch.LIGHT_LEFT_VALUE -> { //左转灯
|
||||
CallerVisualAngleManager.showTurning(true)
|
||||
showTurn(1)
|
||||
turn(1)
|
||||
}
|
||||
Chassis.LightSwitch.LIGHT_RIGHT_VALUE -> { //右转灯
|
||||
CallerVisualAngleManager.showTurning(true)
|
||||
showTurn(2)
|
||||
|
||||
turn(2)
|
||||
}
|
||||
Chassis.LightSwitch.LIGHT_NONE_VALUE -> {
|
||||
CallerVisualAngleManager.showTurning(false)
|
||||
hideTurn()
|
||||
turn(0)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private fun showTurn(lightNum: Int) {
|
||||
if (!isVisualAngleChanged) {
|
||||
isVisualAngleChanged = true
|
||||
private fun turn(lightNum: Int) {
|
||||
if (currentLevel != lightNum) {
|
||||
when (lightNum) {
|
||||
0 -> CallerMapUIServiceManager.getMapUIController()?.setCarLightsType(3, 500)
|
||||
1 -> CallerMapUIServiceManager.getMapUIController()?.setCarLightsType(4, 500)
|
||||
2 -> CallerMapUIServiceManager.getMapUIController()?.setCarLightsType(2, 500)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private fun hideTurn() {
|
||||
if (isVisualAngleChanged) {
|
||||
isVisualAngleChanged = false
|
||||
CallerMapUIServiceManager.getMapUIController()?.setCarLightsType(3, 500)
|
||||
currentLevel = lightNum
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
package com.mogo.eagle.core.function.call.autopilot
|
||||
|
||||
import android.util.Log
|
||||
import chassis.Chassis
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoChassisLamplightListener
|
||||
import com.mogo.eagle.core.function.call.base.CallerBase
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.mogo.eagle.core.function.call.map
|
||||
|
||||
import android.util.Log
|
||||
import com.alibaba.android.arouter.launcher.*
|
||||
import com.mogo.eagle.core.data.constants.*
|
||||
import com.mogo.eagle.core.function.api.map.angle.*
|
||||
@@ -17,6 +18,13 @@ object CallerVisualAngleManager {
|
||||
@Volatile
|
||||
private var isVisualAngleChanged = false
|
||||
|
||||
fun init() {
|
||||
provider?.let {
|
||||
Log.d("CallerVisualAngle", "--- init ---")
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
fun changeAngle(scene: Scene) {
|
||||
provider?.changeAngle(scene)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user