Merge branch 'dev_minibus-d_230425_3.2.0' into code_opt_3.3.0
This commit is contained in:
@@ -237,7 +237,7 @@ object CharterPassengerModel {
|
||||
}
|
||||
when (state) {
|
||||
IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_RUNNING -> {
|
||||
RxUtils.createSubscribe(5_000) {
|
||||
RxUtils.createSubscribe {
|
||||
cleanRoutePoints()
|
||||
CallerLogger.d(M_BUS_P + TAG,"请求底盘轨迹")
|
||||
CallerAutoPilotControlManager.getGlobalPath()
|
||||
|
||||
@@ -373,58 +373,60 @@ class M1SoftFragment :
|
||||
pattern: Int,
|
||||
windSpeed: Int
|
||||
) {
|
||||
if (!airIsOpen && !heaterIsOpen) {
|
||||
tv_aircondition_switch.text = "打开空调"
|
||||
tv_aircondition_switch.isChecked = false
|
||||
dbv_wind.visibility = View.GONE
|
||||
} else {
|
||||
tv_aircondition_switch.text = "关闭空调"
|
||||
tv_aircondition_switch.isChecked = true
|
||||
dbv_wind.visibility = View.VISIBLE
|
||||
}
|
||||
if (airIsOpen) {
|
||||
val adapter = rv_aircondition_temperature.adapter
|
||||
if (adapter is TemperatureAdapter) {
|
||||
adapter.data.forEach {
|
||||
if (it.value == temperatureCmd) {
|
||||
rv_aircondition_temperature.tag = touchTag
|
||||
UiThreadHandler.postDelayed({
|
||||
rv_aircondition_temperature?.smoothScrollToPosition(it.index)
|
||||
},500)
|
||||
tv_aircondition_switch?.let {
|
||||
if (!airIsOpen && !heaterIsOpen) {
|
||||
tv_aircondition_switch.text = "打开空调"
|
||||
tv_aircondition_switch.isChecked = false
|
||||
dbv_wind.visibility = View.GONE
|
||||
} else {
|
||||
tv_aircondition_switch.text = "关闭空调"
|
||||
tv_aircondition_switch.isChecked = true
|
||||
dbv_wind.visibility = View.VISIBLE
|
||||
}
|
||||
if (airIsOpen) {
|
||||
val adapter = rv_aircondition_temperature.adapter
|
||||
if (adapter is TemperatureAdapter) {
|
||||
adapter.data.forEach {
|
||||
if (it.value == temperatureCmd) {
|
||||
rv_aircondition_temperature.tag = touchTag
|
||||
UiThreadHandler.postDelayed({
|
||||
rv_aircondition_temperature?.smoothScrollToPosition(it.index)
|
||||
},500)
|
||||
}
|
||||
}
|
||||
}
|
||||
when (pattern) {//1: 自动模式, 2: 制冷模式, 3: 通风模式(仅送风,无温度)
|
||||
1 -> {rb_pattern_automatic.isChecked = true}
|
||||
2 -> {rb_pattern_refrigeration.isChecked = true}
|
||||
3 -> {rb_pattern_ventilate.isChecked = true}
|
||||
else -> {}
|
||||
}
|
||||
heaterAirEnable(true)
|
||||
when (windSpeed) {//1: 1档,2: 2档,3:3档
|
||||
1 -> {
|
||||
setWind(rb_wind_speed_low,R.drawable.bus_pm1_aircondition_wind_low)
|
||||
}
|
||||
2 -> {
|
||||
setWind(rb_wind_speed_middle,R.drawable.bus_pm1_aircondition_wind_middle)
|
||||
}
|
||||
3 -> {
|
||||
setWind(rb_wind_speed_high,R.drawable.bus_pm1_aircondition_wind_high)
|
||||
}
|
||||
else -> {}
|
||||
}
|
||||
}
|
||||
when (pattern) {//1: 自动模式, 2: 制冷模式, 3: 通风模式(仅送风,无温度)
|
||||
1 -> {rb_pattern_automatic.isChecked = true}
|
||||
2 -> {rb_pattern_refrigeration.isChecked = true}
|
||||
3 -> {rb_pattern_ventilate.isChecked = true}
|
||||
else -> {}
|
||||
}
|
||||
heaterAirEnable(true)
|
||||
when (windSpeed) {//1: 1档,2: 2档,3:3档
|
||||
1 -> {
|
||||
setWind(rb_wind_speed_low,R.drawable.bus_pm1_aircondition_wind_low)
|
||||
if (heaterIsOpen) {
|
||||
rb_pattern_heating.isChecked = true
|
||||
heaterAirEnable(false)
|
||||
when (windSpeed) {//1: 1档,2: 2档
|
||||
1 -> {
|
||||
setWind(rb_wind_speed_middle,R.drawable.bus_pm1_warm_wind_middle)
|
||||
}
|
||||
2 -> {
|
||||
setWind(rb_wind_speed_high,R.drawable.bus_pm1_warm_wind_high)
|
||||
}
|
||||
else -> {}
|
||||
}
|
||||
2 -> {
|
||||
setWind(rb_wind_speed_middle,R.drawable.bus_pm1_aircondition_wind_middle)
|
||||
}
|
||||
3 -> {
|
||||
setWind(rb_wind_speed_high,R.drawable.bus_pm1_aircondition_wind_high)
|
||||
}
|
||||
else -> {}
|
||||
}
|
||||
}
|
||||
if (heaterIsOpen) {
|
||||
rb_pattern_heating.isChecked = true
|
||||
heaterAirEnable(false)
|
||||
when (windSpeed) {//1: 1档,2: 2档
|
||||
1 -> {
|
||||
setWind(rb_wind_speed_middle,R.drawable.bus_pm1_warm_wind_middle)
|
||||
}
|
||||
2 -> {
|
||||
setWind(rb_wind_speed_high,R.drawable.bus_pm1_warm_wind_high)
|
||||
}
|
||||
else -> {}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -547,38 +549,44 @@ class M1SoftFragment :
|
||||
}
|
||||
|
||||
fun setLightTop1View(leftLight: Boolean, isFirst: Boolean){
|
||||
if (leftLight) {
|
||||
tv_light_top_01.text = requireContext().getString(R.string.bus_p_m1_close_light1)
|
||||
tv_light_top_01.isChecked = true
|
||||
if(!isFirst) ToastCharterUtils.showShort("打开顶灯1")
|
||||
} else {
|
||||
tv_light_top_01.text = requireContext().getString(R.string.bus_p_m1_open_light1)
|
||||
tv_light_top_01.isChecked = false
|
||||
if(!isFirst) ToastCharterUtils.showShort("关闭顶灯1")
|
||||
tv_light_top_01?.let {
|
||||
if (leftLight) {
|
||||
tv_light_top_01.text = requireContext().getString(R.string.bus_p_m1_close_light1)
|
||||
tv_light_top_01.isChecked = true
|
||||
if(!isFirst) ToastCharterUtils.showShort("打开顶灯1")
|
||||
} else {
|
||||
tv_light_top_01.text = requireContext().getString(R.string.bus_p_m1_open_light1)
|
||||
tv_light_top_01.isChecked = false
|
||||
if(!isFirst) ToastCharterUtils.showShort("关闭顶灯1")
|
||||
}
|
||||
}
|
||||
}
|
||||
fun setLightTop2View(rightLight: Boolean, isFirst: Boolean){
|
||||
if (rightLight) {
|
||||
tv_light_top_02.text = requireContext().getString(R.string.bus_p_m1_close_light2)
|
||||
tv_light_top_02.isChecked = true
|
||||
if(!isFirst) ToastCharterUtils.showShort("打开顶灯2")
|
||||
} else {
|
||||
tv_light_top_02.text = requireContext().getString(R.string.bus_p_m1_open_light2)
|
||||
tv_light_top_02.isChecked = false
|
||||
if(!isFirst) ToastCharterUtils.showShort("关闭顶灯2")
|
||||
tv_light_top_02?.let {
|
||||
if (rightLight) {
|
||||
tv_light_top_02.text = requireContext().getString(R.string.bus_p_m1_close_light2)
|
||||
tv_light_top_02.isChecked = true
|
||||
if(!isFirst) ToastCharterUtils.showShort("打开顶灯2")
|
||||
} else {
|
||||
tv_light_top_02.text = requireContext().getString(R.string.bus_p_m1_open_light2)
|
||||
tv_light_top_02.isChecked = false
|
||||
if(!isFirst) ToastCharterUtils.showShort("关闭顶灯2")
|
||||
}
|
||||
}
|
||||
}
|
||||
fun setLightAtmosphereView(atmosphereLight: Boolean, isFirst: Boolean){
|
||||
if (atmosphereLight) {
|
||||
tv_light_atmosphere.text = requireContext().getString(R.string.bus_p_m1_close_atmosphere)
|
||||
tv_light_atmosphere.isChecked = true
|
||||
iv_bottom_light_setting.setImageResource(R.drawable.bus_p_function_atmosphere_select)
|
||||
if(!isFirst) ToastCharterUtils.showShort("打开氛围灯")
|
||||
} else {
|
||||
tv_light_atmosphere.text = requireContext().getString(R.string.bus_p_m1_open_atmosphere)
|
||||
tv_light_atmosphere.isChecked = false
|
||||
iv_bottom_light_setting.setImageResource(R.drawable.bus_p_function_atmosphere_nor)
|
||||
if(!isFirst) ToastCharterUtils.showShort("关闭氛围灯")
|
||||
tv_light_atmosphere?.let {
|
||||
if (atmosphereLight) {
|
||||
tv_light_atmosphere.text = requireContext().getString(R.string.bus_p_m1_close_atmosphere)
|
||||
tv_light_atmosphere.isChecked = true
|
||||
iv_bottom_light_setting.setImageResource(R.drawable.bus_p_function_atmosphere_select)
|
||||
if(!isFirst) ToastCharterUtils.showShort("打开氛围灯")
|
||||
} else {
|
||||
tv_light_atmosphere.text = requireContext().getString(R.string.bus_p_m1_open_atmosphere)
|
||||
tv_light_atmosphere.isChecked = false
|
||||
iv_bottom_light_setting.setImageResource(R.drawable.bus_p_function_atmosphere_nor)
|
||||
if(!isFirst) ToastCharterUtils.showShort("关闭氛围灯")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -586,16 +594,18 @@ class M1SoftFragment :
|
||||
* 灯的UI发生变化
|
||||
*/
|
||||
fun setLightView(leftLight: Boolean, rightLight: Boolean) {
|
||||
if (leftLight && rightLight) {
|
||||
iv_top_light_setting.setImageResource(R.drawable.bus_p_function_light_middle_selected)// 都打开
|
||||
} else if (!leftLight && !rightLight) {
|
||||
iv_top_light_setting.setImageResource(R.drawable.bus_p_function_light_nor)// 都关闭
|
||||
} else {
|
||||
if (leftLight) {
|
||||
iv_top_light_setting.setImageResource(R.drawable.bus_p_function_light_select_left)// 左面开
|
||||
}
|
||||
if (rightLight) {
|
||||
iv_top_light_setting.setImageResource(R.drawable.bus_p_function_light_select_right)// 左面开
|
||||
iv_top_light_setting?.let {
|
||||
if (leftLight && rightLight) {
|
||||
iv_top_light_setting.setImageResource(R.drawable.bus_p_function_light_middle_selected)// 都打开
|
||||
} else if (!leftLight && !rightLight) {
|
||||
iv_top_light_setting.setImageResource(R.drawable.bus_p_function_light_nor)// 都关闭
|
||||
} else {
|
||||
if (leftLight) {
|
||||
iv_top_light_setting.setImageResource(R.drawable.bus_p_function_light_select_left)// 左面开
|
||||
}
|
||||
if (rightLight) {
|
||||
iv_top_light_setting.setImageResource(R.drawable.bus_p_function_light_select_right)// 左面开
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -38,6 +38,7 @@ import com.mogo.eagle.core.utilcode.mogo.AppIdentityModeUtils
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_ADAS_IMPL
|
||||
import com.mogo.eagle.core.utilcode.mogo.storage.SharedPrefsMgr
|
||||
import com.mogo.eagle.core.utilcode.util.ParseVersionUtils
|
||||
import com.mogo.eagle.core.utilcode.util.ThreadUtils
|
||||
import com.mogo.eagle.core.utilcode.util.ToastUtils
|
||||
import com.mogo.eagle.core.utilcode.util.UiThreadHandler
|
||||
@@ -846,8 +847,8 @@ class MoGoAutopilotControlProvider :
|
||||
if(carConfigResp.dockVersion.isNotEmpty()){
|
||||
if(carConfigResp.dockVersion.contains("taxi")){
|
||||
//修改雨天模式开关默认状态为开启(仅针对taxi320及以上的版本)-sop 215
|
||||
val num = AdasManager.getInstance().parseVersion(carConfigResp.dockVersion)
|
||||
if(num >= 320){
|
||||
val num = ParseVersionUtils.parseVersion(true,carConfigResp.dockVersion)
|
||||
if(num >= 30200){
|
||||
FunctionBuildConfig.isRainMode = true
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,8 +5,9 @@ import android.os.Message
|
||||
import com.mogo.eagle.core.data.config.FunctionBuildConfig
|
||||
import com.mogo.eagle.core.data.deva.chain.ChainConstant
|
||||
import com.mogo.eagle.core.data.traffic.TrafficData
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotCarConfigListener
|
||||
import com.mogo.eagle.core.function.api.datacenter.obu.IMoGoObuStatusListener
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager.getAutoPilotStatusInfo
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotCarConfigListenerManager
|
||||
import com.mogo.eagle.core.function.call.obu.CallerObuWarningListenerManager
|
||||
import com.mogo.eagle.core.utilcode.mogo.AppIdentityModeUtils.isTaxi
|
||||
import com.mogo.eagle.core.utilcode.mogo.thread.WorkThreadHandler
|
||||
@@ -16,7 +17,7 @@ import mogo.telematics.pad.MessagePad
|
||||
import mogo.telematics.pad.MessagePad.TrackedObject
|
||||
import mogo.yycp.api.proto.SocketDownData
|
||||
|
||||
object IdentifyFactory : Identify, IMoGoObuStatusListener {
|
||||
object IdentifyFactory : Identify, IMoGoObuStatusListener, IMoGoAutopilotCarConfigListener {
|
||||
|
||||
private const val TAG = "IdentifyFactory"
|
||||
|
||||
@@ -35,8 +36,16 @@ object IdentifyFactory : Identify, IMoGoObuStatusListener {
|
||||
private var identify: Identify? = null
|
||||
private var aiCloudIdentify: Identify? = null
|
||||
|
||||
init {
|
||||
val dockerVersion = getAutoPilotStatusInfo().dockVersion
|
||||
fun initType(){
|
||||
drawType("默认开启感知优化,等待docker版本")
|
||||
identify = UserIdentify.beautifyDataDrawer
|
||||
aiCloudIdentify = AiIdentify.aiCloudDataDrawer
|
||||
CallerAutopilotCarConfigListenerManager.addListener(TAG, this)
|
||||
CallerObuWarningListenerManager.addListener(TAG, this)
|
||||
}
|
||||
|
||||
override fun onAutopilotCarConfig(carConfigResp: MessagePad.CarConfigResp) {
|
||||
val dockerVersion = carConfigResp.dockVersion
|
||||
if (dockerVersion != null && dockerVersion.isNotEmpty()) {
|
||||
try {
|
||||
val version = ParseVersionUtils.parseVersion(true, dockerVersion)
|
||||
@@ -54,8 +63,6 @@ object IdentifyFactory : Identify, IMoGoObuStatusListener {
|
||||
identify = UserIdentify.beautifyDataDrawer
|
||||
}
|
||||
}
|
||||
aiCloudIdentify = AiIdentify.aiCloudDataDrawer
|
||||
CallerObuWarningListenerManager.addListener(TAG, this)
|
||||
}
|
||||
|
||||
@ChainLog(
|
||||
@@ -180,4 +187,5 @@ object IdentifyFactory : Identify, IMoGoObuStatusListener {
|
||||
message.obj = trafficData
|
||||
mDrawerHandler.sendMessage(message)
|
||||
}
|
||||
|
||||
}
|
||||
@@ -34,6 +34,7 @@ class MapIdentifySubscriber private constructor() : IMoGoSubscriber,
|
||||
}
|
||||
|
||||
override fun onCrate() {
|
||||
IdentifyFactory.initType()
|
||||
CallerAutopilotIdentifyListenerManager.addListener(TAG, this)
|
||||
CallerObuWarningListenerManager.addListener(TAG, this)
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package com.mogo.eagle.core.function.smp
|
||||
|
||||
import android.content.Context
|
||||
import android.util.Log
|
||||
import com.amap.api.maps.CoordinateConverter
|
||||
import com.amap.api.maps.model.LatLng
|
||||
import com.mogo.eagle.core.utilcode.util.CoordinateUtils
|
||||
@@ -60,19 +61,28 @@ object MarkerDrawerManager {
|
||||
private fun getLoopCalCarObservable(): Observable<Int> {
|
||||
return Observable.create(ObservableOnSubscribe { emitter ->
|
||||
if (emitter.isDisposed) return@ObservableOnSubscribe
|
||||
loopRouteAndWipe(planningPoints, lonLatHeading.first, lonLatHeading.second, lonLatHeading.third)
|
||||
loopRouteAndWipe(
|
||||
planningPoints,
|
||||
lonLatHeading.first,
|
||||
lonLatHeading.second,
|
||||
lonLatHeading.third
|
||||
)
|
||||
emitter.onComplete()
|
||||
})
|
||||
}
|
||||
|
||||
private fun loopRouteAndWipe(routePoints: List<LatLng>?, lon: Double, lat: Double, heading: Double) {
|
||||
private fun loopRouteAndWipe(
|
||||
routePoints: List<LatLng>?,
|
||||
lon: Double,
|
||||
lat: Double,
|
||||
heading: Double
|
||||
) {
|
||||
if (routePoints != null && routePoints.isNotEmpty()) {
|
||||
val newPointList = ArrayList<LatLng>()
|
||||
val arrivedIndex: Int = getArrivedPointIndex(routePoints, newPointList, lon, lat, heading)
|
||||
if (arrivedIndex != -1 && lastArrivedIndex != arrivedIndex) {
|
||||
callback?.onLocationChanged(newPointList, arrivedIndex)
|
||||
lastArrivedIndex = arrivedIndex
|
||||
}
|
||||
val locationIndex: Int =
|
||||
getCarLocationIndex(routePoints, newPointList, lon, lat, heading)
|
||||
Log.d("MarkerDrawerManager", "自车在轨迹集合中的索引为:$locationIndex")
|
||||
callback?.onLocationChanged(newPointList, locationIndex)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -90,7 +100,7 @@ object MarkerDrawerManager {
|
||||
* @param realLat
|
||||
* @return 返回已经到达点的index
|
||||
*/
|
||||
private fun getArrivedPointIndex(
|
||||
private fun getCarLocationIndex(
|
||||
routePoints: List<LatLng>,
|
||||
newPoints: MutableList<LatLng>,
|
||||
realLon: Double,
|
||||
@@ -112,12 +122,21 @@ object MarkerDrawerManager {
|
||||
if (baseDiffDis > diff) {
|
||||
baseDiffDis = diff
|
||||
// 距离最近的时候判断是否走过
|
||||
if (DrivingDirectionUtils.getDegreeOfCar2Poi2(realLon, realLat, latLng.longitude, latLng.latitude, heading) >= 90) {
|
||||
if (DrivingDirectionUtils.getDegreeOfCar2Poi2(
|
||||
realLon,
|
||||
realLat,
|
||||
latLng.longitude,
|
||||
latLng.latitude,
|
||||
heading
|
||||
) >= 90
|
||||
) {
|
||||
currentIndex = if (i < lastArrivedIndex) {
|
||||
lastArrivedIndex
|
||||
} else {
|
||||
lastArrivedIndex = i
|
||||
i
|
||||
}
|
||||
Log.d("MarkerDrawerManager", "已走过的点的索引为:$currentIndex")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -46,7 +46,6 @@ import com.mogo.eagle.core.function.smp.MarkerDrawerManager.planningPoints
|
||||
import com.mogo.eagle.core.function.smp.MarkerDrawerManager.startLoopCalCarLocation
|
||||
import com.mogo.eagle.core.function.smp.MarkerDrawerManager.updateRoutePoints
|
||||
import com.mogo.eagle.core.function.smp.V2XMarkerView
|
||||
import com.mogo.eagle.core.utilcode.mogo.AppIdentityModeUtils
|
||||
import com.mogo.eagle.core.utilcode.mogo.MapAssetStyleUtils
|
||||
import com.mogo.eagle.core.utilcode.util.ThreadUtils
|
||||
import com.mogo.eagle.core.utilcode.util.UiThreadHandler
|
||||
@@ -124,6 +123,9 @@ class OverMapView @JvmOverloads constructor(
|
||||
var siteMarkerList: ArrayList<Marker>? = null
|
||||
var siteNameList: ArrayList<Marker>? = null
|
||||
|
||||
@Volatile
|
||||
private var isInit = false
|
||||
|
||||
companion object {
|
||||
const val TAG = "OverMapView"
|
||||
}
|
||||
@@ -329,6 +331,7 @@ class OverMapView @JvmOverloads constructor(
|
||||
MarkerDrawerManager.stopLoopCalCarLocation()
|
||||
planningPoints.clear()
|
||||
lastArrivedIndex = -1
|
||||
isInit = false
|
||||
}
|
||||
|
||||
@SuppressLint("UseCompatLoadingForDrawables")
|
||||
@@ -460,34 +463,42 @@ class OverMapView @JvmOverloads constructor(
|
||||
}
|
||||
|
||||
fun handlePlanningData(locationList: List<MessagePad.Location>?) {
|
||||
if (locationList.isNullOrEmpty()) return
|
||||
val list: List<MessagePad.Location> = locationList
|
||||
// 转成高德坐标系并存储
|
||||
updateRoutePoints(list, mContext!!)
|
||||
val planningPointList: List<LatLng> = planningPoints
|
||||
UiThreadHandler.post {
|
||||
displayCustomOverView()
|
||||
drawStartAndEndMarker(planningPointList)
|
||||
if (locationList.isNullOrEmpty()) {
|
||||
Log.d(TAG, "全局路径规划轨迹为空")
|
||||
return
|
||||
}
|
||||
callback = object : MarkerDrawerManager.Callback {
|
||||
override fun onLocationChanged(planningPoints: List<LatLng>, locIndex: Int) {
|
||||
// 每1s刷新一下轨迹线
|
||||
UiThreadHandler.post {
|
||||
if (planningPoints.isNotEmpty()) {
|
||||
drawPolyline(planningPoints, locIndex)
|
||||
}
|
||||
val list: List<MessagePad.Location> = locationList
|
||||
ThreadUtils.getSinglePool().submit {
|
||||
lastArrivedIndex = -1
|
||||
// 转成高德坐标系并存储
|
||||
updateRoutePoints(list, mContext!!)
|
||||
val planningPointList: List<LatLng> = planningPoints
|
||||
UiThreadHandler.post {
|
||||
displayCustomOverView()
|
||||
drawStartAndEndMarker(planningPointList)
|
||||
|
||||
if (geoHashInfMap.isNullOrEmpty()) {
|
||||
UiThreadHandler.postDelayed({
|
||||
drawInfrastructureMarkers(locationList)
|
||||
}, 1000)
|
||||
} else {
|
||||
drawInfrastructureMarkers(locationList)
|
||||
}
|
||||
}
|
||||
}
|
||||
startLoopCalCarLocation()
|
||||
UiThreadHandler.post {
|
||||
if (geoHashInfMap.isNullOrEmpty()) {
|
||||
UiThreadHandler.postDelayed({
|
||||
drawInfrastructureMarkers(locationList)
|
||||
}, 1000)
|
||||
} else {
|
||||
drawInfrastructureMarkers(locationList)
|
||||
if (!isInit) {
|
||||
callback = object : MarkerDrawerManager.Callback {
|
||||
override fun onLocationChanged(planningPoints: List<LatLng>, locIndex: Int) {
|
||||
// 每1s刷新一下轨迹线
|
||||
UiThreadHandler.post {
|
||||
if (planningPoints.isNotEmpty()) {
|
||||
drawPolyline(planningPoints, locIndex)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
startLoopCalCarLocation()
|
||||
isInit = true
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -224,22 +224,22 @@ enum class EventTypeEnumNew(
|
||||
1001.toString(),
|
||||
"碰撞预警",
|
||||
poiTypeSrcVr = R.drawable.icon_warning_v2x_motorcycle_collision,
|
||||
content = "前方摩托车",
|
||||
tts = "前方摩托车"
|
||||
content = "前方摩托车闯入",
|
||||
tts = "前方摩托车闯入"
|
||||
),
|
||||
TYPE_USECASE_ID_VRUCW_NOT_MOTOR_VEHICLES(
|
||||
1002.toString(),
|
||||
"碰撞预警",
|
||||
poiTypeSrcVr = R.drawable.icon_warning_v2x_motobike,
|
||||
content = "前方非机动车",
|
||||
tts = "前方非机动车"
|
||||
content = "前方非机动车闯入",
|
||||
tts = "前方非机动车闯入"
|
||||
),
|
||||
TYPE_USECASE_ID_VRUCW_PERSON(
|
||||
1003.toString(),
|
||||
"碰撞预警",
|
||||
poiTypeSrcVr = R.drawable.icon_warning_v2x_pedestrian_crossing,
|
||||
content = "前方路人",
|
||||
tts = "前方路人"
|
||||
content = "前方路人闯入",
|
||||
tts = "前方路人闯入"
|
||||
),
|
||||
TYPE_ERROR_WEAKNESS(
|
||||
1006.toString(),
|
||||
|
||||
@@ -3,6 +3,7 @@ package com.mogo.eagle.core.utilcode.util;
|
||||
import android.text.TextUtils;
|
||||
import android.util.Log;
|
||||
|
||||
import java.util.Locale;
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
@@ -33,7 +34,11 @@ public class ParseVersionUtils {
|
||||
|
||||
/**
|
||||
* 解析版本 格式 xxx.xxx.xxx(x的数量不固定)
|
||||
* 如果用于比较,仅适用于非个位数非0的字符串,例如:"12.03.04" 解析出为120304可能无法正常对比
|
||||
* 仅用于版本比较,不能用于展示
|
||||
* 例如:
|
||||
* "12.03.04" 解析结果:120304
|
||||
* "2.11.0" 解析结果:21100
|
||||
* "3.0.0" 解析结果:30000
|
||||
* 目前已用于DockerVersion和MaserVersion的解析
|
||||
*
|
||||
* @param isUseAll 是否使用全部截取数据 true:表示 12.34.56 截取之后 123456 false:表示12.34.56 截取之后 12
|
||||
@@ -48,8 +53,12 @@ public class ParseVersionUtils {
|
||||
if (matcher.find()) {
|
||||
String group = matcher.group();
|
||||
if (!TextUtils.isEmpty(group)) {
|
||||
String format = "%02d";
|
||||
if (isUseAll) {
|
||||
group = group.replace(".", "");
|
||||
String[] temp = group.split("\\.");
|
||||
group = String.format(Locale.getDefault(), format, Integer.parseInt(temp[0]));
|
||||
group += String.format(Locale.getDefault(), format, Integer.parseInt(temp[1]));
|
||||
group += String.format(Locale.getDefault(), format, Integer.parseInt(temp[2]));
|
||||
} else {
|
||||
group = group.split("\\.")[0];
|
||||
}
|
||||
|
||||
@@ -141,7 +141,8 @@ message TrackedObject
|
||||
repeated Location polygon = 15;
|
||||
geometry.Point center = 16;
|
||||
AdditionalAttribute add_attribute = 17; // 事件类型
|
||||
reserved 18 to 100;
|
||||
double angle = 18; //相对于自车x轴的角度,左正右负
|
||||
reserved 19 to 100;
|
||||
string strUuid = 101;//String类型车辆ID
|
||||
}
|
||||
|
||||
@@ -317,7 +318,7 @@ message CarConfigResp
|
||||
string carType = 9; //车辆类型
|
||||
string subCarType = 10; //车辆子类型
|
||||
reserved 11 to 100;
|
||||
int32 mapVersion = 101;//dockVersion解析出版本号,解析失败为-1。例如:"MAP-taxi_RoboTaxi_df_2.8.0.3_20220928_test" 解析结果为:280
|
||||
int32 mapVersion = 101;//dockVersion解析出版本号,仅用于版本对比,解析失败为-1。例如:"MAP-taxi_RoboTaxi_df_2.8.0.3_20220928_test" 解析结果为:20800
|
||||
bool isDF = 102;//车型是否是东风
|
||||
bool isHQ = 103;//车型是否是红旗
|
||||
bool isJinlv = 104;//车型是否是金旅小巴
|
||||
|
||||
@@ -15,6 +15,7 @@ import com.zhidao.support.adas.high.common.ReceiveTimeoutManager;
|
||||
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
import java.util.Set;
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
@@ -1053,7 +1054,11 @@ public class AdasManager implements IAdasNetCommApi {
|
||||
|
||||
/**
|
||||
* 解析版本 格式 xxx.xxx.xxx(x的数量不固定)
|
||||
* 如果用于比较,仅适用于除个位数非0的字符串,例如:"12.03.04" 解析出为120304可能无法正常对比
|
||||
* 仅用于版本比较,不能用于展示
|
||||
* 例如:
|
||||
* "12.03.04" 解析结果:120304
|
||||
* "2.11.0" 解析结果:21100
|
||||
* "3.0.0" 解析结果:30000
|
||||
* 目前已用于DockerVersion和MaserVersion的解析
|
||||
*
|
||||
* @param ver 版本字符串 例如:"MAP-taxi_RoboTaxi_df_2.8.0.3_20220928_test" 解析结果为:280
|
||||
@@ -1065,7 +1070,11 @@ public class AdasManager implements IAdasNetCommApi {
|
||||
|
||||
/**
|
||||
* 解析版本 格式 xxx.xxx.xxx(x的数量不固定)
|
||||
* 如果用于比较,仅适用于非个位数非0的字符串,例如:"12.03.04" 解析出为120304可能无法正常对比
|
||||
* 仅用于版本比较,不能用于展示
|
||||
* 例如:
|
||||
* "12.03.04" 解析结果:120304
|
||||
* "2.11.0" 解析结果:21100
|
||||
* "3.0.0" 解析结果:30000
|
||||
* 目前已用于DockerVersion和MaserVersion的解析
|
||||
*
|
||||
* @param isUseAll 是否使用全部截取数据 true:表示 12.34.56 截取之后 123456 false:表示12.34.56 截取之后 12
|
||||
@@ -1080,8 +1089,12 @@ public class AdasManager implements IAdasNetCommApi {
|
||||
if (matcher.find()) {
|
||||
String group = matcher.group();
|
||||
if (!TextUtils.isEmpty(group)) {
|
||||
String format = "%02d";
|
||||
if (isUseAll) {
|
||||
group = group.replace(".", "");
|
||||
String[] temp = group.split("\\.");
|
||||
group = String.format(Locale.getDefault(), format, Integer.parseInt(temp[0]));
|
||||
group += String.format(Locale.getDefault(), format, Integer.parseInt(temp[1]));
|
||||
group += String.format(Locale.getDefault(), format, Integer.parseInt(temp[2]));
|
||||
} else {
|
||||
group = group.split("\\.")[0];
|
||||
}
|
||||
|
||||
@@ -138,7 +138,7 @@ public class AutopilotAbilityManager {
|
||||
}
|
||||
|
||||
private void initAutopilotAbility() {
|
||||
if (dockerVersion >= 250) {
|
||||
if (dockerVersion >= 20500) {
|
||||
stop230();
|
||||
if (autopilotAbility250 == null) {
|
||||
autopilotAbility250 = new AutopilotAbility250();
|
||||
@@ -186,7 +186,7 @@ public class AutopilotAbilityManager {
|
||||
@Override
|
||||
public void run() {
|
||||
if (dockerVersion == -1 && AdasManager.getInstance().getIpcConnectionStatus() == Constants.IPC_CONNECTION_STATUS.CONNECTED) {
|
||||
dockerVersion = 230;
|
||||
dockerVersion = 20300;
|
||||
initAutopilotAbility();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user