[6.2.0] fix bug of break map icon
This commit is contained in:
@@ -187,8 +187,15 @@ class AiCloudIdentifyDataManager : IMoGoPlanningRottingListener,
|
||||
}
|
||||
|
||||
override fun mapRomaInRange(range: Boolean) {
|
||||
MapRomaTrace.log("", CHAIN_CODE_ROMA_RANGE, TAG, mutableMapOf("range" to range))
|
||||
if(FunctionBuildConfig.romaModeStyle == 1){
|
||||
val gnss = CallerChassisLocationWGS84ListenerManager.getChassisLocationWGS84().gnssInfo
|
||||
MapRomaTrace.log(
|
||||
"", CHAIN_CODE_ROMA_RANGE, TAG, mutableMapOf(
|
||||
"range" to range,
|
||||
"lon" to gnss.longitude,
|
||||
"lat" to gnss.latitude
|
||||
), true
|
||||
)
|
||||
if (FunctionBuildConfig.romaModeStyle == 1) {
|
||||
return
|
||||
}
|
||||
invokeRomaViewStatus(range)
|
||||
@@ -361,6 +368,7 @@ class AiCloudIdentifyDataManager : IMoGoPlanningRottingListener,
|
||||
FunctionBuildConfig.romaModeStyle = 0
|
||||
} else {
|
||||
FunctionBuildConfig.romaModeStyle = 1
|
||||
invokeRomaViewStatus(true)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -5,6 +5,7 @@ import android.os.Bundle
|
||||
import android.util.AttributeSet
|
||||
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
|
||||
@@ -12,12 +13,15 @@ import com.mogo.eagle.core.function.api.setting.IMoGoSkinModeChangeListener
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLamplightListenerManager
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationWGS84ListenerManager
|
||||
import com.mogo.eagle.core.function.call.setting.CallerSkinModeListenerManager
|
||||
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.map.MogoMapView
|
||||
import com.mogo.map.overlay.line.Polyline
|
||||
import com.mogo.map.overlay.point.Point
|
||||
import com.mogo.map.overlay.proxy.line.IMapPolylineOverlay
|
||||
import com.mogo.map.overlay.proxy.point.IMapPointOverlay
|
||||
import com.mogo.map.uicontroller.IMogoMapUIController
|
||||
import kotlin.properties.Delegates
|
||||
|
||||
|
||||
class MapBizView(context: Context?, attrs: AttributeSet?) : MogoMapView(context, attrs),
|
||||
@@ -95,9 +99,23 @@ class MapBizView(context: Context?, attrs: AttributeSet?) : MogoMapView(context,
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置车辆灯光状态 true 刹车, false 正常
|
||||
*/
|
||||
private var accLimit : Boolean by Delegates.observable(false){ _, oldV, newV ->
|
||||
if(oldV != newV){
|
||||
if(newV){
|
||||
turn(4)
|
||||
}else{
|
||||
turn(0)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
override fun onChassisLocationWGS84(gnssInfo: MogoLocation) {
|
||||
// 跟新地图控件
|
||||
setExtraGPSData(gnssInfo)
|
||||
accLimit = gnssInfo.acceleration < accThreshold
|
||||
}
|
||||
|
||||
private var currentLevel:Int = 0
|
||||
@@ -121,11 +139,7 @@ class MapBizView(context: Context?, attrs: AttributeSet?) : MogoMapView(context,
|
||||
|
||||
private fun turn(lightNum: Int) {
|
||||
if (currentLevel != lightNum) {
|
||||
when (lightNum) {
|
||||
0 -> getUI()?.setCarLightsType(0, 500)
|
||||
1 -> getUI()?.setCarLightsType(1, 500)
|
||||
2 -> getUI()?.setCarLightsType(2, 500)
|
||||
}
|
||||
getUI()?.setCarLightsType(lightNum, 500)
|
||||
currentLevel = lightNum
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user