[3.4.0-map-sdk] update ,wait to test

This commit is contained in:
zhongchao
2023-08-29 17:06:14 +08:00
parent b421d2dc3f
commit 6bef1de3fc
90 changed files with 1272 additions and 3766 deletions

View File

@@ -3,8 +3,6 @@ package com.mogo.eagle.function.biz.v2x.v2n.scenario.impl;
import static com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.M_V2X;
import static com.mogo.map.MogoMap.DEFAULT;
import androidx.localbroadcastmanager.content.LocalBroadcastManager;
import com.mogo.commons.module.status.MogoStatusManager;
import com.mogo.eagle.core.data.config.HmiBuildConfig;
import com.mogo.eagle.core.data.map.entity.V2XMessageEntity;
@@ -26,24 +24,19 @@ import com.mogo.map.uicontroller.VisualAngleMode;
* version: 1.0
*/
public class V2XScenarioManager implements IV2XScenarioManager {
private static V2XScenarioManager mV2XScenarioManager;
private static final String TAG = "V2XScenarioManager";
private AbsV2XScenario mV2XScenario = null;
private V2XScenarioManager() {
}
public static V2XScenarioManager getInstance() {
if (mV2XScenarioManager == null) {
synchronized (V2XScenarioManager.class) {
if (mV2XScenarioManager == null) {
mV2XScenarioManager = new V2XScenarioManager();
}
}
}
return mV2XScenarioManager;
private static final class MV2XScenarioManagerHolder {
static final V2XScenarioManager mV2XScenarioManager = new V2XScenarioManager();
}
public static V2XScenarioManager getInstance() {
return MV2XScenarioManagerHolder.mV2XScenarioManager;
}
@Override
public void handlerMessage(V2XMessageEntity v2XMessageEntity) {

View File

@@ -116,15 +116,15 @@ class AiRoadMarker {
V2XBizTrace.onAck("$TAG --- marker --- 3 --- return ----", "")
return@post
}
if(l1.points.isEmpty() || l2.points.isEmpty()){
if(l1!!.points.isEmpty() || l2!!.points.isEmpty()){
V2XBizTrace.onAck("$TAG --- marker --- 3 --- return ----", "")
return@post
}
V2XBizTrace.onAck("$TAG --- marker --- 4 --- l2:", l2)
V2XBizTrace.onAck("$TAG --- marker --- 4 --- l2:", l2!!)
val points = LinkedList<MogoLatLng>()
if (l2 != null && l2.points.isNotEmpty()) {
points.addAll(l2.points.reversed().map {
MogoLatLng(it.second, it.first)
if (l2 != null && l2!!.points.isNotEmpty()) {
points.addAll(l2!!.points.reversed().map {
MogoLatLng(it.latitude, it.longitude)
})
}
val centerX = marker.poi_lon
@@ -150,17 +150,17 @@ class AiRoadMarker {
} ?: MogoLatLng(centerY, centerX)
marker.farthestPoint = Pair(farthestPoint.lon, farthestPoint.lat)
V2XBizTrace.onAck("$TAG --- marker --- 6 --- marker:", marker)
if (l1 != null && l1.points.isNotEmpty()) {
for (l in l1.points) {
if (l1 != null && l1!!.points.isNotEmpty()) {
for (l in l1!!.points) {
if (DrivingDirectionUtils.getDegreeOfCar2Poi2(
farthestPoint.lon,
farthestPoint.lat,
l.first,
l.second,
l.longitude,
l.latitude,
(location.heading + 180)
) < 90L
) {
points.add(l.let { MogoLatLng(it.second, it.first) })
points.add(l.let { MogoLatLng(it.latitude, it.longitude) })
}
}
}

View File

@@ -294,6 +294,7 @@ internal class DebugSettingView @JvmOverloads constructor(
}
}
@SuppressLint("SetTextI18n")
private fun initView() {
post {
val maxHeight = ScreenUtils.getScreenHeight() - BarUtils.getStatusBarHeight()
@@ -1033,7 +1034,7 @@ internal class DebugSettingView @JvmOverloads constructor(
//设置连接司机屏IP
btnConnectServerIp.setOnClickListener {
val ip = etConnectServerIp.text.toString()
if (!ip.isNullOrEmpty()) {
if (!ip.isEmpty()) {
CallerAutoPilotControlManager.connectSpecifiedServer(ip)
}
}

View File

@@ -1,15 +1,12 @@
package com.mogo.eagle.core.function.main
import android.Manifest
import android.content.Intent
import android.content.pm.PackageManager
import android.net.Uri
import android.os.Build
import android.os.Bundle
import android.provider.Settings
import android.view.*
import android.widget.FrameLayout
import androidx.core.app.ActivityCompat
import androidx.recyclerview.widget.LinearLayoutManager
import com.kwai.koom.base.MonitorManager.addMonitorConfig
import com.kwai.koom.nativeoom.leakmonitor.LeakListener
@@ -84,14 +81,12 @@ open class MainActivity : MvpActivity<MainView?, MainPresenter?>(), MainView,
initConnectInfoRV()
CallerHmiManager.init(this)
//申请悬浮窗权限
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
// 检查是否有悬浮窗权限
if (Settings.canDrawOverlays(this)) {
return
}
PermissionsDialogUtils.openAppDetails(this, "显示悬浮窗", REQUEST_CODE_DIALOG)
// 检查是否有悬浮窗权限
if (Settings.canDrawOverlays(this)) {
return
}
//申请悬浮窗权限
PermissionsDialogUtils.openAppDetails(this, "显示悬浮窗", REQUEST_CODE_DIALOG)
}
private fun injectStatusBar() {
@@ -116,7 +111,6 @@ open class MainActivity : MvpActivity<MainView?, MainPresenter?>(), MainView,
decorView.addView(statusBarView, statusBarLP)
}
// todo 优化 车聊聊
private fun injectFloatView() {
val decorView = this.window.decorView as? FrameLayout ?: return

View File

@@ -5,9 +5,9 @@ import com.mogo.eagle.core.data.config.FunctionBuildConfig
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotPointCloudListener
import com.mogo.eagle.core.function.api.base.IMoGoSubscriber
import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotPointCloudListenerManager
import com.mogo.eagle.core.function.call.map.CallerMapUIServiceManager
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_MAP
import com.zhidaoauto.map.sdk.open.business.PointCloudHelper
import java.math.BigDecimal
/**
@@ -47,26 +47,20 @@ class MapPointCloudSubscriber private constructor()
if (!isDrawPointCloud) {
CallerLogger.d(M_MAP + TAG, "====开启点云渲染====")
isDrawPointCloud = true
PointCloudHelper.setIsDrawPointCloud(true)//打开点云绘制
CallerMapUIServiceManager.getMapUIController()?.setIsDrawPointCloud(true)
}
PointCloudHelper.setIsDrawPointCloud(true)//打开点云绘制
CallerMapUIServiceManager.getMapUIController()?.setIsDrawPointCloud(true) //打开点云绘制
/**
* 更新点云数据
* @param dataStr 点云数据
* @param isTrasformer 是否需要转换坐标
* @param isResidual 是否需要差量更新
* @param isStrong 是否加粗显示
* @return 是否执行
*/
CallerLogger.d(M_MAP + TAG, "====开始传入地图点云数据====")
val result = PointCloudHelper.updatePointCloudDataByPb(pointCloud, true, false, false)
val result = CallerMapUIServiceManager.getMapUIController()?.updatePointCloud(pointCloud,
isTrasformer = true, isResidual = false, isReset = false
)
CallerLogger.d(M_MAP + TAG, "====结束传入地图点云数据=====$result")
} else {
if (isDrawPointCloud) {
CallerLogger.d(M_MAP + TAG, "====停止点云绘制====")
isDrawPointCloud = false
PointCloudHelper.setIsDrawPointCloud(false)//停止点云绘制
CallerMapUIServiceManager.getMapUIController()?.setIsDrawPointCloud(false)//停止点云绘制
}
}
} catch (e: Exception) {
@@ -83,10 +77,10 @@ class MapPointCloudSubscriber private constructor()
// MAP_RoboBus_B1_3.3.0_lxw_20230526_old_dev
val dockerVersionName = AppConfigInfo.dockerVersion
// "." 分割,取前两位
val dockerVersionNameArray = dockerVersionName?.split(".")
val dockerVersionNameArray = dockerVersionName.split(".")
var dockerVersionCode = ""
dockerVersionNameArray?.let {
dockerVersionNameArray.let {
if (it.size >= 3) {
for (index in 0 until 3) {
dockerVersionCode +=

View File

@@ -2,6 +2,7 @@ package com.mogo.eagle.core.function.business.ai
import android.content.Context
import android.os.Handler
import android.os.Looper
import android.os.Message
import com.mogo.aicloud.services.socket.IMogoOnMessageListener
import com.mogo.aicloud.services.socket.MogoAiCloudSocketManager
@@ -68,7 +69,7 @@ class AiCloudIdentifyDataManager : IMoGoPlanningRottingListener,
@Volatile
private var cloudDataSize = 0
private val handler = Handler {
private val handler = Handler(Looper.getMainLooper()) {
if (it.what == H_ERROR_CLOUD) {
if (!aiCloudDataChange.get()) {
MapBizTrace.log(

View File

@@ -8,7 +8,6 @@ import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_
import com.mogo.eagle.core.utilcode.util.ThreadUtils
import com.mogo.map.MogoData.Companion.mogoMapData
//todo emaArrow 多实例影响到的业务,进行测试
object CacheHDMapManager {
private const val TAG = "CacheHDMapManager"

View File

@@ -6,7 +6,6 @@ import com.mogo.map.MoGoOverlayManager.overlay
import com.mogo.map.location.GDLocationClient.Companion.gdLocationClient
import com.mogo.eagle.core.data.constants.MogoServicePaths
import com.mogo.eagle.core.function.api.map.IMogoMapService
import com.mogo.map.MogoMap
import com.mogo.map.uicontroller.IMogoMapUIController
import com.mogo.map.overlay.IMoGoOverlayManager
import com.mogo.map.MogoMap.Companion.mapInstance
@@ -22,7 +21,7 @@ import com.mogo.map.location.IMogoGDLocationClient
@Route(path = MogoServicePaths.PATH_SERVICES_MAP)
class MogoMapService : IMogoMapService {
override fun getMapUIController(mapTag:String): IMogoMapUIController {
override fun getMapUIController(mapTag:String): IMogoMapUIController? {
return mapInstance.getMogoMap().uiController
}

View File

@@ -11,7 +11,6 @@ import com.mogo.eagle.core.function.api.autopilot.IMoGoChassisLocationWGS84Liste
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.map.CallerMapUIServiceManager
import com.mogo.eagle.core.function.call.setting.CallerSkinModeListenerManager
import com.mogo.map.MogoMapView
import com.mogo.map.uicontroller.IMogoMapUIController
@@ -79,9 +78,9 @@ class MapBizView(context: Context?, attrs: AttributeSet?) : MogoMapView(context,
override fun onSkinModeChange(skinMode: Int) {
if (skinMode == 0) {
getUI().stepInVrMode(false)
getUI().stepInDayMode(false)
} else if (skinMode == 1) {
getUI().stepInVrMode(true)
getUI().stepInDayMode(true)
}
}