Merge branch 'test_robotaxi-d-app-module_2110_220915_2.11.0.1' into 'dev_robotaxi-d-app-module_2120_221017_2.12.0'
Test robotaxi d app module 2110 220915 2.11.0.1 See merge request zhjt/AndroidApp/MoGoEagleEye!294
This commit is contained in:
@@ -36,7 +36,6 @@ class DevaToolsProvider : IDevaToolsProvider {
|
||||
|
||||
override fun initBiz() {
|
||||
bizConfigCenter.init(mContext!!)
|
||||
FuncConfigImpl.init()
|
||||
traceManager.init(mContext!!)
|
||||
MogoLogCatchManager.init(mContext!!)
|
||||
}
|
||||
|
||||
@@ -23,10 +23,7 @@ object FuncConfigImpl {
|
||||
data: String?
|
||||
) {
|
||||
when (type) {
|
||||
BIZ_BEAUTY_MODE -> FunctionBuildConfig.isDemoMode = state
|
||||
BIZ_RAIN_MODE -> FunctionBuildConfig.isRainMode = state
|
||||
BIZ_WARNING_UPLOAD -> FunctionBuildConfig.isReportWarning = state
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
)
|
||||
|
||||
@@ -1415,29 +1415,27 @@ class MoGoHmiFragment : MvpFragment<MoGoHmiContract.View?, HmiPresenter?>(),
|
||||
"EmArrow-1013",
|
||||
"it code : ${it.code} , state : ${getAutoPilotStatusInfo().state}"
|
||||
)
|
||||
if (getAutoPilotStatusInfo().state != STATUS_AUTOPILOT_RUNNING) {
|
||||
showWarningV2X(
|
||||
EventTypeEnum.TAKE_OVER_EVENT.poiType,
|
||||
EventTypeEnum.TAKE_OVER_EVENT.content,
|
||||
EventTypeEnum.TAKE_OVER_EVENT.tts,
|
||||
EventTypeEnum.TAKE_OVER_EVENT.poiType,
|
||||
object : IMoGoWarningStatusListener {
|
||||
override fun onShow() {
|
||||
Log.d("EmArrow-1013", "onShow")
|
||||
takeOver = true
|
||||
clTakeOverView.visibility = View.VISIBLE
|
||||
}
|
||||
showWarningV2X(
|
||||
EventTypeEnum.TAKE_OVER_EVENT.poiType,
|
||||
EventTypeEnum.TAKE_OVER_EVENT.content,
|
||||
EventTypeEnum.TAKE_OVER_EVENT.tts,
|
||||
EventTypeEnum.TAKE_OVER_EVENT.poiType,
|
||||
object : IMoGoWarningStatusListener {
|
||||
override fun onShow() {
|
||||
Log.d("EmArrow-1013", "onShow")
|
||||
takeOver = true
|
||||
clTakeOverView.visibility = View.VISIBLE
|
||||
}
|
||||
|
||||
override fun onDismiss() {
|
||||
Log.d("EmArrow-1013", "onDismiss")
|
||||
takeOver = false
|
||||
clTakeOverView.visibility = View.GONE
|
||||
}
|
||||
},
|
||||
true,
|
||||
6000L
|
||||
)
|
||||
}
|
||||
override fun onDismiss() {
|
||||
Log.d("EmArrow-1013", "onDismiss")
|
||||
takeOver = false
|
||||
clTakeOverView.visibility = View.GONE
|
||||
}
|
||||
},
|
||||
true,
|
||||
6000L
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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
|
||||
@@ -1857,7 +1858,6 @@ class DebugSettingView @JvmOverloads constructor(
|
||||
override fun updateBizData(type: String, state: Boolean, lock: Boolean, data: String?) {
|
||||
when (type) {
|
||||
BIZ_BEAUTY_MODE -> {
|
||||
tbIsDemoMode.isClickable = !lock
|
||||
if(lock){
|
||||
tbIsDemoMode.background = resources.getDrawable(R.drawable.radio_button_lock_background)
|
||||
}else{
|
||||
@@ -1865,7 +1865,6 @@ class DebugSettingView @JvmOverloads constructor(
|
||||
}
|
||||
}
|
||||
BIZ_RAIN_MODE -> {
|
||||
tbIsRainMode.isClickable = !lock
|
||||
if(lock){
|
||||
tbIsRainMode.background = resources.getDrawable(R.drawable.radio_button_lock_background)
|
||||
}else{
|
||||
@@ -1873,7 +1872,6 @@ class DebugSettingView @JvmOverloads constructor(
|
||||
}
|
||||
}
|
||||
BIZ_WARNING_UPLOAD -> {
|
||||
tbReportWarning.isClickable = !lock
|
||||
if(lock){
|
||||
tbReportWarning.background = resources.getDrawable(R.drawable.radio_button_lock_background)
|
||||
}else{
|
||||
@@ -1882,20 +1880,16 @@ class DebugSettingView @JvmOverloads constructor(
|
||||
}
|
||||
BIZ_BAG_RECORD -> {
|
||||
if (lock) {
|
||||
btnRecordBag.isClickable = false
|
||||
btnRecordBag.background = resources.getDrawable(R.drawable.radio_button_lock_background)
|
||||
} else {
|
||||
btnRecordBag.isClickable = true
|
||||
btnRecordBag.requestFocus()
|
||||
btnRecordBag.background = null
|
||||
}
|
||||
}
|
||||
BIZ_FULL_LOG -> {
|
||||
if (lock) {
|
||||
tbLogCatch.isClickable = false
|
||||
tbLogCatch.background = resources.getDrawable(R.drawable.radio_button_lock_background)
|
||||
} else {
|
||||
tbLogCatch.isClickable = true
|
||||
tbLogCatch.requestFocus()
|
||||
tbLogCatch.background = null
|
||||
}
|
||||
|
||||
@@ -32,18 +32,18 @@ class PerspectiveSwitchView @JvmOverloads constructor(
|
||||
override fun onClick(v: View?) {
|
||||
//切换地图的远近视图
|
||||
if (MogoMapUIController.getInstance().currentMapVisualAngle.isLongSight) {
|
||||
MogoMarkerManager.getInstance(AbsMogoApplication.getApp())
|
||||
.visibleAllMarkers()
|
||||
// MogoMarkerManager.getInstance(AbsMogoApplication.getApp())
|
||||
// .visibleAllMarkers()
|
||||
MogoMapUIController.getInstance().changeMapVisualAngle(VisualAngleMode.MODE_MEDIUM_SIGHT, null)
|
||||
textSwitch.setText(R.string.module_map_model_normal)
|
||||
} else if (MogoMapUIController.getInstance().currentMapVisualAngle.isMediumSight) {
|
||||
MogoMarkerManager.getInstance(AbsMogoApplication.getApp())
|
||||
.inVisibleWithoutMarkers(DataTypes.TYPE_MARKER_ADAS)
|
||||
// MogoMarkerManager.getInstance(AbsMogoApplication.getApp())
|
||||
// .inVisibleWithoutMarkers(DataTypes.TYPE_MARKER_ADAS)
|
||||
MogoMapUIController.getInstance().changeMapVisualAngle(VisualAngleMode.MODE_LONG_SIGHT, null)
|
||||
textSwitch.setText(R.string.module_map_model_faster)
|
||||
} else {
|
||||
MogoMarkerManager.getInstance(AbsMogoApplication.getApp())
|
||||
.visibleAllMarkers()
|
||||
// MogoMarkerManager.getInstance(AbsMogoApplication.getApp())
|
||||
// .visibleAllMarkers()
|
||||
MogoMapUIController.getInstance().changeMapVisualAngle(VisualAngleMode.MODE_MEDIUM_SIGHT, null)
|
||||
textSwitch.setText(R.string.module_map_model_normal)
|
||||
}
|
||||
|
||||
@@ -483,6 +483,7 @@ object V2XEventManager : IMoGoMapLocationListener, IMoGoTokenCallback, IV2XCallb
|
||||
})
|
||||
}
|
||||
|
||||
AiRoadMarker.receive(Marker(this.roadwork?.center?.point?.lat ?: 0.0, this.roadwork?.center?.point?.lon ?: 0.0, this.roadwork?.center?.road?.bearing?.toDouble() ?: 0.0, null, null, null))
|
||||
}
|
||||
|
||||
// private fun buildRoadEntity(e: V2XMarkerExploreWay, extra: Map<String, Any>? = null): V2XRoadEventEntity { // 记录道路事件
|
||||
|
||||
@@ -6,6 +6,7 @@ import android.content.Intent;
|
||||
|
||||
import androidx.localbroadcastmanager.content.LocalBroadcastManager;
|
||||
|
||||
import com.mogo.eagle.core.function.v2x.events.scenario.scene.airoad.AiRoadMarker;
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger;
|
||||
import com.mogo.eagle.core.function.v2x.events.bridge.BridgeApi;
|
||||
import com.mogo.eagle.core.function.v2x.events.consts.V2XConst;
|
||||
@@ -62,6 +63,7 @@ public class V2XScenarioManager implements IV2XScenarioManager {
|
||||
Intent intent = new Intent(V2XConst.BROADCAST_SCENE_ACTION);
|
||||
intent.putExtra(V2XConst.BROADCAST_SCENE_EXTRA_KEY, v2XMessageEntity);
|
||||
LocalBroadcastManager.getInstance(Utils.getApp()).sendBroadcast(intent);
|
||||
AiRoadMarker.INSTANCE.clear();
|
||||
// 如果没有拿到之前的,根据类型分发
|
||||
switch (v2XMessageEntity.getType()) {
|
||||
case V2XMessageEntity.V2XTypeEnum.ALERT_ROAD_WARNING:
|
||||
|
||||
@@ -3,6 +3,7 @@ package com.mogo.eagle.core.function.v2x.events.scenario.scene.airoad
|
||||
import android.animation.*
|
||||
import android.content.*
|
||||
import android.graphics.*
|
||||
import android.os.*
|
||||
import android.view.animation.*
|
||||
import androidx.core.util.Pair
|
||||
import androidx.lifecycle.*
|
||||
@@ -22,6 +23,7 @@ import com.mogo.map.overlay.*
|
||||
import com.mogo.module.common.entity.*
|
||||
import com.mogo.module.common.utils.*
|
||||
import io.netty.util.internal.*
|
||||
import java.lang.Runnable
|
||||
import java.util.*
|
||||
import java.util.concurrent.*
|
||||
import java.util.concurrent.atomic.*
|
||||
@@ -49,6 +51,17 @@ object AiRoadMarker {
|
||||
private val START_COLOR = Color.parseColor("#002ABAD9")
|
||||
private val END_COLOR = Color.parseColor("#66FF7A30")
|
||||
|
||||
private val handler by lazy {
|
||||
Handler(Looper.getMainLooper())
|
||||
}
|
||||
|
||||
private val checkExpiredTask = Runnable {
|
||||
val marker = this@AiRoadMarker.marker.get()
|
||||
if (marker != null) {
|
||||
unMarker(marker)
|
||||
}
|
||||
}
|
||||
|
||||
private val markers = ConcurrentSet<Marker>()
|
||||
|
||||
private val options by lazy {
|
||||
@@ -189,6 +202,7 @@ object AiRoadMarker {
|
||||
|
||||
fun marker(marker: Marker, drawMarker: Boolean) {
|
||||
val location = carLocation.get() ?: return
|
||||
this.marker.set(marker)
|
||||
//施工中心点前方的自车行驶方向上300米距离
|
||||
val l1 = MogoMap.getInstance().mogoMap.getCenterLineRangeInfo(marker.poi_lon, marker.poi_lat, location.third.toFloat(), 300f)
|
||||
//施工中心点后方的自车行驶方向上300米距离
|
||||
@@ -285,7 +299,7 @@ object AiRoadMarker {
|
||||
|
||||
fun clear() {
|
||||
hideLine()
|
||||
// V2XAiRoadEventMarker.removeMarkers(null)
|
||||
V2XAiRoadEventMarker.removeMarkers(null)
|
||||
}
|
||||
|
||||
fun restore() {
|
||||
@@ -319,6 +333,25 @@ object AiRoadMarker {
|
||||
return degree < 90
|
||||
}
|
||||
|
||||
fun receive(marker: Marker) {
|
||||
val cur = this.marker.get()
|
||||
if (cur == marker) {
|
||||
val poi = this.marker.get()
|
||||
val car = this.carLocation.get()
|
||||
if (poi != null && car != null) {
|
||||
val distance = DrivingDirectionUtils.distance(car.first, car.second, marker.poi_lon, marker.poi_lat)
|
||||
if (distance < 300) {
|
||||
checkExpired()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private fun checkExpired() {
|
||||
handler.removeCallbacks(checkExpiredTask)
|
||||
handler.postDelayed(checkExpiredTask, 5000)
|
||||
}
|
||||
|
||||
data class Marker(
|
||||
val poi_lat: Double,
|
||||
val poi_lon: Double,
|
||||
|
||||
Reference in New Issue
Block a user