Merge tag 'test_MogoAP_eagle-1030_211020_8.0.14.2' into test_MogoAP_eagle-1030_211020_8.0.14.3

210版本
This commit is contained in:
donghongyu
2021-12-17 12:23:16 +08:00
40 changed files with 363 additions and 231 deletions

View File

@@ -424,7 +424,7 @@
-keep class org.conscrypt.HandshakeListener{*;}
-keep class org.conscrypt.BufferAllocator{*;}
-keep class com.squareup.haha.guava.collect.*{*;}
-keep class **.zego.**{*;}

View File

@@ -63,7 +63,7 @@
android:layout_gravity="center"
android:layout_marginTop="@dimen/dp_20"
android:gravity="center"
android:text="连接异常"
android:text="暂无数据"
android:textColor="@color/check_icon_error_color"
android:textSize="@dimen/dp_36"
app:layout_constraintTop_toTopOf="@+id/icon_auto_title" />

View File

@@ -24,7 +24,7 @@
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/dp_65"
android:layout_marginTop="@dimen/dp_20"
android:text="连接异常,请关闭重试"
android:text="暂无数据,请关闭重试"
android:textColor="@color/module_commons_wm_dialog_text_textColor"
android:textSize="@dimen/dp_64"
app:layout_constraintLeft_toRightOf="@+id/check_tip_image"

View File

@@ -148,13 +148,18 @@ class CameraListView : FrameLayout {
Logger.d(TAG, "onPlayEvent: event is:$event")
when (event) {
SimpleVideoPlayer.PLAY_EVT_PLAY_LOADING -> {
// 会出现临时中断后又可以继续播放,需要停掉倒计时
if (valueAnimator.isStarted || valueAnimator.isRunning) {
valueAnimator.cancel()
}
}
SimpleVideoPlayer.PLAY_EVT_PLAY_BEGIN -> {
clickListener?.onShowLive(true)
progressBar.visibility = View.GONE
svpPlayer.visibility = View.VISIBLE
isPlaySuccess = true
if (!isFirstPage && !isCarLive()) {
clickListener?.onShowLive(true)
progressBar.visibility = View.GONE
svpPlayer.visibility = View.VISIBLE
isPlaySuccess = true
}
}
else -> {
Logger.w(TAG, "播放视频异常,event is:$event")
@@ -195,6 +200,7 @@ class CameraListView : FrameLayout {
clickListener?.refreshCameraList()
clickListener?.onShowLive(false)
}
isFirstPage = true
isPlaySuccess = false
}
else -> {

View File

@@ -12,6 +12,7 @@ import androidx.lifecycle.LifecycleObserver;
import androidx.recyclerview.widget.RecyclerView;
import androidx.recyclerview.widget.StaggeredGridLayoutManager;
import com.mogo.cloud.commons.utils.CoordinateUtils;
import com.mogo.cloud.passport.MoGoAiCloudClientConfig;
import com.mogo.eagle.core.data.autopilot.AutopilotControlParameters;
import com.mogo.eagle.core.data.notice.NoticeTrafficStyleInfo;
@@ -177,12 +178,14 @@ public class NoticeTrafficDialog extends BaseFloatDialog implements LifecycleObs
AutopilotControlParameters parameters = new AutopilotControlParameters();
parameters.isSpeakVoice = false;
parameters.vehicleType = 10;
//云平台使用的是火星坐标,自动驾驶需要wgs84
double[] gcj02 = CoordinateUtils.transformGcj02toWgs84(mTrafficStyleInfo.getLat(),mTrafficStyleInfo.getLon());
AutopilotControlParameters.AutoPilotLonLat startLocation = new AutopilotControlParameters.AutoPilotLonLat
(MogoApisHandler.getInstance().getApis().getAdasControllerApi().getLastLon(),
MogoApisHandler.getInstance().getApis().getAdasControllerApi().getLastLat());
parameters.startLatLon = startLocation;
AutopilotControlParameters.AutoPilotLonLat endLocation = new AutopilotControlParameters.AutoPilotLonLat
(mTrafficStyleInfo.getLon(), mTrafficStyleInfo.getLat());
(gcj02[0],gcj02[1]);
parameters.endLatLon = endLocation;
CallerAutoPilotManager.INSTANCE.startAutoPilot(parameters);
}

View File

@@ -458,28 +458,29 @@ class MogoPrivateObuManager private constructor() {
// (5) 限速预警信息CVX_SLW_THREAT_IND
override fun onCvxSlwThreatIndInfo(info: CvxSlwThreatIndInfo?) {
Logger.d(MogoObuConst.TAG_MOGO_OBU, "onCvxSlwThreatIndInfo ------> $info")
if (info != null) {
when (info.status) {
// 添加
ObuConstants.STATUS.ADD,
ObuConstants.STATUS.UPDATE
-> {
if (info.ext_info != null) {
// 计算为千米每小时 TODO 这里需要做一下向上取整数406080120等
Logger.d(
MogoObuConst.TAG_MOGO_OBU,
"info.ext_info.speed_limit_max ------> ${info.ext_info.speed_limit_max}"
)
CallerHmiManager.showLimitingVelocity((Math.round(((info.ext_info.speed_limit_max * 60 * 60) / 1000) / 10) * 10).toInt())
}
}
// 删除
ObuConstants.STATUS.DELETE -> {
CallerHmiManager.disableLimitingVelocity()
}
}
}
//todo 限速走高精地图 屏蔽OBU限速\
// Logger.d(MogoObuConst.TAG_MOGO_OBU, "onCvxSlwThreatIndInfo ------> $info")
// if (info != null) {
// when (info.status) {
// // 添加
// ObuConstants.STATUS.ADD,
// ObuConstants.STATUS.UPDATE
// -> {
// if (info.ext_info != null) {
// // 计算为千米每小时 TODO 这里需要做一下向上取整数406080120等
// Logger.d(
// MogoObuConst.TAG_MOGO_OBU,
// "info.ext_info.speed_limit_max ------> ${info.ext_info.speed_limit_max}"
// )
// CallerHmiManager.showLimitingVelocity((Math.round(((info.ext_info.speed_limit_max * 60 * 60) / 1000) / 10) * 10).toInt())
// }
// }
// // 删除
// ObuConstants.STATUS.DELETE -> {
// CallerHmiManager.disableLimitingVelocity()
// }
// }
// }
}

View File

@@ -1,15 +1,18 @@
package com.mogo.eagle.core.function.v2x.redlightwarning
import android.location.Location
import com.mogo.eagle.core.data.map.MogoLatLng
import com.mogo.eagle.core.data.trafficlight.*
import com.mogo.eagle.core.data.trafficlight.TrafficLightStatusHelper.getCurrentRoadTrafficLight
import com.mogo.eagle.core.function.api.trafficlight.IMoGoTrafficLightListener
import com.mogo.eagle.core.function.api.vip.IMoGoVipSetListener
import com.mogo.eagle.core.function.call.hmi.CallerHmiManager
import com.mogo.eagle.core.function.call.map.CallerMapLocationListenerManager
import com.mogo.eagle.core.function.call.trafficlight.CallTrafficLightListenerManager
import com.mogo.eagle.core.function.call.vip.CallVipSetListenerManager
import com.mogo.eagle.core.utilcode.util.SPUtils
import com.mogo.eagle.core.function.v2x.vip.VipCarManager
import com.mogo.eagle.core.utilcode.util.ThreadUtils
import com.mogo.map.navi.IMogoCarLocationChangedListener2
import com.mogo.module.common.MogoApisHandler
import com.mogo.module.common.enums.EventTypeEnum
import com.mogo.utils.logger.Logger
import kotlin.math.abs
@@ -17,14 +20,19 @@ import kotlin.math.ceil
import kotlin.math.floor
class RedLightWarningManager : IMoGoTrafficLightListener, IMoGoVipSetListener {
class RedLightWarningManager : IMoGoTrafficLightListener, IMoGoVipSetListener,
IMogoCarLocationChangedListener2 {
private var vip: Boolean = false
// 是否第一次进入道路100m处
private var isFirst = true
// 是否已进入到路口(停止线处)
private var isEnter = false
private var mLocation: Location? = null
companion object {
const val TAG = "RedLightWarningManager"
@@ -35,10 +43,15 @@ class RedLightWarningManager : IMoGoTrafficLightListener, IMoGoVipSetListener {
}
override fun onTrafficLightStatus(trafficLightResult: TrafficLightResult) {
// 到路口100m时回调
Logger.d(TAG, "处理路口交通数据:是否是第一次处理:${isFirst}是否进入路口:${isEnter}")
if (trafficLightResult.currentRoadIsRight()) {
Logger.d(TAG,"当前道路右转,不处理")
return
}
if (isFirst && !isEnter) {
getCurrentRoadTrafficLight(trafficLightResult)?.let {
handleRedLightWarning(it, trafficLightResult.flashYellow)
handleRedLightWarning(it, trafficLightResult)
}
isFirst = false
}
@@ -59,36 +72,57 @@ class RedLightWarningManager : IMoGoTrafficLightListener, IMoGoVipSetListener {
fun listenTrafficLight() {
CallTrafficLightListenerManager.registerEnterCrossRoadListener(TAG, this)
CallTrafficLightListenerManager.registerTrafficLightListener(TAG, this)
MogoApisHandler.getInstance().apis.registerCenterApi.registerCarLocationChangedListener(
VipCarManager.TAG,
this
)
CallVipSetListenerManager.registerVipSetListener(TAG, this)
}
private fun handleRedLightWarning(trafficLightStatus: TrafficLightStatus, yellowLightTime: Int = 0) {
private fun handleRedLightWarning(
trafficLightStatus: TrafficLightStatus,
trafficLightResult: TrafficLightResult
) {
// 如果是Vip则不处理
if (vip) {
Logger.w(TAG, "Vip用户不处理闯红灯、绿灯通行预警逻辑")
return
}
// 路口100m闯红灯预警
CallerMapLocationListenerManager.getCurrentLocation()?.let {
mLocation?.let {
// 单位m/s
val speed = it.speed
// 车停止或者速度非常慢,可能返回负数或者很小的值,需要过滤
Logger.d(TAG, "speed is:$speed")
if (speed <= 2.5f) return// 小于等于9km/h不处理
val distance = 100
// 由于到路口100m时回调不准手动计算直线距离
val distance = MogoApisHandler.getInstance().apis.mapServiceApi
.mapUIController.calculateLineDistance(
MogoLatLng(it.latitude, it.longitude),
MogoLatLng(trafficLightResult.lat, trafficLightResult.lon)
)
Logger.d(
TAG,
"路口经度为:${trafficLightResult.lon},纬度为:${trafficLightResult.lat};车的经度为:${it.longitude},纬度为:${it.latitude};两点距离为:${distance}"
)
val remainTime = trafficLightStatus.remain
val arriveTime = distance / speed
Logger.d(TAG, "speed is:$speed,remainTime is:$remainTime,arriveTime is:$arriveTime,yellowTime is:$yellowLightTime")
Logger.d(
TAG,
"speed is:$speed,remainTime is:$remainTime,arriveTime is:$arriveTime,yellowTime is:${trafficLightResult.flashYellow}"
)
when {
trafficLightStatus.isRed() -> {
Logger.d(TAG, "=====当前为红灯=====")
// 到达路口时红灯还没走完
if (arriveTime <= remainTime) {
// 到达路口时红灯还没走完(由于多个数据有偏差红灯预警延长1s绿灯提示条件延长1.5s,多报出错不如少报且准)
if (arriveTime <= remainTime + 1) {
redLightWarning()
} else if (arriveTime > remainTime + yellowLightTime) {// 到达时红、黄灯都走完
} else if (arriveTime > remainTime + trafficLightResult.flashYellow + 1.5) {// 到达时红、黄灯都走完
// 单位Km/h当前为红灯推荐速度越慢越容易绿灯通过且要满足[10,50]
val originRemainSpeed = floor(100 / (remainTime + yellowLightTime) * 3.6).toInt()
when {
val originRemainSpeed =
floor(distance / (remainTime + trafficLightResult.flashYellow + 1.5) * 3.6).toInt()
when {
originRemainSpeed > 50 -> greenLightWarning("10到50")
originRemainSpeed in 10..50 -> greenLightWarning("10到$originRemainSpeed")
}
@@ -96,13 +130,13 @@ class RedLightWarningManager : IMoGoTrafficLightListener, IMoGoVipSetListener {
}
trafficLightStatus.isYellow() -> {
Logger.d(TAG, "=====当前为黄灯=====")
// 到达路口时黄灯还没走完
if (arriveTime <= remainTime) {
// 到达路口时黄灯还没走完(由于多个数据有偏差红灯预警延长1s绿灯提示延长1.5s,多报出错不如少报且准)
if (arriveTime <= remainTime + 1) {
redLightWarning()
} else {
} else if (arriveTime > remainTime + 1.5) {
// 单位Km/h当前为黄灯推荐速度越慢越容易绿灯通过且要满足[10,50]
val originRemainSpeed = floor(100 / remainTime * 3.6).toInt()
when {
val originRemainSpeed = floor(distance / (remainTime + 1.5) * 3.6).toInt()
when {
originRemainSpeed > 50 -> greenLightWarning("10到50")
originRemainSpeed in 10..50 -> greenLightWarning("10到$originRemainSpeed")
}
@@ -110,17 +144,16 @@ class RedLightWarningManager : IMoGoTrafficLightListener, IMoGoVipSetListener {
}
trafficLightStatus.isGreen() -> {
Logger.d(TAG, "=====当前为绿灯=====")
// 到达路口时绿灯已经走完
if (arriveTime >= remainTime) {
// 到达路口时绿灯已经走完(由于多个数据有偏差,多报出错不如少报且准,绿灯时间减少一点)
if (arriveTime >= remainTime - 1) {
redLightWarning()
} else if (arriveTime < remainTime) {
} else if (arriveTime < remainTime - 1.5) {
// 单位Km/h当前为绿灯推荐速度越快越容易绿灯通过且要满足[10,50]
val originRemainSpeed = ceil(100 / remainTime * 3.6).toInt()
when {
val originRemainSpeed = ceil(distance / (remainTime - 1.5) * 3.6).toInt()
when {
originRemainSpeed < 10 -> greenLightWarning("10到50")
originRemainSpeed in 10..50 -> greenLightWarning("${originRemainSpeed}到50")
}
greenLightWarning()
}
}
}
@@ -174,5 +207,19 @@ class RedLightWarningManager : IMoGoTrafficLightListener, IMoGoVipSetListener {
fun onDestroy() {
CallTrafficLightListenerManager.unRegisterTrafficLightListener(TAG)
CallVipSetListenerManager.unRegisterVipSetListener(TAG)
CallTrafficLightListenerManager.unRegisterEnterCrossRoadListener(TAG)
MogoApisHandler.getInstance().apis.registerCenterApi.unregisterCarLocationChangedListener(
TAG, this
)
}
override fun onCarLocationChanged(latLng: MogoLatLng?) {
}
override fun onCarLocationChanged2(latLng: Location?) {
latLng?.let {
mLocation = it
}
}
}

View File

@@ -40,11 +40,8 @@ public class SpeedLimitDataManager implements IMogoCarLocationChangedListener2 {
UiThreadHandler.post(new Runnable() {
@Override
public void run() {
int speed = (int) (mLocation.getSpeed() * 3.6f);
if (speed > 0 && speedLimmit > 0){
if (speedLimmit > 0){
CallerHmiManager.INSTANCE.showLimitingVelocity(speedLimmit);
}else {
CallerHmiManager.INSTANCE.disableLimitingVelocity();
}
}
});

View File

@@ -25,6 +25,10 @@ class RoadArrow {
fun isRight(arrowId: Int): Boolean {
return arrowId == TURN_RIGHT || arrowId == STRAIGHT_OR_RIGHT || arrowId == TURN_LEFT_OR_RIGHT
}
fun isOnlyRight(arrowId: Int): Boolean {
return arrowId == TURN_RIGHT
}
}
}

View File

@@ -4,6 +4,10 @@ fun TrafficLightResult.currentRoadTrafficLight(): TrafficLightStatus? {
return TrafficLightStatusHelper.getCurrentRoadTrafficLight(this)
}
fun TrafficLightResult.currentRoadIsRight():Boolean{
return TrafficLightStatusHelper.currentRoadIsRight(this)
}
/**
* 路口红绿灯请求返回数据
*/

View File

@@ -16,5 +16,10 @@ object TrafficLightStatusHelper {
return null
}
fun currentRoadIsRight(trafficLightResult: TrafficLightResult) : Boolean{
val arrowNo = trafficLightResult.arrowNo
return RoadArrow.isOnlyRight(arrowNo)
}
}

View File

@@ -1,5 +1,6 @@
package com.mogo.eagle.core.function.call.autopilot
import android.util.Log
import androidx.annotation.Nullable
import com.mogo.eagle.core.data.autopilot.AutopilotCarStateInfo
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotCarStateListener
@@ -17,7 +18,7 @@ object CallerAutopilotCarStatusListenerManager : CallerBase() {
// 存储所有注册了监听的对象invokeXXXX进行遍历回调将信息同步
private val M_AUTOPILOT_STATUS_LISTENERS: ConcurrentHashMap<String, IMoGoAutopilotCarStateListener> =
ConcurrentHashMap()
ConcurrentHashMap()
/**
@@ -26,8 +27,8 @@ object CallerAutopilotCarStatusListenerManager : CallerBase() {
* @param listener 监听回调
*/
fun addListener(
@Nullable tag: String,
@Nullable listener: IMoGoAutopilotCarStateListener
@Nullable tag: String,
@Nullable listener: IMoGoAutopilotCarStateListener
) {
if (M_AUTOPILOT_STATUS_LISTENERS.containsKey(tag)) {
LogUtils.eTag(TAG, "Tag:$tag already exists,please use other tag")
@@ -67,6 +68,7 @@ object CallerAutopilotCarStatusListenerManager : CallerBase() {
@Synchronized
fun invokeAutopilotCarStateData(autoPilotCarStateInfo: AutopilotCarStateInfo?) {
//LogUtils.dTag(TAG, "$autoPilotCarStateInfo")
//Log.w("DHY-location", "${autoPilotCarStateInfo?.values?.lon},${autoPilotCarStateInfo?.values?.lat} CallerAutopilotCarStatusListenerManager-invokeAutopilotCarStateData")
M_AUTOPILOT_STATUS_LISTENERS.forEach {
val tag = it.key
val listener = it.value

View File

@@ -1,5 +1,6 @@
package com.mogo.eagle.core.function.call.map
import android.util.Log
import androidx.annotation.Nullable
import com.mogo.eagle.core.data.map.MogoLocation
import com.mogo.eagle.core.function.api.map.listener.IMoGoMapLocationListener
@@ -87,6 +88,7 @@ object CallerMapLocationListenerManager : CallerBase() {
*/
fun invokeMapLocationChangeListener(location: MogoLocation?) {
//LogUtils.dTag(TAG, "mapStyleMode:$location")
Log.w("DHY-location", "${location?.longitude},${location?.latitude} CallerMapLocationListenerManager-invokeMapLocationChangeListener")
mLocation = location
mMapStyleChangeListeners.forEach {
val tag = it.key

Binary file not shown.

View File

@@ -37,7 +37,7 @@ kapt.include.compile.classpath=false
android.useAndroidX=true
# Automatically convert third-party libraries to use AndroidX
android.enableJetifier=true
android.jetifier.blacklist=module-service-2.0.93.aar
android.jetifier.blacklist=module-service-2.0.94.aar
## maven 配置
RELEASE_REPOSITORY_URL=http://nexus.zhidaoauto.com/repository/maven-releases/
SNAPSHOT_REPOSITORY_URL=http://nexus.zhidaoauto.com/repository/maven-snapshots/
@@ -80,7 +80,7 @@ MOGO_TRAFFICLIVE_VERSION=1.3.13
MOGO_LOCATION_VERSION=1.3.13
######## MogoAiCloudSDK Version ########
# 自研地图
MAP_SDK_VERSION=2.0.0.11
MAP_SDK_VERSION=2.0.0.12
# websocket
WEBSOCKET_VERSION=1.1.7
## 产品库必备配置产品库自动对versionCode和versionName版本进行升级
@@ -89,102 +89,102 @@ applicationName=IntelligentPilot
versionCode=80007
versionName=8.0.14
################# 新架构模块Maven版本管理 #################
MOGO_CORE_FUNCTION_AUTOPILOT_VERSION=0.0.35
MOGO_CORE_FUNCTION_CHECK_VERSION=0.0.35
MOGO_CORE_FUNCTION_HMI_VERSION=0.0.35
MOGO_CORE_FUNCTION_MAIN_VERSION=0.0.35
MOGO_CORE_FUNCTION_MAP_VERSION=0.0.35
MOGO_CORE_FUNCTION_MONITORING_VERSION=0.0.35
MOGO_CORE_FUNCTION_NOTICE_VERSION=0.0.35
MOGO_CORE_FUNCTION_OBU_MOGO_VERSION=0.0.35
MOGO_CORE_FUNCTION_SMP_VERSION=0.0.35
MOGO_CORE_FUNCTION_V2X_VERSION=0.0.35
MOGO_CORE_DATA_VERSION=0.0.35
MOGO_CORE_FUNCTION_API_VERSION=0.0.35
MOGO_CORE_FUNCTION_CALL_VERSION=0.0.35
MOGO_CORE_RES_VERSION=0.0.35
MOGO_CORE_UTILS_VERSION=0.0.35
MOGO_CORE_NETWORK_VERSION=0.0.35
MOGO_CORE_FUNCTION_AUTOPILOT_VERSION=0.0.36
MOGO_CORE_FUNCTION_CHECK_VERSION=0.0.36
MOGO_CORE_FUNCTION_HMI_VERSION=0.0.36
MOGO_CORE_FUNCTION_MAIN_VERSION=0.0.36
MOGO_CORE_FUNCTION_MAP_VERSION=0.0.36
MOGO_CORE_FUNCTION_MONITORING_VERSION=0.0.36
MOGO_CORE_FUNCTION_NOTICE_VERSION=0.0.36
MOGO_CORE_FUNCTION_OBU_MOGO_VERSION=0.0.36
MOGO_CORE_FUNCTION_SMP_VERSION=0.0.36
MOGO_CORE_FUNCTION_V2X_VERSION=0.0.36
MOGO_CORE_DATA_VERSION=0.0.36
MOGO_CORE_FUNCTION_API_VERSION=0.0.36
MOGO_CORE_FUNCTION_CALL_VERSION=0.0.36
MOGO_CORE_RES_VERSION=0.0.36
MOGO_CORE_UTILS_VERSION=0.0.36
MOGO_CORE_NETWORK_VERSION=0.0.36
################# 旧版本架构模块版本 #################
## 工程内模块
MOGO_COMMONS_VERSION=2.0.93
MOGO_UTILS_VERSION=2.0.93
MAP_AMAP_VERSION=2.0.93
MAP_AUTONAVI_VERSION=2.0.93
MOGO_MAP_VERSION=2.0.93
MOGO_MAP_API_VERSION=2.0.93
MOGO_SERVICE_VERSION=2.0.93
MOGO_SERVICE_API_VERSION=2.0.93
MOGO_CONNECTION_VERSION=2.0.93
MOGO_MODULE_APPS_VERSION=2.0.93
MOGO_MODULE_NAVI_VERSION=2.0.93
MOGO_MODULE_SHARE_VERSION=2.0.93
MOGO_MODULE_COMMON_VERSION=2.0.93
MOGO_MODULE_MAIN_VERSION=2.0.93
MOGO_MODULE_MAP_VERSION=2.0.93
MOGO_MODULE_SERVICE_VERSION=2.0.93
MOGO_MODULE_EXTENSIONS_VERSION=2.0.93
MOGO_MODULE_SEARCH_VERSION=2.0.93
MOGO_MODULE_BACK_VERSION=2.0.93
MOGO_MODULE_V2X_VERSION=2.0.93
MOGO_COMMONS_VERSION=2.0.94
MOGO_UTILS_VERSION=2.0.94
MAP_AMAP_VERSION=2.0.94
MAP_AUTONAVI_VERSION=2.0.94
MOGO_MAP_VERSION=2.0.94
MOGO_MAP_API_VERSION=2.0.94
MOGO_SERVICE_VERSION=2.0.94
MOGO_SERVICE_API_VERSION=2.0.94
MOGO_CONNECTION_VERSION=2.0.94
MOGO_MODULE_APPS_VERSION=2.0.94
MOGO_MODULE_NAVI_VERSION=2.0.94
MOGO_MODULE_SHARE_VERSION=2.0.94
MOGO_MODULE_COMMON_VERSION=2.0.94
MOGO_MODULE_MAIN_VERSION=2.0.94
MOGO_MODULE_MAP_VERSION=2.0.94
MOGO_MODULE_SERVICE_VERSION=2.0.94
MOGO_MODULE_EXTENSIONS_VERSION=2.0.94
MOGO_MODULE_SEARCH_VERSION=2.0.94
MOGO_MODULE_BACK_VERSION=2.0.94
MOGO_MODULE_V2X_VERSION=2.0.94
# 探路
MOGO_MODULE_TANLU_VERSION=2.0.93
MOGO_MODULE_TANLU_VERSION=2.0.94
# 推送
MOGO_MODULE_PUSH_VERSION=2.0.93
MOGO_MODULE_PUSH_BASE_VERSION=2.0.93
MOGO_MODULE_PUSH_NOOP_VERSION=2.0.93
MOGO_MODULE_PUSH_VERSION=2.0.94
MOGO_MODULE_PUSH_BASE_VERSION=2.0.94
MOGO_MODULE_PUSH_NOOP_VERSION=2.0.94
# 探路上报和分享模块
TANLULIB_VERSION=2.0.93
MOGO_TANLU_API_VERSION=2.0.93
TANLULIB_VERSION=2.0.94
MOGO_TANLU_API_VERSION=2.0.94
#左侧面板模块
MOGO_MODULE_LEFT_PANEL_VERSION=2.0.93
MOGO_MODULE_LEFT_PANEL_NOOP_VERSION=2.0.93
MOGO_MODULE_LEFT_PANEL_VERSION=2.0.94
MOGO_MODULE_LEFT_PANEL_NOOP_VERSION=2.0.94
# 小控件
MOGO_MODULE_WIDGETS_VERSION=2.0.93
MOGO_MODULE_WIDGETS_VERSION=2.0.94
# obu
MOGO_MODULE_OBU_VERSION=2.0.93
MOGO_MODULE_OBU_MOGO_VERSION=2.0.93
MOGO_MODULE_OBU_VERSION=2.0.94
MOGO_MODULE_OBU_MOGO_VERSION=2.0.94
# monitor
MOGO_MODULE_MONITOR_VERSION=2.0.93
MOGO_MODULE_MONITOR_VERSION=2.0.94
# bugly
CRASHREPORT_VERSION=2.0.93
CRASHREPORT_BUGLY_VERSION=2.0.93
CRASHREPORT_NOOP_VERSION=2.0.93
CRASHREPORT_UPGRADE_VERSION=2.0.93
CRASHREPORT_VERSION=2.0.94
CRASHREPORT_BUGLY_VERSION=2.0.94
CRASHREPORT_NOOP_VERSION=2.0.94
CRASHREPORT_UPGRADE_VERSION=2.0.94
## tts
TTS_BASE_VERSION=2.0.93
TTS_DI_VERSION=2.0.93
TTS_ZHI_VERSION=2.0.93
TTS_PAD_VERSION=2.0.93
TTS_NOOP_VERSION=2.0.93
TTS_BASE_VERSION=2.0.94
TTS_DI_VERSION=2.0.94
TTS_ZHI_VERSION=2.0.94
TTS_PAD_VERSION=2.0.94
TTS_NOOP_VERSION=2.0.94
# 自研地图
MAP_CUSTOM_VERSION=2.0.93
MOGO_MODULE_ADAS_VERSION=2.0.93
MAP_CUSTOM_VERSION=2.0.94
MOGO_MODULE_ADAS_VERSION=2.0.94
# 基础服务实现passport、socket、location
MOGO_BASE_WEBSOCKET_SDK_VERSION=2.0.93
MOGO_BASE_SERVICES_APK_VERSION=2.0.93
MOGO_BASE_SERVICES_SDK_VERSION=2.0.93
MOGO_MODULE_CHAT_VERSION=2.0.93
MOGO_BASE_WEBSOCKET_SDK_VERSION=2.0.94
MOGO_BASE_SERVICES_APK_VERSION=2.0.94
MOGO_BASE_SERVICES_SDK_VERSION=2.0.94
MOGO_MODULE_CHAT_VERSION=2.0.94
# 车聊聊
MOGO_MODULE_CARCHATTING_VERSION=2.0.93
MOGO_MODULE_CARCHATTING_VERSION=2.0.94
# 车聊聊接口
MOGO_MODULE_CARCHATTINGPROVIDER_VERSION=2.0.93
MOGO_MODULE_CARCHATTINGPROVIDER_VERSION=2.0.94
# 皮肤
MOGO_SKIN_SUPPORT_VERSION=2.0.93
MOGO_SKIN_LIGHT_VERSION=2.0.93
MOGO_SKIN_SUPPORT_IMPL_VERSION=2.0.93
MOGO_SKIN_SUPPORT_NOOP_VERSION=2.0.93
SKIN_SUPPORT_VERSION=2.0.93
SKIN_SUPPORT_APPCOMPAT_VERSION=2.0.93
SKIN_SUPPORT_CARDVIEW_VERSION=2.0.93
SKIN_SUPPORT_CONSTRAINT_LAYOUT_VERSION=2.0.93
SKIN_SUPPORT_DESIGN_VERSION=2.0.93
MOGO_SKIN_SUPPORT_VERSION=2.0.94
MOGO_SKIN_LIGHT_VERSION=2.0.94
MOGO_SKIN_SUPPORT_IMPL_VERSION=2.0.94
MOGO_SKIN_SUPPORT_NOOP_VERSION=2.0.94
SKIN_SUPPORT_VERSION=2.0.94
SKIN_SUPPORT_APPCOMPAT_VERSION=2.0.94
SKIN_SUPPORT_CARDVIEW_VERSION=2.0.94
SKIN_SUPPORT_CONSTRAINT_LAYOUT_VERSION=2.0.94
SKIN_SUPPORT_DESIGN_VERSION=2.0.94
# OCH
MOGO_OCH_VERSION=2.0.93-test
MOGO_OCH_BUS_VERSION=2.0.93-test
MOGO_OCH_NOOP_VERSION=2.0.93-test
MOGO_OCH_TAXI_VERSION=2.0.93-test
MOGO_OCH_VERSION=2.0.94-test
MOGO_OCH_BUS_VERSION=2.0.94-test
MOGO_OCH_NOOP_VERSION=2.0.94-test
MOGO_OCH_TAXI_VERSION=2.0.94-test
# mogoAiCloud sdk services
MOGO_AICLOUD_SERVICES_SDK_VERSION=2.0.93
MOGO_AICLOUD_SERVICES_SDK_VERSION=2.0.94
################# 旧版本架构模块版本 #################

View File

@@ -29,6 +29,7 @@ import com.mogo.eagle.core.function.call.map.CallerLocationUpdaterManager;
import com.mogo.eagle.core.function.call.map.CallerMapLocationListenerManager;
import com.mogo.eagle.core.function.call.map.CallerMapStyleListenerManager;
import com.mogo.eagle.core.utilcode.mogo.toast.TipToast;
import com.mogo.eagle.core.utilcode.util.GsonUtils;
import com.mogo.map.IMogoMap;
import com.mogo.map.IMogoMapView;
import com.mogo.map.impl.custom.navi.NaviClient;
@@ -750,6 +751,7 @@ public class AMapViewWrapper implements IMogoMapView,
@Override
public void onLocationChanged(@NotNull com.zhidaoauto.map.sdk.open.location.MogoLocation location) {
Log.w("DHY-location", location.getLon() + "," + location.getLat() + " AMapViewWrapper-onLocationChanged");
MogoLocation mLastLocation = ObjectUtils.fromLocation(location);
UiThreadHandler.post(() -> CallerMapLocationListenerManager.INSTANCE.invokeMapLocationChangeListener(mLastLocation));
@@ -788,7 +790,7 @@ public class AMapViewWrapper implements IMogoMapView,
} else {
mIsFirstLocated = true;
mIsDelayed = false;
Logger.d(TAG, "同步定位");
Logger.d(TAG, "同步定位" + GsonUtils.toJson(location));
MapStyleController.getInstance().onLocationChanged(location, this);
}
}
@@ -797,8 +799,8 @@ public class AMapViewWrapper implements IMogoMapView,
try {
mSelfMarker = mMapView.getMapAutoViewHelper().getMyLocationStyle().getSelfMarker();
mSelfMarker.setInfoWindowEnable(true);
} catch (Exception e) {
e.printStackTrace();
}
} else {
// 通过不同的方向类型来改变车模目前暂定三种模型drawlevel 1 绿,2 黄,3 红,绿色的时候需要把相应的切换为默认模型

View File

@@ -74,7 +74,7 @@ public class CustomMapApiBuilder implements IMogoMapApiBuilder {
Log.d(TAG, "setDebugMode==true");
MapParams mapParams = MapParams.Companion.init();
mapParams.setDebugMode(false)
mapParams.setDebugMode(true)
//.setDataFileSource(1) //todo 1-使用本地地图数据0-使用在线地图数据
.setCoordinateType(MapParams.COORDINATETYPE_GCJ02)
.setPerspectiveMode(MapParams.MAP_PERSPECTIVE_2D)

View File

@@ -2,6 +2,7 @@ package com.mogo.map.impl.custom.location;
import android.content.Context;
import android.os.Trace;
import android.util.Log;
import com.mogo.eagle.core.function.call.map.CallerMapLocationListenerManager;
import com.mogo.map.impl.custom.utils.ObjectUtils;
@@ -113,6 +114,7 @@ public class ALocationClient implements IMogoLocationClient {
@Override
public void onLocationChanged( @NotNull com.zhidaoauto.map.sdk.open.location.MogoLocation location ) {
Log.w("DHY-location", location.getLon() + "," + location.getLat() + " ALocationClient-onLocationChanged");
if ( mIsDestroyed ) {
destroyWarming();
return;

View File

@@ -732,6 +732,7 @@ public class ObjectUtils {
target.lonLatPoints( points );
}
target.setLineWidth( options.getWidth() );
target.zIndex(options.getZIndex());
target.setColor( options.getColor() );
target.useGradient( options.isGradient() );
if ( options.getColorValues() != null ) {

View File

@@ -2,7 +2,6 @@ package com.mogo.module.adas;
import android.util.Log;
import com.mogo.commons.AbsMogoApplication;
import com.mogo.eagle.core.data.autopilot.ADASTrajectoryInfo;
import com.mogo.eagle.core.data.autopilot.AutopilotCarStateInfo;
import com.mogo.eagle.core.data.autopilot.AutopilotGuardianStatusInfo;
@@ -10,14 +9,12 @@ import com.mogo.eagle.core.data.autopilot.AutopilotRouteInfo;
import com.mogo.eagle.core.data.autopilot.AutopilotStationInfo;
import com.mogo.eagle.core.data.autopilot.AutopilotStatusInfo;
import com.mogo.eagle.core.data.autopilot.AutopilotWarnMessage;
import com.mogo.eagle.core.data.constants.MoGoConfig;
import com.mogo.eagle.core.data.traffic.TrafficData;
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager;
import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotCarStatusListenerManager;
import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotIdentifyListenerManager;
import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotPlanningListenerManager;
import com.mogo.utils.logger.Logger;
import com.mogo.utils.storage.SharedPrefsMgr;
import com.zhidao.support.adas.high.AdasManager;
import com.zhidao.support.adas.high.OnAdasListener;
import com.zhidao.support.adas.high.bean.AutopilotRoute;
@@ -45,7 +42,7 @@ import java.util.List;
public class OnAdasListenerAdapter implements OnAdasListener {
private final String TAG = "OnAdasListenerAdapter";
@Override
public void onRectData(RectInfo rectInfo) {
ArrayList<TrafficData> recognizedListResults = AdasObjectUtils.INSTANCE.regroupTrafficDataData(rectInfo.getModels());
@@ -56,10 +53,10 @@ public class OnAdasListenerAdapter implements OnAdasListener {
@Override
public void onCarStateData(CarStateInfo carStateInfo) {
Logger.d(TAG, "--------carStateInfo.toString() = " + carStateInfo.toString());
AutopilotCarStateInfo autopilotCarStateInfo = AdasObjectUtils.INSTANCE.fromAdasCarStateInfoObject(carStateInfo);
CallerAutopilotCarStatusListenerManager.INSTANCE.invokeAutopilotCarStateData(autopilotCarStateInfo);
//can数据转发
CarStateInfo.ValuesBean bean = carStateInfo.getValues();
Log.w("DHY-location", bean.getLon() + "," + bean.getLat() + " OnAdasListenerAdapter-onCarStateData");
if (bean != null) {
int turn_light = bean.getTurn_light(); //转向灯状态 0是正常 1是左转 2是右转
Logger.d(TAG, "onCarStateData ---- turn_light = " + turn_light);
@@ -67,6 +64,9 @@ public class OnAdasListenerAdapter implements OnAdasListener {
} else {
Logger.e(TAG, "bean == null ");
}
AutopilotCarStateInfo autopilotCarStateInfo = AdasObjectUtils.INSTANCE.fromAdasCarStateInfoObject(carStateInfo);
CallerAutopilotCarStatusListenerManager.INSTANCE.invokeAutopilotCarStateData(autopilotCarStateInfo);
}
@Override

View File

@@ -493,15 +493,17 @@ class CallChatCenter private constructor() : IBizCallChat.IBizCallBack, IVoiceCo
* 2.如果当前正在打电话中,则拒绝
*/
override fun showIncomingCall(userInfo: UserInfo) {
Logger.d(TAG, "showIncomingCall===userInfo: $userInfo")
currentUserInfo = userInfo
if (callChatManager.isCalling() || callingWindowManager.isIncomingWindowShow()) {
log(TAG, "已在通话进程中,准备拒绝他 ---> ")
refuseCall(userInfo.sn)
} else {
log(TAG, "有人打来电话,准备显示 ---> ${UserInfoHelper.currentRoomId}")
log(TAG, "有人打来电话,准备显示 房间号---> ${UserInfoHelper.currentRoomId} , 用户---> ${currentUserInfo!!.sn}")
callingWindowManager.showIncomingView({
callChatManager.answerInvoke(userInfo.sn)
callChatManager.answerInvoke(currentUserInfo!!.sn)
}, {
refuseCall(userInfo.sn)
refuseCall(currentUserInfo!!.sn)
})
}
}

View File

@@ -155,7 +155,7 @@ class CallChatManager(iBizCallChat: IBizCallChat.IBizCallBack) : ICallResponse {
}
fun answerInvoke(sn: String) {
Logger.i(TAG, "answerInvoke")
Logger.i(TAG, "answerInvoke sn : $sn")
IMCallManager.answer(sn, this)
}

View File

@@ -216,7 +216,7 @@ public class BaseDrawer {
} else if (recognizedType == AdasRecognizedType.classIdStopLine) {
return R.raw.stopline;
} else if (recognizedType == AdasRecognizedType.classIdWarningArrows) {
return R.raw.stopline;
return R.raw.jiantou;
} else if (recognizedType == AdasRecognizedType.classIdUnKnow) {
return R.raw.special_vehicle;
} else if (recognizedType == AdasRecognizedType.classIdBicycle) {

View File

@@ -44,7 +44,8 @@ object TrafficMarkerDrawer {
object : Handler(WorkThreadHandler.newInstance("other_traffic_drawer").looper) {
override fun handleMessage(msg: Message) {
super.handleMessage(msg)
drawerTrafficInfo()
// TODO 因为与自动驾驶的感知重合临时关掉OBU车辆绘制
// drawerTrafficInfo()
// 延时50毫秒重复发送自己定时轮询进行车辆绘制可以及时将已经不存在车辆删除
sendEmptyMessageDelayed(0, 50L)
}

View File

@@ -108,7 +108,7 @@ public class V2XWarnDataDrawer extends BaseDrawer implements IMogoStatusChangedL
.object(markerShowEntity)
.latitude(markerShowEntity.getMarkerLocation().getLat())
.longitude(markerShowEntity.getMarkerLocation().getLon())
.setGps(false);
.setGps(true);
IMarkerView iMarkerView = MapMarkerAdapter.getMarkerView(mContext, markerShowEntity, options);
options.icon3DRes(getModelRes(modeResType)); //TODO
options.anchorColor("#FB3C3CFF");
@@ -124,7 +124,7 @@ public class V2XWarnDataDrawer extends BaseDrawer implements IMogoStatusChangedL
.latitude(location.getLat())
.longitude(location.getLon())
.set3DMode(true)
.setGps(false)
.setGps(true)
.controlAngle(true)
.icon3DRes(getModelRes(type))
.anchorColor("#FB3C3CFF")

View File

@@ -197,4 +197,16 @@ public class V2XMessageEntity<T> implements Serializable {
@Retention(RetentionPolicy.SOURCE) //表示注解所存活的时间,在运行时,而不会存在 .class 文件中
public @interface MessageType { //接口,定义新的注解类型
}
@Override
public String toString() {
return "V2XMessageEntity{" +
"type=" + type +
", showState=" + showState +
", isNeedCompareSameScenario=" + isNeedCompareSameScenario +
", onlyShow=" + onlyShow +
", needAddLine=" + needAddLine +
", content=" + content +
'}';
}
}

View File

@@ -150,16 +150,18 @@ public class TopViewNoLinkageAnimHelper {
public void removeAllView() {
Logger.d(TAG, "remove all view");
isTopViewOut = true;
int lastCount = topContainerNoLinkage.getChildCount();
for (int i = 0; i < lastCount; i++) {
View child = topContainerNoLinkage.getChildAt(i);
IMogoTopViewStatusListener listener = statusListenerMap.remove(child);
if (listener != null) {
listener.beforeViewRemoveAnim(child);
listener.onViewRemoved(child);
if (topContainerNoLinkage != null) {
int lastCount = topContainerNoLinkage.getChildCount();
for (int i = 0; i < lastCount; i++) {
View child = topContainerNoLinkage.getChildAt(i);
IMogoTopViewStatusListener listener = statusListenerMap.remove(child);
if (listener != null) {
listener.beforeViewRemoveAnim(child);
listener.onViewRemoved(child);
}
}
topContainerNoLinkage.removeAllViews();
}
topContainerNoLinkage.removeAllViews();
MapCenterPointStrategy.setMapCenterPointByScene(mogoMapUIController, Scene.AIMLESS);
}

View File

@@ -30,6 +30,8 @@ public class RouteOverlayDrawer {
private RouteOverlayDrawer(Context context) {
mPolylineOptions = new MogoPolylineOptions();
mPolylineOptions.zIndex(20000f);
mPolylineOptions.setGps(true);
// 绘制路径集合
mPolylinePointList = new ArrayList<>();
// 引导线颜色
@@ -114,6 +116,7 @@ public class RouteOverlayDrawer {
public void clearMogoRouteOverlay(){
if (mMoGoPolyline != null) {
mMoGoPolyline.remove();
mMoGoPolyline = null;
mPolylinePointList.clear();
mPolylineColors.clear();
}
@@ -124,20 +127,24 @@ public class RouteOverlayDrawer {
}
public void drawTrajectoryList(List<MogoLatLng> routeList) {
clearMogoRouteOverlay();
// clearMogoRouteOverlay();
mPolylinePointList.clear();
if (routeList != null) {
for (MogoLatLng latLng : routeList) {
mPolylinePointList.add(latLng);
}
mPolylineOptions.setGps(true);
mPolylineOptions.zIndex(10000f);
mPolylineColors.addAll(ColorUtils.getGradientAlpha("#002965ED", "#FF2965ED", "#002965ED", mPolylinePointList.size()));
// 替换路径集合
mPolylineOptions.points(mPolylinePointList);
if (mPolylineColors.isEmpty()){
mPolylineColors.addAll(ColorUtils.getGradientAlpha("#002965ED", "#FF2965ED", "#002965ED", mPolylinePointList.size()));
}
// 线条粗细,渐变,渐变色值
mPolylineOptions.width(25).useGradient(true).colorValues(mPolylineColors);
// 绘制线
mMoGoPolyline = mogoOverlayManager.addPolyline(mPolylineOptions);
mPolylineOptions.width(20).useGradient(true).colorValues(mPolylineColors);
if (mMoGoPolyline == null || mMoGoPolyline.isDestroyed()){
mPolylineOptions.points(mPolylinePointList);
mMoGoPolyline = mogoOverlayManager.addPolyline(mPolylineOptions);
}else {
mMoGoPolyline.setPoints(mPolylinePointList);
}
}
}
}

View File

@@ -16,6 +16,8 @@ import androidx.localbroadcastmanager.content.LocalBroadcastManager;
import com.alibaba.android.arouter.facade.annotation.Route;
import com.mogo.cloud.passport.MoGoAiCloudClientConfig;
import com.mogo.eagle.core.data.map.MogoLatLng;
import com.mogo.eagle.core.data.map.MogoLocation;
import com.mogo.eagle.core.function.api.map.listener.IMoGoMapLocationListener;
import com.mogo.eagle.core.utilcode.util.TimeUtils;
import com.mogo.eagle.core.utilcode.util.Utils;
import com.mogo.map.listener.IMogoMapListener;
@@ -54,6 +56,8 @@ import com.mogo.utils.network.utils.GsonUtil;
import com.mogo.utils.storage.SharedPrefsMgr;
import com.tencent.liteav.basic.log.TXCLog;
import org.jetbrains.annotations.Nullable;
import static com.mogo.module.v2x.V2XConst.MODULE_NAME;
import static com.mogo.module.v2x.VideoInitKt.initVideo;
@@ -441,4 +445,9 @@ public class V2XModuleProvider implements
public void onDestroy() {
}
// @Override
// public void onLocationChanged(@Nullable MogoLocation location) {
// V2XScenarioManager.getInstance().handlerMessage(entity);
// }
}

View File

@@ -36,7 +36,7 @@ public class MoGoPersonWarnPolylineManager implements IMoGoPersonWarnPolylineMan
}
// 连接线参数
MogoPolylineOptions options = new MogoPolylineOptions().setGps(false);
MogoPolylineOptions options = new MogoPolylineOptions().setGps(true);
// 渐变色
List<Integer> colors = new ArrayList<>();

View File

@@ -37,7 +37,7 @@ public class MoGoWarnPolylineManager implements IMoGoWarnPolylineManager {
// 连接线参数
MogoPolylineOptions options = new MogoPolylineOptions()
.setGps(false);
.setGps(true);
List<Integer> colors = new ArrayList<>();
if (info.isHasStopLines() == true) {
@@ -50,7 +50,7 @@ public class MoGoWarnPolylineManager implements IMoGoWarnPolylineManager {
colors.add(0x0DE32F46);
}
Log.d(V2XConst.LOG_NAME_WARN, "MoGoWarnPolylineManager roadWidth = " + info.getWidth());
Log.d("V2XWarningMarker", "MoGoWarnPolylineManager roadWidth = " + info.getWidth());
// 线条粗细,渐变,渐变色值
options.width(info.getWidth() == 0.0 ? 60 : info.getWidth()).useGradient(true).colorValues(colors);
List<MogoLatLng> locations = info.getLocations();

View File

@@ -59,7 +59,7 @@ public class V2XScenarioManager implements IV2XScenarioManager {
@Override
public void handlerMessage(V2XMessageEntity v2XMessageEntity) {
//Logger.d(MODULE_NAME, "处理V2X场景" + GsonUtil.jsonFromObject(v2XMessageEntity));
Logger.d(MODULE_NAME, "处理V2X场景" + (v2XMessageEntity == null ? "null" : v2XMessageEntity.toString()));
try {
synchronized (V2XScenarioManager.class) {
// 展示

View File

@@ -7,7 +7,12 @@ import android.view.ViewGroup;
import androidx.annotation.Nullable;
import com.google.protobuf.DescriptorProtos;
import com.mogo.eagle.core.data.map.MogoLatLng;
import com.mogo.eagle.core.data.map.MogoLocation;
import com.mogo.eagle.core.function.api.map.listener.IMoGoMapLocationListener;
import com.mogo.eagle.core.function.call.map.CallerMapLocationListenerManager;
import com.mogo.eagle.core.utilcode.util.ObjectUtils;
import com.mogo.eagle.core.utilcode.util.Utils;
import com.mogo.map.navi.IMogoCarLocationChangedListener2;
import com.mogo.module.common.MogoApisHandler;
@@ -23,7 +28,8 @@ import com.mogo.service.windowview.IMogoTopViewStatusListener;
* @description 车路云—场景预警-V1.0 前车/行人/摩托车/盲区碰撞预警
* @since: 2021/3/24
*/
public class V2XFrontWarningScenario extends AbsV2XScenario implements IMogoTopViewStatusListener, IMogoCarLocationChangedListener2 {
public class V2XFrontWarningScenario extends AbsV2XScenario implements IMogoTopViewStatusListener ,IMoGoMapLocationListener{
private static final String TAG = "V2XWarningMarker";
private V2XWarningEntity mMarkerEntity;
static private V2XWarningMarker sV2XWarningMarker = new V2XWarningMarker();
@@ -34,10 +40,9 @@ public class V2XFrontWarningScenario extends AbsV2XScenario implements IMogoTopV
@Override
public void init(@Nullable V2XMessageEntity v2XMessageEntity) {
Log.d(TAG, "----- init -----:\n" + (v2XMessageEntity == null ? "null" : v2XMessageEntity.toString()));
try {
if (v2XMessageEntity.getContent() != null) {
MogoApisHandler.getInstance().getApis().getRegisterCenterApi()
.registerCarLocationChangedListener(TAG, this);
if (V2XServiceManager.getMoGoStatusManager().isMainPageOnResume()) {
mMarkerEntity = (V2XWarningEntity) v2XMessageEntity.getContent();
show();
@@ -57,7 +62,9 @@ public class V2XFrontWarningScenario extends AbsV2XScenario implements IMogoTopV
@Override
public void showWindow() {
Log.d(TAG, "----- showWindow --- 1 --:\n" + (mMarkerEntity == null ? "null" : mMarkerEntity.toString()));
if (getV2XWindow() != null && mMarkerEntity != null) {
Log.d(TAG, "----- showWindow --- 2 --:\n" + mMarkerEntity.toString());
ViewGroup.LayoutParams layoutParams =
new ViewGroup.LayoutParams(
ViewGroup.LayoutParams.MATCH_PARENT,
@@ -72,17 +79,17 @@ public class V2XFrontWarningScenario extends AbsV2XScenario implements IMogoTopV
@Override
public void closeWindow() {
Log.d(TAG, "----- closeWindow -----:\n" + (mMarkerEntity == null ? "null" : mMarkerEntity.toString()));
}
@Override
public void showButton() {
Log.d(TAG, "----- showButton -----:\n" + (mMarkerEntity == null ? "null" : mMarkerEntity.toString()));
}
@Override
public void closeButton() {
Log.d(TAG, "----- closeButton -----:\n" + (mMarkerEntity == null ? "null" : mMarkerEntity.toString()));
}
@Override
@@ -95,37 +102,38 @@ public class V2XFrontWarningScenario extends AbsV2XScenario implements IMogoTopV
@Override
public void clearPOI() {
Log.d(TAG, "----- clearPOI -----");
}
@Override
public void onViewAdded(View view) {
Log.d(TAG, "----- onViewAdded -----");
}
@Override
public void onViewRemoved(View view) {
Log.d(TAG, "onViewRemoved");
Log.d(TAG, "----- onViewRemoved -----");
}
@Override
public void beforeViewAddAnim(View view) {
Log.d(TAG, "----- beforeViewAddAnim -----");
}
@Override
public void beforeViewRemoveAnim(View view) {
Log.d(TAG, "----- beforeViewRemoveAnim -----");
}
// @Override
// public void onCarLocationChanged2(Location latLng) {
// sV2XWarningMarker.onCarLocationChanged2(latLng);
// }
@Override
public void onCarLocationChanged2(Location latLng) {
sV2XWarningMarker.onCarLocationChanged2(latLng);
public void onLocationChanged(@org.jetbrains.annotations.Nullable MogoLocation location) {
sV2XWarningMarker.onCarLocationChanged2(location);
}
@Override
public void onCarLocationChanged(MogoLatLng latLng) {
}
}

View File

@@ -5,6 +5,8 @@ import android.util.Log;
import com.mogo.cloud.commons.utils.CoordinateUtils;
import com.mogo.eagle.core.data.map.MogoLatLng;
import com.mogo.eagle.core.data.map.MogoLocation;
import com.mogo.eagle.core.function.call.map.CallerMapLocationListenerManager;
import com.mogo.map.overlay.IMogoPolyline;
import com.mogo.module.common.MogoApisHandler;
import com.mogo.module.common.drawer.V2XWarnDataDrawer;
@@ -31,10 +33,10 @@ import static com.mogo.module.v2x.V2XServiceManager.getContext;
/**
* @author liujing
* @description 前方预警marker打点 绘制安全线和预警线
* @description 前方预警marker打点 绘制安全线和预警线 衡阳交付-取消划线需求,只渲染识别物红色模型移动过程,代码保留
* @since: 2021/3/30
*/
public class V2XWarningMarker implements IV2XMarker {
public class V2XWarningMarker implements IV2XMarker{
private static final String TAG = "V2XWarningMarker";
private static String WARNING_ARROWS = "WARNING_ARROWS";
private V2XWarningEntity mCloundWarningInfo;
@@ -57,6 +59,7 @@ public class V2XWarningMarker implements IV2XMarker {
@Override
public void drawPOI(Object entity) {
try {
Log.d(TAG, "===drawPOI");
mCloundWarningInfo = (V2XWarningEntity) entity;
drawLineWithEntity();
@@ -71,38 +74,48 @@ public class V2XWarningMarker implements IV2XMarker {
fillPointOnStopLine();
bearing = V2XLocationListener.getInstance().getLastCarLocation().getBearing();
hasStopLines = mCloundWarningInfo.getStopLines().size() > 0;
if (mCloundWarningInfo != null && mCloundWarningInfo.getStopLines() != null) {
hasStopLines = mCloundWarningInfo.getStopLines().size() > 0;
}
isSelfLineClear = false;
isFirstLocation = false;
if (fillPoints.size() > 0) {
if (fillPoints != null && fillPoints.size() > 0) {
//存在停止线的情况 自车与停止线之间绘制蓝色安全线 停止线向前50m绘制红色预警线
middleLocationInStopLine = getMiddleLocationInStopLine();
//停止线前方画线
WorkThreadHandler.getInstance().postDelayed(() -> {
if (carLocation.lat != 0 && carLocation.lon != 0) {
//在自车与停止线直线绘制蓝色预警线
drawSelfCarLine(carLocation.lon, carLocation.lat, bearing);
//衡阳交付-取消划线需求,只渲染识别物红色模型移动过程
//drawSelfCarLine(carLocation.lon, carLocation.lat, bearing);
} else {
Log.d(TAG, "自车定位数据为空carLocation == null");
}
//二轮车和行人的渲染和移动
V2XServiceManager.getMarkerManager().removeMarkers(TYPE_MARKER_CLOUD_WARN_DATA);
/* 衡阳交付-取消划线需求,只渲染识别物红色模型移动过程
//获取停止线前方50m坐标点
MogoLatLng warningLocation = Trigonometric.getNewLocation(middleLocationInStopLine,
50, angleForCarMoveDirection());
//停止线向前方50m绘制红色预警线
drawRedWarningLineFrontOfStopLine(mCloundWarningInfo, middleLocationInStopLine,
warningLocation);
*/
V2XWarnDataDrawer.getInstance().renderWarnData(mCloundWarningInfo);
//添加停止线marker
handleStopLine();
//衡阳交付-取消划线需求,只渲染识别物红色模型移动过程
//handleStopLine();
}, 0);
Log.d(TAG, "显示时间为++" + String.valueOf(showTime) + "识别物类型:" +
String.valueOf(mCloundWarningInfo.getType()));
clearAllLine();
} else { //无停止线
Log.d(TAG, "无停止线");
WorkThreadHandler.getInstance().postDelayed(() -> {
/* 衡阳交付-取消划线需求,只渲染识别物红色模型移动过程
Log.d(TAG, "无停止线" + mCloundWarningInfo.toString());
//绘制识别物与交汇点连线,并且更新连线数据
drawOtherObjectLine(mCloundWarningInfo);
//二轮车和行人的渲染和移动
@@ -112,6 +125,7 @@ public class V2XWarningMarker implements IV2XMarker {
} else {
Log.d(TAG, "数据为空carLocation == null");
}
*/
V2XWarnDataDrawer.getInstance().renderWarnData(mCloundWarningInfo);
}, 0);
@@ -195,7 +209,7 @@ public class V2XWarningMarker implements IV2XMarker {
try {
fillPoints.clear();
List stopLines = mCloundWarningInfo.getStopLines();
if (stopLines.size() > 1) {
if (stopLines != null && stopLines.size() > 1) {
MogoLatLng x = mCloundWarningInfo.getStopLines().get(0);
MogoLatLng y = mCloundWarningInfo.getStopLines().get(1);
//两点间的距离
@@ -210,8 +224,11 @@ public class V2XWarningMarker implements IV2XMarker {
fillPoints.add(newLocation);
}
fillPoints.add(y);
} else {
Log.d(TAG, "停止线数据不存在");
}
} catch (Exception e) {
Log.d(TAG, "Exception");
e.printStackTrace();
}
}
@@ -251,7 +268,7 @@ public class V2XWarningMarker implements IV2XMarker {
Log.d(TAG, "获取不到车的位置");
}
MogoLatLng newLocation = new MogoLatLng(0, 0);
if (mCloundWarningInfo.getStopLines().size() > 1) {
if (mCloundWarningInfo != null && mCloundWarningInfo.getStopLines() != null && mCloundWarningInfo.getStopLines().size() > 1) {
MogoLatLng x = mCloundWarningInfo.getStopLines().get(0);
MogoLatLng y = mCloundWarningInfo.getStopLines().get(1);
float distance = CoordinateUtils.calculateLineDistance(x.lon, x.lat, y.lon, y.lat);
@@ -270,6 +287,7 @@ public class V2XWarningMarker implements IV2XMarker {
* lat 自车纬度
*/
public void drawSelfCarLine(double lon, double lat, float bearing) {
Log.d(TAG, "drawSelfCarLine");
if (!isSelfLineClear) {
if (mCloundWarningInfo != null) {
IMogoPolyline mogoPolyline = V2XServiceManager.getMoGoWarnPolylineManager().getMogoWarnPolyline();
@@ -305,7 +323,9 @@ public class V2XWarningMarker implements IV2XMarker {
info.setLocations(locations);
info.setHeading(bearing);
info.setWidth(mCloundWarningInfo.getRoadwidth() * 14 + 5);
info.setHasStopLines(mCloundWarningInfo.getStopLines().size() > 0);
if (mCloundWarningInfo.getStopLines() != null){
info.setHasStopLines(mCloundWarningInfo.getStopLines().size() > 0);
}
V2XServiceManager.getMoGoWarnPolylineManager().drawWarnPolyline(getContext(), info);
Log.d(TAG, "自车前方第一条线" + "起点:" + startLatlng + "中间点:" + addMiddleLoc + "终点:" + endLatlng);
}
@@ -322,6 +342,7 @@ public class V2XWarningMarker implements IV2XMarker {
*/
private void drawOtherObjectLine(V2XWarningEntity info) {
if (info != null) {
Log.d(TAG, "info != null");
IMogoPolyline polyLine = V2XServiceManager.getMoGoPersonWarnPolylineManager().getMogoPersonWarnPolyline();
MogoLatLng startLatlng = new MogoLatLng(info.getLat(), info.getLon());//识别物坐标
MogoLatLng endLatlng = new MogoLatLng(info.getCollisionLat(), info.getCollisionLon());//预碰撞点坐标
@@ -329,7 +350,7 @@ public class V2XWarningMarker implements IV2XMarker {
MogoLatLng addMiddleLoc = Trigonometric.getNewLocation(startLatlng, distance / 2,
Trigonometric.getAngle(startLatlng.lon, startLatlng.lat, endLatlng.lon, endLatlng.lat));//补点
if (polyLine != null) {
Log.d(V2XConst.LOG_NAME_WARN, "polyLine != null");
Log.d(TAG, "目标物与碰撞点连线 != null");
polyLine.setPoints(Arrays.asList(startLatlng, addMiddleLoc, endLatlng));
polyLine.setTransparency(0.5f);
} else {
@@ -347,7 +368,7 @@ public class V2XWarningMarker implements IV2XMarker {
Log.d(TAG, "目标物与预碰撞点画线点为" + "起点:" + startLatlng + "中间点:" + addMiddleLoc + "终点:" + endLatlng);
}
} else {
Log.e(V2XConst.LOG_NAME_WARN, "info == null");
Log.e(TAG, "info == null");
clearAllLine();
}
}
@@ -371,13 +392,14 @@ public class V2XWarningMarker implements IV2XMarker {
}
//线随车动
public void onCarLocationChanged2(Location latLng) {
public void onCarLocationChanged2(MogoLocation latLng) {
carLocation = new MogoLatLng(latLng.getLatitude(), latLng.getLongitude());
if (MogoApisHandler.getInstance().getApis().getStatusManagerApi().isVrMode() && isSelfLineClear == false) {
if (mCloundWarningInfo != null) {
mCloundWarningInfo.setCarLocation(new MogoLatLng(latLng.getLatitude(), latLng.getLongitude()));
}
drawSelfCarLine(latLng.getLongitude(), latLng.getLatitude(), latLng.getBearing());
//衡阳交付-取消划线需求,只渲染识别物红色模型移动过程
//drawSelfCarLine(latLng.getLongitude(), latLng.getLatitude(), latLng.getBearing());
}
Log.d(TAG, "车辆行驶轨迹" + String.valueOf(latLng.getLongitude()) + "," + String.valueOf(latLng.getLatitude()));
}

View File

@@ -3,6 +3,7 @@ package com.mogo.module.v2x.scenario.scene.warning;
import android.content.Context;
import android.os.Handler;
import android.util.AttributeSet;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.ImageView;
@@ -25,7 +26,7 @@ import java.math.BigDecimal;
* @since: 2021/3/25
*/
public class V2XWarningWindow extends V2XBasWindow implements IV2XWindow {
private static final String TAG = "V2XWarningMarker";
private ImageView typeImage;
private TextView warningTextView;
private TextView distance;
@@ -63,6 +64,7 @@ public class V2XWarningWindow extends V2XBasWindow implements IV2XWindow {
public void show(Object entity) {
if (entity != null) {
mV2XWarningEntity = (V2XWarningEntity) entity;
Log.d(TAG, mV2XWarningEntity.toString());
//1行人/2自行车/4摩托车
switch (mV2XWarningEntity.getType()) {
case 1:

View File

@@ -1,29 +1,19 @@
{
"type": 1,
"lat": 26.87912015,
"lon": 112.56885373,
"distance": 2.678,
"collisionLat": 26.8791769,
"collisionLon": 112.56896496,
"lat": 26.851909,
"lon": 112.571751,
"distance": 40.119,
"collisionLat": 26.85198163866211,
"collisionLon": 112.57059540184451,
"stopLines": [
{
"lat": 26.8791769,
"lon": 112.56896496
},
{
"lat": 26.879153,
"lon": 112.568997
}
],
"from": 1,
"angle": 240,
"direction": 1,
"speed": 11.108121,
"targetColor": "#FF4040",
"stopLineDistance": 60,
"warningContent": "小心行人",
"heading": 0,
"heading": 76,
"showTime": 3,
"roadwidth": 4.0
}

View File

@@ -36,7 +36,8 @@ public class BuglyCrashReportProvider implements ITestCrashReportProvider {
String processName = getProcessName(android.os.Process.myPid());
CrashReport.UserStrategy strategy = new CrashReport.UserStrategy(context);
strategy.setUploadProcess(processName == null || processName.equals(packageName));
//该用户本次启动后的异常日志用户ID都将是 sn
CrashReport.setUserId(MoGoAiCloudClientConfig.getInstance().getSn());
String productFlavor = DebugConfig.getProductFlavor();
strategy.setAppChannel(productFlavor);
Bugly.init(context, CrashReportConstants.buglyAppID, true, strategy);