Merge remote-tracking branch 'origin/dev_arch_opt_3.0' into dev_arch_opt_3.0
This commit is contained in:
@@ -587,6 +587,8 @@ class MogoPrivateObuNewManager private constructor() {
|
||||
EventTypeEnumNew.getWarningContent(EventTypeEnumNew.TYPE_USECASE_ID_FCW.poiType)
|
||||
ttsContent =
|
||||
EventTypeEnumNew.getWarningTts(EventTypeEnumNew.TYPE_USECASE_ID_FCW.poiType)
|
||||
|
||||
// ObuManager.getInstance().obuRvToTrackedObject(info) //todo emArrow
|
||||
}
|
||||
|
||||
//交叉路口碰撞预警
|
||||
@@ -734,7 +736,6 @@ class MogoPrivateObuNewManager private constructor() {
|
||||
}, direction
|
||||
)
|
||||
}
|
||||
// ObuManager.getInstance().obuRvToTrackedObject(info)
|
||||
//更新周边车辆进行预警颜色变换,车辆实时移动和变色 ,UUID不需要匹配了
|
||||
TrafficDataConvertUtilsNew.cvxV2vThreatIndInfo2TrafficData(info)?.let {
|
||||
CallerMapUIServiceManager.getMarkerService()
|
||||
|
||||
@@ -101,7 +101,7 @@ class BindingCarManager : IMoGoAutopilotCarConfigListener {
|
||||
}
|
||||
|
||||
fun modifyCarInfo(callBack: (ModifyBindingcarInfo) -> Unit) {
|
||||
BindingCarNetWorkManager.instance.modifyBindingcar(mContext!!, mAddress, mWidevineIDWithMd5, callBack, screenType)
|
||||
BindingCarNetWorkManager.instance.modifyBindingCar(mContext!!, mAddress, mWidevineIDWithMd5, callBack, screenType)
|
||||
}
|
||||
|
||||
private fun driverScreen(macAddress: String, widevineIDWithMd5: String) {
|
||||
|
||||
@@ -74,12 +74,10 @@ class BindingCarNetWorkManager private constructor() {
|
||||
override fun onSubscribe(d: Disposable) {}
|
||||
override fun onNext(info: BindingCarInfo) {
|
||||
if (info != null && info.getData() != null) {
|
||||
d(SceneConstant.M_BINDING + TAG, "getBindingcarInfo data =" + info.getData().toString())
|
||||
//根据车辆类型切换不同的车辆模型,只针对红旗做处理,当mac地址不一致,切换模型
|
||||
d(SceneConstant.M_BINDING + TAG, "getBindingCarInfo data =" + info.getData().toString())
|
||||
if (!SharedPrefsMgr.getInstance(context).getString(SharedPrefsConstants.MAC_ADDRESS).equals(macAddress) && DebugConfig.isCarModelChange()) {
|
||||
updateCarVrIconRes(info.getData().brandId)
|
||||
updateCarVrIconRes(info.getData().brandId);
|
||||
}
|
||||
|
||||
when (info.getData().compare) {
|
||||
"0" -> showBindingCarDialog()
|
||||
"3" -> showModifyBindingCarDialog()
|
||||
@@ -93,7 +91,7 @@ class BindingCarNetWorkManager private constructor() {
|
||||
override fun onError(e: Throwable) {
|
||||
e(
|
||||
SceneConstant.M_BINDING + TAG,
|
||||
"getBindingcarInfo onError e = " + e.toString() + "---e.getMessage = " + e.message
|
||||
"getBindingCarInfo onError e = " + e.toString() + "---e.getMessage = " + e.message
|
||||
)
|
||||
}
|
||||
|
||||
@@ -105,7 +103,7 @@ class BindingCarNetWorkManager private constructor() {
|
||||
* 绑定和修改绑定车辆
|
||||
* mac: 48:b0:2d:3a:9c:19
|
||||
*/
|
||||
fun modifyBindingcar(
|
||||
fun modifyBindingCar(
|
||||
context: Context,
|
||||
macAddress: String?,
|
||||
widevineIDWithMd5: String?,
|
||||
@@ -133,12 +131,11 @@ class BindingCarNetWorkManager private constructor() {
|
||||
callBack.invoke(info)
|
||||
d(
|
||||
SceneConstant.M_BINDING + TAG,
|
||||
"modifyBindingcar onNext code = " + info.code + "---msg = " + info.msg + "--info.toString() = " + info.toString()
|
||||
"modifyBindingCar onNext code = " + info.code + "---msg = " + info.msg + "--info.toString() = " + info.toString()
|
||||
)
|
||||
if (!SharedPrefsMgr.getInstance(context).getString(SharedPrefsConstants.MAC_ADDRESS).equals(macAddress) && DebugConfig.isCarModelChange()) {
|
||||
updateCarVrIconRes(info.data.brandId)
|
||||
updateCarVrIconRes(info.data.brandId);
|
||||
}
|
||||
|
||||
SharedPrefsMgr.getInstance(context).putString(SharedPrefsConstants.MAC_ADDRESS, macAddress)
|
||||
}
|
||||
}
|
||||
@@ -146,7 +143,7 @@ class BindingCarNetWorkManager private constructor() {
|
||||
override fun onError(e: Throwable) {
|
||||
e(
|
||||
SceneConstant.M_BINDING + TAG,
|
||||
"modifyBindingcar onError e = " + e.toString() + "---e.getMessage = " + e.message
|
||||
"modifyBindingCar onError e = " + e.toString() + "---e.getMessage = " + e.message
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
@@ -9,6 +9,7 @@ import android.graphics.Color
|
||||
import android.os.Build
|
||||
import android.text.Html
|
||||
import android.util.AttributeSet
|
||||
import android.util.Log
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import androidx.annotation.RequiresApi
|
||||
@@ -607,7 +608,6 @@ internal class DebugSettingView @JvmOverloads constructor(
|
||||
tbIsDemoMode.visibility = View.GONE
|
||||
}
|
||||
|
||||
|
||||
// 雨天模式,上一次勾选的数据
|
||||
tbIsRainMode.isChecked = FunctionBuildConfig.isRainMode
|
||||
//雨天模式
|
||||
@@ -624,36 +624,30 @@ internal class DebugSettingView @JvmOverloads constructor(
|
||||
//感知优化模式
|
||||
tbBeautyMode.setOnCheckedChangeListener { _, isChecked ->
|
||||
FunctionBuildConfig.isBeautyMode = isChecked
|
||||
if (!FunctionBuildConfig.isBeautyMode) {
|
||||
tbBeautyMode.isChecked = false
|
||||
}
|
||||
}
|
||||
|
||||
tbV2NFromCar.isChecked = FunctionBuildConfig.isV2NFromCar
|
||||
//v2n车端预警
|
||||
tbV2NFromCar.setOnCheckedChangeListener { _, isChecked ->
|
||||
FunctionBuildConfig.isV2NFromCar = isChecked
|
||||
if (!FunctionBuildConfig.isV2NFromCar) {
|
||||
tbV2NFromCar.isChecked = false
|
||||
}
|
||||
}
|
||||
|
||||
tbDrawAiCloudFusion.isChecked = FunctionBuildConfig.isDrawAiCloudFusion
|
||||
//云端感知绘制
|
||||
tbDrawAiCloudFusion.setOnCheckedChangeListener { _, isChecked ->
|
||||
FunctionBuildConfig.isDrawAiCloudFusion = isChecked
|
||||
if (!FunctionBuildConfig.isDrawAiCloudFusion) {
|
||||
tbDrawAiCloudFusion.isChecked = false
|
||||
}
|
||||
}
|
||||
|
||||
tbDrawRomaMode.isChecked = FunctionBuildConfig.isRomaMode
|
||||
//roma
|
||||
tbDrawRomaMode.setOnCheckedChangeListener { _, isChecked ->
|
||||
FunctionBuildConfig.isRomaMode = isChecked
|
||||
if (!FunctionBuildConfig.isRomaMode) {
|
||||
tbDrawRomaMode.isChecked = false
|
||||
}
|
||||
}
|
||||
|
||||
tbObuWarningFusionUnion.isChecked = FunctionBuildConfig.isObuWarningFusionUnion
|
||||
//ObuWarningFusionUnion
|
||||
tbObuWarningFusionUnion.setOnCheckedChangeListener { _, isChecked ->
|
||||
FunctionBuildConfig.isObuWarningFusionUnion = isChecked
|
||||
}
|
||||
|
||||
//重启工控机所有节点
|
||||
@@ -749,12 +743,6 @@ internal class DebugSettingView @JvmOverloads constructor(
|
||||
FunctionBuildConfig.isDrawUnknownIdentifyData = isChecked
|
||||
}
|
||||
|
||||
// // 初始化 OBU感知数据是否绘制 选择情况
|
||||
// tbIsDrawOBUIdentifyData.isChecked = FunctionBuildConfig.isDrawObuIdentifyData
|
||||
// tbIsDrawOBUIdentifyData.setOnCheckedChangeListener { buttonView, isChecked ->
|
||||
// FunctionBuildConfig.isDrawObuIdentifyData = isChecked
|
||||
// }
|
||||
|
||||
//TODO
|
||||
tbIsDrawPath.setOnCheckedChangeListener { _, isChecked ->
|
||||
|
||||
@@ -1062,18 +1050,6 @@ internal class DebugSettingView @JvmOverloads constructor(
|
||||
* 设置Hmi点击监听
|
||||
*/
|
||||
private fun setHmiCheckedChangeListener() {
|
||||
|
||||
/**
|
||||
* 隐藏、显示小地图
|
||||
*/
|
||||
tbControlView.setOnCheckedChangeListener { _, isChecked ->
|
||||
// if (isChecked) {
|
||||
// CallerSmpManager.hidePanel()
|
||||
// } else {
|
||||
// CallerSmpManager.showPanel()
|
||||
// }
|
||||
}
|
||||
|
||||
/**
|
||||
* sn绑定控制
|
||||
*/
|
||||
|
||||
@@ -278,6 +278,18 @@
|
||||
android:textOn="关闭漫游模式"
|
||||
android:textSize="@dimen/dp_24" />
|
||||
|
||||
<ToggleButton
|
||||
android:id="@+id/tbObuWarningFusionUnion"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="@dimen/dp_10"
|
||||
android:padding="@dimen/dp_20"
|
||||
android:background="@drawable/radio_button_normal_background_right"
|
||||
android:textColor="#000"
|
||||
android:textOff="开启obu预警融合"
|
||||
android:textOn="关闭obu预警融合"
|
||||
android:textSize="@dimen/dp_24" />
|
||||
|
||||
<ToggleButton
|
||||
android:id="@+id/tbMojie"
|
||||
android:layout_width="match_parent"
|
||||
@@ -1310,18 +1322,6 @@
|
||||
app:layout_constraintLeft_toRightOf="@+id/tbChangeCurrentCarIcon"
|
||||
app:layout_constraintTop_toTopOf="@id/tbChangeCurrentCarIcon" />
|
||||
|
||||
<ToggleButton
|
||||
android:id="@+id/tbControlView"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_columnWeight="1"
|
||||
android:layout_margin="2dp"
|
||||
android:gravity="center"
|
||||
android:padding="@dimen/dp_20"
|
||||
android:textOff="隐藏「小地图」"
|
||||
android:textOn="显示「小地图」"
|
||||
android:textSize="@dimen/dp_24" />
|
||||
|
||||
<ToggleButton
|
||||
android:id="@+id/tbOpenSnBinding"
|
||||
android:layout_width="wrap_content"
|
||||
|
||||
@@ -11,6 +11,7 @@ import android.view.MotionEvent
|
||||
import android.view.View
|
||||
import android.widget.RelativeLayout
|
||||
import android.widget.TextView
|
||||
import androidx.annotation.MainThread
|
||||
import ch.hsr.geohash.GeoHash
|
||||
import com.amap.api.maps.AMap
|
||||
import com.amap.api.maps.CameraUpdate
|
||||
@@ -71,7 +72,7 @@ class OverMapView @JvmOverloads constructor(
|
||||
private val zoomLevel = 15
|
||||
private var mCameraUpdate: CameraUpdate? = null
|
||||
private var mContext: Context? = null
|
||||
private val mTilt = 60f
|
||||
private var mTilt = 0f
|
||||
private var overLayerView: TextView? = null
|
||||
|
||||
// 全局路径规划中的GeoHash网格
|
||||
@@ -99,6 +100,7 @@ class OverMapView @JvmOverloads constructor(
|
||||
private var isFirstLocation = true
|
||||
var mCustomMapStyleOptions: CustomMapStyleOptions? = null
|
||||
var currMarkerList: ArrayList<Marker>? = null
|
||||
var siteMarkerList: ArrayList<Marker>? = null
|
||||
|
||||
companion object {
|
||||
const val TAG = "OverMapView"
|
||||
@@ -155,18 +157,56 @@ class OverMapView @JvmOverloads constructor(
|
||||
}
|
||||
// =================必须通知高德地图生命周期的变化=================
|
||||
|
||||
/**
|
||||
* 隐藏右下角的重置View
|
||||
*/
|
||||
fun hideResetView() {
|
||||
overLayerView?.visibility = View.GONE
|
||||
}
|
||||
|
||||
/**
|
||||
* siteLatLngs: 高德坐标集合
|
||||
* bitmap: Marker对应的图片
|
||||
* (anchorX,anchorY)为锚点坐标,各自取值范围为[0,1],默认值为(0.5,1)
|
||||
*/
|
||||
@MainThread
|
||||
fun drawSiteMarkers(siteLatLngs: List<LatLng>?, bitmap: Bitmap, anchorX: Float, anchorY: Float) {
|
||||
if (siteLatLngs.isNullOrEmpty()) return
|
||||
clearSiteMarkers()
|
||||
val markerOptionsList = ArrayList<MarkerOptions>()
|
||||
for (latLng in siteLatLngs) {
|
||||
val markerOption = MarkerOptions()
|
||||
markerOption.position(latLng)
|
||||
markerOption.anchor(anchorX, anchorY)
|
||||
markerOption.icon(
|
||||
BitmapDescriptorFactory.fromBitmap(bitmap)
|
||||
)
|
||||
markerOptionsList.add(markerOption)
|
||||
}
|
||||
siteMarkerList = mAMap!!.addMarkers(markerOptionsList, false)
|
||||
}
|
||||
|
||||
@MainThread
|
||||
fun clearSiteMarkers() {
|
||||
if (siteMarkerList != null) {
|
||||
for (marker in siteMarkerList!!) {
|
||||
marker.destroy()
|
||||
}
|
||||
siteMarkerList = null
|
||||
}
|
||||
}
|
||||
|
||||
private fun initView(context: Context) {
|
||||
mContext = context
|
||||
val smpView = LayoutInflater.from(context).inflate(R.layout.module_overview_map_view, this)
|
||||
mMapView = smpView.findViewById(R.id.aMapView)
|
||||
overLayerView = findViewById(R.id.overLayer)
|
||||
overLayerView?.background = resources.getDrawable(if (resetDrawable != -1) resetDrawable else R.drawable.amap_reset)
|
||||
arrivedBitmap = BitmapDescriptorFactory.fromResource(if (arrivedDrawable != -1) arrivedDrawable else R.drawable.taxi_map_arrow_arrived)
|
||||
unArrivedBitmap = BitmapDescriptorFactory.fromResource(if (unArrivedDrawable != -1) unArrivedDrawable else R.drawable.taxi_map_arrow_un_arrive)
|
||||
overLayerView?.background =
|
||||
resources.getDrawable(if (resetDrawable != -1) resetDrawable else R.drawable.amap_reset)
|
||||
arrivedBitmap =
|
||||
BitmapDescriptorFactory.fromResource(if (arrivedDrawable != -1) arrivedDrawable else R.drawable.taxi_map_arrow_arrived)
|
||||
unArrivedBitmap =
|
||||
BitmapDescriptorFactory.fromResource(if (unArrivedDrawable != -1) unArrivedDrawable else R.drawable.taxi_map_arrow_un_arrive)
|
||||
CallerPlanningRottingListenerManager.addListener(TAG, this)
|
||||
initAMapView(context)
|
||||
// 注册定位监听
|
||||
@@ -177,6 +217,7 @@ class OverMapView @JvmOverloads constructor(
|
||||
|
||||
private fun initAMapView(context: Context) {
|
||||
Log.d(TAG, "initAMapView")
|
||||
mTilt = 30f
|
||||
mCameraUpdate = CameraUpdateFactory.zoomTo(zoomLevel.toFloat())
|
||||
mAMap = mMapView!!.map
|
||||
mCustomMapStyleOptions = CustomMapStyleOptions()
|
||||
@@ -197,6 +238,8 @@ class OverMapView @JvmOverloads constructor(
|
||||
}
|
||||
// 实时路况图层关闭,必须添加在loaded结束之后,其他位置不生效
|
||||
mAMap?.isTrafficEnabled = false
|
||||
mAMap?.showBuildings(true)
|
||||
mAMap?.animateCamera(CameraUpdateFactory.changeTilt(mTilt))
|
||||
}
|
||||
setUpMap()
|
||||
customOptions()
|
||||
@@ -350,7 +393,7 @@ class OverMapView @JvmOverloads constructor(
|
||||
return bitmap
|
||||
}
|
||||
|
||||
fun clearV2XMarkers() {
|
||||
private fun clearV2XMarkers() {
|
||||
if (currMarkerList != null) {
|
||||
for (marker in currMarkerList!!) {
|
||||
marker.destroy()
|
||||
@@ -428,6 +471,7 @@ class OverMapView @JvmOverloads constructor(
|
||||
bitmap
|
||||
)
|
||||
)
|
||||
markerOption.anchor(0.18f, 0.98f)
|
||||
markerOption.zIndex(2f)
|
||||
posInfMap[latLng] = structureList
|
||||
markerOptionsList.add(markerOption)
|
||||
@@ -448,8 +492,8 @@ class OverMapView @JvmOverloads constructor(
|
||||
val marker = MakerWithCount(context)
|
||||
marker.setCount(count)
|
||||
marker.measure(
|
||||
MeasureSpec.makeMeasureSpec(116, MeasureSpec.EXACTLY),
|
||||
MeasureSpec.makeMeasureSpec(116, MeasureSpec.EXACTLY)
|
||||
MeasureSpec.makeMeasureSpec(AutoSizeUtils.dp2px(mContext, 116f), MeasureSpec.EXACTLY),
|
||||
MeasureSpec.makeMeasureSpec(AutoSizeUtils.dp2px(mContext, 116f), MeasureSpec.EXACTLY)
|
||||
)
|
||||
marker.layout(0, 0, marker.measuredWidth, marker.measuredHeight)
|
||||
val bitmap = Bitmap.createBitmap(marker.width, marker.height, Bitmap.Config.ARGB_8888)
|
||||
@@ -486,7 +530,7 @@ class OverMapView @JvmOverloads constructor(
|
||||
} else {
|
||||
//设置希望展示的地图缩放级别
|
||||
val cameraPosition = CameraPosition.Builder()
|
||||
.target(mCarMarker!!.position).tilt(0f).zoom(zoomLevel.toFloat()).build()
|
||||
.target(mCarMarker!!.position).tilt(mTilt).zoom(zoomLevel.toFloat()).build()
|
||||
mAMap!!.moveCamera(CameraUpdateFactory.newCameraPosition(cameraPosition))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,7 +10,6 @@ import com.mogo.eagle.core.data.map.MogoLatLng;
|
||||
import com.mogo.eagle.core.data.map.entity.V2XMessageEntity;
|
||||
import com.mogo.eagle.core.data.map.entity.V2XRoadEventEntity;
|
||||
import com.mogo.eagle.core.data.v2x.V2XOptimalRouteDataRes;
|
||||
import com.mogo.eagle.core.function.call.map.CallerSmpManager;
|
||||
import com.mogo.eagle.core.function.v2x.events.consts.V2XConst;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
Reference in New Issue
Block a user