[6.2.0] wait to test
This commit is contained in:
@@ -3,6 +3,7 @@ package com.mogo.eagle.core.function.hmi.ui.widget
|
||||
import android.content.Context
|
||||
import android.util.AttributeSet
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import androidx.appcompat.content.res.AppCompatResources
|
||||
import androidx.constraintlayout.widget.ConstraintLayout
|
||||
import com.mogo.commons.module.status.MogoStatusManager
|
||||
@@ -76,6 +77,14 @@ class RomaBusView @JvmOverloads constructor(
|
||||
}
|
||||
}
|
||||
|
||||
override fun mapRomaInRange(range: Boolean) {
|
||||
if(range){
|
||||
this.visibility = View.VISIBLE
|
||||
} else {
|
||||
this.visibility = View.GONE
|
||||
}
|
||||
}
|
||||
|
||||
override fun romaStatus(status: Boolean) {
|
||||
ThreadUtils.runOnUiThread {
|
||||
click = true
|
||||
|
||||
@@ -3,6 +3,7 @@ package com.mogo.eagle.core.function.hmi.ui.widget
|
||||
import android.content.Context
|
||||
import android.util.AttributeSet
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import androidx.constraintlayout.widget.ConstraintLayout
|
||||
import com.mogo.commons.module.status.MogoStatusManager
|
||||
import com.mogo.eagle.core.function.api.map.roma.IMoGoRomaListener
|
||||
@@ -67,6 +68,14 @@ class RomaPassengerView @JvmOverloads constructor(
|
||||
}
|
||||
}
|
||||
|
||||
override fun mapRomaInRange(range: Boolean) {
|
||||
if(range){
|
||||
this.visibility = View.VISIBLE
|
||||
} else {
|
||||
this.visibility = View.GONE
|
||||
}
|
||||
}
|
||||
|
||||
override fun romaStatus(status: Boolean) {
|
||||
ThreadUtils.runOnUiThread {
|
||||
click = true
|
||||
|
||||
@@ -3,6 +3,7 @@ package com.mogo.eagle.core.function.hmi.ui.widget
|
||||
import android.content.Context
|
||||
import android.util.AttributeSet
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import androidx.appcompat.content.res.AppCompatResources
|
||||
import androidx.constraintlayout.widget.ConstraintLayout
|
||||
import com.mogo.commons.module.status.MogoStatusManager
|
||||
@@ -76,6 +77,14 @@ class RomaTaxiView @JvmOverloads constructor(
|
||||
}
|
||||
}
|
||||
|
||||
override fun mapRomaInRange(range: Boolean) {
|
||||
if(range){
|
||||
this.visibility = View.VISIBLE
|
||||
} else {
|
||||
this.visibility = View.GONE
|
||||
}
|
||||
}
|
||||
|
||||
override fun romaStatus(status: Boolean) {
|
||||
ThreadUtils.runOnUiThread {
|
||||
click = true
|
||||
|
||||
@@ -19,6 +19,7 @@ import com.mogo.eagle.core.data.deva.chain.ChainConstant.Companion.CHAIN_CODE_RO
|
||||
import com.mogo.eagle.core.data.deva.chain.ChainConstant.Companion.CHAIN_CODE_ROMA_MAP_ERROR
|
||||
import com.mogo.eagle.core.data.deva.chain.ChainConstant.Companion.CHAIN_CODE_ROMA_MAP_READY_START
|
||||
import com.mogo.eagle.core.data.deva.chain.ChainConstant.Companion.CHAIN_CODE_ROMA_MAP_START
|
||||
import com.mogo.eagle.core.data.deva.chain.ChainConstant.Companion.CHAIN_CODE_ROMA_RANGE
|
||||
import com.mogo.eagle.core.data.deva.chain.ChainConstant.Companion.CHAIN_CODE_ROMA_REQUEST
|
||||
import com.mogo.eagle.core.data.deva.chain.ChainConstant.Companion.CHAIN_CODE_ROMA_REQUEST_DELAY
|
||||
import com.mogo.eagle.core.data.deva.chain.ChainConstant.Companion.CHAIN_CODE_ROMA_REQUEST_ERROR
|
||||
@@ -33,6 +34,7 @@ import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListener
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationWGS84ListenerManager
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerPlanningRottingListenerManager
|
||||
import com.mogo.eagle.core.function.call.map.CallerMapRomaListener
|
||||
import com.mogo.eagle.core.function.call.map.CallerMapRomaListener.invokeRomaViewStatus
|
||||
import com.mogo.eagle.core.function.call.map.CallerMapUIServiceManager
|
||||
import com.mogo.eagle.core.function.call.map.CallerVisualAngleManager.updateLongSightLevel
|
||||
import com.mogo.eagle.core.function.utils.MapRomaTrace
|
||||
@@ -179,10 +181,19 @@ class AiCloudIdentifyDataManager : IMoGoPlanningRottingListener,
|
||||
MapIdentifySubscriber.instance.clearAiCloudRoma()
|
||||
// 主动关闭roma,回到中景视角
|
||||
if (manual) {
|
||||
CallerMapUIServiceManager.getMapUIController()?.changeMapVisualAngle(VisualAngleMode.MODE_MEDIUM_SIGHT, null)
|
||||
CallerMapUIServiceManager.getMapUIController()
|
||||
?.changeMapVisualAngle(VisualAngleMode.MODE_MEDIUM_SIGHT, null)
|
||||
}
|
||||
}
|
||||
|
||||
override fun mapRomaInRange(range: Boolean) {
|
||||
MapRomaTrace.log("", CHAIN_CODE_ROMA_RANGE, TAG, mutableMapOf("range" to range))
|
||||
if(FunctionBuildConfig.romaModeStyle == 1){
|
||||
return
|
||||
}
|
||||
invokeRomaViewStatus(range)
|
||||
}
|
||||
|
||||
fun requestRangeOfIdentify(dataReceive: Boolean) {
|
||||
val gnss = CallerChassisLocationWGS84ListenerManager.getChassisLocationWGS84().gnssInfo
|
||||
// false,改变父节点信息
|
||||
@@ -215,10 +226,17 @@ class AiCloudIdentifyDataManager : IMoGoPlanningRottingListener,
|
||||
)
|
||||
if (dataReceive) {
|
||||
// 请求地图开始漫游
|
||||
CallerMapUIServiceManager.getMapUIController()?.setRomaMode(FunctionBuildConfig.romaModeStyle)
|
||||
}else{
|
||||
CallerMapUIServiceManager.getMapUIController()
|
||||
?.setRomaMode(FunctionBuildConfig.romaModeStyle)
|
||||
} else {
|
||||
// 保底清除策略
|
||||
MapRomaTrace.log("",CHAIN_CODE_ROMA_REQUEST_DELAY,TAG,mutableMapOf("delay" to true),true)
|
||||
MapRomaTrace.log(
|
||||
"",
|
||||
CHAIN_CODE_ROMA_REQUEST_DELAY,
|
||||
TAG,
|
||||
mutableMapOf("delay" to true),
|
||||
true
|
||||
)
|
||||
MapIdentifySubscriber.instance.clearAiCloudRoma()
|
||||
}
|
||||
},
|
||||
@@ -322,7 +340,7 @@ class AiCloudIdentifyDataManager : IMoGoPlanningRottingListener,
|
||||
if (it.wayPointsList != null && it.wayPointsList.size > 0) {
|
||||
val roamList = ArrayList<LonLatPoint>()
|
||||
it.wayPointsList.forEach { loc ->
|
||||
roamList.add(LonLatPoint(loc.longitude,loc.latitude))
|
||||
roamList.add(LonLatPoint(loc.longitude, loc.latitude))
|
||||
}
|
||||
updateRomaStyle(false, roamList)
|
||||
}
|
||||
|
||||
@@ -119,6 +119,7 @@ class ChainConstant {
|
||||
const val CHAIN_CODE_EAGLE_START_AUTOPILOT_RESULT = "CHAIN_CODE_EAGLE_START_AUTOPILOT_RESULT"
|
||||
|
||||
// 漫游业务code
|
||||
const val CHAIN_CODE_ROMA_RANGE = "CHAIN_CODE_ROMA_RANGE"
|
||||
const val CHAIN_CODE_ROMA_CLICK = "CHAIN_CODE_ROMA_CLICK"
|
||||
const val CHAIN_CODE_ROMA_CLOSE_CLICK = "CHAIN_CODE_ROMA_CLOSE_CLICK"
|
||||
const val CHAIN_CODE_ROMA_REQUEST = "CHAIN_CODE_ROMA_REQUEST"
|
||||
|
||||
@@ -2,11 +2,21 @@ package com.mogo.eagle.core.function.api.map.roma
|
||||
|
||||
interface IMoGoRomaListener {
|
||||
|
||||
/**
|
||||
* 是否在自由漫游范围内
|
||||
*/
|
||||
fun mapRomaInRange(range:Boolean){}
|
||||
|
||||
/**
|
||||
* 漫游地图状态回调
|
||||
*/
|
||||
fun mapRomaStatus(status:Int, msg:String){}
|
||||
|
||||
/**
|
||||
* 漫游按钮显示状态
|
||||
*/
|
||||
fun romaViewStatus(status: Boolean){}
|
||||
|
||||
/**
|
||||
* 漫游状态回调
|
||||
*/
|
||||
|
||||
@@ -2,17 +2,29 @@ package com.mogo.eagle.core.function.call.map
|
||||
|
||||
import com.mogo.eagle.core.function.api.map.roma.IMoGoRomaListener
|
||||
import com.mogo.eagle.core.function.call.base.CallerBase
|
||||
import kotlin.properties.Delegates
|
||||
|
||||
object CallerMapRomaListener : CallerBase<IMoGoRomaListener>() {
|
||||
|
||||
private var roma = false
|
||||
private var romaStatus = -1
|
||||
private var romaMsg: String = ""
|
||||
private var romaRange:Boolean = false
|
||||
|
||||
override fun doSomeAfterAddListener(tag: String, listener: IMoGoRomaListener) {
|
||||
listener.romaStatus(roma)
|
||||
}
|
||||
|
||||
fun invokeMapRomaRange(romaRange: Boolean) {
|
||||
if(romaRange!= this.romaRange){
|
||||
this.romaRange = romaRange
|
||||
M_LISTENERS.forEach {
|
||||
val listener = it.value
|
||||
listener.mapRomaInRange(romaRange)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fun invokeMapRomaStatus(status: Int, msg: String) {
|
||||
romaStatus = status
|
||||
romaMsg = msg
|
||||
@@ -22,6 +34,13 @@ object CallerMapRomaListener : CallerBase<IMoGoRomaListener>() {
|
||||
}
|
||||
}
|
||||
|
||||
fun invokeRomaViewStatus(range:Boolean){
|
||||
M_LISTENERS.forEach {
|
||||
val listener = it.value
|
||||
listener.romaViewStatus(range)
|
||||
}
|
||||
}
|
||||
|
||||
fun invokeMapRoma(romaStatus: Boolean) {
|
||||
roma = romaStatus
|
||||
M_LISTENERS.forEach {
|
||||
|
||||
@@ -17,6 +17,7 @@ import com.mogo.eagle.core.function.call.map.CallerMapDevaListenerManager.invoke
|
||||
import com.mogo.eagle.core.function.call.map.CallerMapRoadListenerManager.invokeListenersOnRoadIdGet
|
||||
import com.mogo.eagle.core.function.call.map.CallerMapRoadListenerManager.invokeListenersOnStopLineGet
|
||||
import com.mogo.eagle.core.function.call.map.CallerMapRoadListenerManager.invokeRoadChange
|
||||
import com.mogo.eagle.core.function.call.map.CallerMapRomaListener.invokeMapRomaRange
|
||||
import com.mogo.eagle.core.function.call.map.CallerMapRomaListener.invokeMapRomaStatus
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger.d
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger.e
|
||||
@@ -59,7 +60,7 @@ import kotlin.properties.Delegates
|
||||
class AMapViewWrapper(mMapView: MapAutoView) : IMogoMapView, IMogoMapUIController,
|
||||
OnMapLoadedListener, OnCameraChangeListener, OnMapClickListener, OnMapTouchListener,
|
||||
OnMarkClickListener, OnMapStyleListener, OnMapViewVisualAngleChangeListener, OnRoadInfoListener,
|
||||
ILog, OnRoamStatusListener {
|
||||
ILog, OnRoamStatusListener, OnRoadSideFenceRegionListener {
|
||||
|
||||
companion object {
|
||||
private const val TAG = "AMapViewWrapper"
|
||||
@@ -122,6 +123,7 @@ class AMapViewWrapper(mMapView: MapAutoView) : IMogoMapView, IMogoMapUIControlle
|
||||
mMapView.setOnRoamStatusListener(this)
|
||||
mMapView.setOnMapViewVisualAngleChangeListener(this)
|
||||
mMapView.setOnRoadInfoListener(this, 1)
|
||||
mMapView.setOnRoadSideFenceRegionListener(this,5000)
|
||||
registerLogListener(this, mMapView.getEventController())
|
||||
d(M_MAP + TAG, "initListeners - setOnMapStyleListener - view $mMapView")
|
||||
}
|
||||
@@ -870,4 +872,12 @@ class AMapViewWrapper(mMapView: MapAutoView) : IMogoMapView, IMogoMapUIControlle
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 判断当前位置是否在道路围栏区域内
|
||||
* @param status 1: 在围栏内,0 不在围栏内
|
||||
*/
|
||||
override fun isInRoadSideFenceRegion(status: Int) {
|
||||
invokeMapRomaRange(status == 1)
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user