Merge branch 'dev_robotaxi-d_230912_6.1.0' into dev_minibus-d_230919_6.1.0
This commit is contained in:
@@ -118,7 +118,7 @@ class RedLightWarningManager : IMoGoTrafficLightListener, IMoGoVipSetListener,
|
||||
"$M_V2X$TAG",
|
||||
"路口经度为:${trafficLightResult.lon},纬度为:${trafficLightResult.lat};车的经度为:${it.longitude},纬度为:${it.latitude};两点距离为:${distance}"
|
||||
)
|
||||
val remainTime = trafficLightStatus.remain
|
||||
val remainTime = trafficLightStatus.time()
|
||||
val arriveTime = distance / speed
|
||||
CallerLogger.d(
|
||||
"$M_V2X$TAG",
|
||||
@@ -235,7 +235,7 @@ class RedLightWarningManager : IMoGoTrafficLightListener, IMoGoVipSetListener,
|
||||
EventTypeEnumNew.getWarningTts(EventTypeEnumNew.TYPE_USECASE_ID_IVP_GREEN.poiType),
|
||||
speed
|
||||
)
|
||||
if (content.isNullOrEmpty() || tts.isNullOrEmpty()) {
|
||||
if (content.isEmpty() || tts.isEmpty()) {
|
||||
Log.d("MsgBox-RedLightWarManaG", "alertContent或ttsContent为空!")
|
||||
}
|
||||
CallerMsgBoxManager.saveMsgBox(
|
||||
@@ -263,8 +263,8 @@ class RedLightWarningManager : IMoGoTrafficLightListener, IMoGoVipSetListener,
|
||||
CallerChassisLocationGCJ02ListenerManager.removeListener(TAG)
|
||||
}
|
||||
|
||||
override fun onChassisLocationGCJ02(gnssInfo: MogoLocation?) {
|
||||
gnssInfo?.let {
|
||||
override fun onChassisLocationGCJ02(mogoLocation: MogoLocation?) {
|
||||
mogoLocation?.let {
|
||||
mLocation = it
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,7 +11,7 @@ import com.mogo.eagle.core.data.biz.trafficlight.isInRange
|
||||
import com.mogo.eagle.core.data.map.MogoLocation
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoChassisLocationGCJ02Listener
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationGCJ02ListenerManager
|
||||
import com.mogo.eagle.core.function.call.map.CallerMapUIServiceManager
|
||||
import com.mogo.eagle.core.function.call.map.CallerMapRoadListenerManager
|
||||
import com.mogo.eagle.core.function.call.v2x.CallerTrafficLightListenerManager
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_V2X
|
||||
@@ -21,7 +21,8 @@ import com.mogo.eagle.function.biz.v2x.trafficlight.core.TrafficLightThreadHandl
|
||||
import com.mogo.eagle.function.biz.v2x.trafficlight.core.TrafficLightThreadHandler.Companion.MSG_WHAT_STOP_SEARCH_TRAFFIC_LIGHT
|
||||
import com.mogo.eagle.function.biz.v2x.trafficlight.network.TrafficLightNetWorkModel
|
||||
|
||||
class MogoTrafficLightManager : IMoGoChassisLocationGCJ02Listener {
|
||||
class MogoTrafficLightManager : IMoGoChassisLocationGCJ02Listener,
|
||||
CallerMapRoadListenerManager.OnRoadListener {
|
||||
|
||||
companion object {
|
||||
|
||||
@@ -40,7 +41,7 @@ class MogoTrafficLightManager : IMoGoChassisLocationGCJ02Listener {
|
||||
private var roadIDResult: RoadIDResult? = null
|
||||
@Volatile
|
||||
private var trafficLightResult: TrafficLightResult? = null
|
||||
|
||||
@Volatile
|
||||
private var inRange: Boolean = false
|
||||
@Volatile
|
||||
private var firstLoopCrossRoad: Boolean = true //开启循环请求路口
|
||||
@@ -50,6 +51,7 @@ class MogoTrafficLightManager : IMoGoChassisLocationGCJ02Listener {
|
||||
fun initServer(context: Context) {
|
||||
mContext = context
|
||||
CallerChassisLocationGCJ02ListenerManager.addListener(TAG, this)
|
||||
CallerMapRoadListenerManager.registerRoadListener(TAG, this)
|
||||
mThreadHandler =
|
||||
TrafficLightThreadHandler(Looper.getMainLooper(), {
|
||||
//第一次查询路口时,如果红绿灯显示,则隐藏掉
|
||||
@@ -119,29 +121,46 @@ class MogoTrafficLightManager : IMoGoChassisLocationGCJ02Listener {
|
||||
mThreadHandler?.sendEmptyMessageDelayed(MSG_WHAT_LOOP_SEARCH_CROSS_ROAD, 5_000L)
|
||||
}
|
||||
|
||||
override fun onRoadChange(cross: Boolean) {
|
||||
super.onRoadChange(cross)
|
||||
if(!cross){
|
||||
outOfCrossRange()
|
||||
}
|
||||
}
|
||||
|
||||
private fun checkOutOfRange() {
|
||||
mLocation?.let { loc ->
|
||||
roadIDResult?.let {
|
||||
// 检测是否开过路口,开过路口则停止读灯。并重置 trafficLightResult 值为 null
|
||||
if (trafficLightResult != null && it.isInRange(loc.latitude, loc.longitude)) {
|
||||
if(inRange){
|
||||
return
|
||||
}
|
||||
inRange = true
|
||||
// CallerLogger.d(M_V2X + TAG, "进入路口")
|
||||
CallerLogger.d(M_V2X + TAG, "进入路口")
|
||||
CallerTrafficLightListenerManager.invokeEnterCrossRoad(true)
|
||||
return
|
||||
}
|
||||
if (inRange) {
|
||||
// CallerLogger.d(M_V2X + TAG, "离开路口")
|
||||
CallerTrafficLightListenerManager.invokeEnterCrossRoad(false)
|
||||
inRange = false
|
||||
trafficLightResult = null
|
||||
firstLoopCrossRoad = true
|
||||
mThreadHandler?.sendEmptyMessage(MSG_WHAT_STOP_SEARCH_TRAFFIC_LIGHT)
|
||||
CallerTrafficLightListenerManager.resetTrafficLightStatus()
|
||||
outOfCrossRange()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private fun outOfCrossRange(){
|
||||
CallerLogger.d(M_V2X + TAG, "离开路口 , inRange:$inRange")
|
||||
if(!inRange){
|
||||
return
|
||||
}
|
||||
CallerTrafficLightListenerManager.invokeEnterCrossRoad(false)
|
||||
inRange = false
|
||||
trafficLightResult = null
|
||||
firstLoopCrossRoad = true
|
||||
mThreadHandler?.sendEmptyMessage(MSG_WHAT_STOP_SEARCH_TRAFFIC_LIGHT)
|
||||
CallerTrafficLightListenerManager.resetTrafficLightStatus()
|
||||
}
|
||||
|
||||
fun getRoadResult(): RoadIDResult? {
|
||||
return roadIDResult
|
||||
}
|
||||
|
||||
@@ -4,12 +4,12 @@ import com.mogo.cloud.passport.MoGoAiCloudClientConfig
|
||||
import com.mogo.commons.constants.HostConst
|
||||
import com.mogo.eagle.core.data.BaseResponse
|
||||
import com.mogo.eagle.core.data.biz.trafficlight.*
|
||||
import com.mogo.eagle.core.function.call.map.CallerMapUIServiceManager
|
||||
import com.mogo.eagle.core.network.MoGoRetrofitFactory
|
||||
import com.mogo.eagle.core.network.apiCall
|
||||
import com.mogo.eagle.core.network.cancel
|
||||
import com.mogo.eagle.core.network.request
|
||||
import com.mogo.eagle.core.utilcode.util.GsonUtils
|
||||
import com.mogo.map.MogoData.Companion.mogoMapData
|
||||
|
||||
class TrafficLightNetWorkModel {
|
||||
|
||||
@@ -28,8 +28,7 @@ class TrafficLightNetWorkModel {
|
||||
request<BaseResponse<RoadIDResult>>("requestRoadID") {
|
||||
loader {
|
||||
apiCall {
|
||||
val tileId = CallerMapUIServiceManager.getMapUIController()
|
||||
?.getTileId(lon, lat) ?: 0
|
||||
val tileId = mogoMapData.get()?.getTileId(lon, lat)?:0
|
||||
val map = hashMapOf<String, String>()
|
||||
val roadIDRequestData = RoadIDRequestData(tileId, lat, lon, bearing)
|
||||
map["sn"] = MoGoAiCloudClientConfig.getInstance().sn
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
package com.mogo.eagle.function.biz.v2x.v2n.scenario.impl;
|
||||
|
||||
import static com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.M_V2X;
|
||||
|
||||
import androidx.localbroadcastmanager.content.LocalBroadcastManager;
|
||||
import static com.mogo.map.MogoMap.DEFAULT;
|
||||
|
||||
import com.mogo.commons.module.status.MogoStatusManager;
|
||||
import com.mogo.eagle.core.data.config.HmiBuildConfig;
|
||||
@@ -25,24 +24,19 @@ import com.mogo.map.uicontroller.VisualAngleMode;
|
||||
* version: 1.0
|
||||
*/
|
||||
public class V2XScenarioManager implements IV2XScenarioManager {
|
||||
private static V2XScenarioManager mV2XScenarioManager;
|
||||
private static final String TAG = "V2XScenarioManager";
|
||||
private AbsV2XScenario mV2XScenario = null;
|
||||
|
||||
private V2XScenarioManager() {
|
||||
}
|
||||
|
||||
public static V2XScenarioManager getInstance() {
|
||||
if (mV2XScenarioManager == null) {
|
||||
synchronized (V2XScenarioManager.class) {
|
||||
if (mV2XScenarioManager == null) {
|
||||
mV2XScenarioManager = new V2XScenarioManager();
|
||||
}
|
||||
}
|
||||
}
|
||||
return mV2XScenarioManager;
|
||||
private static final class MV2XScenarioManagerHolder {
|
||||
static final V2XScenarioManager mV2XScenarioManager = new V2XScenarioManager();
|
||||
}
|
||||
|
||||
public static V2XScenarioManager getInstance() {
|
||||
return MV2XScenarioManagerHolder.mV2XScenarioManager;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void handlerMessage(V2XMessageEntity v2XMessageEntity) {
|
||||
@@ -93,7 +87,7 @@ public class V2XScenarioManager implements IV2XScenarioManager {
|
||||
* 道路事件触发后,切换到中景
|
||||
*/
|
||||
private void sceneChange() {
|
||||
IMogoMapUIController mapUiController = CallerMapUIServiceManager.INSTANCE.getMapUIController();
|
||||
IMogoMapUIController mapUiController = CallerMapUIServiceManager.INSTANCE.getMapUIController(DEFAULT);
|
||||
if (mapUiController != null && mapUiController.getCurrentMapVisualAngle() != VisualAngleMode.MODE_MEDIUM_SIGHT) {
|
||||
mapUiController.changeMapVisualAngle(VisualAngleMode.MODE_MEDIUM_SIGHT, null);
|
||||
}
|
||||
|
||||
@@ -18,11 +18,13 @@ import com.mogo.eagle.function.biz.v2x.v2n.consts.V2XConst
|
||||
import com.mogo.eagle.function.biz.v2x.v2n.remove.MarkerRemoveManager
|
||||
import com.mogo.eagle.function.biz.v2x.v2n.remove.MarkerWrapper
|
||||
import com.mogo.eagle.function.biz.v2x.v2n.scenario.scene.road.V2XAiRoadEventMarker
|
||||
import com.mogo.map.MogoMap
|
||||
import com.mogo.map.MogoData.Companion.mogoMapData
|
||||
import com.mogo.map.overlay.core.Level.ROAD_CENTER_LINE
|
||||
import com.mogo.map.overlay.line.*
|
||||
import com.mogo.map.overlay.line.Polyline
|
||||
import com.zhidaoauto.map.data.road.CenterLine
|
||||
import java.util.*
|
||||
import java.util.concurrent.ConcurrentHashMap
|
||||
import java.util.concurrent.atomic.AtomicInteger
|
||||
import java.util.concurrent.atomic.AtomicReference
|
||||
|
||||
/**
|
||||
@@ -33,9 +35,9 @@ class AiRoadMarker {
|
||||
companion object {
|
||||
@JvmField
|
||||
val aiMakers = ConcurrentHashMap<String, AiRoadMarker>()
|
||||
}
|
||||
|
||||
private val TAG = "AiRoadMarker"
|
||||
private const val TAG = "AiRoadMarker"
|
||||
}
|
||||
|
||||
private val marker by lazy { AtomicReference<Marker>() }
|
||||
|
||||
@@ -49,20 +51,26 @@ class AiRoadMarker {
|
||||
private val roadMarker by lazy { V2XAiRoadEventMarker() }
|
||||
|
||||
private val line = AtomicReference<Polyline>()
|
||||
private val countDown = AtomicInteger(0)
|
||||
|
||||
private val handler by lazy {
|
||||
Handler(Looper.getMainLooper())
|
||||
}
|
||||
|
||||
private val v2nDrawHandler by lazy {
|
||||
HandlerThread("v2n_draw_thread").let { it.start(); Handler(it.looper)}
|
||||
HandlerThread("v2n_draw_thread").let { it.start(); Handler(it.looper) }
|
||||
}
|
||||
|
||||
private val checkExpiredTask = Runnable {
|
||||
val poi = this.marker.get()
|
||||
val car = CallerChassisLocationWGS84ListenerManager.getChassisLocationWGS84()
|
||||
if (poi != null) {
|
||||
val distance = CoordinateUtils.calculateLineDistance(car.longitude, car.latitude, poi.poi_lon, poi.poi_lat)
|
||||
val distance = CoordinateUtils.calculateLineDistance(
|
||||
car.longitude,
|
||||
car.latitude,
|
||||
poi.poi_lon,
|
||||
poi.poi_lat
|
||||
)
|
||||
if (distance < 500) {
|
||||
unMarker(poi)
|
||||
}
|
||||
@@ -70,7 +78,8 @@ class AiRoadMarker {
|
||||
}
|
||||
|
||||
private val builder by lazy {
|
||||
Polyline.Options.Builder(V2XConst.V2X_MARKER_OWNER, ROAD_CENTER_LINE).setIsGradient(true).setWidth(50f).setUseGps(true)
|
||||
Polyline.Options.Builder(V2XConst.V2X_MARKER_OWNER, ROAD_CENTER_LINE).setIsGradient(true)
|
||||
.setWidth(50f).setUseGps(true)
|
||||
}
|
||||
|
||||
fun marker(marker: Marker, drawMarker: Boolean, drawRoadLine: Boolean = false) {
|
||||
@@ -83,99 +92,130 @@ class AiRoadMarker {
|
||||
}
|
||||
if (drawRoadLine) {
|
||||
//施工中心点前方的自车行驶方向上300米距离
|
||||
val l1 = MogoMap.getInstance().mogoMap.getCenterLineRangeInfo(
|
||||
var l1: CenterLine? = null
|
||||
var l2: CenterLine? = null
|
||||
mogoMapData.get()?.getCenterLineRangeInfo(
|
||||
marker.poi_lon,
|
||||
marker.poi_lat,
|
||||
location.heading.toFloat(),
|
||||
300f
|
||||
)
|
||||
//施工中心点后方的自车行驶方向上300米距离
|
||||
V2XBizTrace.onAck("$TAG --- marker --- 3 --- l1:", l1)
|
||||
val l2 = MogoMap.getInstance().mogoMap.getCenterLineRangeInfo(
|
||||
marker.poi_lon,
|
||||
marker.poi_lat,
|
||||
location.heading.toFloat(),
|
||||
-300f
|
||||
)
|
||||
if (l1.points.isEmpty() || l2.points.isEmpty()) {
|
||||
V2XBizTrace.onAck("$TAG --- marker --- 3 --- return ----", "")
|
||||
return@post
|
||||
}
|
||||
V2XBizTrace.onAck("$TAG --- marker --- 4 --- l2:", l2)
|
||||
val points = LinkedList<MogoLatLng>()
|
||||
if (l2 != null && l2.points.isNotEmpty()) {
|
||||
points.addAll(l2.points.reversed().map {
|
||||
MogoLatLng(it.second, it.first)
|
||||
300f, call = { result ->
|
||||
//施工中心点后方的自车行驶方向上300米距离
|
||||
result?.let {
|
||||
V2XBizTrace.onAck("$TAG --- marker --- 3 --- l1:", it)
|
||||
l1 = result
|
||||
}
|
||||
countDown.incrementAndGet()
|
||||
realMark(marker, wrapper, l1, l2, location.heading)
|
||||
})
|
||||
}
|
||||
val centerX = marker.poi_lon
|
||||
val centerY = marker.poi_lat
|
||||
V2XBizTrace.onAck("$TAG --- marker --- 5 --- marker:", marker)
|
||||
val farthestPoint = marker.polygon?.let {
|
||||
var find: Pair<Double, Double> = Pair(centerX, centerY)
|
||||
var min = Long.MAX_VALUE
|
||||
for (p in it) {
|
||||
val angle = DrivingDirectionUtils.getDegreeOfCar2Poi2(
|
||||
centerX,
|
||||
centerY,
|
||||
p.first,
|
||||
p.second,
|
||||
location.heading
|
||||
)
|
||||
if (angle < min) {
|
||||
min = angle
|
||||
find = p
|
||||
mogoMapData.get()?.getCenterLineRangeInfo(
|
||||
marker.poi_lon,
|
||||
marker.poi_lat,
|
||||
location.heading.toFloat(),
|
||||
-300f, call = { result ->
|
||||
result?.let {
|
||||
V2XBizTrace.onAck("$TAG --- marker --- 3 --- l2:", it)
|
||||
l2 = result
|
||||
}
|
||||
}
|
||||
MogoLatLng(find.second, find.first)
|
||||
} ?: MogoLatLng(centerY, centerX)
|
||||
marker.farthestPoint = Pair(farthestPoint.lon, farthestPoint.lat)
|
||||
V2XBizTrace.onAck("$TAG --- marker --- 6 --- marker:", marker)
|
||||
if (l1 != null && l1.points.isNotEmpty()) {
|
||||
for (l in l1.points) {
|
||||
if (DrivingDirectionUtils.getDegreeOfCar2Poi2(
|
||||
farthestPoint.lon,
|
||||
farthestPoint.lat,
|
||||
l.first,
|
||||
l.second,
|
||||
(location.heading + 180)
|
||||
) < 90L
|
||||
) {
|
||||
points.add(l.let { MogoLatLng(it.second, it.first) })
|
||||
}
|
||||
}
|
||||
}
|
||||
if (points.size <= 1) {
|
||||
return@post
|
||||
}
|
||||
val evaluator = ArgbEvaluator()
|
||||
val interceptor = DecelerateInterpolator(1.5f)
|
||||
val total = points.size
|
||||
val colors = ArrayList<Int>()
|
||||
(0..total).forEach { i ->
|
||||
colors += evaluator.evaluate(
|
||||
interceptor.getInterpolation(i * 1f / total),
|
||||
START_COLOR,
|
||||
END_COLOR
|
||||
) as Int
|
||||
}
|
||||
builder.points(points)
|
||||
builder.colors(colors)
|
||||
builder.setVisible(true)
|
||||
V2XBizTrace.onAck("$TAG --- marker --- 7 --- points:", "${points.size}")
|
||||
val line = overlayManager?.showOrUpdateLine(builder.build())
|
||||
if (line != null) {
|
||||
this.line.set(line)
|
||||
wrapper.addLine(line)
|
||||
}
|
||||
countDown.incrementAndGet()
|
||||
realMark(marker, wrapper, l1, l2, location.heading)
|
||||
})
|
||||
}
|
||||
wrapper.onRemoved = { id ->
|
||||
aiMakers.remove(id)
|
||||
}
|
||||
MarkerRemoveManager.addMarker(wrapper)
|
||||
}
|
||||
}
|
||||
|
||||
@Synchronized
|
||||
private fun realMark(
|
||||
marker: Marker,
|
||||
wrapper: MarkerWrapper,
|
||||
l1: CenterLine?,
|
||||
l2: CenterLine?,
|
||||
heading: Double
|
||||
) {
|
||||
if (countDown.get() != 2) {
|
||||
return
|
||||
}
|
||||
if (l1 == null || l2 == null) {
|
||||
V2XBizTrace.onAck("$TAG --- marker --- 3 --- line null return ----", "")
|
||||
return
|
||||
}
|
||||
if (l1.points.isEmpty() || l2.points.isEmpty()) {
|
||||
V2XBizTrace.onAck("$TAG --- marker --- 3 --- line points null return ----", "")
|
||||
return
|
||||
}
|
||||
V2XBizTrace.onAck("$TAG --- marker --- 4 --- l2:", l2)
|
||||
val points = LinkedList<MogoLatLng>()
|
||||
if (l2.points.isNotEmpty()) {
|
||||
points.addAll(l2.points.reversed().map {
|
||||
MogoLatLng(it.latitude, it.longitude)
|
||||
})
|
||||
}
|
||||
val centerX = marker.poi_lon
|
||||
val centerY = marker.poi_lat
|
||||
V2XBizTrace.onAck("$TAG --- marker --- 5 --- marker:", marker)
|
||||
val farthestPoint = marker.polygon?.let {
|
||||
var find: Pair<Double, Double> = Pair(centerX, centerY)
|
||||
var min = Long.MAX_VALUE
|
||||
for (p in it) {
|
||||
val angle = DrivingDirectionUtils.getDegreeOfCar2Poi2(
|
||||
centerX,
|
||||
centerY,
|
||||
p.first,
|
||||
p.second,
|
||||
heading
|
||||
)
|
||||
if (angle < min) {
|
||||
min = angle
|
||||
find = p
|
||||
}
|
||||
}
|
||||
MogoLatLng(find.second, find.first)
|
||||
} ?: MogoLatLng(centerY, centerX)
|
||||
marker.farthestPoint = Pair(farthestPoint.lon, farthestPoint.lat)
|
||||
V2XBizTrace.onAck("$TAG --- marker --- 6 --- marker:", marker)
|
||||
if (l1.points.isNotEmpty()) {
|
||||
for (l in l1.points) {
|
||||
if (DrivingDirectionUtils.getDegreeOfCar2Poi2(
|
||||
farthestPoint.lon,
|
||||
farthestPoint.lat,
|
||||
l.longitude,
|
||||
l.latitude,
|
||||
(heading + 180)
|
||||
) < 90L
|
||||
) {
|
||||
points.add(l.let { MogoLatLng(it.latitude, it.longitude) })
|
||||
}
|
||||
}
|
||||
}
|
||||
if (points.size <= 1) {
|
||||
return
|
||||
}
|
||||
val evaluator = ArgbEvaluator()
|
||||
val interceptor = DecelerateInterpolator(1.5f)
|
||||
val total = points.size
|
||||
val colors = ArrayList<Int>()
|
||||
(0..total).forEach { i ->
|
||||
colors += evaluator.evaluate(
|
||||
interceptor.getInterpolation(i * 1f / total),
|
||||
START_COLOR,
|
||||
END_COLOR
|
||||
) as Int
|
||||
}
|
||||
builder.points(points)
|
||||
builder.colors(colors)
|
||||
builder.setVisible(true)
|
||||
V2XBizTrace.onAck("$TAG --- marker --- 7 --- points:", "${points.size}")
|
||||
val line = overlayManager?.showOrUpdateLine(builder.build())
|
||||
if (line != null) {
|
||||
this.line.set(line)
|
||||
wrapper.addLine(line)
|
||||
}
|
||||
wrapper.onRemoved = { id ->
|
||||
aiMakers.remove(id)
|
||||
}
|
||||
MarkerRemoveManager.addMarker(wrapper)
|
||||
countDown.set(0)
|
||||
}
|
||||
|
||||
private fun removeLine() {
|
||||
val old = line.get()
|
||||
V2XBizTrace.onAck("$TAG --- removeRedLine --- 1", "")
|
||||
@@ -202,7 +242,12 @@ class AiRoadMarker {
|
||||
val poi = this.marker.get()
|
||||
val car = CallerChassisLocationWGS84ListenerManager.getChassisLocationWGS84()
|
||||
if (poi != null) {
|
||||
val distance = CoordinateUtils.calculateLineDistance(car.longitude, car.latitude, poi.poi_lon, poi.poi_lat)
|
||||
val distance = CoordinateUtils.calculateLineDistance(
|
||||
car.longitude,
|
||||
car.latitude,
|
||||
poi.poi_lon,
|
||||
poi.poi_lat
|
||||
)
|
||||
V2XBizTrace.onAck(
|
||||
"$TAG --- receive --- 2 ---",
|
||||
"car:[${car.longitude}, ${car.latitude}] -> poi:[${poi.poi_lon}, ${poi.poi_lat}] --> distance:$distance"
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package com.mogo.eagle.function.biz.v2x.v2n.scenario.scene.road;
|
||||
|
||||
import static com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.M_V2X;
|
||||
import static com.mogo.map.MogoMap.DEFAULT;
|
||||
|
||||
import androidx.core.util.Pair;
|
||||
import com.mogo.eagle.core.data.enums.EventTypeEnumNew;
|
||||
@@ -54,7 +55,7 @@ public class V2XRoadEventMarker implements IV2XMarker<V2XRoadEventEntity> {
|
||||
.longitude(entity.getLocation().getLon())
|
||||
.latitude(entity.getLocation().getLat())
|
||||
.set3DMode(true)
|
||||
.icon3DRes(EventTypeEnumNew.getMarker3DRes(entity.getPoiType())).build());
|
||||
.icon3DRes(EventTypeEnumNew.getMarker3DRes(entity.getPoiType())).build(),DEFAULT);
|
||||
if (point != null) {
|
||||
V2XBizTrace.Companion.onAck("V2XRoadEventMarker -> --- add Marker type: ", entity.getPoiType());
|
||||
ArrayList<Point> markers = new ArrayList<>();
|
||||
|
||||
@@ -5,8 +5,6 @@ import com.mogo.commons.utils.MogoAnalyticUtils
|
||||
import com.mogo.eagle.core.data.app.AppConfigInfo
|
||||
import com.mogo.eagle.core.data.enums.CommunicationType
|
||||
import com.mogo.eagle.core.data.enums.DataSourceType
|
||||
import com.mogo.eagle.core.data.map.MogoLocation
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoChassisLocationWGS84Listener
|
||||
import com.mogo.eagle.core.function.api.biz.IFuncBizProvider
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationWGS84ListenerManager
|
||||
import com.mogo.eagle.core.function.call.biz.CallerFuncBizListenerManager
|
||||
@@ -17,7 +15,7 @@ import java.util.concurrent.atomic.AtomicBoolean
|
||||
/**
|
||||
* V2X消息播报埋点统计
|
||||
*/
|
||||
object V2XEventAnalyticsManager: IMoGoChassisLocationWGS84Listener,IFuncBizProvider{
|
||||
object V2XEventAnalyticsManager: IFuncBizProvider{
|
||||
|
||||
private const val TAG = "V2XEventAnalyticsManager"
|
||||
private val hasInit by lazy { AtomicBoolean(false) }
|
||||
@@ -38,10 +36,6 @@ object V2XEventAnalyticsManager: IMoGoChassisLocationWGS84Listener,IFuncBizProvi
|
||||
private const val EVENT_PARAMS_LATITUDE ="latitude" // 纬度
|
||||
private const val EVENT_PARAMS_HEADING ="heading" // 航向角
|
||||
|
||||
private var longitude: Double?=null //经度
|
||||
private var latitude: Double?=null //纬度
|
||||
private var heading: Double?=null //航向角
|
||||
|
||||
private var oldTime = System.currentTimeMillis()
|
||||
|
||||
fun init(){
|
||||
@@ -52,13 +46,11 @@ object V2XEventAnalyticsManager: IMoGoChassisLocationWGS84Listener,IFuncBizProvi
|
||||
|
||||
private fun registerListener(){
|
||||
// 添加 ADAS车辆状态&定位 监听
|
||||
CallerChassisLocationWGS84ListenerManager.addListener(TAG, this)
|
||||
CallerFuncBizListenerManager.addListener(TAG,this)
|
||||
}
|
||||
|
||||
private fun unRegisterListener(){
|
||||
// 移除 ADAS车辆状态&定位 监听
|
||||
CallerChassisLocationWGS84ListenerManager.removeListener(TAG)
|
||||
CallerFuncBizListenerManager.removeListener(TAG)
|
||||
}
|
||||
|
||||
@@ -87,9 +79,9 @@ object V2XEventAnalyticsManager: IMoGoChassisLocationWGS84Listener,IFuncBizProvi
|
||||
msgEventParams[EVENT_PARAMS_PLATE_NUMBER] = AppConfigInfo.plateNumber //车牌号
|
||||
msgEventParams[EVENT_PARAMS_CAR_SN] = MoGoAiCloudClientConfig.getInstance().sn //鹰眼SN
|
||||
msgEventParams[EVENT_PARAMS_EYE_VERSION] = AppUtils.getAppVersionName() //鹰眼版本
|
||||
msgEventParams[EVENT_PARAMS_LONGITUDE] = "$longitude" //经度
|
||||
msgEventParams[EVENT_PARAMS_LATITUDE] = "$latitude" //纬度
|
||||
msgEventParams[EVENT_PARAMS_HEADING] = "$heading" //航向角
|
||||
msgEventParams[EVENT_PARAMS_LONGITUDE] = "${CallerChassisLocationWGS84ListenerManager.getChassisLocationWGS84().longitude}" //经度
|
||||
msgEventParams[EVENT_PARAMS_LATITUDE] = "${CallerChassisLocationWGS84ListenerManager.getChassisLocationWGS84().latitude}" //纬度
|
||||
msgEventParams[EVENT_PARAMS_HEADING] = "${CallerChassisLocationWGS84ListenerManager.getChassisLocationWGS84().heading}" //航向角
|
||||
MogoAnalyticUtils.track(EVENT_KEY_RECEIVE_V2X_MSG,msgEventParams)
|
||||
}
|
||||
|
||||
@@ -109,20 +101,12 @@ object V2XEventAnalyticsManager: IMoGoChassisLocationWGS84Listener,IFuncBizProvi
|
||||
msgEventParams[EVENT_PARAMS_PLATE_NUMBER] = AppConfigInfo.plateNumber //车牌号
|
||||
msgEventParams[EVENT_PARAMS_CAR_SN] = MoGoAiCloudClientConfig.getInstance().sn //鹰眼SN
|
||||
msgEventParams[EVENT_PARAMS_EYE_VERSION] = AppUtils.getAppVersionName() //鹰眼版本
|
||||
msgEventParams[EVENT_PARAMS_LONGITUDE] = "$longitude" //经度
|
||||
msgEventParams[EVENT_PARAMS_LATITUDE] = "$latitude" //纬度
|
||||
msgEventParams[EVENT_PARAMS_HEADING] = "$heading" //航向角
|
||||
msgEventParams[EVENT_PARAMS_LONGITUDE] = "${CallerChassisLocationWGS84ListenerManager.getChassisLocationWGS84().longitude}" //经度
|
||||
msgEventParams[EVENT_PARAMS_LATITUDE] = "${CallerChassisLocationWGS84ListenerManager.getChassisLocationWGS84().latitude}" //纬度
|
||||
msgEventParams[EVENT_PARAMS_HEADING] = "${CallerChassisLocationWGS84ListenerManager.getChassisLocationWGS84().heading}" //航向角
|
||||
MogoAnalyticUtils.track(EVENT_KEY_V2X_MSG_EVENT,msgEventParams)
|
||||
}
|
||||
|
||||
override fun onChassisLocationWGS84(gnssInfo: MogoLocation) {
|
||||
gnssInfo.let {
|
||||
longitude = it.longitude
|
||||
latitude = it.latitude
|
||||
heading = it.heading
|
||||
}
|
||||
}
|
||||
|
||||
fun onDestroy(){
|
||||
if (hasInit.compareAndSet(true, false)){
|
||||
unRegisterListener()
|
||||
|
||||
@@ -11,6 +11,7 @@ import com.mogo.cloud.passport.MoGoAiCloudClientConfig
|
||||
import com.mogo.eagle.core.data.biz.trafficlight.TrafficLightResult
|
||||
import com.mogo.eagle.core.data.biz.trafficlight.currentRoadTrafficLight
|
||||
import com.mogo.eagle.core.data.biz.trafficlight.isGreen
|
||||
import com.mogo.eagle.core.data.biz.trafficlight.time
|
||||
import com.mogo.eagle.core.data.deva.bizconfig.FuncBizConfig.Companion.BIZ_VIP
|
||||
import com.mogo.eagle.core.data.deva.bizconfig.FuncBizConfig.Companion.V2N
|
||||
import com.mogo.eagle.core.data.enums.CommunicationType
|
||||
@@ -34,6 +35,7 @@ import com.mogo.eagle.function.biz.v2x.trafficlight.core.MogoTrafficLightManager
|
||||
import com.mogo.eagle.function.biz.v2x.v2n.utils.V2XEventAnalyticsManager
|
||||
import com.mogo.eagle.function.biz.v2x.vip.network.VipNetWorkModel
|
||||
import com.zhjt.service_biz.BizConfig
|
||||
import kotlin.math.abs
|
||||
|
||||
class VipCarManager : IMogoOnMessageListener<VipMessage>, IMoGoTrafficLightListener,
|
||||
Handler.Callback {
|
||||
@@ -133,7 +135,7 @@ class VipCarManager : IMogoOnMessageListener<VipMessage>, IMoGoTrafficLightListe
|
||||
if (!turnLight) {
|
||||
// 首次判断,变灯
|
||||
turnLight = true
|
||||
val controlTime = if (currentResult!!.isGreen()) 45 - currentResult.remain else 45
|
||||
val controlTime = if (currentResult!!.isGreen()) 45 - abs(currentResult.time()) else 45
|
||||
turnLight(controlTime)
|
||||
}
|
||||
|
||||
|
||||
@@ -140,7 +140,7 @@ class MoGoAutopilotControlProvider :
|
||||
timer = Timer()
|
||||
}
|
||||
// 10s同步一次数据到乘客屏
|
||||
timer!!.schedule(object : TimerTask() {
|
||||
timer?.schedule(object : TimerTask() {
|
||||
override fun run() {
|
||||
// 同步是否开启美化模式
|
||||
setDemoMode(FunctionBuildConfig.isDemoMode)
|
||||
@@ -424,7 +424,7 @@ class MoGoAutopilotControlProvider :
|
||||
}
|
||||
|
||||
override fun cancelAutoPilot() {
|
||||
if (AdasManager.getInstance().ipcConnectionStatus == Constants.IPC_CONNECTION_STATUS.CONNECTED) {
|
||||
if (AdasManager.getInstance().ipcConnectionStatus == IPC_CONNECTION_STATUS.CONNECTED) {
|
||||
AdasManager.getInstance().sendAutoPilotModeReq(0, 1, null)
|
||||
} else {
|
||||
CallerLogger.e("$M_D_C$TAG", "车机与工控机链接失败,无法断开自动驾驶")
|
||||
@@ -687,10 +687,6 @@ class MoGoAutopilotControlProvider :
|
||||
|
||||
/**
|
||||
* 获取数据采集录制模式配置列表
|
||||
* @param reqType 0: all, 1:获取当前所有topic列表, 2:配置需要预加载的topic组合
|
||||
* @param recordType 0:不需要修改内置类型的topic组合, 1:需要修改内置类型的topic组合
|
||||
* @param topicsNeedToCache
|
||||
* @return boolean
|
||||
*/
|
||||
override fun sendBagManagerCmd(bagManagerEntity: BagManagerEntity): Boolean {
|
||||
val bagManager = BagManagerOuterClass.BagManager
|
||||
|
||||
@@ -212,7 +212,7 @@ class MoGoAdasListenerImpl : OnAdasListener {
|
||||
* 底盘数据
|
||||
*
|
||||
* @param header 头
|
||||
* @param vehicleState 数据
|
||||
* @param chassisStates 数据
|
||||
*/
|
||||
@ChainLog(
|
||||
linkChainLog = CHAIN_TYPE_SOCKET_VEHICLE,
|
||||
@@ -492,7 +492,9 @@ class MoGoAdasListenerImpl : OnAdasListener {
|
||||
header: MessagePad.Header?,
|
||||
spatWarningData: ObuScene.SpatWarningData?
|
||||
) {
|
||||
CallerObuWarningSpatListenerManager.invokeObuSpatWarning(spatWarningData!!)
|
||||
spatWarningData?.let {
|
||||
CallerObuWarningSpatListenerManager.invokeObuSpatWarning(it)
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -505,7 +507,9 @@ class MoGoAdasListenerImpl : OnAdasListener {
|
||||
header: MessagePad.Header?,
|
||||
rsiWarningData: ObuScene.RsiWarningData?
|
||||
) {
|
||||
CallerObuWarningRsiListenerManager.invokeObuRsiWarning(rsiWarningData!!)
|
||||
rsiWarningData?.let {
|
||||
CallerObuWarningRsiListenerManager.invokeObuRsiWarning(it)
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -518,7 +522,9 @@ class MoGoAdasListenerImpl : OnAdasListener {
|
||||
header: MessagePad.Header?,
|
||||
rsmWarningData: ObuScene.RsmWarningData?
|
||||
) {
|
||||
CallerObuWarningRsmListenerManager.invokeObuRsmWarning(rsmWarningData!!)
|
||||
rsmWarningData?.let {
|
||||
CallerObuWarningRsmListenerManager.invokeObuRsmWarning(it)
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -528,7 +534,9 @@ class MoGoAdasListenerImpl : OnAdasListener {
|
||||
* @param mapMatchData 数据
|
||||
*/
|
||||
override fun onObuMapMath(header: MessagePad.Header?, mapMatchData: ObuScene.MapMatchData?) {
|
||||
CallerObuMapMathListenerManager.invokeObuMapMath(mapMatchData!!)
|
||||
mapMatchData?.let {
|
||||
CallerObuMapMathListenerManager.invokeObuMapMath(it)
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -894,13 +902,9 @@ class MoGoAdasListenerImpl : OnAdasListener {
|
||||
}
|
||||
|
||||
override fun onParallelDrivingAbility(
|
||||
isParallelDrivingAbility: Boolean,
|
||||
unableParallelDrivingReasons: java.util.ArrayList<UnableLaunchReason>?
|
||||
isParallelDrivingAbility: Boolean
|
||||
) {
|
||||
CallerParallelDrivingActionsListenerManager.invokeParallelDrivingAbility(
|
||||
isParallelDrivingAbility,
|
||||
unableParallelDrivingReasons
|
||||
)
|
||||
CallerParallelDrivingActionsListenerManager.invokeParallelDrivingAbility(isParallelDrivingAbility)
|
||||
}
|
||||
|
||||
@ChainLog(
|
||||
|
||||
@@ -332,7 +332,7 @@ class MogoObuDcCombineManager private constructor() : IMoGoObuWarningRsiListener
|
||||
)
|
||||
// 交通参与者类型 0x0:未知 UNKNOWN | 1机动车 2:非机动车 NON_MOTOR | 3:行人 PEDESTRIAN 4:obu
|
||||
if (rsmWarningData != null && rsmWarningData.participant != null) {
|
||||
var v2xType = when (rsmWarningData.participant.ptcType) {
|
||||
val v2xType = when (rsmWarningData.participant.ptcType) {
|
||||
1 -> { //机动车
|
||||
EventTypeEnumNew.TYPE_USECASE_ID_VRUCW_MOTOR_VEHICLES.poiType
|
||||
}
|
||||
@@ -434,12 +434,12 @@ class MogoObuDcCombineManager private constructor() : IMoGoObuWarningRsiListener
|
||||
fun onMogoObuDcSpatWarning(spatWarningData: ObuScene.SpatWarningData?) {
|
||||
CallerLogger.d(
|
||||
"${M_OBU}${TAG}",
|
||||
"onMogoObuDcSpatWarning warningType = ${spatWarningData!!.warningType} --status = ${spatWarningData?.status} --lightsList = ${spatWarningData.lightsList}"
|
||||
"onMogoObuDcSpatWarning warningType = ${spatWarningData!!.warningType} --status = ${spatWarningData.status} --lightsList = ${spatWarningData.lightsList}"
|
||||
)
|
||||
handlerTrafficLight(
|
||||
spatWarningData!!.warningType,
|
||||
spatWarningData?.status,
|
||||
spatWarningData?.lightsList
|
||||
spatWarningData.warningType,
|
||||
spatWarningData.status,
|
||||
spatWarningData.lightsList
|
||||
)
|
||||
}
|
||||
|
||||
@@ -520,7 +520,7 @@ class MogoObuDcCombineManager private constructor() : IMoGoObuWarningRsiListener
|
||||
MogoObuShowConstants.STATUS.ADD,
|
||||
MogoObuShowConstants.STATUS.UPDATE
|
||||
-> {
|
||||
if (lights != null && lights.isNotEmpty()) {
|
||||
if (lights.isNotEmpty()) {
|
||||
changeTrafficLightStatus(appId, lights)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -65,8 +65,8 @@ object TrafficMarkerDrawer {
|
||||
* 更新识别数据,V2V预警的时候需要修改车辆颜色
|
||||
*/
|
||||
fun updateITrafficInfo(trafficData: TrafficData) {
|
||||
if (trafficData.uuid != null) {
|
||||
mTrafficMap[trafficData.uuid!!] = trafficData
|
||||
trafficData.uuid?.let {
|
||||
mTrafficMap[it] = trafficData
|
||||
}
|
||||
}
|
||||
|
||||
@@ -85,12 +85,12 @@ object TrafficMarkerDrawer {
|
||||
tempTraffic.lat = trafficData.lat
|
||||
tempTraffic.lon = trafficData.lon
|
||||
tempTraffic.heading = trafficData.heading
|
||||
if (trafficData.uuid != null) {
|
||||
mTrafficMap[trafficData.uuid!!] = tempTraffic
|
||||
trafficData.uuid?.let {
|
||||
mTrafficMap[it] = tempTraffic
|
||||
}
|
||||
} else {
|
||||
if (trafficData.uuid != null) {
|
||||
mTrafficMap[trafficData.uuid!!] = trafficData
|
||||
trafficData.uuid?.let {
|
||||
mTrafficMap[it] = trafficData
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -111,12 +111,12 @@ object TrafficMarkerDrawer {
|
||||
tempTraffic.lon = trafficData.lon
|
||||
tempTraffic.heading = trafficData.heading
|
||||
tempTraffic.threatLevel = trafficData.threatLevel
|
||||
if (trafficData.uuid != null) {
|
||||
mTrafficMap[trafficData.uuid!!] = tempTraffic
|
||||
trafficData.uuid?.let {
|
||||
mTrafficMap[it] = tempTraffic
|
||||
}
|
||||
} else {
|
||||
if (trafficData.uuid != null) {
|
||||
mTrafficMap[trafficData.uuid!!] = trafficData
|
||||
trafficData.uuid?.let {
|
||||
mTrafficMap[it] = trafficData
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -197,8 +197,8 @@ object TrafficMarkerDrawer {
|
||||
|
||||
// 缓存3D资源
|
||||
mMarkerCachesResMd5Values[resIdVal] = options.resName ?: "" // 缓存数据
|
||||
if (trafficData.uuid != null) {
|
||||
mMarkersCaches[trafficData.uuid!!] = point
|
||||
trafficData.uuid?.let {
|
||||
mMarkersCaches[it] = point
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -293,10 +293,10 @@ class TrafficLightDispatcher : IMoGoAutopilotIdentifyListener, IMoGoTrafficLight
|
||||
"updateTrafficLight ----- currentTrafficLight = $currentTrafficLight"
|
||||
)
|
||||
currentTrafficLight?.let {
|
||||
val remain = if (it.remain > 99) {
|
||||
val remain = if (it.time() > 99) {
|
||||
99
|
||||
} else {
|
||||
it.remain
|
||||
it.time()
|
||||
}
|
||||
onTrafficLightPlusSource(it.convert(), remain, DataSourceType.AICLOUD)
|
||||
}
|
||||
|
||||
@@ -17,12 +17,10 @@ import com.mogo.eagle.core.data.deva.badcase.BagDescriptionEntity
|
||||
import com.mogo.eagle.core.data.deva.badcase.BagInfoEntity
|
||||
import com.mogo.eagle.core.data.deva.badcase.BagManagerEntity
|
||||
import com.mogo.eagle.core.data.deva.badcase.RecordCaseEntity
|
||||
import com.mogo.eagle.core.data.map.MogoLocation
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotRecordListener
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoChassisLocationWGS84Listener
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotControlManager
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotRecordListenerManager
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationWGS84ListenerManager
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationWGS84ListenerManager.getChassisLocationWGS84
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_DEVA
|
||||
import com.mogo.eagle.core.utilcode.mogo.toast.TipToast
|
||||
@@ -37,12 +35,10 @@ import com.zhidao.loglib.upload.UploadManager
|
||||
import com.zhidao.loglib.util.FileUtil
|
||||
import com.zhjt.mogo_core_function_devatools.R
|
||||
import com.zhjt.mogo_core_function_devatools.badcase.BadCaseAnalyticsManager
|
||||
import com.zhjt.mogo_core_function_devatools.badcase.BadCaseManager
|
||||
import com.zhjt.mogo_core_function_devatools.badcase.consts.BadCaseConfig
|
||||
import com.zhjt.mogo_core_function_devatools.badcase.record.RecordManager
|
||||
import kotlinx.coroutines.GlobalScope
|
||||
import kotlinx.coroutines.launch
|
||||
import mogo.telematics.pad.MessagePad
|
||||
import record_cache.RecordPanelOuterClass
|
||||
import java.io.File
|
||||
import java.lang.StringBuilder
|
||||
@@ -55,7 +51,7 @@ import java.util.*
|
||||
* @since: 2022/7/13
|
||||
*/
|
||||
class InitiativeBadCaseWindow constructor(activity: Activity) : View.OnTouchListener,
|
||||
IMoGoAutopilotRecordListener, IMoGoChassisLocationWGS84Listener {
|
||||
IMoGoAutopilotRecordListener {
|
||||
|
||||
companion object {
|
||||
const val TAG = "InitiativeBadCaseWindow"
|
||||
@@ -94,8 +90,6 @@ class InitiativeBadCaseWindow constructor(activity: Activity) : View.OnTouchList
|
||||
private var recordFileName: String?=null //录制文件包名
|
||||
private var receiveTime: String?= null
|
||||
private var uploadStamp: String = System.currentTimeMillis().toString()
|
||||
private var longitude: Double?=null
|
||||
private var latitude: Double?=null
|
||||
|
||||
private var bagManagerEntity: BagManagerEntity = BagManagerEntity()
|
||||
|
||||
@@ -109,7 +103,7 @@ class InitiativeBadCaseWindow constructor(activity: Activity) : View.OnTouchList
|
||||
private var clickListener: ClickListener? = null
|
||||
|
||||
init {
|
||||
initFloatWindow();
|
||||
initFloatWindow()
|
||||
}
|
||||
|
||||
private val presenter by lazy {
|
||||
@@ -147,8 +141,6 @@ class InitiativeBadCaseWindow constructor(activity: Activity) : View.OnTouchList
|
||||
|
||||
//采集结果回调监听
|
||||
CallerAutopilotRecordListenerManager.addListener(this.hashCode().toString(),this)
|
||||
// 添加 ADAS车辆状态&定位 监听
|
||||
CallerChassisLocationWGS84ListenerManager.addListener(this.hashCode().toString(), this)
|
||||
viewAudioButton.setOnClickListener {
|
||||
audioStatus = !audioStatus
|
||||
setAudio(audioStatus)
|
||||
@@ -309,14 +301,14 @@ class InitiativeBadCaseWindow constructor(activity: Activity) : View.OnTouchList
|
||||
itx["audioUrl"] = downloadUrl?:"" //音频COS地址
|
||||
itx["mapVersion"] = BadCaseConfig.dockerVersion ?:"" //工控机版本
|
||||
itx["eyeVersion"] = AppUtils.getAppVersionName() //鹰眼版本
|
||||
itx["coordinate"] = "latitude:${latitude};longitude:${longitude}" //坐标
|
||||
itx["coordinate"] = "latitude:${getChassisLocationWGS84().latitude};longitude:${getChassisLocationWGS84().longitude}" //坐标
|
||||
})
|
||||
if (uploadResult == null || uploadResult.code != 200) {
|
||||
TipToast.shortTip("上报失败")
|
||||
} else {
|
||||
TipToast.shortTip("上报成功")
|
||||
//将上报BI的结果同步给工控机记录保存
|
||||
recordKey?.let {
|
||||
recordKey.let {
|
||||
val hasAudio = downloadUrl != null
|
||||
val descReqEntity = BagDescriptionEntity(uploadReason.toString(),hasAudio,downloadUrl.toString(),true)
|
||||
bagManagerEntity.reqType = 5
|
||||
@@ -324,15 +316,16 @@ class InitiativeBadCaseWindow constructor(activity: Activity) : View.OnTouchList
|
||||
bagManagerEntity.descReq = descReqEntity
|
||||
CallerAutoPilotControlManager.sendBagManagerCmd(bagManagerEntity)
|
||||
}
|
||||
val loc = getChassisLocationWGS84()
|
||||
BadCaseAnalyticsManager.bagRecordUpload(recordKey.toString(),recordFileName?:"",uploadStamp,
|
||||
"100",AppConfigInfo.plateNumber,BadCaseConfig.totalDuration.toString(),MoGoAiCloudClientConfig.getInstance().sn,
|
||||
BadCaseConfig.dockerVersion ?:"",AppUtils.getAppVersionName(),latitude.toString(),longitude.toString(),
|
||||
BadCaseConfig.dockerVersion ?:"",AppUtils.getAppVersionName(),loc.latitude.toString(),loc.longitude.toString(),
|
||||
BadCaseConfig.identity,downloadUrl?:"",uploadReason.toString(),System.currentTimeMillis().toString(),"1")
|
||||
//日志
|
||||
CallerLogger.i("$M_DEVA$TAG", "BadCase Initiative Analytics="+"key="+recordKey+" filename="+recordFileName+
|
||||
" receiveTime="+uploadStamp+" stat="+"100"+" plateNumber="+AppConfigInfo.plateNumber+
|
||||
" totalDuration="+ BadCaseConfig.totalDuration +" carSn="+MoGoAiCloudClientConfig.getInstance().sn+" mapVersion="+BadCaseConfig.dockerVersion+
|
||||
" eyeVersion="+AppUtils.getAppVersionName()+" latitude="+ latitude +" longitude="+ longitude+
|
||||
" eyeVersion="+AppUtils.getAppVersionName()+" latitude="+ loc.latitude +" longitude="+ loc.longitude+
|
||||
" identity="+BadCaseConfig.identity + " downloadUrl="+downloadUrl +" uploadReason="+uploadReason+
|
||||
" uploadTime="+System.currentTimeMillis()+" channel="+"1")
|
||||
BadCaseConfig.windowNum--
|
||||
@@ -413,8 +406,6 @@ class InitiativeBadCaseWindow constructor(activity: Activity) : View.OnTouchList
|
||||
fun hideFloatWindow() {
|
||||
//注销采集结果回调监听
|
||||
CallerAutopilotRecordListenerManager.removeListener(this.hashCode().toString())
|
||||
// 移除 ADAS车辆状态&定位 监听
|
||||
CallerChassisLocationWGS84ListenerManager.removeListener(this.hashCode().toString())
|
||||
if (mFloatLayout.parent != null) mWindowManager!!.removeView(mFloatLayout)
|
||||
}
|
||||
|
||||
@@ -440,9 +431,4 @@ class InitiativeBadCaseWindow constructor(activity: Activity) : View.OnTouchList
|
||||
fun closeWindow()
|
||||
}
|
||||
|
||||
override fun onChassisLocationWGS84(gnssInfo: MogoLocation) {
|
||||
latitude = gnssInfo.latitude
|
||||
longitude = gnssInfo.longitude
|
||||
}
|
||||
|
||||
}
|
||||
@@ -6,8 +6,6 @@ import android.graphics.Color
|
||||
import android.graphics.PixelFormat
|
||||
import android.os.CountDownTimer
|
||||
import android.os.Handler
|
||||
import android.os.Parcel
|
||||
import android.os.Parcelable
|
||||
import android.util.DisplayMetrics
|
||||
import android.view.*
|
||||
import android.widget.CheckBox
|
||||
@@ -19,10 +17,8 @@ import com.mogo.cloud.passport.MoGoAiCloudClientConfig
|
||||
import com.mogo.eagle.core.data.app.AppConfigInfo
|
||||
import com.mogo.eagle.core.data.deva.badcase.BagDescriptionEntity
|
||||
import com.mogo.eagle.core.data.deva.badcase.BagManagerEntity
|
||||
import com.mogo.eagle.core.data.map.MogoLocation
|
||||
import com.mogo.eagle.core.data.msgbox.MsgBoxBean
|
||||
import com.mogo.eagle.core.data.msgbox.RecordBagMsg
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoChassisLocationWGS84Listener
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotControlManager
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationWGS84ListenerManager
|
||||
import com.mogo.eagle.core.function.call.msgbox.CallerMsgBoxManager
|
||||
@@ -38,7 +34,6 @@ import com.zhjt.mogo_core_function_devatools.badcase.consts.BadCaseConfig
|
||||
import com.zhjt.mogo_core_function_devatools.badcase.record.RecordManager
|
||||
import kotlinx.coroutines.GlobalScope
|
||||
import kotlinx.coroutines.launch
|
||||
import mogo.telematics.pad.MessagePad
|
||||
import com.zhidao.loglib.upload.UploadManager
|
||||
import com.zhidao.loglib.util.FileUtil
|
||||
import com.zhjt.mogo_core_function_devatools.badcase.BadCaseAnalyticsManager
|
||||
@@ -52,7 +47,7 @@ import java.io.File
|
||||
* @since: 2022/7/17
|
||||
*/
|
||||
class PassiveBadCaseWindow constructor(activity: Activity) : View.OnTouchListener,
|
||||
IMoGoChassisLocationWGS84Listener, CompoundButton.OnCheckedChangeListener {
|
||||
CompoundButton.OnCheckedChangeListener {
|
||||
|
||||
companion object {
|
||||
const val TAG = "PassiveBadCaseWindow"
|
||||
@@ -74,8 +69,6 @@ class PassiveBadCaseWindow constructor(activity: Activity) : View.OnTouchListene
|
||||
private var receiveTime: String ?= null //接收时间
|
||||
private var stat: String = ""
|
||||
private var boxBean: MsgBoxBean ?= null
|
||||
private var longitude: Double = 0.0
|
||||
private var latitude: Double = 0.0
|
||||
|
||||
private var mInViewX = 0f
|
||||
private var mInViewY = 0f
|
||||
@@ -100,7 +93,7 @@ class PassiveBadCaseWindow constructor(activity: Activity) : View.OnTouchListene
|
||||
private lateinit var flReasonLayout: FlexboxLayout
|
||||
|
||||
init {
|
||||
initFloatWindow();
|
||||
initFloatWindow()
|
||||
}
|
||||
|
||||
private val presenter by lazy {
|
||||
@@ -126,8 +119,6 @@ class PassiveBadCaseWindow constructor(activity: Activity) : View.OnTouchListene
|
||||
BadCaseConfig.windowNum++
|
||||
tvPassiveTime.text = "时间:${millis2String(System.currentTimeMillis(),TimeUtils.getHourMinSecondFormat())}"
|
||||
tvPassiveIdentity.text = "身份:${BadCaseConfig.identity}"
|
||||
// 添加 ADAS车辆状态&定位 监听
|
||||
CallerChassisLocationWGS84ListenerManager.addListener(TAG, this)
|
||||
viewAudioButton.setOnClickListener {
|
||||
audioStatus = !audioStatus
|
||||
setAudio(audioStatus)
|
||||
@@ -271,7 +262,7 @@ class PassiveBadCaseWindow constructor(activity: Activity) : View.OnTouchListene
|
||||
itx["audioUrl"] = downloadUrl?:"" //音频COS地址
|
||||
itx["mapVersion"] = BadCaseConfig.dockerVersion ?:"" //工控机版本
|
||||
itx["eyeVersion"] = AppUtils.getAppVersionName() //鹰眼版本
|
||||
itx["coordinate"] = "latitude:${latitude};longitude:${longitude}" //坐标
|
||||
itx["coordinate"] = "latitude:${CallerChassisLocationWGS84ListenerManager.getChassisLocationWGS84().latitude};longitude:${CallerChassisLocationWGS84ListenerManager.getChassisLocationWGS84().longitude}" //坐标
|
||||
|
||||
})
|
||||
if (uploadResult == null || uploadResult.code != 200) {
|
||||
@@ -288,15 +279,16 @@ class PassiveBadCaseWindow constructor(activity: Activity) : View.OnTouchListene
|
||||
CallerAutoPilotControlManager.sendBagManagerCmd(bagManagerEntity)
|
||||
}
|
||||
//被动上报埋点统计
|
||||
val loc = CallerChassisLocationWGS84ListenerManager.getChassisLocationWGS84()
|
||||
BadCaseAnalyticsManager.bagRecordUpload(recordKey?:"",recordFileName?:"",receiveTime?:System.currentTimeMillis().toString(),
|
||||
stat,AppConfigInfo.plateNumber,BadCaseConfig.totalDuration.toString(),MoGoAiCloudClientConfig.getInstance().sn,
|
||||
BadCaseConfig.dockerVersion ?:"",AppUtils.getAppVersionName(),latitude.toString(),longitude.toString(),
|
||||
BadCaseConfig.dockerVersion ?:"",AppUtils.getAppVersionName(),loc.latitude.toString(),loc.longitude.toString(),
|
||||
BadCaseConfig.identity,downloadUrl?:"",uploadReason,System.currentTimeMillis().toString(),"0")
|
||||
//日志
|
||||
CallerLogger.i("$M_DEVA$TAG", "BadCase Passive Analytics="+"key="+recordKey+" filename="+recordFileName+
|
||||
" receiveTime="+receiveTime+" stat="+"100"+" plateNumber="+AppConfigInfo.plateNumber+
|
||||
" totalDuration="+ BadCaseConfig.totalDuration +" carSn="+MoGoAiCloudClientConfig.getInstance().sn+" mapVersion="+BadCaseConfig.dockerVersion+
|
||||
" eyeVersion="+AppUtils.getAppVersionName()+" latitude="+ latitude +" longitude="+ longitude+
|
||||
" eyeVersion="+AppUtils.getAppVersionName()+" latitude="+ loc.latitude +" longitude="+ loc.longitude+
|
||||
" identity="+BadCaseConfig.identity + " downloadUrl="+downloadUrl +" uploadReason="+uploadReason+
|
||||
" uploadTime="+System.currentTimeMillis()+" channel="+"0")
|
||||
BadCaseConfig.windowNum--
|
||||
@@ -390,7 +382,6 @@ class PassiveBadCaseWindow constructor(activity: Activity) : View.OnTouchListene
|
||||
|
||||
fun hideFloatWindow() {
|
||||
// 移除 ADAS车辆状态&定位 监听
|
||||
CallerChassisLocationWGS84ListenerManager.removeListener(TAG)
|
||||
if (mFloatLayout.parent != null) mWindowManager!!.removeView(mFloatLayout)
|
||||
}
|
||||
|
||||
@@ -411,9 +402,4 @@ class PassiveBadCaseWindow constructor(activity: Activity) : View.OnTouchListene
|
||||
fun closeWindow()
|
||||
}
|
||||
|
||||
override fun onChassisLocationWGS84(gnssInfo: MogoLocation) {
|
||||
latitude = gnssInfo.latitude
|
||||
longitude = gnssInfo.longitude
|
||||
}
|
||||
|
||||
}
|
||||
@@ -18,7 +18,6 @@ import com.mogo.eagle.core.function.api.map.deva.IMoGoMapDevaProvider
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotControlManager
|
||||
import com.mogo.eagle.core.function.call.devatools.CallerDevaToolsListenerManager
|
||||
import com.mogo.eagle.core.function.call.map.CallerMapDevaListenerManager
|
||||
import com.mogo.eagle.core.function.call.map.CallerMapUIServiceManager
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.LogLevel
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.Logger
|
||||
@@ -26,6 +25,7 @@ import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_
|
||||
import com.mogo.eagle.core.utilcode.mogo.storage.SharedPrefsMgr
|
||||
import com.mogo.eagle.core.utilcode.mogo.toast.TipToast
|
||||
import com.mogo.eagle.core.utilcode.util.ThreadUtils
|
||||
import com.mogo.map.MogoData
|
||||
import com.zhidao.loglib.bean.RemoteLogPushContent
|
||||
import com.zhidao.loglib.call.LogInfoManagerFactory
|
||||
import com.zhidao.loglib.core.ILogListener
|
||||
@@ -224,7 +224,7 @@ object MogoLogCatchManager : IMogoOnMessageListener<RemoteLogPushContent>, Handl
|
||||
config.isShowDebugLog = true
|
||||
config.isShowNetDebugLog = true
|
||||
}
|
||||
CallerMapUIServiceManager.getMapUIController()?.setDebugMode(true)
|
||||
// MogoData.mogoMapData.get()?.setDebugMode(true)
|
||||
CallerAutoPilotControlManager.setEnableLog(true)
|
||||
}
|
||||
|
||||
@@ -238,7 +238,7 @@ object MogoLogCatchManager : IMogoOnMessageListener<RemoteLogPushContent>, Handl
|
||||
config.isShowDebugLog = false
|
||||
config.isShowNetDebugLog = false
|
||||
}
|
||||
CallerMapUIServiceManager.getMapUIController()?.setDebugMode(false)
|
||||
// MogoData.mogoMapData.get()?.setDebugMode(false)
|
||||
CallerAutoPilotControlManager.setEnableLog(false)
|
||||
}
|
||||
|
||||
|
||||
@@ -23,9 +23,6 @@ import com.mogo.eagle.core.function.hmi.R;
|
||||
import com.mogo.eagle.core.function.hmi.ui.utils.SearchCriteria;
|
||||
import com.mogo.eagle.core.function.hmi.ui.utils.TagColorUtil;
|
||||
|
||||
import me.jessyan.autosize.AutoSizeCompat;
|
||||
|
||||
|
||||
public class LogItemAdapter extends AbsRecyclerAdapter<AbsViewBinder<LogLine>, LogLine> implements Filterable {
|
||||
|
||||
public LogItemAdapter(Context context) {
|
||||
|
||||
@@ -2,6 +2,7 @@ package com.mogo.eagle.core.function.hmi.ui.map
|
||||
|
||||
import android.annotation.SuppressLint
|
||||
import android.content.Context
|
||||
import android.os.Looper
|
||||
import android.view.View
|
||||
import android.widget.ImageView
|
||||
import android.widget.ProgressBar
|
||||
@@ -10,16 +11,16 @@ import androidx.constraintlayout.widget.ConstraintLayout
|
||||
import androidx.core.content.ContextCompat
|
||||
import com.mogo.eagle.core.data.map.MogoLocation
|
||||
import com.mogo.eagle.core.function.call.hmi.CallerHmiListenerManager
|
||||
import com.mogo.eagle.core.function.call.map.CallerMapUIServiceManager
|
||||
import com.mogo.eagle.core.function.hmi.R
|
||||
import com.mogo.eagle.core.function.hmi.dialog.BaseFloatDialog
|
||||
import com.mogo.map.hdcache.IHdCacheListener
|
||||
import com.mogo.eagle.core.utilcode.util.ThreadUtils
|
||||
import com.mogo.map.MogoData.Companion.mogoMapData
|
||||
import me.jessyan.autosize.utils.AutoSizeUtils
|
||||
|
||||
/**
|
||||
* 离线地图缓存
|
||||
*/
|
||||
class OfflineMapDialog(context: Context): BaseFloatDialog(context) {
|
||||
class OfflineMapDialog(context: Context) : BaseFloatDialog(context) {
|
||||
|
||||
private var roundRootLayout: ConstraintLayout? = null
|
||||
private var offlineTitleView: TextView? = null
|
||||
@@ -86,37 +87,29 @@ class OfflineMapDialog(context: Context): BaseFloatDialog(context) {
|
||||
|
||||
okView?.setOnClickListener {
|
||||
if (isLoading) {
|
||||
CallerMapUIServiceManager.cancelDownloadCacheData()
|
||||
mogoMapData.get()?.cancelDownloadCacheData()
|
||||
}
|
||||
dismiss()
|
||||
}
|
||||
}
|
||||
|
||||
private fun cacheHDDataByCityByLonLat() {
|
||||
CallerMapUIServiceManager.cacheHDDataByCityByLonLat(object : IHdCacheListener {
|
||||
override fun onMapHdCacheProgress(cityId: Int, progress: Double) {
|
||||
mogoMapData.get()?.cacheHDDataByCityByLonLat(location!!, { _, progress ->
|
||||
updateProgress(progress.toInt())
|
||||
}, { _, state ->
|
||||
if (state == 0) {// 失败
|
||||
showNewContent(isLoading = false, false)
|
||||
}
|
||||
|
||||
override fun onMapHdCacheResult(cityId: Int, state: Int) {
|
||||
if (state == 0) {// 失败
|
||||
showNewContent(isLoading = false, false)
|
||||
}
|
||||
}
|
||||
}, location!!)
|
||||
})
|
||||
}
|
||||
|
||||
private fun cacheHDOfflineData() {
|
||||
if (location == null) {// 拿到了高德地图的cityCode
|
||||
CallerMapUIServiceManager.cacheHDDataByCity(object : IHdCacheListener {
|
||||
override fun onMapHdCacheProgress(cityId: Int, progress: Double) {
|
||||
updateProgress(progress.toInt())
|
||||
}
|
||||
|
||||
override fun onMapHdCacheResult(cityId: Int, state: Int) {
|
||||
if (state == 0) {// 失败
|
||||
showNewContent(isLoading = false, false)
|
||||
}
|
||||
mogoMapData.get()?.cacheHDDataByCity({ _, progress ->
|
||||
updateProgress(progress.toInt())
|
||||
}, { _, state ->
|
||||
if (state == 0) {// 失败
|
||||
showNewContent(isLoading = false, false)
|
||||
}
|
||||
})
|
||||
} else {// 只拿到了高精的经纬度
|
||||
@@ -176,15 +169,18 @@ class OfflineMapDialog(context: Context): BaseFloatDialog(context) {
|
||||
isSuccess -> {
|
||||
okView?.visibility = View.VISIBLE
|
||||
okView?.text = context.resources.getString(R.string.ok_tip)
|
||||
offlineTitleView?.text = context.resources.getString(R.string.offline_download_success)
|
||||
offlineTitleView?.text =
|
||||
context.resources.getString(R.string.offline_download_success)
|
||||
progressBar?.visibility = View.GONE
|
||||
downloadPercentView?.visibility = View.GONE
|
||||
downloadResultImg?.background = ContextCompat.getDrawable(context, R.drawable.download_success_icon)
|
||||
downloadResultImg?.background =
|
||||
ContextCompat.getDrawable(context, R.drawable.download_success_icon)
|
||||
}
|
||||
else -> {
|
||||
isRetry = true
|
||||
isConfirm = false
|
||||
offlineTitleView?.text = context.resources.getString(R.string.offline_download_failure)
|
||||
offlineTitleView?.text =
|
||||
context.resources.getString(R.string.offline_download_failure)
|
||||
okView?.visibility = View.GONE
|
||||
progressBar?.visibility = View.GONE
|
||||
downloadPercentView?.visibility = View.GONE
|
||||
@@ -193,7 +189,8 @@ class OfflineMapDialog(context: Context): BaseFloatDialog(context) {
|
||||
rightView?.visibility = View.VISIBLE
|
||||
vertLineView?.visibility = View.VISIBLE
|
||||
rightView?.text = context.resources.getString(R.string.retry)
|
||||
downloadResultImg?.background = ContextCompat.getDrawable(context, R.drawable.download_fail_icon)
|
||||
downloadResultImg?.background =
|
||||
ContextCompat.getDrawable(context, R.drawable.download_fail_icon)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,7 +7,6 @@ import android.content.ClipboardManager
|
||||
import android.content.Context
|
||||
import android.content.Intent
|
||||
import android.graphics.Color
|
||||
import android.net.*
|
||||
import android.os.Build
|
||||
import android.os.Process
|
||||
import android.text.Html
|
||||
@@ -18,8 +17,8 @@ import androidx.annotation.RequiresApi
|
||||
import androidx.appcompat.widget.PopupMenu
|
||||
import androidx.constraintlayout.widget.ConstraintLayout
|
||||
import androidx.core.content.ContextCompat
|
||||
import androidx.core.content.FileProvider
|
||||
import androidx.core.view.*
|
||||
import androidx.core.view.MenuCompat
|
||||
import androidx.core.view.isVisible
|
||||
import androidx.lifecycle.lifecycleScope
|
||||
import chassis.Chassis
|
||||
import com.mogo.cloud.passport.MoGoAiCloudClient
|
||||
@@ -38,19 +37,19 @@ import com.mogo.eagle.core.data.deva.bizconfig.FuncBizConfig.Companion.BIZ_FULL_
|
||||
import com.mogo.eagle.core.data.deva.bizconfig.FuncBizConfig.Companion.BIZ_RAIN_MODE
|
||||
import com.mogo.eagle.core.data.deva.bizconfig.FuncBizConfig.Companion.BIZ_WARNING_UPLOAD
|
||||
import com.mogo.eagle.core.data.deva.chain.ChainConstant
|
||||
import com.mogo.eagle.core.data.deva.report.ReportEntity
|
||||
import com.mogo.eagle.core.data.deva.scene.SceneModule
|
||||
import com.mogo.eagle.core.data.enums.TrafficTypeEnum
|
||||
import com.mogo.eagle.core.data.gnss.AccelerationEntity
|
||||
import com.mogo.eagle.core.data.map.MogoLocation
|
||||
import com.mogo.eagle.core.data.multidisplay.TelematicConstant
|
||||
import com.mogo.eagle.core.data.obu.MogoObuConst
|
||||
import com.mogo.eagle.core.data.obu.ObuStatusInfo
|
||||
import com.mogo.eagle.core.data.deva.report.ReportEntity
|
||||
import com.mogo.eagle.core.data.multidisplay.TelematicConstant
|
||||
import com.mogo.eagle.core.function.api.autopilot.*
|
||||
import com.mogo.eagle.core.function.api.devatools.IMoGoDevaToolsFuncConfigListener
|
||||
import com.mogo.eagle.core.function.api.devatools.IMoGoDevaToolsListener
|
||||
import com.mogo.eagle.core.function.api.datacenter.obu.IMoGoObuConnectListener
|
||||
import com.mogo.eagle.core.function.api.datacenter.obu.IMoGoObuInfoListener
|
||||
import com.mogo.eagle.core.function.api.devatools.IMoGoDevaToolsFuncConfigListener
|
||||
import com.mogo.eagle.core.function.api.devatools.IMoGoDevaToolsListener
|
||||
import com.mogo.eagle.core.function.api.setting.ISopSettingListener
|
||||
import com.mogo.eagle.core.function.call.autopilot.*
|
||||
import com.mogo.eagle.core.function.call.devatools.CallerDevaToolsFuncConfigListenerManager
|
||||
@@ -66,7 +65,10 @@ import com.mogo.eagle.core.function.call.telematic.CallerTelematicManager
|
||||
import com.mogo.eagle.core.function.hmi.R
|
||||
import com.mogo.eagle.core.function.hmi.ui.logcatch.ILogViewListener
|
||||
import com.mogo.eagle.core.function.hmi.ui.logcatch.LogInfoView
|
||||
import com.mogo.eagle.core.utilcode.kotlin.*
|
||||
import com.mogo.eagle.core.utilcode.kotlin.currentPadding
|
||||
import com.mogo.eagle.core.utilcode.kotlin.lifecycleOwner
|
||||
import com.mogo.eagle.core.utilcode.kotlin.onClick
|
||||
import com.mogo.eagle.core.utilcode.kotlin.scope
|
||||
import com.mogo.eagle.core.utilcode.mogo.AppIdentityModeUtils
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.LogLevel
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.Logger
|
||||
@@ -75,11 +77,10 @@ import com.mogo.eagle.core.utilcode.mogo.permissions.BackgrounderPermission
|
||||
import com.mogo.eagle.core.utilcode.mogo.storage.SharedPrefsMgr
|
||||
import com.mogo.eagle.core.utilcode.mogo.toast.TipToast
|
||||
import com.mogo.eagle.core.utilcode.util.*
|
||||
import com.mogo.map.hdcache.IHdCacheListener
|
||||
import com.mogo.map.MogoData.Companion.mogoMapData
|
||||
import com.mogo.map.uicontroller.VisualAngleMode
|
||||
import com.mogo.map.uicontroller.VisualAngleMode.*
|
||||
import kotlinx.android.synthetic.main.view_debug_setting.view.*
|
||||
import kotlinx.android.synthetic.main.view_debug_setting.view.tbRouteDynamicEffect
|
||||
import kotlinx.coroutines.*
|
||||
import mogo.telematics.pad.MessagePad
|
||||
import mogo_msg.MogoReportMsg
|
||||
@@ -194,10 +195,10 @@ internal class DebugSettingView @JvmOverloads constructor(
|
||||
*/
|
||||
private val timerTaskRefresh = object : TimerTask() {
|
||||
override fun run() {
|
||||
if(this@DebugSettingView == null){
|
||||
if (this@DebugSettingView == null) {
|
||||
return
|
||||
}
|
||||
if(!isRunCheck){
|
||||
if (!isRunCheck) {
|
||||
return
|
||||
}
|
||||
UiThreadHandler.post {
|
||||
@@ -231,7 +232,7 @@ internal class DebugSettingView @JvmOverloads constructor(
|
||||
//添加 底盘灯光数据 监听
|
||||
CallerChassisLamplightListenerManager.addListener(TAG, this)
|
||||
//雨天、美化、点云设置同步
|
||||
CallerSopSettingManager.addListener(TAG,this)
|
||||
CallerSopSettingManager.addListener(TAG, this)
|
||||
|
||||
//添加 业务配置监听
|
||||
CallerDevaToolsFuncConfigListenerManager.registerDevaToolsFuncConfigListener(
|
||||
@@ -299,11 +300,12 @@ internal class DebugSettingView @JvmOverloads constructor(
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressLint("SetTextI18n")
|
||||
private fun initView() {
|
||||
post {
|
||||
val maxHeight = ScreenUtils.getScreenHeight()-BarUtils.getStatusBarHeight()
|
||||
val maxHeight = ScreenUtils.getScreenHeight() - BarUtils.getStatusBarHeight()
|
||||
val height = clDebugContain.height
|
||||
if(height>maxHeight){
|
||||
if (height > maxHeight) {
|
||||
val layoutParamsOther = clDebugContain.layoutParams
|
||||
layoutParamsOther.height = maxHeight
|
||||
clDebugContain.layoutParams = layoutParamsOther
|
||||
@@ -593,12 +595,9 @@ internal class DebugSettingView @JvmOverloads constructor(
|
||||
}
|
||||
|
||||
if (AppIdentityModeUtils.isPassenger(FunctionBuildConfig.appIdentityMode)) {
|
||||
ThreadUtils.getIoPool().execute {
|
||||
val isCached = CallerMapUIServiceManager.isCityDataCached()
|
||||
isHDCached = isCached
|
||||
UiThreadHandler.post {
|
||||
btn_cache_hd_map.text = "缓存高精离线地图(${if (isCached) "已是最新版" else "待更新"}!)"
|
||||
}
|
||||
mogoMapData.get()?.isCityDataCached {
|
||||
isHDCached = it
|
||||
btn_cache_hd_map.text = "缓存高精离线地图(${if (it) "已是最新版" else "待更新"}!)"
|
||||
}
|
||||
btn_cache_hd_map.visibility = View.VISIBLE
|
||||
}
|
||||
@@ -633,9 +632,15 @@ internal class DebugSettingView @JvmOverloads constructor(
|
||||
*/
|
||||
tbControlPassengerDriverMonitor.setOnCheckedChangeListener { _, isChecked ->
|
||||
if (isChecked) {
|
||||
CallerTelematicManager.sendMsgToAllClients(TelematicConstant.CONTROL_PASSENGER_DRIVER_MONITOR, "1".toByteArray())
|
||||
CallerTelematicManager.sendMsgToAllClients(
|
||||
TelematicConstant.CONTROL_PASSENGER_DRIVER_MONITOR,
|
||||
"1".toByteArray()
|
||||
)
|
||||
} else {
|
||||
CallerTelematicManager.sendMsgToAllClients(TelematicConstant.CONTROL_PASSENGER_DRIVER_MONITOR, "0".toByteArray())
|
||||
CallerTelematicManager.sendMsgToAllClients(
|
||||
TelematicConstant.CONTROL_PASSENGER_DRIVER_MONITOR,
|
||||
"0".toByteArray()
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -661,7 +666,8 @@ internal class DebugSettingView @JvmOverloads constructor(
|
||||
|
||||
// 初始化OBU IP信息
|
||||
val ipAddress =
|
||||
SharedPrefsMgr.getInstance(context).getString(MoGoConfig.OBU_IP, MogoObuConst.OBU_DEFAULT_IP)
|
||||
SharedPrefsMgr.getInstance(context)
|
||||
.getString(MoGoConfig.OBU_IP, MogoObuConst.OBU_DEFAULT_IP)
|
||||
|
||||
etObuIP.setText(ipAddress)
|
||||
etObuIP.text?.let { etObuIP.setSelection(it.length) }
|
||||
@@ -694,7 +700,7 @@ internal class DebugSettingView @JvmOverloads constructor(
|
||||
tbIsDemoMode.isChecked = FunctionBuildConfig.isDemoMode
|
||||
// 演示模式
|
||||
tbIsDemoMode.setOnCheckedChangeListener { compoundButton, isChecked ->
|
||||
if(!compoundButton.isPressed){
|
||||
if (!compoundButton.isPressed) {
|
||||
return@setOnCheckedChangeListener
|
||||
}
|
||||
FunctionBuildConfig.isDemoMode = !FunctionBuildConfig.isDemoMode
|
||||
@@ -716,9 +722,11 @@ internal class DebugSettingView @JvmOverloads constructor(
|
||||
}
|
||||
|
||||
tbIsStrictMode?.also {
|
||||
it.isChecked = SharedPrefs.getInstance(Utils.getApp()).getBoolean("MOGO_STRICT_MODE_ENABLED", false)
|
||||
it.isChecked = SharedPrefs.getInstance(Utils.getApp())
|
||||
.getBoolean("MOGO_STRICT_MODE_ENABLED", false)
|
||||
it.setOnCheckedChangeListener { _, isChecked ->
|
||||
SharedPrefs.getInstance(Utils.getApp()).putBoolean("MOGO_STRICT_MODE_ENABLED", isChecked)
|
||||
SharedPrefs.getInstance(Utils.getApp())
|
||||
.putBoolean("MOGO_STRICT_MODE_ENABLED", isChecked)
|
||||
scope.launch {
|
||||
ToastUtils.showShort("配置生效, 2秒后重启应用...")
|
||||
delay(2000)
|
||||
@@ -731,7 +739,7 @@ internal class DebugSettingView @JvmOverloads constructor(
|
||||
tbIsRainMode.isChecked = FunctionBuildConfig.isRainMode
|
||||
//雨天模式
|
||||
tbIsRainMode.setOnCheckedChangeListener { compoundButton, isChecked ->
|
||||
if(!compoundButton.isPressed){
|
||||
if (!compoundButton.isPressed) {
|
||||
return@setOnCheckedChangeListener
|
||||
}
|
||||
CallerAutoPilotControlManager.setRainMode(isChecked)
|
||||
@@ -848,16 +856,37 @@ internal class DebugSettingView @JvmOverloads constructor(
|
||||
|
||||
//TODO
|
||||
tbIsDrawPath.setOnCheckedChangeListener { _, isChecked ->
|
||||
ToastUtils.showShort("功能开发中")
|
||||
}
|
||||
|
||||
if(FunctionBuildConfig.isDrawPointCloudData){
|
||||
//如果点云效果是打开的,则自车光圈也跟随打开
|
||||
tbCarAperture.isChecked = true
|
||||
}else{
|
||||
tbCarAperture.isChecked = FunctionBuildConfig.isDisplayAnimEnable
|
||||
}
|
||||
tbCarAperture.setOnCheckedChangeListener { compoundButton, isChecked ->
|
||||
CallerMapUIServiceManager.getMapUIController()?.setDisplayAnimEnable(isChecked)
|
||||
CallerSopSettingManager.invokeCarApertureListener(isChecked)
|
||||
if(!compoundButton.isPressed){
|
||||
return@setOnCheckedChangeListener
|
||||
}
|
||||
FunctionBuildConfig.isDisplayAnimEnable = isChecked
|
||||
}
|
||||
|
||||
//初始化点云数据渲染情况
|
||||
tbDrawPointCloudData.isChecked = FunctionBuildConfig.isDrawPointCloudData
|
||||
//是否渲染点云数据
|
||||
tbDrawPointCloudData.setOnCheckedChangeListener { compoundButton, isChecked ->
|
||||
if(!compoundButton.isPressed){
|
||||
if (!compoundButton.isPressed) {
|
||||
return@setOnCheckedChangeListener
|
||||
}
|
||||
//打开点云效果时,如果自车光圈是关闭状态,则自动打开自车光圈(点云是跟随光圈的 默认没有光圈就不显示点云的)
|
||||
if(isChecked && !FunctionBuildConfig.isDisplayAnimEnable){
|
||||
tbCarAperture.isChecked = true
|
||||
}else{
|
||||
tbCarAperture.isChecked = FunctionBuildConfig.isDisplayAnimEnable
|
||||
}
|
||||
CallerAutoPilotControlManager.setIsDrawPointCloud(isChecked)
|
||||
FunctionBuildConfig.isDrawPointCloudData = isChecked
|
||||
CallerMapUIServiceManager.getMapUIController()?.setIsDrawPointCloud(isChecked)
|
||||
@@ -872,7 +901,8 @@ internal class DebugSettingView @JvmOverloads constructor(
|
||||
} else {
|
||||
try {
|
||||
val cloudSizeFloat = cloudSize.toFloat()
|
||||
CallerMapUIServiceManager.getMapUIController()?.setPointCloudSize(cloudSizeFloat)
|
||||
CallerMapUIServiceManager.getMapUIController()
|
||||
?.setPointCloudSize(cloudSizeFloat)
|
||||
} catch (e: Exception) {
|
||||
ToastUtils.showShort("点云大小格式输入不正确")
|
||||
}
|
||||
@@ -918,7 +948,7 @@ internal class DebugSettingView @JvmOverloads constructor(
|
||||
tbADASLog.isChecked = CallerAutoPilotControlManager.isEnableLog()
|
||||
|
||||
//如果工控机异常上报列表窗口为展示状态,则显示上报异常布局
|
||||
if(CallerDevaToolsManager.getReportWindowStatus()){
|
||||
if (CallerDevaToolsManager.getReportWindowStatus()) {
|
||||
reportMsgLayout.visibility = View.VISIBLE
|
||||
tbReportMore.isChecked = true
|
||||
}
|
||||
@@ -951,7 +981,7 @@ internal class DebugSettingView @JvmOverloads constructor(
|
||||
clipboardManager?.setPrimaryClip(
|
||||
ClipData.newPlainText(
|
||||
"DockVersion",
|
||||
CallerAutoPilotStatusListenerManager.getDockerVersion()?:""
|
||||
CallerAutoPilotStatusListenerManager.getDockerVersion() ?: ""
|
||||
)
|
||||
)
|
||||
ToastUtils.showLong("docker版本复制成功")
|
||||
@@ -1041,7 +1071,7 @@ internal class DebugSettingView @JvmOverloads constructor(
|
||||
//设置连接司机屏IP
|
||||
btnConnectServerIp.setOnClickListener {
|
||||
val ip = etConnectServerIp.text.toString()
|
||||
if (!ip.isNullOrEmpty()) {
|
||||
if (!ip.isEmpty()) {
|
||||
CallerAutoPilotControlManager.connectSpecifiedServer(ip)
|
||||
}
|
||||
}
|
||||
@@ -1064,13 +1094,15 @@ internal class DebugSettingView @JvmOverloads constructor(
|
||||
}
|
||||
|
||||
if (!AppIdentityModeUtils.isTaxiDriver(FunctionBuildConfig.appIdentityMode)
|
||||
&& !AppIdentityModeUtils.isBusDriver(FunctionBuildConfig.appIdentityMode)){
|
||||
&& !AppIdentityModeUtils.isBusDriver(FunctionBuildConfig.appIdentityMode)
|
||||
) {
|
||||
tbStartAutopilotCommand.visibility = GONE
|
||||
}
|
||||
|
||||
|
||||
//切换环境
|
||||
tvCurEnv.text = "当前环境:${CallerDevaToolsManager.getEnvCityName()}${CallerDevaToolsManager.getEnvNetMode()}"
|
||||
tvCurEnv.text =
|
||||
"当前环境:${CallerDevaToolsManager.getEnvCityName()}${CallerDevaToolsManager.getEnvNetMode()}"
|
||||
btChangeEnv.onClick {
|
||||
PopupMenu(context, btChangeEnv).also { p ->
|
||||
p.menuInflater.inflate(R.menu.menu_env_pop, p.menu)
|
||||
@@ -1086,13 +1118,22 @@ internal class DebugSettingView @JvmOverloads constructor(
|
||||
R.id.env_reset ->
|
||||
CallerDevaToolsManager.envConfigReset()
|
||||
R.id.hy_product ->
|
||||
CallerDevaToolsManager.envConfigChange("0734", DebugConfig.NET_MODE_RELEASE)
|
||||
CallerDevaToolsManager.envConfigChange(
|
||||
"0734",
|
||||
DebugConfig.NET_MODE_RELEASE
|
||||
)
|
||||
R.id.hy_qa ->
|
||||
CallerDevaToolsManager.envConfigChange("0734", DebugConfig.NET_MODE_QA)
|
||||
R.id.hy_demo ->
|
||||
CallerDevaToolsManager.envConfigChange("0734", DebugConfig.NET_MODE_DEMO)
|
||||
CallerDevaToolsManager.envConfigChange(
|
||||
"0734",
|
||||
DebugConfig.NET_MODE_DEMO
|
||||
)
|
||||
R.id.bj_product ->
|
||||
CallerDevaToolsManager.envConfigChange("010", DebugConfig.NET_MODE_RELEASE)
|
||||
CallerDevaToolsManager.envConfigChange(
|
||||
"010",
|
||||
DebugConfig.NET_MODE_RELEASE
|
||||
)
|
||||
R.id.bj_qa ->
|
||||
CallerDevaToolsManager.envConfigChange("010", DebugConfig.NET_MODE_QA)
|
||||
R.id.bj_demo ->
|
||||
@@ -1293,7 +1334,7 @@ internal class DebugSettingView @JvmOverloads constructor(
|
||||
* 设置是否输出高精地图日志 true-打印日志,false-不打印日志
|
||||
*/
|
||||
tbHdMapLog.setOnCheckedChangeListener { _, isChecked ->
|
||||
CallerMapUIServiceManager.getMapUIController()?.setDebugMode(isChecked)
|
||||
mogoMapData.get()?.setDebugMode(isChecked)
|
||||
}
|
||||
|
||||
cbTraceLog.isChecked = CallerDevaToolsManager.getTraceLogStatus()
|
||||
@@ -1575,8 +1616,10 @@ internal class DebugSettingView @JvmOverloads constructor(
|
||||
/**
|
||||
* 版本信息
|
||||
*/
|
||||
tvAppVersionName.text = "鹰眼版本:${AppUtils.getAppVersionName()} Git Hash:${AppConfigInfo.workingBranchHash} \n渠道信息:${AppConfigInfo.flavor}"
|
||||
tvAppVersionNameKey.text = "鹰眼版本:${AppUtils.getAppVersionName()} Git Hash:${AppConfigInfo.workingBranchHash}\n渠道信息:${AppConfigInfo.flavor}"
|
||||
tvAppVersionName.text =
|
||||
"鹰眼版本:${AppUtils.getAppVersionName()} Git Hash:${AppConfigInfo.workingBranchHash} \n渠道信息:${AppConfigInfo.flavor}"
|
||||
tvAppVersionNameKey.text =
|
||||
"鹰眼版本:${AppUtils.getAppVersionName()} Git Hash:${AppConfigInfo.workingBranchHash}\n渠道信息:${AppConfigInfo.flavor}"
|
||||
|
||||
tvAutopilotProtocolVersionInfo.text =
|
||||
"Autopilot协议版本:${CallerAutoPilotControlManager.getProtocolVersion()}"
|
||||
@@ -1593,9 +1636,12 @@ internal class DebugSettingView @JvmOverloads constructor(
|
||||
tvGitBranchInfo.text = "Git分支:${AppConfigInfo.workingBranchName}"
|
||||
tvAppBuildTimeInfo.text = "版本构建时间:${AppConfigInfo.appBuildTime}"
|
||||
|
||||
if(tbBeautyMode.isVisible){
|
||||
val version = ParseVersionUtils.parseVersion(true, CallerAutoPilotStatusListenerManager.getDockerVersion())
|
||||
if(version >= 30100 && AppIdentityModeUtils.isTaxi(FunctionBuildConfig.appIdentityMode)){
|
||||
if (tbBeautyMode.isVisible) {
|
||||
val version = ParseVersionUtils.parseVersion(
|
||||
true,
|
||||
CallerAutoPilotStatusListenerManager.getDockerVersion()
|
||||
)
|
||||
if (version >= 30100 && AppIdentityModeUtils.isTaxi(FunctionBuildConfig.appIdentityMode)) {
|
||||
tbBeautyMode.visibility = View.GONE
|
||||
}
|
||||
}
|
||||
@@ -1628,7 +1674,7 @@ internal class DebugSettingView @JvmOverloads constructor(
|
||||
"移动数据"
|
||||
} else {
|
||||
//WiFi
|
||||
CommonUtils.getWifiName(context)?:""
|
||||
CommonUtils.getWifiName(context) ?: ""
|
||||
}
|
||||
|
||||
} else {
|
||||
@@ -1703,11 +1749,14 @@ internal class DebugSettingView @JvmOverloads constructor(
|
||||
tvIpcInfo.text = it
|
||||
tvIpcInfoKey.text = it
|
||||
}
|
||||
tvCmdbCarInfoContent.text = SharedPrefsMgr.getInstance(context).getString(SharedPrefsConstants.CAR_INFO)?:""
|
||||
tvCmdbCarInfoContent.text =
|
||||
SharedPrefsMgr.getInstance(context).getString(SharedPrefsConstants.CAR_INFO) ?: ""
|
||||
|
||||
//APP升级功能
|
||||
tvAppHost.text = "HOST地址:" + SharedPrefsMgr.getInstance(context).getString(SharedPrefsConstants.HOST_ADDRESS)?:""
|
||||
tvAppContent.text = "APP升级数据:" + SharedPrefsMgr.getInstance(context).getString(SharedPrefsConstants.APP_UPGRADE_CONTENT)?:""
|
||||
tvAppHost.text = "HOST地址:" + SharedPrefsMgr.getInstance(context)
|
||||
.getString(SharedPrefsConstants.HOST_ADDRESS) ?: ""
|
||||
tvAppContent.text = "APP升级数据:" + SharedPrefsMgr.getInstance(context)
|
||||
.getString(SharedPrefsConstants.APP_UPGRADE_CONTENT) ?: ""
|
||||
|
||||
tvCarInfo.text =
|
||||
"GPS时间:${(mGnssInfo?.satelliteTime?.times(1000))?.toLong()}\n" +
|
||||
@@ -1739,6 +1788,18 @@ internal class DebugSettingView @JvmOverloads constructor(
|
||||
mTrajectoryInfoSize = 0
|
||||
mRouteInfoSize = 0
|
||||
|
||||
if (FunctionBuildConfig.isDemoMode) {
|
||||
tbIsDemoMode?.text = "关闭美化模式"
|
||||
} else {
|
||||
tbIsDemoMode?.text = "开启美化模式"
|
||||
}
|
||||
|
||||
if (FunctionBuildConfig.isRainMode) {
|
||||
tbIsRainMode?.text = "关闭雨天模式"
|
||||
} else {
|
||||
tbIsRainMode?.text = "开启雨天模式"
|
||||
}
|
||||
|
||||
obuConnectStatusTv.text = Html.fromHtml(
|
||||
"OBU连接状态:${
|
||||
if (AppConfigInfo.isConnectObu) {
|
||||
@@ -2120,56 +2181,47 @@ internal class DebugSettingView @JvmOverloads constructor(
|
||||
}
|
||||
|
||||
private fun restartApp() {
|
||||
Utils.getApp().startActivity(Utils.getApp().packageManager.getLaunchIntentForPackage(Utils.getApp().packageName))
|
||||
Utils.getApp()
|
||||
.startActivity(Utils.getApp().packageManager.getLaunchIntentForPackage(Utils.getApp().packageName))
|
||||
Process.killProcess(Process.myPid())
|
||||
}
|
||||
|
||||
private fun cacheHDOfflineData(isGaoDe: Boolean) {
|
||||
var progss = 0
|
||||
if (isGaoDe) {// 拿到了高德地图的cityCode
|
||||
CallerMapUIServiceManager.cacheHDDataByCity(object : IHdCacheListener {
|
||||
override fun onMapHdCacheProgress(cityId: Int, progress: Double) {
|
||||
// 更新进度
|
||||
progss = progress.toInt()
|
||||
if (progss == 100) {
|
||||
isHDCached = true
|
||||
btn_cache_hd_map.text = "缓存高精离线地图(已是最新版!)"
|
||||
} else {
|
||||
btn_cache_hd_map.text = "缓存高精离线地图(进度:${progss}%)"
|
||||
}
|
||||
}
|
||||
|
||||
override fun onMapHdCacheResult(cityId: Int, state: Int) {
|
||||
if (state == 0) {// 失败
|
||||
btn_cache_hd_map.text = "缓存高精离线地图(下载失败!)"
|
||||
ToastUtils.showShort("下载失败,请重试!")
|
||||
}
|
||||
}
|
||||
mogoMapData.get()?.cacheHDDataByCity({ _, progress ->
|
||||
cacheHDCityProgressUpdate(progress)
|
||||
}, { _, state ->
|
||||
cacheHDCityResult(state)
|
||||
})
|
||||
} else {// 只拿到了高精的经纬度
|
||||
mGnssInfo?.let { loc ->
|
||||
CallerMapUIServiceManager.cacheHDDataByCityByLonLat(object : IHdCacheListener {
|
||||
override fun onMapHdCacheProgress(cityId: Int, progress: Double) {
|
||||
progss = progress.toInt()
|
||||
if (progss == 100) {
|
||||
isHDCached = true
|
||||
btn_cache_hd_map.text = "缓存高精离线地图(已是最新版!)"
|
||||
} else {
|
||||
btn_cache_hd_map.text = "缓存高精离线地图(进度:${progss}%)"
|
||||
}
|
||||
}
|
||||
|
||||
override fun onMapHdCacheResult(cityId: Int, state: Int) {
|
||||
if (state == 0) {// 失败
|
||||
btn_cache_hd_map.text = "缓存高精离线地图(下载失败!)"
|
||||
ToastUtils.showShort("下载失败,请重试!")
|
||||
}
|
||||
}
|
||||
}, loc)
|
||||
mogoMapData.get()?.cacheHDDataByCityByLonLat(loc, { _, progress ->
|
||||
cacheHDCityProgressUpdate(progress)
|
||||
}, { _, state ->
|
||||
cacheHDCityResult(state)
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private fun cacheHDCityProgressUpdate(progress: Double) {
|
||||
// 更新进度
|
||||
val progss = progress.toInt()
|
||||
if (progss == 100) {
|
||||
isHDCached = true
|
||||
btn_cache_hd_map.text = "缓存高精离线地图(已是最新版!)"
|
||||
} else {
|
||||
btn_cache_hd_map.text = "缓存高精离线地图(进度:${progss}%)"
|
||||
}
|
||||
}
|
||||
|
||||
private fun cacheHDCityResult(state: Int) {
|
||||
if (state == 0) {// 失败
|
||||
btn_cache_hd_map.text = "缓存高精离线地图(下载失败!)"
|
||||
ToastUtils.showShort("下载失败,请重试!")
|
||||
}
|
||||
}
|
||||
|
||||
override fun fwThreadClose() {
|
||||
refreshTraceInfo()
|
||||
}
|
||||
@@ -2209,4 +2261,11 @@ internal class DebugSettingView @JvmOverloads constructor(
|
||||
tbDrawPointCloudData.isChecked = status
|
||||
}
|
||||
|
||||
/**
|
||||
* 自车光圈
|
||||
*/
|
||||
override fun onCarApertureClickEvent(status: Boolean) {
|
||||
tbCarAperture.isChecked = status
|
||||
}
|
||||
|
||||
}
|
||||
@@ -384,12 +384,17 @@ internal class SOPSettingView @JvmOverloads constructor(
|
||||
//自车光圈
|
||||
if(FunctionBuildConfig.isDrawPointCloudData){
|
||||
//如果点云效果是打开的,则自车光圈也跟随打开
|
||||
FunctionBuildConfig.isDisplayAnimEnable = true
|
||||
scCarAperture.isChecked = true
|
||||
CallerMapUIServiceManager.getMapUIController()?.setDisplayAnimEnable(true)
|
||||
hmiAction("SOP 是否展示自车光圈,",FunctionBuildConfig.isDisplayAnimEnable)
|
||||
Log.i(TAG,"SOP 是否展示自车光圈,${FunctionBuildConfig.isDisplayAnimEnable}")
|
||||
}else{
|
||||
scCarAperture.isChecked = FunctionBuildConfig.isDisplayAnimEnable
|
||||
}
|
||||
scCarAperture.setOnCheckedChangeListener { compoundButton, isChecked ->
|
||||
CallerMapUIServiceManager.getMapUIController()?.setDisplayAnimEnable(isChecked)
|
||||
CallerSopSettingManager.invokeCarApertureListener(isChecked)
|
||||
hmiAction("SOP 是否展示自车光圈,",isChecked)
|
||||
Log.i(TAG,"SOP 是否展示自车光圈,$isChecked")
|
||||
if(!compoundButton.isPressed){
|
||||
@@ -768,6 +773,10 @@ internal class SOPSettingView @JvmOverloads constructor(
|
||||
scDrawPointCloudData.isChecked = status
|
||||
}
|
||||
|
||||
override fun onCarApertureClickEvent(status: Boolean) {
|
||||
scCarAperture.isChecked = status
|
||||
}
|
||||
|
||||
/**
|
||||
* 工控机配置参数获取
|
||||
*/
|
||||
|
||||
@@ -10,6 +10,7 @@ import com.mogo.eagle.core.data.autopilot.pnc.PncActionsHelper
|
||||
import com.mogo.eagle.core.data.biz.trafficlight.TrafficLightResult
|
||||
import com.mogo.eagle.core.data.biz.trafficlight.currentRoadTrafficLight
|
||||
import com.mogo.eagle.core.data.biz.trafficlight.isRed
|
||||
import com.mogo.eagle.core.data.biz.trafficlight.time
|
||||
import com.mogo.eagle.core.data.deva.bizconfig.FuncBizConfig.Companion.BIZ_PNC_ACTIONS
|
||||
import com.mogo.eagle.core.data.deva.bizconfig.FuncBizConfig.Companion.FOUNDATION
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotPlanningActionsListener
|
||||
@@ -137,7 +138,7 @@ class PncActionsView @JvmOverloads constructor(
|
||||
&& mTrafficLightResult!!.currentRoadTrafficLight() != null
|
||||
&& mTrafficLightResult!!.currentRoadTrafficLight()!!.isRed()
|
||||
) {
|
||||
mTrafficLightResult!!.currentRoadTrafficLight()!!.remain.toString()
|
||||
mTrafficLightResult!!.currentRoadTrafficLight()!!.time().toString()
|
||||
} else {
|
||||
""
|
||||
}
|
||||
|
||||
@@ -46,28 +46,26 @@ class SteeringBrakeView(context: Context, attrs: AttributeSet?) : ConstraintLayo
|
||||
}
|
||||
|
||||
override fun onChassisLocationWGS84(gnssInfo: MogoLocation) {
|
||||
if (gnssInfo != null) {
|
||||
//设置刹车信息,小于默认认为是刹车
|
||||
brakeLight =
|
||||
if (gnssInfo.acceleration < SharedPrefsMgr.getInstance(Utils.getApp()).getFloat(
|
||||
MoGoConfig.BRAKE_ACCELERATION_THRESHOLD, -2.5f
|
||||
)
|
||||
) {
|
||||
1
|
||||
} else {
|
||||
0
|
||||
}
|
||||
CallerLogger.d(
|
||||
"$M_HMI$TAG",
|
||||
"---onAutopilotLightSwitchData ---Acceleration = " + gnssInfo.acceleration + "-- brakeLight = " + brakeLight
|
||||
)
|
||||
ThreadUtils.runOnUiThread {
|
||||
if (!isShowTurnLight) { //在不展示转向灯的情况下,展示车辆刹车的动效
|
||||
brakeView.visibility = View.VISIBLE
|
||||
brakeView.setBrakeLight(brakeLight)
|
||||
} else {
|
||||
brakeView.visibility = View.GONE
|
||||
}
|
||||
//设置刹车信息,小于默认认为是刹车 //todo 优化sp获取,不要每次回调都去调用sp
|
||||
brakeLight =
|
||||
if (gnssInfo.acceleration < SharedPrefsMgr.getInstance(Utils.getApp()).getFloat(
|
||||
MoGoConfig.BRAKE_ACCELERATION_THRESHOLD, -2.5f
|
||||
)
|
||||
) {
|
||||
1
|
||||
} else {
|
||||
0
|
||||
}
|
||||
CallerLogger.d(
|
||||
"$M_HMI$TAG",
|
||||
"---onAutopilotLightSwitchData ---Acceleration = " + gnssInfo.acceleration + "-- brakeLight = " + brakeLight
|
||||
)
|
||||
ThreadUtils.runOnUiThread {
|
||||
if (!isShowTurnLight) { //在不展示转向灯的情况下,展示车辆刹车的动效
|
||||
brakeView.visibility = View.VISIBLE
|
||||
brakeView.setBrakeLight(brakeLight)
|
||||
} else {
|
||||
brakeView.visibility = View.GONE
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -152,8 +152,7 @@ class ParallelDriveView @JvmOverloads constructor(
|
||||
}
|
||||
|
||||
override fun onParallelDrivingAbility(
|
||||
isParallelDrivingAbility: Boolean,
|
||||
unableParallelDrivingReasons: ArrayList<UnableLaunchReason>?
|
||||
isParallelDrivingAbility: Boolean
|
||||
) {
|
||||
if (!isParallelDrivingAbility) {
|
||||
Log.d(TAG, "onParallelDrivingAbility-UNAVAILABLE")
|
||||
|
||||
@@ -1,46 +0,0 @@
|
||||
package com.mogo.eagle.core.function.hmi.ui.widget
|
||||
|
||||
import android.content.Context
|
||||
import android.util.AttributeSet
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.widget.FrameLayout
|
||||
import com.mogo.eagle.core.function.call.map.CallerMapUIServiceManager.getMapUIController
|
||||
import com.mogo.eagle.core.function.hmi.R
|
||||
import com.mogo.map.uicontroller.VisualAngleMode
|
||||
import kotlinx.android.synthetic.main.view_perspective_switch.view.*
|
||||
|
||||
/**
|
||||
*@author xiaoyuzhou
|
||||
*@date 2021/10/15 11:34 上午
|
||||
* 视角切换按钮
|
||||
*/
|
||||
class PerspectiveSwitchView @JvmOverloads constructor(
|
||||
context: Context,
|
||||
attrs: AttributeSet? = null,
|
||||
defStyleAttr: Int = 0
|
||||
) : FrameLayout(context, attrs, defStyleAttr), View.OnClickListener{
|
||||
|
||||
override fun onAttachedToWindow() {
|
||||
super.onAttachedToWindow()
|
||||
LayoutInflater.from(context).inflate(R.layout.view_perspective_switch, this, true)
|
||||
setBackgroundResource(R.drawable.module_switch_map_bg)
|
||||
setOnClickListener(this)
|
||||
}
|
||||
|
||||
override fun onClick(v: View?) {
|
||||
getMapUIController()?.let {
|
||||
if (it.currentMapVisualAngle.isLongSight) {
|
||||
it.changeMapVisualAngle(VisualAngleMode.MODE_MEDIUM_SIGHT, null)
|
||||
textSwitch.setText(R.string.module_map_model_normal)
|
||||
} else if (it.currentMapVisualAngle.isMediumSight) {
|
||||
it.changeMapVisualAngle(VisualAngleMode.MODE_LONG_SIGHT, null)
|
||||
textSwitch.setText(R.string.module_map_model_faster)
|
||||
} else {
|
||||
it.changeMapVisualAngle(VisualAngleMode.MODE_LONG_SIGHT, null)
|
||||
textSwitch.setText(R.string.module_map_model_faster)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -10,7 +10,9 @@ import com.mogo.eagle.core.function.api.map.roma.IMoGoRomaListener
|
||||
import com.mogo.eagle.core.function.call.map.CallerMapIdentifyManager.romaTrigger
|
||||
import com.mogo.eagle.core.function.call.map.CallerMapRomaListener
|
||||
import com.mogo.eagle.core.function.hmi.R
|
||||
import com.mogo.eagle.core.utilcode.util.*
|
||||
import com.mogo.eagle.core.utilcode.util.ClickUtils
|
||||
import com.mogo.eagle.core.utilcode.util.ThreadUtils
|
||||
import com.mogo.eagle.core.utilcode.util.ToastUtils
|
||||
import kotlinx.android.synthetic.main.view_roma_taxi_bg.view.ivRomaView
|
||||
import kotlinx.android.synthetic.main.view_roma_taxi_bg.view.ll_roma_bg
|
||||
|
||||
|
||||
@@ -9,13 +9,11 @@ import androidx.constraintlayout.widget.ConstraintLayout
|
||||
import com.mogo.eagle.core.data.app.AppConfigInfo
|
||||
import com.mogo.eagle.core.data.deva.bindingcar.AdUpgradeStateHelper
|
||||
import com.mogo.eagle.core.data.deva.bindingcar.IPCUpgradeStateInfo
|
||||
import com.mogo.eagle.core.data.map.MogoLocation
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotStatusListener
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoChassisLocationWGS84Listener
|
||||
import com.mogo.eagle.core.function.api.devatools.IMoGoDevaToolsListener
|
||||
import com.mogo.eagle.core.function.api.hmi.autopilot.IMoGoCheckAutoPilotBtnListener
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationWGS84ListenerManager
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationWGS84ListenerManager.getChassisLocationWGS84
|
||||
import com.mogo.eagle.core.function.call.devatools.CallerDevaToolsListenerManager
|
||||
import com.mogo.eagle.core.function.call.devatools.CallerDevaToolsManager
|
||||
import com.mogo.eagle.core.function.call.hmi.CallerHmiListenerManager
|
||||
@@ -26,6 +24,7 @@ import com.mogo.eagle.core.function.hmi.ui.utils.HmiActionLog.Companion.hmiActio
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_HMI
|
||||
import com.mogo.eagle.core.utilcode.util.*
|
||||
import com.mogo.map.MogoData.Companion.mogoMapData
|
||||
import kotlinx.android.synthetic.main.view_system_version.view.*
|
||||
import system_master.SsmInfo
|
||||
import system_master.SystemStatusInfo
|
||||
@@ -41,7 +40,7 @@ class SystemVersionView @JvmOverloads constructor(
|
||||
attrs: AttributeSet? = null,
|
||||
defStyleAttr: Int = 0
|
||||
) : ConstraintLayout(context, attrs, defStyleAttr), IMoGoAutopilotStatusListener,
|
||||
IMoGoDevaToolsListener, IMoGoCheckAutoPilotBtnListener, IMoGoChassisLocationWGS84Listener {
|
||||
IMoGoDevaToolsListener, IMoGoCheckAutoPilotBtnListener {
|
||||
|
||||
companion object {
|
||||
const val TAG = "SystemVersionView"
|
||||
@@ -56,7 +55,6 @@ class SystemVersionView @JvmOverloads constructor(
|
||||
private var currentProgress: Int = -1 //当前已下载包体大小
|
||||
|
||||
private var isHDCached = false
|
||||
private var location: MogoLocation? = null
|
||||
|
||||
init {
|
||||
LayoutInflater.from(context).inflate(R.layout.view_system_version, this, true)
|
||||
@@ -140,17 +138,17 @@ class SystemVersionView @JvmOverloads constructor(
|
||||
ivHDCache.setOnClickListener {
|
||||
hmiAction(
|
||||
"$M_HMI$TAG",
|
||||
"HD map view click , isHDCached:$isHDCached , lon:${location?.longitude} , lat:${location?.latitude}"
|
||||
"HD map view click , isHDCached:$isHDCached , lon:${getChassisLocationWGS84().longitude} , lat:${getChassisLocationWGS84().latitude}"
|
||||
)
|
||||
if (isHDCached) {// 已缓存
|
||||
ToastUtils.showShort(resources.getString(R.string.offline_had_downloaded))
|
||||
} else {// 未缓存
|
||||
if (CallerMapUIServiceManager.getCityCode().isNullOrEmpty()) {// 未拿到高德的cityCode
|
||||
if (location == null || (location!!.longitude <= 0.0 && location!!.latitude <= 0.0)) {// 未拿到高精的经纬度
|
||||
if ((getChassisLocationWGS84().longitude <= 0.0 && getChassisLocationWGS84().latitude <= 0.0)) {// 未拿到高精的经纬度
|
||||
ToastUtils.showShort(resources.getString(R.string.location_try_again))
|
||||
} else {// 拿到了高精的经纬度
|
||||
val dialog = OfflineMapDialog(context)
|
||||
dialog.location = location
|
||||
dialog.location = getChassisLocationWGS84()
|
||||
dialog.show()
|
||||
}
|
||||
} else {// 拿到高德的cityCode
|
||||
@@ -159,11 +157,8 @@ class SystemVersionView @JvmOverloads constructor(
|
||||
}
|
||||
}
|
||||
|
||||
ThreadUtils.getIoPool().execute {
|
||||
val isCached = CallerMapUIServiceManager.isCityDataCached()
|
||||
UiThreadHandler.post {
|
||||
updateHDDataCacheStatus(isCached)
|
||||
}
|
||||
mogoMapData.get()?.isCityDataCached {
|
||||
updateHDDataCacheStatus(it)
|
||||
}
|
||||
|
||||
if (AdUpgradeStateHelper.isConfirmUpgrade()) {
|
||||
@@ -311,7 +306,6 @@ class SystemVersionView @JvmOverloads constructor(
|
||||
CallerHmiListenerManager.addListener(TAG, this)
|
||||
CallerAutoPilotStatusListenerManager.addListener(TAG, this)
|
||||
CallerDevaToolsListenerManager.addListener(TAG, this)
|
||||
CallerChassisLocationWGS84ListenerManager.addListener(TAG, this)
|
||||
needQueryContainers = true
|
||||
}
|
||||
|
||||
@@ -323,7 +317,6 @@ class SystemVersionView @JvmOverloads constructor(
|
||||
CallerHmiListenerManager.removeListener(TAG)
|
||||
CallerAutoPilotStatusListenerManager.removeListener(TAG)
|
||||
CallerDevaToolsListenerManager.removeListener(TAG)
|
||||
CallerChassisLocationWGS84ListenerManager.removeListener(TAG)
|
||||
needQueryContainers = false
|
||||
}
|
||||
|
||||
@@ -366,22 +359,18 @@ class SystemVersionView @JvmOverloads constructor(
|
||||
adCircularProgressView?.visibility = View.GONE
|
||||
}
|
||||
|
||||
override fun onChassisLocationWGS84(gnssInfo: MogoLocation) {
|
||||
location = gnssInfo
|
||||
}
|
||||
|
||||
/**
|
||||
* 状态查询应答
|
||||
* @param status 数据
|
||||
* HQ、M1 MAP350开始弃用,其他车型MAP360开始弃用
|
||||
*/
|
||||
override fun onAutopilotStatusRespByQuery(status: SystemStatusInfo.StatusInfo) {
|
||||
Log.i(TAG,"hdMapVer="+status.hdMapVer)
|
||||
Log.i(TAG, "hdMapVer=" + status.hdMapVer)
|
||||
//hdMapVer返回示例:/home/mogo/autopilot/share/hadmap_engine/data/hadmap_data/db.sqlite|bj|2.2.7|对bus路线上的junction进行修改,对原609场景修改为6091、6092、6201、 6202四种细分场景,并对通往园区路口改为619
|
||||
if(status.hdMapVer!= null && status.hdMapVer.isNotEmpty()){
|
||||
if (status.hdMapVer != null && status.hdMapVer.isNotEmpty()) {
|
||||
//对地图版本进行截取
|
||||
val city = status.hdMapVer.substringAfter(".sqlite|").substringBefore("|")
|
||||
val version =status.hdMapVer.substringAfter("$city|").substringBefore("|")
|
||||
val version = status.hdMapVer.substringAfter("$city|").substringBefore("|")
|
||||
AppConfigInfo.adHdMapVersion = "${city}_${version}"
|
||||
updateAdHdMapVersion()
|
||||
}
|
||||
@@ -395,12 +384,12 @@ class SystemVersionView @JvmOverloads constructor(
|
||||
* @param statusInf 数据
|
||||
*/
|
||||
override fun onSystemStatus(statusInf: SsmInfo.SsmStatusInf) {
|
||||
Log.i(TAG,"hdMapVer="+statusInf.hdMapVer)
|
||||
Log.i(TAG, "hdMapVer=" + statusInf.hdMapVer)
|
||||
//hdMapVer返回示例:/home/mogo/autopilot/share/hadmap_engine/data/hadmap_data/db.sqlite|bj|2.2.7|对bus路线上的junction进行修改,对原609场景修改为6091、6092、6201、 6202四种细分场景,并对通往园区路口改为619
|
||||
if(statusInf.hdMapVer!= null && statusInf.hdMapVer.isNotEmpty()){
|
||||
if (statusInf.hdMapVer != null && statusInf.hdMapVer.isNotEmpty()) {
|
||||
//对地图版本进行截取
|
||||
val city = statusInf.hdMapVer.substringAfter(".sqlite|").substringBefore("|")
|
||||
val version =statusInf.hdMapVer.substringAfter("$city|").substringBefore("|")
|
||||
val version = statusInf.hdMapVer.substringAfter("$city|").substringBefore("|")
|
||||
AppConfigInfo.adHdMapVersion = "${city}_${version}"
|
||||
updateAdHdMapVersion()
|
||||
}
|
||||
@@ -409,8 +398,8 @@ class SystemVersionView @JvmOverloads constructor(
|
||||
/**
|
||||
* 更新工控机高精地图版本
|
||||
*/
|
||||
private fun updateAdHdMapVersion(){
|
||||
if(tvAdHdMapVersionContent.text.isNullOrEmpty() && AppConfigInfo.adHdMapVersion.isNotEmpty() || tvAdHdMapVersionContent.text != AppConfigInfo.adHdMapVersion){
|
||||
private fun updateAdHdMapVersion() {
|
||||
if (tvAdHdMapVersionContent.text.isNullOrEmpty() && AppConfigInfo.adHdMapVersion.isNotEmpty() || tvAdHdMapVersionContent.text != AppConfigInfo.adHdMapVersion) {
|
||||
ThreadUtils.runOnUiThread {
|
||||
tvAdHdMapVersionContent.text = AppConfigInfo.adHdMapVersion
|
||||
}
|
||||
|
||||
@@ -1,15 +1,12 @@
|
||||
package com.mogo.eagle.core.function.main
|
||||
|
||||
import android.Manifest
|
||||
import android.content.Intent
|
||||
import android.content.pm.PackageManager
|
||||
import android.net.Uri
|
||||
import android.os.Build
|
||||
import android.os.Bundle
|
||||
import android.provider.Settings
|
||||
import android.view.*
|
||||
import android.widget.FrameLayout
|
||||
import androidx.core.app.ActivityCompat
|
||||
import androidx.recyclerview.widget.LinearLayoutManager
|
||||
import com.kwai.koom.base.MonitorManager.addMonitorConfig
|
||||
import com.kwai.koom.javaoom.monitor.OOMHprofUploader
|
||||
@@ -89,14 +86,12 @@ open class MainActivity : MvpActivity<MainView?, MainPresenter?>(), MainView,
|
||||
initConnectInfoRV()
|
||||
CallerHmiManager.init(this)
|
||||
|
||||
//申请悬浮窗权限
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
|
||||
// 检查是否有悬浮窗权限
|
||||
if (Settings.canDrawOverlays(this)) {
|
||||
return
|
||||
}
|
||||
PermissionsDialogUtils.openAppDetails(this, "显示悬浮窗", REQUEST_CODE_DIALOG)
|
||||
// 检查是否有悬浮窗权限
|
||||
if (Settings.canDrawOverlays(this)) {
|
||||
return
|
||||
}
|
||||
//申请悬浮窗权限
|
||||
PermissionsDialogUtils.openAppDetails(this, "显示悬浮窗", REQUEST_CODE_DIALOG)
|
||||
}
|
||||
|
||||
private fun injectStatusBar() {
|
||||
@@ -121,7 +116,6 @@ open class MainActivity : MvpActivity<MainView?, MainPresenter?>(), MainView,
|
||||
decorView.addView(statusBarView, statusBarLP)
|
||||
}
|
||||
|
||||
|
||||
// todo 优化 车聊聊
|
||||
private fun injectFloatView() {
|
||||
val decorView = this.window.decorView as? FrameLayout ?: return
|
||||
|
||||
@@ -14,7 +14,6 @@ import android.os.Handler;
|
||||
import android.os.Process;
|
||||
import android.text.TextUtils;
|
||||
import android.util.Log;
|
||||
import android.view.KeyEvent;
|
||||
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
@@ -23,14 +22,11 @@ import com.mogo.commons.module.intent.IMogoIntentListener;
|
||||
import com.mogo.commons.module.intent.IntentManager;
|
||||
import com.mogo.eagle.core.function.api.base.IMoGoFunctionProvider;
|
||||
import com.mogo.eagle.core.function.api.setting.IMoGoSkinModeChangeListener;
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotControlManager;
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager;
|
||||
import com.mogo.eagle.core.function.call.setting.CallerSkinModeListenerManager;
|
||||
import com.mogo.eagle.core.function.hmi.R;
|
||||
import com.mogo.eagle.core.function.main.moujie.BluetoothMonitorReceiver;
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger;
|
||||
import com.mogo.eagle.core.utilcode.mogo.storage.SharedPrefsMgr;
|
||||
import com.mogo.eagle.core.utilcode.util.ToastUtils;
|
||||
import com.rousetime.android_startup.model.CostTimesModel;
|
||||
import com.zhjt.service.chain.ChainLog;
|
||||
|
||||
@@ -40,8 +36,6 @@ import org.greenrobot.eventbus.Subscribe;
|
||||
import java.lang.reflect.Method;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
import java.util.Timer;
|
||||
import java.util.TimerTask;
|
||||
|
||||
/**
|
||||
* 针对作为Launcher的情况,做个性化操作 TODO 测试用的,可删除
|
||||
@@ -54,10 +48,6 @@ public class PassengerLauncherActivity extends MainActivity implements IMogoInte
|
||||
private final static Handler handlerV2XEvent = new Handler();
|
||||
private static Runnable runnableV2XEvent;
|
||||
|
||||
private volatile double accelerated;//加速度
|
||||
private Timer timerHorn;
|
||||
private Timer timerAcc;
|
||||
|
||||
private BluetoothMonitorReceiver mBluetoothReceiver = null;
|
||||
private BluetoothAdapter mBluetoothAdapter;
|
||||
|
||||
|
||||
@@ -1775,6 +1775,22 @@
|
||||
app:layout_constraintRight_toRightOf="@id/tbIsDrawAutopilotTrajectoryData"
|
||||
app:layout_constraintTop_toBottomOf="@id/tbIsDrawAutopilotTrajectoryData" />
|
||||
|
||||
<ToggleButton
|
||||
android:id="@+id/tbCarAperture"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="2dp"
|
||||
android:padding="@dimen/dp_20"
|
||||
android:textColor="#000"
|
||||
android:textOff="开启自车光圈"
|
||||
android:textOn="关闭自车光圈"
|
||||
android:textSize="@dimen/dp_24"
|
||||
app:layout_constraintLeft_toRightOf="@id/tbChangeAutoPilotStatus"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/tbIsDrawAutopilotTrajectoryData"
|
||||
/>
|
||||
|
||||
|
||||
<ToggleButton
|
||||
android:id="@+id/tbDrawPointCloudData"
|
||||
android:layout_width="0dp"
|
||||
@@ -1785,9 +1801,10 @@
|
||||
android:textOff="开启渲染点云数据"
|
||||
android:textOn="关闭渲染点云数据"
|
||||
android:textSize="@dimen/dp_24"
|
||||
app:layout_constraintLeft_toRightOf="@id/tbChangeAutoPilotStatus"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/tbIsDrawAutopilotTrajectoryData" />
|
||||
app:layout_constraintLeft_toLeftOf="@id/tbChangeAutoPilotStatus"
|
||||
app:layout_constraintRight_toRightOf="@id/tbChangeAutoPilotStatus"
|
||||
app:layout_constraintTop_toBottomOf="@id/tbChangeAutoPilotStatus"
|
||||
/>
|
||||
|
||||
<Button
|
||||
android:id="@+id/btnPointCloudSize"
|
||||
|
||||
@@ -1,31 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/module_switch_model_layout"
|
||||
android:layout_width="@dimen/module_switch_map"
|
||||
android:layout_height="@dimen/module_switch_map_height">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:gravity="center"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iconSwitch"
|
||||
android:layout_width="@dimen/module_switch_image"
|
||||
android:layout_height="@dimen/module_switch_image"
|
||||
android:layout_gravity="left|center_vertical"
|
||||
android:paddingLeft="@dimen/module_switch_margin_left"
|
||||
android:src="@drawable/module_switch_map_angle" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textSwitch"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingLeft="@dimen/module_switch_margin_left"
|
||||
android:text="@string/module_map_model_normal"
|
||||
android:textColor="@color/color_white"
|
||||
android:textSize="@dimen/module_switch_text_size" />
|
||||
</LinearLayout>
|
||||
</FrameLayout>
|
||||
@@ -61,7 +61,8 @@ dependencies {
|
||||
exclude group: 'com.zhidaoauto.machine', module: 'map'
|
||||
}
|
||||
|
||||
implementation rootProject.ext.dependencies.mogocustommap
|
||||
// implementation rootProject.ext.dependencies.mogocustommap
|
||||
implementation project(':libraries:mapmodule')
|
||||
implementation rootProject.ext.dependencies.amapnavi3dmap
|
||||
|
||||
implementation rootProject.ext.dependencies.androidxroomruntime
|
||||
|
||||
@@ -13,6 +13,7 @@ import com.mogo.eagle.core.function.business.identify.MapIdentifySubscriber
|
||||
import com.mogo.eagle.core.function.business.routeoverlay.MogoRouteOverlayManager
|
||||
import com.mogo.eagle.core.function.call.map.CallerVisualAngleManager
|
||||
import com.mogo.eagle.core.utilcode.util.DeviceUtils
|
||||
import com.mogo.map.MapDataWrapper
|
||||
|
||||
@Route(path = MogoServicePaths.PATH_MAP_BIZ)
|
||||
class MapBizProvider :IMoGoFunctionServerProvider, IMogoRoma {
|
||||
@@ -21,6 +22,7 @@ class MapBizProvider :IMoGoFunctionServerProvider, IMogoRoma {
|
||||
get() = "MapBizProvider"
|
||||
|
||||
override fun init(context: Context?) {
|
||||
MapDataWrapper.init()
|
||||
MapIdentifySubscriber.instance
|
||||
MogoRouteOverlayManager.getInstance().init()
|
||||
MapPointCloudSubscriber.instance
|
||||
|
||||
@@ -9,13 +9,13 @@ import androidx.lifecycle.Lifecycle.Event.ON_DESTROY
|
||||
import com.alibaba.android.arouter.facade.annotation.Route
|
||||
import com.mogo.eagle.core.data.constants.MogoServicePaths
|
||||
import com.mogo.eagle.core.data.map.*
|
||||
import com.mogo.eagle.core.data.map.MapRoadInfo.StopLine
|
||||
import com.mogo.eagle.core.function.api.map.angle.*
|
||||
import com.mogo.eagle.core.function.api.map.angle.Scene
|
||||
import com.mogo.eagle.core.function.call.autopilot.*
|
||||
import com.mogo.eagle.core.function.call.map.*
|
||||
import com.mogo.eagle.core.function.call.map.CallerMapRoadListenerManager.OnRoadListener
|
||||
import com.mogo.eagle.core.utilcode.kotlin.*
|
||||
import com.zhidaoauto.map.data.road.StopLine
|
||||
import com.zhidaoauto.map.sdk.open.tools.*
|
||||
import kotlinx.coroutines.*
|
||||
import kotlinx.coroutines.android.*
|
||||
@@ -90,11 +90,11 @@ class MoGoVisualAngleChangeProvider: IMoGoVisualAngleChangeProvider {
|
||||
|
||||
|
||||
override fun onStopLineInfo(info: StopLine) {
|
||||
Log.d(TAG, "-- onStopLineInfo --: ${info.distanceOfCarToStopLine}")
|
||||
if (!hasCrossRoad && info.distanceOfCarToStopLine <= 30.0) {
|
||||
Log.d(TAG, "-- onStopLineInfo --: ${info.distance}")
|
||||
if (!hasCrossRoad && info.distance <= 30.0) {
|
||||
hasCrossRoad = true
|
||||
triggerRoadId.set(this.roadId.get())
|
||||
distanceOfCarToStopLine.set(info.distanceOfCarToStopLine)
|
||||
distanceOfCarToStopLine.set(info.distance)
|
||||
triggerLocation.set(CallerChassisLocationGCJ02ListenerManager.getChassisLocationGCJ02())
|
||||
changeAngle(CrossRoad(true))
|
||||
}
|
||||
|
||||
@@ -5,9 +5,9 @@ import com.mogo.eagle.core.data.config.FunctionBuildConfig
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotPointCloudListener
|
||||
import com.mogo.eagle.core.function.api.base.IMoGoSubscriber
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotPointCloudListenerManager
|
||||
import com.mogo.eagle.core.function.call.map.CallerMapUIServiceManager
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_MAP
|
||||
import com.zhidaoauto.map.sdk.open.business.PointCloudHelper
|
||||
import java.math.BigDecimal
|
||||
|
||||
/**
|
||||
@@ -47,26 +47,20 @@ class MapPointCloudSubscriber private constructor()
|
||||
if (!isDrawPointCloud) {
|
||||
CallerLogger.d(M_MAP + TAG, "====开启点云渲染====")
|
||||
isDrawPointCloud = true
|
||||
PointCloudHelper.setIsDrawPointCloud(true)//打开点云绘制
|
||||
CallerMapUIServiceManager.getMapUIController()?.setIsDrawPointCloud(true)
|
||||
}
|
||||
PointCloudHelper.setIsDrawPointCloud(true)//打开点云绘制
|
||||
CallerMapUIServiceManager.getMapUIController()?.setIsDrawPointCloud(true) //打开点云绘制
|
||||
|
||||
/**
|
||||
* 更新点云数据
|
||||
* @param dataStr 点云数据
|
||||
* @param isTrasformer 是否需要转换坐标
|
||||
* @param isResidual 是否需要差量更新
|
||||
* @param isStrong 是否加粗显示
|
||||
* @return 是否执行
|
||||
*/
|
||||
CallerLogger.d(M_MAP + TAG, "====开始传入地图点云数据====")
|
||||
val result = PointCloudHelper.updatePointCloudDataByPb(pointCloud, true, false, false)
|
||||
val result = CallerMapUIServiceManager.getMapUIController()?.updatePointCloud(pointCloud,
|
||||
isTransformer = true, isResidual = false, isReset = false
|
||||
)
|
||||
CallerLogger.d(M_MAP + TAG, "====结束传入地图点云数据=====$result")
|
||||
} else {
|
||||
if (isDrawPointCloud) {
|
||||
CallerLogger.d(M_MAP + TAG, "====停止点云绘制====")
|
||||
isDrawPointCloud = false
|
||||
PointCloudHelper.setIsDrawPointCloud(false)//停止点云绘制
|
||||
CallerMapUIServiceManager.getMapUIController()?.setIsDrawPointCloud(false)//停止点云绘制
|
||||
}
|
||||
}
|
||||
} catch (e: Exception) {
|
||||
|
||||
@@ -1,15 +1,12 @@
|
||||
package com.mogo.eagle.core.function.business;
|
||||
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
import com.mogo.eagle.core.data.enums.DataSourceType;
|
||||
import com.mogo.eagle.core.data.map.MogoLocation;
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoChassisLocationWGS84Listener;
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationWGS84ListenerManager;
|
||||
import com.mogo.eagle.core.function.call.map.CallerMapUIServiceManager;
|
||||
import com.mogo.eagle.core.function.call.v2x.CallerLimitingVelocityListenerManager;
|
||||
import com.mogo.map.MapDataWrapper;
|
||||
|
||||
import java.util.Objects;
|
||||
import java.util.Timer;
|
||||
import java.util.TimerTask;
|
||||
|
||||
@@ -18,11 +15,9 @@ import java.util.TimerTask;
|
||||
*
|
||||
* @author mogoauto
|
||||
*/
|
||||
public class SpeedLimitDataManager implements IMoGoChassisLocationWGS84Listener {
|
||||
public class SpeedLimitDataManager {
|
||||
|
||||
private final static String TAG = "SpeedLimitDataManager";
|
||||
private static volatile SpeedLimitDataManager instance;
|
||||
private volatile MogoLocation mLocation;
|
||||
|
||||
private SpeedLimitDataManager() {
|
||||
}
|
||||
@@ -38,31 +33,26 @@ public class SpeedLimitDataManager implements IMoGoChassisLocationWGS84Listener
|
||||
return instance;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onChassisLocationWGS84(@Nullable MogoLocation gnssInfo) {
|
||||
mLocation = gnssInfo;
|
||||
}
|
||||
|
||||
private class SpeedTimerTask extends TimerTask {
|
||||
private static class SpeedTimerTask extends TimerTask {
|
||||
@Override
|
||||
public void run() {
|
||||
if (mLocation != null) {
|
||||
if (CallerMapUIServiceManager.INSTANCE.getMapUIController() != null) {
|
||||
getSpeedLimit();
|
||||
}
|
||||
}
|
||||
getSpeedLimit();
|
||||
}
|
||||
|
||||
private void getSpeedLimit() {
|
||||
int speedLimit = Objects.requireNonNull(CallerMapUIServiceManager.INSTANCE.getMapUIController()).getLimitSpeed(mLocation.getLongitude(), mLocation.getLatitude(), (float) mLocation.getHeading());
|
||||
if (speedLimit > 0) {
|
||||
CallerLimitingVelocityListenerManager.INSTANCE.invokeUnion(speedLimit, DataSourceType.MAP);
|
||||
MogoLocation loc = CallerChassisLocationWGS84ListenerManager.INSTANCE.getChassisLocationWGS84();
|
||||
if (loc.getLatitude() > 0 && loc.getLongitude() > 0) {
|
||||
MapDataWrapper.INSTANCE.getLimitSpeed(loc.getLongitude(), loc.getLatitude(), (float) loc.getHeading(), integer -> {
|
||||
if (integer != null && integer > 0) {
|
||||
CallerLimitingVelocityListenerManager.INSTANCE.invokeUnion(integer, DataSourceType.MAP);
|
||||
}
|
||||
return null;
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void start() {
|
||||
CallerChassisLocationWGS84ListenerManager.INSTANCE.addListener(TAG, this);
|
||||
Timer mTimer = new Timer();
|
||||
mTimer.schedule(new SpeedTimerTask(), 3000, 1000);
|
||||
}
|
||||
|
||||
@@ -38,8 +38,8 @@ import com.mogo.eagle.core.function.call.map.CallerVisualAngleManager.updateLong
|
||||
import com.mogo.eagle.core.function.utils.MapBizTrace
|
||||
import com.mogo.eagle.core.function.utils.MapBizTrace.Companion.getCurrentCNode
|
||||
import com.mogo.eagle.core.utilcode.util.ToastUtils
|
||||
import com.mogo.map.MogoMapUIController
|
||||
import com.mogo.map.uicontroller.VisualAngleMode
|
||||
import com.zhidaoauto.map.data.point.LonLatPoint
|
||||
import com.zhjt.service.chain.ChainLog
|
||||
import mogo.telematics.pad.MessagePad
|
||||
import mogo.yycp.api.proto.SocketDownData
|
||||
@@ -179,8 +179,7 @@ class AiCloudIdentifyDataManager : IMoGoPlanningRottingListener,
|
||||
MapIdentifySubscriber.instance.clearAiCloudRoma()
|
||||
// 主动关闭roma,回到中景视角
|
||||
if (manual) {
|
||||
MogoMapUIController.getInstance()
|
||||
.changeMapVisualAngle(VisualAngleMode.MODE_MEDIUM_SIGHT, null)
|
||||
CallerMapUIServiceManager.getMapUIController()?.changeMapVisualAngle(VisualAngleMode.MODE_MEDIUM_SIGHT, null)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -216,7 +215,7 @@ class AiCloudIdentifyDataManager : IMoGoPlanningRottingListener,
|
||||
)
|
||||
if (dataReceive) {
|
||||
// 请求地图开始漫游
|
||||
MogoMapUIController.getInstance().setRomaMode(FunctionBuildConfig.romaModeStyle)
|
||||
CallerMapUIServiceManager.getMapUIController()?.setRomaMode(FunctionBuildConfig.romaModeStyle)
|
||||
}else{
|
||||
// 保底清除策略
|
||||
MapBizTrace.log("",CHAIN_CODE_ROMA_REQUEST_DELAY,TAG,mutableMapOf("delay" to true),true)
|
||||
@@ -321,28 +320,24 @@ class AiCloudIdentifyDataManager : IMoGoPlanningRottingListener,
|
||||
override fun onAutopilotRotting(globalPathResp: MessagePad.GlobalPathResp?) {
|
||||
globalPathResp?.let {
|
||||
if (it.wayPointsList != null && it.wayPointsList.size > 0) {
|
||||
val builder = StringBuilder()
|
||||
val roamList = ArrayList<LonLatPoint>()
|
||||
it.wayPointsList.forEach { loc ->
|
||||
builder.append(loc.longitude).append(",").append(loc.latitude).append(",")
|
||||
roamList.add(LonLatPoint(loc.longitude,loc.latitude))
|
||||
}
|
||||
var romaRoute = builder.toString()
|
||||
if (romaRoute.endsWith(",")) {
|
||||
romaRoute = romaRoute.substring(0, builder.toString().length - 1)
|
||||
}
|
||||
updateRomaStyle(false, romaRoute)
|
||||
updateRomaStyle(false, roamList)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private fun updateRomaStyle(auto: Boolean, route: String? = null) {
|
||||
private fun updateRomaStyle(auto: Boolean, routeList: ArrayList<LonLatPoint>? = null) {
|
||||
MapBizTrace.log(
|
||||
"",
|
||||
CHAIN_CODE_ROMA_ROUTE_MODE,
|
||||
TAG,
|
||||
"updateRomaStyle auto status:$auto, route:${route ?: "reset null"}"
|
||||
"updateRomaStyle auto status:$auto, route:${routeList?.size ?: "reset null"}"
|
||||
)
|
||||
route?.let {
|
||||
CallerMapUIServiceManager.getMapUIController()?.setRoamTrajectory(route)
|
||||
routeList?.let {
|
||||
CallerMapUIServiceManager.getMapUIController()?.setRoamTrajectory(it)
|
||||
}
|
||||
if (auto) {
|
||||
FunctionBuildConfig.romaModeStyle = 0
|
||||
|
||||
@@ -1,58 +1,51 @@
|
||||
package com.mogo.eagle.core.function.business.cachemap
|
||||
|
||||
import android.util.Log
|
||||
import com.mogo.eagle.core.data.config.FunctionBuildConfig
|
||||
import com.mogo.eagle.core.data.map.MogoLocation
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoChassisLocationWGS84Listener
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationWGS84ListenerManager
|
||||
import com.mogo.eagle.core.function.call.map.CallerMapUIServiceManager
|
||||
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_MAP
|
||||
import com.mogo.eagle.core.utilcode.util.ThreadUtils
|
||||
import com.mogo.map.hdcache.IHdCacheListener
|
||||
import com.mogo.map.MogoData.Companion.mogoMapData
|
||||
|
||||
object CacheHDMapManager: IMoGoChassisLocationWGS84Listener {
|
||||
object CacheHDMapManager {
|
||||
|
||||
private const val TAG = "CacheHDMapManager"
|
||||
|
||||
@Volatile
|
||||
private var location: MogoLocation? = null
|
||||
|
||||
fun scheduleGetLocation() {
|
||||
if (!AppIdentityModeUtils.isDriver(FunctionBuildConfig.appIdentityMode)) {
|
||||
CallerChassisLocationWGS84ListenerManager.addListener(TAG, this)
|
||||
ThreadUtils.getIoPool().execute {
|
||||
if (!CallerMapUIServiceManager.isCityDataCached()) {
|
||||
while (true) {
|
||||
if (location != null) {
|
||||
Log.d(TAG, "开始下载")
|
||||
CallerMapUIServiceManager.cacheHDDataByCityByLonLat(object : IHdCacheListener {
|
||||
override fun onMapHdCacheProgress(cityId: Int, progress: Double) {
|
||||
Log.d(TAG, "下载进度:${progress.toInt()}")
|
||||
}
|
||||
|
||||
override fun onMapHdCacheResult(cityId: Int, state: Int) {
|
||||
if (state == 0) {
|
||||
Log.d(TAG, "下载失败")
|
||||
}
|
||||
}
|
||||
}, location!!)
|
||||
Log.d(TAG, "移除监听并关闭循环")
|
||||
CallerChassisLocationWGS84ListenerManager.removeListener(TAG)
|
||||
return@execute
|
||||
mogoMapData.get()?.isCityDataCached {
|
||||
if (!it) {
|
||||
ThreadUtils.getIoPool().execute {
|
||||
while (true) {
|
||||
val loc =
|
||||
CallerChassisLocationWGS84ListenerManager.getChassisLocationWGS84()
|
||||
if (loc.latitude != 0.0 || loc.longitude != 0.0) {
|
||||
CallerLogger.d(TAG, "开始下载")
|
||||
mogoMapData.get()?.cacheHDDataByCityByLonLat(loc,
|
||||
{ _, progress ->
|
||||
CallerLogger.i(M_MAP + TAG, "下载进度:${progress.toInt()}")
|
||||
},
|
||||
{ _, state ->
|
||||
if (state == 0) {
|
||||
CallerLogger.i(M_MAP + TAG, "下载失败")
|
||||
}
|
||||
})
|
||||
CallerLogger.i(M_MAP + TAG, "移除监听并关闭循环")
|
||||
break
|
||||
}
|
||||
try {
|
||||
CallerLogger.i(M_MAP + TAG, "开始休眠...")
|
||||
Thread.sleep(1500)
|
||||
} catch (e: Exception) {
|
||||
}
|
||||
}
|
||||
try {
|
||||
Log.d(TAG, "开始休眠...")
|
||||
Thread.sleep(1500)
|
||||
} catch (e: Exception) {}
|
||||
}
|
||||
} else {
|
||||
Log.d(TAG, "高精地图缓存已下载!")
|
||||
CallerLogger.i(M_MAP + TAG, "高精地图缓存已下载!")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
override fun onChassisLocationWGS84(gnssInfo: MogoLocation) {
|
||||
location = gnssInfo
|
||||
}
|
||||
}
|
||||
@@ -2,7 +2,6 @@ package com.mogo.eagle.core.function.business.identify
|
||||
|
||||
import android.annotation.SuppressLint
|
||||
import androidx.collection.ArraySet
|
||||
import com.mogo.commons.AbsMogoApplication
|
||||
import com.mogo.commons.module.status.MogoStatusManager
|
||||
import com.mogo.map.identify.MogoIdentifyManager
|
||||
import mogo.yycp.api.proto.SocketDownData
|
||||
@@ -10,10 +9,6 @@ import java.util.concurrent.ConcurrentHashMap
|
||||
|
||||
class IdentifyAiCloudDataDrawer : Identify {
|
||||
|
||||
companion object {
|
||||
private const val TAG = "IdentifyDataDrawer"
|
||||
}
|
||||
|
||||
/**
|
||||
* 上一帧数据的缓存
|
||||
*/
|
||||
@@ -55,14 +50,14 @@ class IdentifyAiCloudDataDrawer : Identify {
|
||||
val key = it.next() as String
|
||||
it.remove()
|
||||
mMarkersCaches.remove(key)
|
||||
MogoIdentifyManager.getInstance(AbsMogoApplication.getApp())
|
||||
MogoIdentifyManager.getInstance()
|
||||
.removeMarker(key.hashCode().toString())
|
||||
}
|
||||
|
||||
val filterList = filterTrafficData(resultList)
|
||||
if (filterList.size > 0) {
|
||||
// 绘制新数据
|
||||
MogoIdentifyManager.getInstance(AbsMogoApplication.getApp())
|
||||
MogoIdentifyManager.getInstance()
|
||||
.updateBatchAiMarkerPosition(filterList)
|
||||
}
|
||||
}
|
||||
@@ -90,7 +85,7 @@ class IdentifyAiCloudDataDrawer : Identify {
|
||||
trafficDataUuidList.clear()
|
||||
mMarkersCaches.forEach { (uuid, _) ->
|
||||
mMarkersCaches.remove(uuid)
|
||||
MogoIdentifyManager.getInstance(AbsMogoApplication.getApp())
|
||||
MogoIdentifyManager.getInstance()
|
||||
.removeMarker(uuid.hashCode().toString())
|
||||
}
|
||||
mFilterTrafficData.clear()
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
package com.mogo.eagle.core.function.business.identify
|
||||
|
||||
import android.annotation.SuppressLint
|
||||
import com.mogo.commons.AbsMogoApplication
|
||||
import com.mogo.commons.module.status.MogoStatusManager
|
||||
import com.mogo.eagle.core.data.traffic.TrafficData
|
||||
import com.mogo.map.identify.MogoIdentifyManager
|
||||
@@ -13,10 +12,6 @@ import mogo.telematics.pad.MessagePad.TrackedObject
|
||||
*/
|
||||
class IdentifyBeautifyDataDrawer : Identify {
|
||||
|
||||
companion object {
|
||||
private const val TAG = "IdentifyDataDrawer"
|
||||
}
|
||||
|
||||
override fun renderPlanningWarningObj(planningObjects: List<MessagePad.PlanningObject>?) {
|
||||
TrackManager.getInstance().renderPlanningWarningObj(planningObjects)
|
||||
}
|
||||
@@ -46,7 +41,7 @@ class IdentifyBeautifyDataDrawer : Identify {
|
||||
val filterList = TrackManager.getInstance().filterTrafficData(resultList)
|
||||
if (filterList.size > 0) {
|
||||
// 绘制新数据
|
||||
MogoIdentifyManager.getInstance(AbsMogoApplication.getApp())
|
||||
MogoIdentifyManager.getInstance()
|
||||
.updateBatchMarkerPosition(filterList)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,7 +2,6 @@ package com.mogo.eagle.core.function.business.identify
|
||||
|
||||
import android.annotation.SuppressLint
|
||||
import androidx.collection.ArraySet
|
||||
import com.mogo.commons.AbsMogoApplication
|
||||
import com.mogo.commons.module.status.MogoStatusManager
|
||||
import com.mogo.eagle.core.data.traffic.TrafficData
|
||||
import com.mogo.map.identify.MogoIdentifyManager
|
||||
@@ -17,10 +16,6 @@ import java.util.concurrent.ConcurrentHashMap
|
||||
*/
|
||||
class IdentifyOriginDataDrawer : Identify {
|
||||
|
||||
companion object {
|
||||
private const val TAG = "IdentifyDataDrawer"
|
||||
}
|
||||
|
||||
/**
|
||||
* 上一帧数据的缓存
|
||||
*/
|
||||
@@ -65,11 +60,11 @@ class IdentifyOriginDataDrawer : Identify {
|
||||
|
||||
//清除缓存
|
||||
for (data in resultList) {
|
||||
if (trafficDataUuidList.size > 0 && trafficDataUuidList.contains("" + data.uuid)) {
|
||||
if (trafficDataUuidList.size > 0 && trafficDataUuidList.contains(data.uuid.toString())) {
|
||||
if (TrackerSourceFilterHelper.filterData(data)) {
|
||||
continue
|
||||
}
|
||||
trafficDataUuidList.remove("" + data.uuid)
|
||||
trafficDataUuidList.remove(data.uuid.toString())
|
||||
}
|
||||
}
|
||||
|
||||
@@ -79,14 +74,14 @@ class IdentifyOriginDataDrawer : Identify {
|
||||
val key = it.next() as String
|
||||
it.remove()
|
||||
mMarkersCaches.remove(key)
|
||||
MogoIdentifyManager.getInstance(AbsMogoApplication.getApp())
|
||||
MogoIdentifyManager.getInstance()
|
||||
.removeMarker(key)
|
||||
}
|
||||
|
||||
val filterList = filterTrafficData(resultList)
|
||||
if (filterList.size > 0) {
|
||||
// 绘制新数据
|
||||
MogoIdentifyManager.getInstance(AbsMogoApplication.getApp())
|
||||
MogoIdentifyManager.getInstance()
|
||||
.updateBatchMarkerPosition(filterList)
|
||||
}
|
||||
}
|
||||
@@ -105,7 +100,7 @@ class IdentifyOriginDataDrawer : Identify {
|
||||
continue
|
||||
}
|
||||
var temp: TrackedObject = data
|
||||
val uuid = "" + data.uuid
|
||||
val uuid = data.uuid.toString()
|
||||
val cacheData = mMarkersCaches[uuid]
|
||||
if (cacheData != null) {
|
||||
val color = TrackerSourceFilterHelper.getDefaultColor(data)
|
||||
@@ -124,7 +119,7 @@ class IdentifyOriginDataDrawer : Identify {
|
||||
@SuppressLint("NewApi")
|
||||
override fun clearOldMarker() {
|
||||
for (uuid in trafficDataUuidList) {
|
||||
MogoIdentifyManager.getInstance(AbsMogoApplication.getApp())
|
||||
MogoIdentifyManager.getInstance()
|
||||
.removeMarker(uuid)
|
||||
}
|
||||
trafficDataUuidList.clear()
|
||||
|
||||
@@ -1,11 +1,13 @@
|
||||
package com.mogo.eagle.core.function.business.identify;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.os.Build;
|
||||
import android.util.ArraySet;
|
||||
|
||||
import androidx.annotation.RequiresApi;
|
||||
|
||||
import com.google.common.collect.BiMap;
|
||||
import com.google.common.collect.HashBiMap;
|
||||
import com.mogo.commons.AbsMogoApplication;
|
||||
import com.mogo.eagle.core.data.traffic.TrafficData;
|
||||
import com.mogo.eagle.core.utilcode.geometry.S2CellId;
|
||||
import com.mogo.eagle.core.utilcode.geometry.S2LatLng;
|
||||
@@ -71,13 +73,13 @@ public class TrackManager {
|
||||
public HashMap<String, MessagePad.TrackedObject> filterTrafficData(List<MessagePad.TrackedObject> trafficData) {
|
||||
//清空上次返回数据,做到缓存复用
|
||||
mFilterTrafficData.clear();
|
||||
long cost = System.currentTimeMillis();
|
||||
// long cost = System.currentTimeMillis();
|
||||
//进入过滤机制的感知物体,首先从缓存队列中进行查找 uuid
|
||||
for (MessagePad.TrackedObject data : trafficData) {
|
||||
if (TrackerSourceFilterHelper.INSTANCE.filterData(data)) {
|
||||
continue;
|
||||
}
|
||||
String uuid = "" + data.getUuid();
|
||||
String uuid = Integer.toString(data.getUuid());
|
||||
TrackObj trackObj = mMarkersCaches.get(uuid);
|
||||
|
||||
String color = TrackerSourceFilterHelper.INSTANCE.getDefaultColor(data);
|
||||
@@ -93,24 +95,26 @@ public class TrackManager {
|
||||
if (cellIdCaches.containsValue(pos)) {
|
||||
String findSameValue = cellIdCaches.inverse().get(pos);
|
||||
//uuid处理
|
||||
data = data.toBuilder().setUuid(Integer.parseInt(findSameValue)).build();
|
||||
TrackObj cacheTrack = mMarkersCaches.get(findSameValue);
|
||||
if (cacheTrack != null) {
|
||||
trackObj = cacheTrack;
|
||||
MessagePad.TrackedObject cache = cacheTrack.getCache();
|
||||
if (cache != null) {
|
||||
//相对静止物体 感知融合同位置物体,使用缓存数据做覆盖
|
||||
if (cacheTrack.relativeStatic()) {
|
||||
if (data.getColor() != null && !data.getColor().isEmpty()) {
|
||||
cache = cache.toBuilder().setColor(data.getColor()).build();
|
||||
if(findSameValue != null && !findSameValue.isEmpty()){
|
||||
data = data.toBuilder().setUuid(Integer.parseInt(findSameValue)).build();
|
||||
TrackObj cacheTrack = mMarkersCaches.get(findSameValue);
|
||||
if (cacheTrack != null) {
|
||||
trackObj = cacheTrack;
|
||||
MessagePad.TrackedObject cache = cacheTrack.getCache();
|
||||
if (cache != null) {
|
||||
//相对静止物体 感知融合同位置物体,使用缓存数据做覆盖
|
||||
if (cacheTrack.relativeStatic()) {
|
||||
if (data.getColor() != null && !data.getColor().isEmpty()) {
|
||||
cache = cache.toBuilder().setColor(data.getColor()).build();
|
||||
}
|
||||
data = cache;
|
||||
}
|
||||
data = cache;
|
||||
}
|
||||
uuid = findSameValue;
|
||||
trackObj.updateObj(data);
|
||||
} else {
|
||||
trackObj = new TrackObj(data,s2CellId,s2LatLng);
|
||||
}
|
||||
uuid = findSameValue;
|
||||
trackObj.updateObj(data);
|
||||
} else {
|
||||
trackObj = new TrackObj(data,s2CellId,s2LatLng);
|
||||
}
|
||||
} else {
|
||||
trackObj = new TrackObj(data,s2CellId,s2LatLng);
|
||||
@@ -128,7 +132,7 @@ public class TrackManager {
|
||||
public void clearCache(List<MessagePad.TrackedObject> resultList) {
|
||||
//过滤现有元素
|
||||
for (MessagePad.TrackedObject data : resultList) {
|
||||
String uuid = "" + data.getUuid();
|
||||
String uuid = Integer.toString(data.getUuid());
|
||||
if (trafficDataUuid.size() > 0 && trafficDataUuid.contains(uuid)) {
|
||||
if (TrackerSourceFilterHelper.INSTANCE.filterData(data)) {
|
||||
continue;
|
||||
@@ -150,17 +154,18 @@ public class TrackManager {
|
||||
cellIdCaches.remove(key);
|
||||
mMarkersCaches.remove(key);
|
||||
WarningHelper.INSTANCE.remove(key);
|
||||
MogoIdentifyManager.getInstance(AbsMogoApplication.getApp())
|
||||
MogoIdentifyManager.getInstance()
|
||||
.removeMarker(key);
|
||||
}
|
||||
|
||||
@RequiresApi(api = Build.VERSION_CODES.N)
|
||||
public void clearAll() {
|
||||
cellIdCaches.clear();
|
||||
trafficDataUuid.clear();
|
||||
WarningHelper.INSTANCE.clear();
|
||||
mMarkersCaches.forEach((uuid, trackObj) -> {
|
||||
trackObj.clear();
|
||||
MogoIdentifyManager.getInstance(AbsMogoApplication.getApp())
|
||||
MogoIdentifyManager.getInstance()
|
||||
.removeMarker(uuid);
|
||||
});
|
||||
mMarkersCaches.clear();
|
||||
|
||||
@@ -4,7 +4,6 @@ import android.annotation.SuppressLint
|
||||
import com.mogo.eagle.core.data.config.FunctionBuildConfig
|
||||
import com.mogo.eagle.core.data.enums.TrafficTypeEnum
|
||||
import com.mogo.eagle.core.function.call.biz.CallerFuncBizListenerManager
|
||||
import com.mogo.eagle.core.function.call.map.CallerMapUIServiceManager
|
||||
import mogo.telematics.pad.MessagePad.*
|
||||
|
||||
object TrackerSourceFilterHelper {
|
||||
@@ -12,7 +11,8 @@ object TrackerSourceFilterHelper {
|
||||
@SuppressLint("NewApi")
|
||||
fun filterData(data: TrackedObject): Boolean {
|
||||
if (!FunctionBuildConfig.isDrawUnknownIdentifyData && (data.type == TrafficTypeEnum.TYPE_TRAFFIC_ID_WEI_ZHI.type
|
||||
|| data.type == TrafficTypeEnum.TYPE_TRAFFIC_ID_501.type || data.type == TrafficTypeEnum.TYPE_TRAFFIC_ID_502.type)) {
|
||||
|| data.type == TrafficTypeEnum.TYPE_TRAFFIC_ID_501.type || data.type == TrafficTypeEnum.TYPE_TRAFFIC_ID_502.type)
|
||||
) {
|
||||
return true
|
||||
}
|
||||
var trackIPCFilter = true
|
||||
@@ -32,7 +32,7 @@ object TrackerSourceFilterHelper {
|
||||
}
|
||||
}
|
||||
4 -> {
|
||||
if(isV2nRSM(data).second){
|
||||
if (isV2nRSM(data).second) {
|
||||
trackIPCFilter = false
|
||||
}
|
||||
}
|
||||
@@ -73,12 +73,10 @@ object TrackerSourceFilterHelper {
|
||||
}
|
||||
|
||||
//僵尸车
|
||||
if(data.addAttribute == AdditionalAttribute.ATTR_ZOMBIE){
|
||||
if (data.addAttribute == AdditionalAttribute.ATTR_ZOMBIE) {
|
||||
color = "#7A8499FF"
|
||||
CallerMapUIServiceManager.getMapUIController()?.let {
|
||||
if(it.isDayMode){
|
||||
color = "#9BA8BCFF"
|
||||
}
|
||||
if (FunctionBuildConfig.skinMode == 1) {
|
||||
color = "#9BA8BCFF"
|
||||
}
|
||||
//消息埋点
|
||||
CallerFuncBizListenerManager.invokeAttrZombieAnalyticsEvent()
|
||||
|
||||
@@ -41,7 +41,7 @@ object WarningHelper {
|
||||
return
|
||||
}
|
||||
planningObjects.forEach(Consumer { planningObj: PlanningObject ->
|
||||
val trackId = "" + planningObj.uuid
|
||||
val trackId = planningObj.uuid.toString()
|
||||
if (mMarkersCaches.containsKey(trackId)) {
|
||||
mMarkersCaches[trackId] ?: return@Consumer
|
||||
if (planningObj.type == 0) { //0是leading障碍物,障碍物车身红色提示
|
||||
@@ -72,7 +72,7 @@ object WarningHelper {
|
||||
return
|
||||
}
|
||||
planningObjects.forEach(Consumer { planningObj: PlanningObject ->
|
||||
val trackId = "" + planningObj.uuid
|
||||
val trackId = planningObj.uuid.toString()
|
||||
if (mMarkersCaches.containsKey(trackId)) {
|
||||
mMarkersCaches[trackId] ?: return@Consumer
|
||||
if (planningObj.type == 0) { //0是leading障碍物,障碍物车身红色提示
|
||||
|
||||
@@ -58,7 +58,7 @@ public class MogoRouteOverlayManager implements
|
||||
|
||||
@Override
|
||||
public void onAutopilotTrajectory(@NonNull List<MessagePad.TrajectoryPoint> items) {
|
||||
Log.d(TAG, "-- onAutopilotTrajectory --: " + (items != null ? items.size() : "0"));
|
||||
// Log.d(TAG, "-- onAutopilotTrajectory --: " + (items != null ? items.size() : "0"));
|
||||
synchronized (queue) {
|
||||
queue.clear();
|
||||
queue.offer(items);
|
||||
@@ -72,18 +72,18 @@ public class MogoRouteOverlayManager implements
|
||||
}
|
||||
int autoPilotState = CallerAutoPilotStatusListenerManager.INSTANCE.getState();
|
||||
boolean isArriveAtStation = CallerAutoPilotStatusListenerManager.INSTANCE.isArriveAtStation();
|
||||
Log.d(TAG, "-- onChassisLocationGCJ02 -- 1 ---" + ":auto-mode:" + autoPilotState + ", isArriveAtStation: " + isArriveAtStation);
|
||||
// Log.d(TAG, "-- onChassisLocationGCJ02 -- 1 ---" + ":auto-mode:" + autoPilotState + ", isArriveAtStation: " + isArriveAtStation);
|
||||
if (isArriveAtStation && autoPilotState != 2) {
|
||||
RouteOverlayDrawer.getInstance().clearMogoRouteOverlay();
|
||||
return;
|
||||
}
|
||||
Log.d(TAG, "-- onChassisLocationGCJ02 -- 2 ---" + "auto-mode:" + autoPilotState + ", isDemoMode:" + FunctionBuildConfig.isDemoMode + ", force:" + FunctionBuildConfig.isForceDrawAutopilotTrajectoryByDebugSettingView);
|
||||
// Log.d(TAG, "-- onChassisLocationGCJ02 -- 2 ---" + "auto-mode:" + autoPilotState + ", isDemoMode:" + FunctionBuildConfig.isDemoMode + ", force:" + FunctionBuildConfig.isForceDrawAutopilotTrajectoryByDebugSettingView);
|
||||
boolean force = FunctionBuildConfig.isForceDrawAutopilotTrajectoryByDebugSettingView || FunctionBuildConfig.isDemoMode && FunctionBuildConfig.isIgnoreConditionsDrawAutopilotTrajectoryData;
|
||||
if (!force && autoPilotState != 2) {
|
||||
RouteOverlayDrawer.getInstance().clearMogoRouteOverlay();
|
||||
return;
|
||||
}
|
||||
Log.d(TAG, "-- onChassisLocationGCJ02 -- 3 ---");
|
||||
// Log.d(TAG, "-- onChassisLocationGCJ02 -- 3 ---");
|
||||
synchronized (queue) {
|
||||
if (!queue.isEmpty()) {
|
||||
List<MessagePad.TrajectoryPoint> items = queue.pollLast();
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
package com.mogo.eagle.core.function.business.routeoverlay;
|
||||
|
||||
import static com.mogo.map.MogoMap.DEFAULT;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.graphics.Color;
|
||||
import android.os.Handler;
|
||||
@@ -197,7 +199,7 @@ public class RouteOverlayDrawer {
|
||||
if (mPolylineOptions == null) {
|
||||
mPolylineOptions = options;
|
||||
}
|
||||
overlayManager.showOrUpdateLine(options);
|
||||
overlayManager.showOrUpdateLine(options,DEFAULT);
|
||||
} else {
|
||||
isExcept = true;
|
||||
}
|
||||
|
||||
@@ -1,43 +0,0 @@
|
||||
package com.mogo.eagle.core.function.impl;
|
||||
|
||||
import android.content.Context;
|
||||
|
||||
import com.alibaba.android.arouter.facade.annotation.Route;
|
||||
import com.mogo.eagle.core.data.constants.MogoServicePaths;
|
||||
import com.mogo.eagle.core.function.api.map.IMogoMapService;
|
||||
import com.mogo.map.MoGoOverlayManager;
|
||||
import com.mogo.map.MogoMapUIController;
|
||||
import com.mogo.map.location.GDLocationClient;
|
||||
import com.mogo.map.location.IMogoGDLocationClient;
|
||||
import com.mogo.map.overlay.IMoGoOverlayManager;
|
||||
import com.mogo.map.uicontroller.IMogoMapUIController;
|
||||
|
||||
/**
|
||||
* @author congtaowang
|
||||
* @since 2019-12-18
|
||||
* <p>
|
||||
* 地图对外地接口
|
||||
*/
|
||||
@Route(path = MogoServicePaths.PATH_SERVICES_MAP)
|
||||
public class MogoMapService implements IMogoMapService {
|
||||
|
||||
|
||||
@Override
|
||||
public IMogoMapUIController getMapUIController() {
|
||||
return MogoMapUIController.getInstance();
|
||||
}
|
||||
|
||||
@Override
|
||||
public IMoGoOverlayManager getOverlayManager() {
|
||||
return MoGoOverlayManager.INSTANCE.overlay();
|
||||
}
|
||||
|
||||
@Override
|
||||
public IMogoGDLocationClient getGDLocationServer(Context context) {
|
||||
return GDLocationClient.getInstance(context);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void init(Context context) {
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
package com.mogo.eagle.core.function.impl
|
||||
|
||||
import android.content.Context
|
||||
import com.alibaba.android.arouter.facade.annotation.Route
|
||||
import com.mogo.map.MoGoOverlayManager.overlay
|
||||
import com.mogo.map.location.GDLocationClient.Companion.gdLocationClient
|
||||
import com.mogo.eagle.core.data.constants.MogoServicePaths
|
||||
import com.mogo.eagle.core.function.api.map.IMogoMapService
|
||||
import com.mogo.map.uicontroller.IMogoMapUIController
|
||||
import com.mogo.map.overlay.IMoGoOverlayManager
|
||||
import com.mogo.map.MogoMap.Companion.mapInstance
|
||||
import com.mogo.map.location.IMogoGDLocationClient
|
||||
|
||||
/**
|
||||
* @author congtaowang
|
||||
* @since 2019-12-18
|
||||
*
|
||||
*
|
||||
* 地图对外地接口,多实例情况下,如果某个业务需要在多个地图上展示,需要业务提供监听接口,各个地图实例监听实现
|
||||
*/
|
||||
@Route(path = MogoServicePaths.PATH_SERVICES_MAP)
|
||||
class MogoMapService : IMogoMapService {
|
||||
|
||||
override fun getMapUIController(mapTag:String): IMogoMapUIController? {
|
||||
return mapInstance.getMogoMap().uiController
|
||||
}
|
||||
|
||||
override fun getOverlayManager(): IMoGoOverlayManager {
|
||||
return overlay()
|
||||
}
|
||||
|
||||
override fun getGDLocationServer(): IMogoGDLocationClient {
|
||||
return gdLocationClient
|
||||
}
|
||||
|
||||
override fun init(context: Context) {}
|
||||
}
|
||||
@@ -11,9 +11,13 @@ import com.mogo.eagle.core.function.api.autopilot.IMoGoChassisLocationWGS84Liste
|
||||
import com.mogo.eagle.core.function.api.setting.IMoGoSkinModeChangeListener
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLamplightListenerManager
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationWGS84ListenerManager
|
||||
import com.mogo.eagle.core.function.call.map.CallerMapUIServiceManager
|
||||
import com.mogo.eagle.core.function.call.setting.CallerSkinModeListenerManager
|
||||
import com.mogo.map.MogoMapView
|
||||
import com.mogo.map.overlay.line.Polyline
|
||||
import com.mogo.map.overlay.point.Point
|
||||
import com.mogo.map.overlay.proxy.line.IMapPolylineOverlay
|
||||
import com.mogo.map.overlay.proxy.point.IMapPointOverlay
|
||||
import com.mogo.map.uicontroller.IMogoMapUIController
|
||||
|
||||
|
||||
class MapBizView(context: Context?, attrs: AttributeSet?) : MogoMapView(context, attrs),
|
||||
@@ -28,7 +32,6 @@ class MapBizView(context: Context?, attrs: AttributeSet?) : MogoMapView(context,
|
||||
super.onCreate(bundle)
|
||||
map?.uiController?.showMyLocation(true)
|
||||
initMapView()
|
||||
|
||||
CallerSkinModeListenerManager.addListener(TAG, this)
|
||||
CallerChassisLocationWGS84ListenerManager.addListener(TAG, 20,this)
|
||||
CallerChassisLamplightListenerManager.addListener(TAG, this)
|
||||
@@ -48,7 +51,7 @@ class MapBizView(context: Context?, attrs: AttributeSet?) : MogoMapView(context,
|
||||
//设置旋转手势是否可用。
|
||||
it.setRotateGesturesEnabled(false)
|
||||
//设置比例尺控件是否可见
|
||||
it.setScaleControlsEnabled(true)
|
||||
it.setScaleControlsEnabled(false)
|
||||
//设置拖拽手势是否可用。
|
||||
it.setScrollGesturesEnabled(true)
|
||||
//设置倾斜手势是否可用。
|
||||
@@ -60,7 +63,19 @@ class MapBizView(context: Context?, attrs: AttributeSet?) : MogoMapView(context,
|
||||
}
|
||||
}
|
||||
|
||||
override fun onSaveInstanceState(outState: Bundle?) {
|
||||
fun getUI(): IMogoMapUIController? {
|
||||
return map?.uiController
|
||||
}
|
||||
|
||||
fun addLine(options:Polyline.Options): IMapPolylineOverlay? {
|
||||
return map?.addLine(options)
|
||||
}
|
||||
|
||||
fun addPoint(options: Point.Options): IMapPointOverlay?{
|
||||
return map?.addPoint(options)
|
||||
}
|
||||
|
||||
override fun onSaveInstanceState(outState: Bundle) {
|
||||
super.onSaveInstanceState(outState)
|
||||
}
|
||||
|
||||
@@ -74,9 +89,9 @@ class MapBizView(context: Context?, attrs: AttributeSet?) : MogoMapView(context,
|
||||
|
||||
override fun onSkinModeChange(skinMode: Int) {
|
||||
if (skinMode == 0) {
|
||||
CallerMapUIServiceManager.getMapUIController()?.stepInVrMode(false)
|
||||
getUI()?.stepInDayMode(false)
|
||||
} else if (skinMode == 1) {
|
||||
CallerMapUIServiceManager.getMapUIController()?.stepInVrMode(true)
|
||||
getUI()?.stepInDayMode(true)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -107,9 +122,9 @@ class MapBizView(context: Context?, attrs: AttributeSet?) : MogoMapView(context,
|
||||
private fun turn(lightNum: Int) {
|
||||
if (currentLevel != lightNum) {
|
||||
when (lightNum) {
|
||||
0 -> CallerMapUIServiceManager.getMapUIController()?.setCarLightsType(0, 500)
|
||||
1 -> CallerMapUIServiceManager.getMapUIController()?.setCarLightsType(1, 500)
|
||||
2 -> CallerMapUIServiceManager.getMapUIController()?.setCarLightsType(2, 500)
|
||||
0 -> getUI()?.setCarLightsType(0, 500)
|
||||
1 -> getUI()?.setCarLightsType(1, 500)
|
||||
2 -> getUI()?.setCarLightsType(2, 500)
|
||||
}
|
||||
currentLevel = lightNum
|
||||
}
|
||||
|
||||
@@ -101,7 +101,7 @@ class HttpDnsStartUp : AndroidStartup<Boolean>() {
|
||||
}
|
||||
|
||||
private fun initGDLoc() {
|
||||
CallerMapUIServiceManager.getGDLocationServer(context!!)?.start()
|
||||
CallerMapUIServiceManager.getGDLocationServer()?.start(context!!)
|
||||
}
|
||||
|
||||
private fun preparePassportEnvironment() {
|
||||
@@ -170,10 +170,10 @@ class HttpDnsStartUp : AndroidStartup<Boolean>() {
|
||||
// 更新
|
||||
httpDnsSimpleLocation = if (
|
||||
mogoLocation.cityCode.isNullOrEmpty() &&
|
||||
!CallerMapUIServiceManager.getGDLocationServer(context!!)?.lastCityCode.isNullOrEmpty()
|
||||
!CallerMapUIServiceManager.getGDLocationServer()?.lastCityCode.isNullOrEmpty()
|
||||
) {
|
||||
SimpleLocation(
|
||||
CallerMapUIServiceManager.getGDLocationServer(context!!)?.lastCityCode
|
||||
CallerMapUIServiceManager.getGDLocationServer()?.lastCityCode
|
||||
?: "010",
|
||||
mogoLocation.latitude,
|
||||
mogoLocation.longitude
|
||||
@@ -354,13 +354,9 @@ class HttpDnsStartUp : AndroidStartup<Boolean>() {
|
||||
})
|
||||
// 开启Socket长链服务
|
||||
val lat =
|
||||
if (location.latitude != 0.0) location.latitude else CallerMapUIServiceManager.getGDLocationServer(
|
||||
context!!
|
||||
)!!.lastLat
|
||||
if (location.latitude != 0.0) location.latitude else CallerMapUIServiceManager.getGDLocationServer()!!.lastLat
|
||||
val lon =
|
||||
if (location.longitude != 0.0) location.longitude else CallerMapUIServiceManager.getGDLocationServer(
|
||||
context!!
|
||||
)!!.lastLon
|
||||
if (location.longitude != 0.0) location.longitude else CallerMapUIServiceManager.getGDLocationServer()!!.lastLon
|
||||
MogoAiCloudSocketManager.getInstance(context)
|
||||
.init(context, sn, DebugConfig.getSocketAppId(), lat, lon)
|
||||
}
|
||||
@@ -381,11 +377,11 @@ class HttpDnsStartUp : AndroidStartup<Boolean>() {
|
||||
map["lat"] =
|
||||
if (CallerChassisLocationGCJ02ListenerManager.getChassisLocationGCJ02().latitude != 0.0)
|
||||
CallerChassisLocationGCJ02ListenerManager.getChassisLocationGCJ02().latitude else
|
||||
CallerMapUIServiceManager.getGDLocationServer(context!!)!!.lastLat
|
||||
CallerMapUIServiceManager.getGDLocationServer()!!.lastLat
|
||||
map["lon"] =
|
||||
if (CallerChassisLocationGCJ02ListenerManager.getChassisLocationGCJ02().longitude != 0.0)
|
||||
CallerChassisLocationGCJ02ListenerManager.getChassisLocationGCJ02().longitude else
|
||||
CallerMapUIServiceManager.getGDLocationServer(context!!)!!.lastLon
|
||||
CallerMapUIServiceManager.getGDLocationServer()!!.lastLon
|
||||
map["reason"] = msg
|
||||
return map
|
||||
}
|
||||
|
||||
@@ -82,6 +82,7 @@ dependencies {
|
||||
implementation rootProject.ext.dependencies.protobuf_java_util
|
||||
|
||||
implementation project(':core:mogo-core-res')
|
||||
api 'com.zhidaoauto.machine:mapdata:1.0.0.3'
|
||||
api project(":libraries:mogo-adas-data")
|
||||
api project(':core:mogo-core-utils')
|
||||
}
|
||||
|
||||
@@ -18,13 +18,13 @@ fun TrafficLightResult.toTrafficLightDetail():MessagePad.TrafficLightDetail{
|
||||
if(this.laneList != null){
|
||||
left.phaseNo = this.laneList.left.phaseNo
|
||||
left.color = this.laneList.left.color
|
||||
left.remain = this.laneList.left.remain
|
||||
left.remain = this.laneList.left.time()
|
||||
mid.phaseNo = this.laneList.mid.phaseNo
|
||||
mid.color = this.laneList.mid.color
|
||||
mid.remain = this.laneList.mid.remain
|
||||
mid.remain = this.laneList.mid.time()
|
||||
right.phaseNo = this.laneList.right.phaseNo
|
||||
right.color = this.laneList.right.color
|
||||
right.remain = this.laneList.right.remain
|
||||
right.remain = this.laneList.right.time()
|
||||
}
|
||||
return trafficLightBuilder.build()
|
||||
}
|
||||
|
||||
@@ -25,13 +25,16 @@ fun TrafficLightStatus.turnRedAtOnce(): Boolean {
|
||||
return isFlashGreen() || isYellow()
|
||||
}
|
||||
|
||||
fun TrafficLightStatus.time():Int{
|
||||
return if(remain.contains("--") || remain.isEmpty()) -1 else remain.toInt()
|
||||
}
|
||||
|
||||
/**
|
||||
* 红绿灯路口具体灯态信息
|
||||
*/
|
||||
data class TrafficLightStatus(
|
||||
val phaseNo: String, //相位编号
|
||||
val color: String, //灯态: 红灯-R,绿灯-G,绿闪-FG,黄-Y,B-黑
|
||||
val remain: Int //倒计时-秒 todo 云端string类型 如果返回 -- 解析异常
|
||||
val remain: String //倒计时-秒 todo 云端string类型 如果返回 -- 解析异常
|
||||
) {
|
||||
|
||||
}
|
||||
@@ -1,51 +1,16 @@
|
||||
package com.mogo.eagle.core.data.constants;
|
||||
|
||||
public
|
||||
/**
|
||||
* @author congtaowang
|
||||
* @since 2020/10/28
|
||||
*
|
||||
* 描述
|
||||
*/
|
||||
class DataTypes {
|
||||
|
||||
/**
|
||||
* 识别感知和云端感知数据,全部标记为Marker融合数据
|
||||
*/
|
||||
public static final String TYPE_MARKER_MERGE = "TYPE_MARKER_MERGE";
|
||||
public class DataTypes {
|
||||
|
||||
/**
|
||||
* adas识别数据,Mock用
|
||||
*/
|
||||
public static final String TYPE_MARKER_ADAS = "TYPE_MARKER_ADAS";
|
||||
|
||||
/**
|
||||
* 云端下发数据,Mock用
|
||||
*/
|
||||
public static final String TYPE_MARKER_CLOUD_DATA = "TYPE_MARKER_CLOUD_DATA";
|
||||
|
||||
/**
|
||||
* 云端下发识别目标物警告数据
|
||||
*/
|
||||
public static final String TYPE_MARKER_CLOUD_WARN_DATA = "TYPE_MARKER_CLOUD_WARN_DATA";
|
||||
|
||||
/**
|
||||
* 云端下发停止线数据
|
||||
*/
|
||||
public static final String TYPE_MARKER_CLOUD_STOP_LINE_DATA = "TYPE_MARKER_CLOUD_STOP_LINE_DATA";
|
||||
|
||||
/**
|
||||
* Push 事件场景 VR
|
||||
*/
|
||||
public static final String TYPE_MARKER_PUSH_DATA = "TYPE_MARKER_PUSH_DATA";
|
||||
|
||||
/**
|
||||
*OBU 识别的交通元素
|
||||
*/
|
||||
public static final String TYPE_MARKER_OBU_DATA = "TYPE_MARKER_OBU_DATA";
|
||||
|
||||
/**
|
||||
* 道路事件预警 水滴状道路事件类型替换为3D模型
|
||||
*/
|
||||
public static final String TYPE_MARKER_ROAD_WARNING_TYPE = "TYPE_MARKER_ROAD_WARNING_TYPE";
|
||||
}
|
||||
|
||||
@@ -1,9 +0,0 @@
|
||||
package com.mogo.eagle.core.data.constants;
|
||||
|
||||
/**
|
||||
* 数据库常量
|
||||
*/
|
||||
public class RoomConstants {
|
||||
public static final String DB_NAME_V2X = "MoGoScenario.db";
|
||||
public static final String TB_NAME_SCENARIO = "tb_travel_scenario";
|
||||
}
|
||||
@@ -102,6 +102,7 @@ class ChainConstant {
|
||||
const val CHAIN_CODE_V2X_MSG = "CHAIN_CODE_V2X_MSG"
|
||||
const val CHAIN_CODE_MSG_BOX = "CHAIN_CODE_MSG_BOX"
|
||||
const val CHAIN_CODE_HD_MAP_CALL = "CHAIN_CODE_HD_MAP_CALL"
|
||||
const val CHAIN_CODE_HD_MAP_ROAD_CROSS = "CHAIN_CODE_HD_MAP_ROAD_CROSS"
|
||||
const val CHAIN_CODE_HMI_ACTIONS = "CHAIN_CODE_HMI_ACTIONS"
|
||||
|
||||
//operation by user
|
||||
|
||||
@@ -1,19 +0,0 @@
|
||||
package com.mogo.eagle.core.data.map
|
||||
|
||||
|
||||
/**
|
||||
* 道路中心经纬度集合
|
||||
*/
|
||||
class CenterLine {
|
||||
var id = "" //id
|
||||
var tile_id = "" //瓦片id
|
||||
var road_id = ""//道路id
|
||||
var lane_id = ""//车道id
|
||||
var points: ArrayList<LonLatPoint>? = null//道路经纬度
|
||||
var angle: Double? = 0.0//车道线id
|
||||
override fun toString(): String {
|
||||
return "CenterLine(id='$id', tile_id='$tile_id', road_id='$road_id', lane_id='$lane_id', points=$points, angle=$angle)"
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -1,111 +0,0 @@
|
||||
package com.mogo.eagle.core.data.map;
|
||||
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
public class LonLatPoint implements Serializable {
|
||||
|
||||
private double longitude;
|
||||
private double latitude;
|
||||
private double altitude;
|
||||
private int duration;
|
||||
private double angle = 0;
|
||||
private String provider;
|
||||
private double distance;
|
||||
private double speed;
|
||||
|
||||
public LonLatPoint() {
|
||||
}
|
||||
|
||||
public LonLatPoint(double longitude, double latitude) {
|
||||
this.longitude = longitude;
|
||||
this.latitude = latitude;
|
||||
}
|
||||
|
||||
public LonLatPoint(double longitude, double latitude, double angle) {
|
||||
this.longitude = longitude;
|
||||
this.latitude = latitude;
|
||||
this.angle = angle;
|
||||
}
|
||||
|
||||
public LonLatPoint(double longitude, double latitude, double altitude, double angle) {
|
||||
this.longitude = longitude;
|
||||
this.latitude = latitude;
|
||||
this.altitude = altitude;
|
||||
this.angle = angle;
|
||||
}
|
||||
|
||||
public String getProvider() {
|
||||
return provider;
|
||||
}
|
||||
|
||||
public void setProvider(String provider) {
|
||||
this.provider = provider;
|
||||
}
|
||||
|
||||
public int getDuration() {
|
||||
return duration;
|
||||
}
|
||||
|
||||
public void setDuration(int duration) {
|
||||
this.duration = duration;
|
||||
}
|
||||
|
||||
public double getLongitude() {
|
||||
return longitude;
|
||||
}
|
||||
|
||||
public void setLongitude(double longitude) {
|
||||
this.longitude = longitude;
|
||||
}
|
||||
|
||||
public double getLatitude() {
|
||||
return latitude;
|
||||
}
|
||||
|
||||
public void setLatitude(double latitude) {
|
||||
this.latitude = latitude;
|
||||
}
|
||||
|
||||
public double getAltitude() {
|
||||
return altitude;
|
||||
}
|
||||
|
||||
public void setAltitude(double altitude) {
|
||||
this.altitude = altitude;
|
||||
}
|
||||
|
||||
public double getAngle() {
|
||||
return angle;
|
||||
}
|
||||
|
||||
public void setAngle(double angle) {
|
||||
this.angle = angle;
|
||||
}
|
||||
|
||||
public double getDistance() {
|
||||
return distance;
|
||||
}
|
||||
|
||||
public void setDistance(double distance) {
|
||||
this.distance = distance;
|
||||
}
|
||||
|
||||
public double getSpeed() {
|
||||
return speed;
|
||||
}
|
||||
|
||||
public void setSpeed(double speed) {
|
||||
this.speed = speed;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "LonLatPoint{" +
|
||||
"longitude=" + longitude +
|
||||
", latitude=" + latitude +
|
||||
", altitude=" + altitude +
|
||||
", angle=" + angle +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
@@ -1,36 +0,0 @@
|
||||
package com.mogo.eagle.core.data.map
|
||||
|
||||
class MapRoadInfo {
|
||||
|
||||
class StopLine {
|
||||
/**
|
||||
* 停止线的长度
|
||||
*/
|
||||
var distance: Double = 0.0
|
||||
|
||||
/**
|
||||
* 车道ID
|
||||
*/
|
||||
var laneId: List<String>? = null
|
||||
|
||||
/**
|
||||
* 停止线上的点
|
||||
*/
|
||||
var points: List<MogoLatLng> = emptyList()
|
||||
|
||||
/**
|
||||
* 道路ID
|
||||
*/
|
||||
var roadId: List<String>? = null
|
||||
|
||||
/**
|
||||
* 瓦片ID
|
||||
*/
|
||||
var tieId: String = ""
|
||||
|
||||
/**
|
||||
* 自车到停止线的距离
|
||||
*/
|
||||
var distanceOfCarToStopLine: Double = 0.0
|
||||
}
|
||||
}
|
||||
@@ -1,97 +0,0 @@
|
||||
package com.mogo.eagle.core.data.map;
|
||||
|
||||
/**
|
||||
* poi信息封装
|
||||
*
|
||||
* @author tongchenfei
|
||||
*/
|
||||
public class PoiWrapper {
|
||||
private int id;
|
||||
private String poiType;
|
||||
private int iconRes;
|
||||
private int iconInfoRes;
|
||||
private String iconUrl = "";
|
||||
// "https://yycp-static-1255510688.cos.ap-beijing.myqcloud.com/defaultUserHeadImg/VN000012.jpg";
|
||||
private String iconInfoUrl = "";
|
||||
// "http://yycp-static-1255510688.cos.ap-beijing.myqcloud.com/sso-server-image/1596705960869.png";
|
||||
private String title = "拥堵";
|
||||
|
||||
public PoiWrapper(){
|
||||
|
||||
}
|
||||
|
||||
public PoiWrapper(String poiType, int iconRes, int iconInfoRes, String title) {
|
||||
this.poiType = poiType;
|
||||
this.iconRes = iconRes;
|
||||
this.iconInfoRes = iconInfoRes;
|
||||
this.title = title;
|
||||
}
|
||||
|
||||
public int getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(int id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getPoiType() {
|
||||
return poiType;
|
||||
}
|
||||
|
||||
public void setPoiType(String poiType) {
|
||||
this.poiType = poiType;
|
||||
}
|
||||
|
||||
public int getIconRes() {
|
||||
return iconRes;
|
||||
}
|
||||
|
||||
public void setIconRes(int iconRes) {
|
||||
this.iconRes = iconRes;
|
||||
}
|
||||
|
||||
public String getIconUrl() {
|
||||
return iconUrl;
|
||||
}
|
||||
|
||||
public void setIconUrl(String iconUrl) {
|
||||
this.iconUrl = iconUrl;
|
||||
}
|
||||
|
||||
public String getTitle() {
|
||||
return title;
|
||||
}
|
||||
|
||||
public void setTitle(String title) {
|
||||
this.title = title;
|
||||
}
|
||||
|
||||
public int getIconInfoRes() {
|
||||
return iconInfoRes;
|
||||
}
|
||||
|
||||
public void setIconInfoRes(int iconInfoRes) {
|
||||
this.iconInfoRes = iconInfoRes;
|
||||
}
|
||||
|
||||
public String getIconInfoUrl() {
|
||||
return iconInfoUrl;
|
||||
}
|
||||
|
||||
public void setIconInfoUrl(String iconInfoUrl) {
|
||||
this.iconInfoUrl = iconInfoUrl;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "PoiWrapper{" +
|
||||
"poiType='" + poiType + '\'' +
|
||||
", iconRes=" + iconRes +
|
||||
", iconInfoRes=" + iconInfoRes +
|
||||
", iconUrl='" + iconUrl + '\'' +
|
||||
", iconInfoUrl='" + iconInfoUrl + '\'' +
|
||||
", title='" + title + '\'' +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
@@ -1,41 +0,0 @@
|
||||
|
||||
package com.mogo.eagle.core.data.map.entity;
|
||||
|
||||
|
||||
import android.text.TextUtils;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
public class MarkerActivitiesScope implements Serializable {
|
||||
|
||||
private String content;
|
||||
private boolean isCheck;
|
||||
|
||||
public String getContent() {
|
||||
if (TextUtils.isEmpty(content)) {
|
||||
return "";
|
||||
}
|
||||
return content;
|
||||
}
|
||||
|
||||
public void setContent(String content) {
|
||||
this.content = content;
|
||||
}
|
||||
|
||||
public boolean getIsCheck() {
|
||||
return isCheck;
|
||||
}
|
||||
|
||||
public void setIsCheck(boolean isCheck) {
|
||||
this.isCheck = isCheck;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "MarkerActivitiesScope{" +
|
||||
"content='" + content + '\'' +
|
||||
", isCheck=" + isCheck +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
@@ -1,46 +0,0 @@
|
||||
|
||||
package com.mogo.eagle.core.data.map.entity;
|
||||
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
public class MarkerCarChat implements Serializable {
|
||||
|
||||
private String type;
|
||||
private MarkerLocation location;
|
||||
private MarkerUserInfo userInfo;
|
||||
|
||||
public MarkerLocation getLocation() {
|
||||
return location;
|
||||
}
|
||||
|
||||
public void setLocation(MarkerLocation location) {
|
||||
this.location = location;
|
||||
}
|
||||
|
||||
public String getType() {
|
||||
return type;
|
||||
}
|
||||
|
||||
public void setType(String type) {
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
public MarkerUserInfo getUserInfo() {
|
||||
return userInfo;
|
||||
}
|
||||
|
||||
public void setUserInfo(MarkerUserInfo userInfo) {
|
||||
this.userInfo = userInfo;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "MarkerCarChat{" +
|
||||
"location=" + location +
|
||||
", type='" + type + '\'' +
|
||||
", userInfo=" + userInfo +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
@@ -1,106 +0,0 @@
|
||||
|
||||
package com.mogo.eagle.core.data.map.entity;
|
||||
|
||||
|
||||
import android.text.TextUtils;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
public class MarkerCarInfo implements Serializable {
|
||||
|
||||
private String carBrandLogoUrl;
|
||||
private String carTypeName;
|
||||
private int vehicleType;
|
||||
private CarLiveInfo carLiveInfo;
|
||||
|
||||
public String getCarBrandLogoUrl() {
|
||||
if (TextUtils.isEmpty(carBrandLogoUrl)) {
|
||||
return "";
|
||||
}
|
||||
return carBrandLogoUrl;
|
||||
}
|
||||
|
||||
public void setCarBrandLogoUrl(String carBrandLogoUrl) {
|
||||
this.carBrandLogoUrl = carBrandLogoUrl;
|
||||
}
|
||||
|
||||
public String getCarTypeName() {
|
||||
if (TextUtils.isEmpty(carTypeName)) {
|
||||
return "";
|
||||
}
|
||||
return carTypeName;
|
||||
}
|
||||
|
||||
public void setCarTypeName(String carTypeName) {
|
||||
this.carTypeName = carTypeName;
|
||||
}
|
||||
|
||||
public int getVehicleType() {
|
||||
return vehicleType;
|
||||
}
|
||||
|
||||
public void setVehicleType(int vehicleType) {
|
||||
this.vehicleType = vehicleType;
|
||||
}
|
||||
|
||||
public CarLiveInfo getCarLiveInfo() {
|
||||
return carLiveInfo;
|
||||
}
|
||||
|
||||
public void setCarLiveInfo(CarLiveInfo carLiveInfo) {
|
||||
this.carLiveInfo = carLiveInfo;
|
||||
}
|
||||
|
||||
public static class CarLiveInfo implements Serializable {
|
||||
//rtmp视频直播地址rtmp://
|
||||
private String videoUrl;
|
||||
//直播频道【直播心跳接口参数】C_1
|
||||
private String videoChannel;
|
||||
//直播源sn【直播心跳接口参数】XTCBA90740400625
|
||||
private String videoSn;
|
||||
|
||||
public String getVideoUrl() {
|
||||
return videoUrl;
|
||||
}
|
||||
|
||||
public void setVideoUrl(String videoUrl) {
|
||||
this.videoUrl = videoUrl;
|
||||
}
|
||||
|
||||
public String getVideoChannel() {
|
||||
return videoChannel;
|
||||
}
|
||||
|
||||
public void setVideoChannel(String videoChannel) {
|
||||
this.videoChannel = videoChannel;
|
||||
}
|
||||
|
||||
public String getVideoSn() {
|
||||
return videoSn;
|
||||
}
|
||||
|
||||
public void setVideoSn(String videoSn) {
|
||||
this.videoSn = videoSn;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "CarLiveInfo{" +
|
||||
"videoUrl='" + videoUrl + '\'' +
|
||||
", videoChannel='" + videoChannel + '\'' +
|
||||
", videoSn='" + videoSn + '\'' +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "MarkerCarInfo{" +
|
||||
"carBrandLogoUrl='" + carBrandLogoUrl + '\'' +
|
||||
", carTypeName='" + carTypeName + '\'' +
|
||||
", vehicleType=" + vehicleType +
|
||||
", carLiveInfo=" + carLiveInfo +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
@@ -1,43 +0,0 @@
|
||||
package com.mogo.eagle.core.data.map.entity;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Created by ihoudf on 2020-04-16.
|
||||
**/
|
||||
public class MarkerCarPois {
|
||||
|
||||
private List coordinates;
|
||||
private double angle; // 车头角度
|
||||
private String adcode;
|
||||
|
||||
public List getCoordinates() {
|
||||
return coordinates;
|
||||
}
|
||||
|
||||
public void setCoordinates(List coordinates) {
|
||||
this.coordinates = coordinates;
|
||||
}
|
||||
|
||||
public double getAngle() {
|
||||
return angle;
|
||||
}
|
||||
|
||||
public void setAngle(double angle) {
|
||||
this.angle = angle;
|
||||
}
|
||||
|
||||
public String getAdcode() {
|
||||
return adcode;
|
||||
}
|
||||
|
||||
public void setAdcode(String adcode) {
|
||||
this.adcode = adcode;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "MarkerCarPois{" + "coordinates=" + coordinates + ", angle=" + angle + ", adcode" +
|
||||
"='" + adcode + '\'' + '}';
|
||||
}
|
||||
}
|
||||
@@ -1,75 +0,0 @@
|
||||
|
||||
package com.mogo.eagle.core.data.map.entity;
|
||||
|
||||
import com.mogo.eagle.core.data.BaseData;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
public class MarkerCardResult extends BaseData {
|
||||
|
||||
private List<String> dataType; // 要查询的类型
|
||||
private List<MarkerCarChat> carChat;
|
||||
private List<MarkerShareMusic> shareMusic;
|
||||
private List<MarkerNoveltyInfo> noveltyInfo;
|
||||
|
||||
private List<MarkerOnlineCar> onlineCar;
|
||||
private List<MarkerExploreWay> exploreWay;
|
||||
private long messageTime;
|
||||
|
||||
public List<MarkerCarChat> getCarChat() {
|
||||
return carChat;
|
||||
}
|
||||
|
||||
public void setCarChat(List<MarkerCarChat> carChat) {
|
||||
this.carChat = carChat;
|
||||
}
|
||||
|
||||
public List<MarkerExploreWay> getExploreWay() {
|
||||
return exploreWay;
|
||||
}
|
||||
|
||||
public void setExploreWay(List<MarkerExploreWay> exploreWay) {
|
||||
this.exploreWay = exploreWay;
|
||||
}
|
||||
|
||||
public List<MarkerOnlineCar> getOnlineCar() {
|
||||
return onlineCar;
|
||||
}
|
||||
|
||||
public void setOnlineCar(List<MarkerOnlineCar> onlineCar) {
|
||||
this.onlineCar = onlineCar;
|
||||
}
|
||||
|
||||
public List<MarkerShareMusic> getShareMusic() {
|
||||
return shareMusic;
|
||||
}
|
||||
|
||||
public void setShareMusic(List<MarkerShareMusic> shareMusic) {
|
||||
this.shareMusic = shareMusic;
|
||||
}
|
||||
|
||||
public List<MarkerNoveltyInfo> getNoveltyInfo() {
|
||||
return noveltyInfo;
|
||||
}
|
||||
|
||||
public void setNoveltyInfo(List<MarkerNoveltyInfo> noveltyInfo) {
|
||||
this.noveltyInfo = noveltyInfo;
|
||||
}
|
||||
|
||||
public List<String> getDataType() {
|
||||
return dataType;
|
||||
}
|
||||
|
||||
public void setDataType(List<String> dataType) {
|
||||
this.dataType = dataType;
|
||||
}
|
||||
|
||||
public long getMessageTime() {
|
||||
return messageTime;
|
||||
}
|
||||
|
||||
public void setMessageTime(long messageTime) {
|
||||
this.messageTime = messageTime;
|
||||
}
|
||||
}
|
||||
@@ -1,166 +0,0 @@
|
||||
|
||||
package com.mogo.eagle.core.data.map.entity;
|
||||
|
||||
|
||||
import android.text.TextUtils;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
public class MarkerDynamicData implements Serializable {
|
||||
//QQ音乐,懒人听书,乐听头条 2 为书籍听书,3 为新闻,1 为qq音乐
|
||||
private int type;
|
||||
private String mediaId;//qq音乐id,书的bookId
|
||||
//qq音乐url 懒人听书为“”
|
||||
private String mediaUrl;
|
||||
//歌曲名 ,当前播放书名,新闻标题内容
|
||||
private String mediaName;
|
||||
//演唱歌手,当前章节,新闻来源
|
||||
private String mediaSinger;
|
||||
//歌曲封面,书籍封面,新闻预览图
|
||||
private String mediaImg;
|
||||
//音乐类别,类似经典 ,流行只有qq特有
|
||||
private String mediaType;
|
||||
private int maxTime;//音频总时长
|
||||
private String bookInfo;//懒人听书json串
|
||||
//当前播放时长,可以不加,播放进度单独独立出来
|
||||
private int curTime;
|
||||
//是否是本地音频,只有qq音乐
|
||||
private boolean isLocalMedia;//本地
|
||||
//播放模式,顺序,单曲循环,随机
|
||||
private int mediaPlayMode;
|
||||
//1 播放 2 缓冲 0 暂停/停止 -1 播放错误
|
||||
private int playState;
|
||||
|
||||
public String getMediaId() {
|
||||
return mediaId;
|
||||
}
|
||||
|
||||
public void setMediaId(String mediaId) {
|
||||
this.mediaId = mediaId;
|
||||
}
|
||||
|
||||
public String getMediaUrl() {
|
||||
return mediaUrl;
|
||||
}
|
||||
|
||||
public void setMediaUrl(String mediaUrl) {
|
||||
this.mediaUrl = mediaUrl;
|
||||
}
|
||||
|
||||
public int getType() {
|
||||
return type;
|
||||
}
|
||||
|
||||
public void setType(int type) {
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
public int getPlayState() {
|
||||
return playState;
|
||||
}
|
||||
|
||||
public void setPlayState(int playState) {
|
||||
this.playState = playState;
|
||||
}
|
||||
|
||||
public String getMediaName() {
|
||||
if (TextUtils.isEmpty(mediaName)) {
|
||||
return "";
|
||||
}
|
||||
return mediaName;
|
||||
}
|
||||
|
||||
public void setMediaName(String mediaName) {
|
||||
this.mediaName = mediaName;
|
||||
}
|
||||
|
||||
public String getMediaSinger() {
|
||||
if (TextUtils.isEmpty(mediaSinger)) {
|
||||
return "";
|
||||
}
|
||||
return mediaSinger;
|
||||
}
|
||||
|
||||
public void setMediaSinger(String mediaSinger) {
|
||||
this.mediaSinger = mediaSinger;
|
||||
}
|
||||
|
||||
public String getMediaImg() {
|
||||
return mediaImg;
|
||||
}
|
||||
|
||||
public void setMediaImg(String mediaImg) {
|
||||
this.mediaImg = mediaImg;
|
||||
}
|
||||
|
||||
public long getMaxTime() {
|
||||
return maxTime;
|
||||
}
|
||||
|
||||
public void setMaxTime(int maxTime) {
|
||||
this.maxTime = maxTime;
|
||||
}
|
||||
|
||||
public long getCurTime() {
|
||||
return curTime;
|
||||
}
|
||||
|
||||
public void setCurTime(int curTime) {
|
||||
this.curTime = curTime;
|
||||
}
|
||||
|
||||
public String getMediaType() {
|
||||
if (TextUtils.isEmpty(mediaType)) {
|
||||
return "";
|
||||
}
|
||||
return mediaType;
|
||||
}
|
||||
|
||||
public void setMediaType(String mediaType) {
|
||||
this.mediaType = mediaType;
|
||||
}
|
||||
|
||||
public boolean isLocalMedia() {
|
||||
return isLocalMedia;
|
||||
}
|
||||
|
||||
public void setLocalMedia(boolean localMedia) {
|
||||
isLocalMedia = localMedia;
|
||||
}
|
||||
|
||||
public int getMediaPlayMode() {
|
||||
return mediaPlayMode;
|
||||
}
|
||||
|
||||
public void setMediaPlayMode(int mediaPlayMode) {
|
||||
this.mediaPlayMode = mediaPlayMode;
|
||||
}
|
||||
|
||||
public String getBookInfo() {
|
||||
return bookInfo;
|
||||
}
|
||||
|
||||
public void setBookInfo(String bookInfo) {
|
||||
this.bookInfo = bookInfo;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "MarkerDynamicData{" +
|
||||
"type=" + type +
|
||||
", mediaId='" + mediaId + '\'' +
|
||||
", mediaUrl='" + mediaUrl + '\'' +
|
||||
", mediaName='" + mediaName + '\'' +
|
||||
", mediaSinger='" + mediaSinger + '\'' +
|
||||
", mediaImg='" + mediaImg + '\'' +
|
||||
", mediaType='" + mediaType + '\'' +
|
||||
", maxTime=" + maxTime +
|
||||
", bookInfo='" + bookInfo + '\'' +
|
||||
", curTime=" + curTime +
|
||||
", isLocalMedia=" + isLocalMedia +
|
||||
", mediaPlayMode=" + mediaPlayMode +
|
||||
", playState=" + playState +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
@@ -1,71 +0,0 @@
|
||||
package com.mogo.eagle.core.data.map.entity;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* author : donghongyu
|
||||
* e-mail : 1358506549@qq.com
|
||||
* date : 2020-01-1615:12
|
||||
* desc : 爱好
|
||||
* version: 1.0
|
||||
*/
|
||||
public class MarkerHobbyDatum implements Serializable {
|
||||
private List<MarkerOnlineTag> singerTop2; // 最喜欢的两位歌手
|
||||
private List<MarkerOnlineTag> songTypeTop2; // 最喜欢的两种音乐类型
|
||||
private List<MarkerOnlineTag> newsType; // 最喜欢的资讯类型
|
||||
private List<MarkerOnlineTag> listenBookTop2; // 最喜欢听的两本书
|
||||
private List<MarkerOnlineTag> ifSociety; // 是否喜爱社交
|
||||
|
||||
|
||||
public List<MarkerOnlineTag> getSingerTop2() {
|
||||
return singerTop2;
|
||||
}
|
||||
|
||||
public void setSingerTop2(List<MarkerOnlineTag> singerTop2) {
|
||||
this.singerTop2 = singerTop2;
|
||||
}
|
||||
|
||||
public List<MarkerOnlineTag> getSongTypeTop2() {
|
||||
return songTypeTop2;
|
||||
}
|
||||
|
||||
public void setSongTypeTop2(List<MarkerOnlineTag> songTypeTop2) {
|
||||
this.songTypeTop2 = songTypeTop2;
|
||||
}
|
||||
|
||||
public List<MarkerOnlineTag> getNewsType() {
|
||||
return newsType;
|
||||
}
|
||||
|
||||
public void setNewsType(List<MarkerOnlineTag> newsType) {
|
||||
this.newsType = newsType;
|
||||
}
|
||||
|
||||
public List<MarkerOnlineTag> getListenBookTop2() {
|
||||
return listenBookTop2;
|
||||
}
|
||||
|
||||
public void setListenBookTop2(List<MarkerOnlineTag> listenBookTop2) {
|
||||
this.listenBookTop2 = listenBookTop2;
|
||||
}
|
||||
|
||||
public List<MarkerOnlineTag> getIfSociety() {
|
||||
return ifSociety;
|
||||
}
|
||||
|
||||
public void setIfSociety(List<MarkerOnlineTag> ifSociety) {
|
||||
this.ifSociety = ifSociety;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "MarkerHobbyDatum{" +
|
||||
"singerTop2=" + singerTop2 +
|
||||
", songTypeTop2=" + songTypeTop2 +
|
||||
", newsType=" + newsType +
|
||||
", listenBookTop2=" + listenBookTop2 +
|
||||
", ifSociety=" + ifSociety +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
@@ -1,195 +0,0 @@
|
||||
|
||||
package com.mogo.eagle.core.data.map.entity;
|
||||
|
||||
|
||||
/**
|
||||
* 新鲜事儿Marker数据
|
||||
*/
|
||||
public class MarkerNoveltyInfo {
|
||||
private String type;
|
||||
private String sn;
|
||||
private MarkerLocation location;
|
||||
private String poiType;
|
||||
private ContentData contentData;
|
||||
|
||||
public ContentData getContentData() {
|
||||
return contentData;
|
||||
}
|
||||
|
||||
public void setContentData(ContentData contentData) {
|
||||
this.contentData = contentData;
|
||||
}
|
||||
|
||||
public MarkerLocation getLocation() {
|
||||
return location;
|
||||
}
|
||||
|
||||
public void setLocation(MarkerLocation location) {
|
||||
this.location = location;
|
||||
}
|
||||
|
||||
public String getPoiType() {
|
||||
return poiType;
|
||||
}
|
||||
|
||||
public void setPoiType(String poiType) {
|
||||
this.poiType = poiType;
|
||||
}
|
||||
|
||||
public String getType() {
|
||||
return type;
|
||||
}
|
||||
|
||||
public void setType(String type) {
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
public String getSn() {
|
||||
return sn;
|
||||
}
|
||||
|
||||
public void setSn(String sn) {
|
||||
this.sn = sn;
|
||||
}
|
||||
|
||||
public static class ContentData {
|
||||
private String content;
|
||||
private String iconUrl;
|
||||
private String imgUrl;
|
||||
private String infoId;
|
||||
private long likeNum;
|
||||
private String title;
|
||||
private String gasPrices;
|
||||
private boolean displayNavigation;
|
||||
private boolean desplayHost;
|
||||
private boolean fabulous;
|
||||
private String styleType;
|
||||
//上报类型:1-用户上报,2-后台上报 3-三方上报
|
||||
private String uploadType;
|
||||
|
||||
public String getContent() {
|
||||
return content;
|
||||
}
|
||||
|
||||
public void setContent(String content) {
|
||||
this.content = content;
|
||||
}
|
||||
|
||||
public String getIconUrl() {
|
||||
return iconUrl;
|
||||
}
|
||||
|
||||
public void setIconUrl(String iconUrl) {
|
||||
this.iconUrl = iconUrl;
|
||||
}
|
||||
|
||||
public String getImgUrl() {
|
||||
return imgUrl;
|
||||
}
|
||||
|
||||
public void setImgUrl(String imgUrl) {
|
||||
this.imgUrl = imgUrl;
|
||||
}
|
||||
|
||||
public String getInfoId() {
|
||||
return infoId;
|
||||
}
|
||||
|
||||
public void setInfoId(String infoId) {
|
||||
this.infoId = infoId;
|
||||
}
|
||||
|
||||
public long getLikeNum() {
|
||||
return likeNum;
|
||||
}
|
||||
|
||||
public void setLikeNum(long likeNum) {
|
||||
this.likeNum = likeNum;
|
||||
}
|
||||
|
||||
public String getTitle() {
|
||||
return title;
|
||||
}
|
||||
|
||||
public void setTitle(String title) {
|
||||
this.title = title;
|
||||
}
|
||||
|
||||
public boolean isDisplayNavigation() {
|
||||
return displayNavigation;
|
||||
}
|
||||
|
||||
public void setDisplayNavigation(boolean displayNavigation) {
|
||||
this.displayNavigation = displayNavigation;
|
||||
}
|
||||
|
||||
public String getStyleType() {
|
||||
return styleType;
|
||||
}
|
||||
|
||||
public void setStyleType(String styleType) {
|
||||
this.styleType = styleType;
|
||||
}
|
||||
|
||||
public String getGasPrices() {
|
||||
return gasPrices;
|
||||
}
|
||||
|
||||
public void setGasPrices(String gasPrices) {
|
||||
this.gasPrices = gasPrices;
|
||||
}
|
||||
|
||||
public boolean isDesplayHost() {
|
||||
return desplayHost;
|
||||
}
|
||||
|
||||
public void setDesplayHost(boolean desplayHost) {
|
||||
this.desplayHost = desplayHost;
|
||||
}
|
||||
|
||||
public boolean isFabulous() {
|
||||
return fabulous;
|
||||
}
|
||||
|
||||
public void setFabulous(boolean fabulous) {
|
||||
this.fabulous = fabulous;
|
||||
}
|
||||
|
||||
public String getUploadType() {
|
||||
return uploadType;
|
||||
}
|
||||
|
||||
public void setUploadType(String uploadType) {
|
||||
this.uploadType = uploadType;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "ContentData{" +
|
||||
"content='" + content + '\'' +
|
||||
", iconUrl='" + iconUrl + '\'' +
|
||||
", imgUrl='" + imgUrl + '\'' +
|
||||
", infoId='" + infoId + '\'' +
|
||||
", likeNum=" + likeNum +
|
||||
", title='" + title + '\'' +
|
||||
", gasPrices='" + gasPrices + '\'' +
|
||||
", displayNavigation=" + displayNavigation +
|
||||
", desplayHost=" + desplayHost +
|
||||
", fabulous=" + fabulous +
|
||||
", styleType='" + styleType + '\'' +
|
||||
", uploadType='" + uploadType + '\'' +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "MarkerNoveltyInfo{" +
|
||||
"type='" + type + '\'' +
|
||||
", sn='" + sn + '\'' +
|
||||
", location=" + location +
|
||||
", poiType='" + poiType + '\'' +
|
||||
", contentData=" + contentData +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
@@ -1,105 +0,0 @@
|
||||
package com.mogo.eagle.core.data.map.entity;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
public class MarkerOnlineCar implements Serializable {
|
||||
|
||||
private String type;//卡片类型
|
||||
private MarkerLocation location;//所在位置
|
||||
private Boolean isFocus;//isFocus":"0-未关注,1-关注
|
||||
private MarkerUserInfo userInfo;//用户数据
|
||||
private MarkerCarInfo carInfo;//车辆数据
|
||||
private List<MarkerCarPois> pois;//车辆路线
|
||||
private MarkerDynamicData dynamicData;//动态数据
|
||||
private MarkerHobbyDatum hobbyData;//爱好数据集合
|
||||
private List<MarkerActivitiesScope> activitiesScope;//活动范围数据集合
|
||||
private int compatibility;//匹配度
|
||||
|
||||
public String getType() {
|
||||
return type;
|
||||
}
|
||||
|
||||
public void setType(String type) {
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
public MarkerLocation getLocation() {
|
||||
return location;
|
||||
}
|
||||
|
||||
public void setLocation(MarkerLocation location) {
|
||||
this.location = location;
|
||||
}
|
||||
|
||||
public Boolean getFocus() {
|
||||
return isFocus;
|
||||
}
|
||||
|
||||
public void setFocus(Boolean focus) {
|
||||
isFocus = focus;
|
||||
}
|
||||
|
||||
public MarkerUserInfo getUserInfo() {
|
||||
return userInfo;
|
||||
}
|
||||
|
||||
public void setUserInfo(MarkerUserInfo userInfo) {
|
||||
this.userInfo = userInfo;
|
||||
}
|
||||
|
||||
public MarkerCarInfo getCarInfo() {
|
||||
return carInfo;
|
||||
}
|
||||
|
||||
public void setCarInfo(MarkerCarInfo carInfo) {
|
||||
this.carInfo = carInfo;
|
||||
}
|
||||
|
||||
public List<MarkerCarPois> getPois() {
|
||||
return pois;
|
||||
}
|
||||
|
||||
public void setPois(List<MarkerCarPois> pois) {
|
||||
this.pois = pois;
|
||||
}
|
||||
|
||||
public MarkerDynamicData getDynamicData() {
|
||||
return dynamicData;
|
||||
}
|
||||
|
||||
public void setDynamicData(MarkerDynamicData dynamicData) {
|
||||
this.dynamicData = dynamicData;
|
||||
}
|
||||
|
||||
public MarkerHobbyDatum getHobbyData() {
|
||||
return hobbyData;
|
||||
}
|
||||
|
||||
public void setHobbyData(MarkerHobbyDatum hobbyData) {
|
||||
this.hobbyData = hobbyData;
|
||||
}
|
||||
|
||||
public List<MarkerActivitiesScope> getActivitiesScope() {
|
||||
return activitiesScope;
|
||||
}
|
||||
|
||||
public void setActivitiesScope(List<MarkerActivitiesScope> activitiesScope) {
|
||||
this.activitiesScope = activitiesScope;
|
||||
}
|
||||
|
||||
public int getCompatibility() {
|
||||
return compatibility;
|
||||
}
|
||||
|
||||
public void setCompatibility(int compatibility) {
|
||||
this.compatibility = compatibility;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "MarkerOnlineCar{" + "type='" + type + '\'' + ", location=" + location + ", " +
|
||||
"isFocus=" + isFocus + ", userInfo=" + userInfo + ", carInfo=" + carInfo + ", " + "pois=" + pois + ", dynamicData=" + dynamicData + ", hobbyData=" + hobbyData + "," + " activitiesScope=" + activitiesScope + ", compatibility=" + compatibility + '}';
|
||||
}
|
||||
}
|
||||
@@ -1,41 +0,0 @@
|
||||
|
||||
package com.mogo.eagle.core.data.map.entity;
|
||||
|
||||
|
||||
import android.text.TextUtils;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
public class MarkerOnlineTag implements Serializable {
|
||||
|
||||
private String content;
|
||||
private boolean isCheck;
|
||||
|
||||
public String getContent() {
|
||||
if (TextUtils.isEmpty(content)) {
|
||||
return "";
|
||||
}
|
||||
return content;
|
||||
}
|
||||
|
||||
public void setContent(String content) {
|
||||
this.content = content;
|
||||
}
|
||||
|
||||
public boolean getIsCheck() {
|
||||
return isCheck;
|
||||
}
|
||||
|
||||
public void setIsCheck(boolean isCheck) {
|
||||
this.isCheck = isCheck;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "MarkerHobbyDatum{" +
|
||||
"content='" + content + '\'' +
|
||||
", isCheck=" + isCheck +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
@@ -1,54 +0,0 @@
|
||||
|
||||
package com.mogo.eagle.core.data.map.entity;
|
||||
|
||||
|
||||
import com.mogo.eagle.core.data.BaseData;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
public class MarkerResponse extends BaseData implements Serializable {
|
||||
|
||||
// private int code;
|
||||
// private String msg;
|
||||
private MarkerCardResult result;
|
||||
private String sign;
|
||||
|
||||
public int getCode() {
|
||||
return code;
|
||||
}
|
||||
|
||||
public void setCode(int code) {
|
||||
this.code = code;
|
||||
}
|
||||
|
||||
public String getMsg() {
|
||||
return msg;
|
||||
}
|
||||
|
||||
public void setMsg(String msg) {
|
||||
this.msg = msg;
|
||||
}
|
||||
|
||||
public MarkerCardResult getResult() {
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
public void setResult(MarkerCardResult result) {
|
||||
this.result = result;
|
||||
}
|
||||
|
||||
public String getSign() {
|
||||
return sign;
|
||||
}
|
||||
|
||||
public void setSign(String sign) {
|
||||
this.sign = sign;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "MarkerResponse{" + "result=" + result + ", sign='" + sign + '\'' + ", code=" + code + ", msg='" + msg + '\'' + '}';
|
||||
}
|
||||
}
|
||||
@@ -1,155 +0,0 @@
|
||||
|
||||
package com.mogo.eagle.core.data.map.entity;
|
||||
|
||||
|
||||
import android.text.TextUtils;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
public class MarkerShareMusic implements Serializable {
|
||||
|
||||
private String bookInfo;
|
||||
private int id;
|
||||
private int likeNumber;
|
||||
private MarkerLocation location;
|
||||
private String mediaId;
|
||||
private String mediaImg;
|
||||
private String mediaName;
|
||||
private String mediaSinger;
|
||||
private String mediaUrl;
|
||||
private String shareContentText;
|
||||
private int shareType;
|
||||
private String type;
|
||||
private MarkerUserInfo userInfo;
|
||||
|
||||
public String getBookInfo() {
|
||||
return bookInfo;
|
||||
}
|
||||
|
||||
public void setBookInfo(String bookInfo) {
|
||||
this.bookInfo = bookInfo;
|
||||
}
|
||||
|
||||
public int getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(int id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public int getLikeNumber() {
|
||||
return likeNumber;
|
||||
}
|
||||
|
||||
public void setLikeNumber(int likeNumber) {
|
||||
this.likeNumber = likeNumber;
|
||||
}
|
||||
|
||||
public String getMediaId() {
|
||||
return mediaId;
|
||||
}
|
||||
|
||||
public void setMediaId(String mediaId) {
|
||||
this.mediaId = mediaId;
|
||||
}
|
||||
|
||||
public String getMediaImg() {
|
||||
if (TextUtils.isEmpty(mediaImg)) {
|
||||
return "";
|
||||
}
|
||||
return mediaImg;
|
||||
}
|
||||
|
||||
public void setMediaImg(String mediaImg) {
|
||||
this.mediaImg = mediaImg;
|
||||
}
|
||||
|
||||
public String getMediaName() {
|
||||
if (TextUtils.isEmpty(mediaName)) {
|
||||
return "";
|
||||
}
|
||||
return mediaName;
|
||||
}
|
||||
|
||||
public void setMediaName(String mediaName) {
|
||||
this.mediaName = mediaName;
|
||||
}
|
||||
|
||||
public String getMediaSinger() {
|
||||
return mediaSinger;
|
||||
}
|
||||
|
||||
public void setMediaSinger(String mediaSinger) {
|
||||
this.mediaSinger = mediaSinger;
|
||||
}
|
||||
|
||||
public String getMediaUrl() {
|
||||
return mediaUrl;
|
||||
}
|
||||
|
||||
public void setMediaUrl(String mediaUrl) {
|
||||
this.mediaUrl = mediaUrl;
|
||||
}
|
||||
|
||||
public String getShareContentText() {
|
||||
return shareContentText;
|
||||
}
|
||||
|
||||
public void setShareContentText(String shareContentText) {
|
||||
this.shareContentText = shareContentText;
|
||||
}
|
||||
|
||||
public int getShareType() {
|
||||
return shareType;
|
||||
}
|
||||
|
||||
public void setShareType(int shareType) {
|
||||
this.shareType = shareType;
|
||||
}
|
||||
|
||||
public String getType() {
|
||||
return type;
|
||||
}
|
||||
|
||||
public void setType(String type) {
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
public MarkerUserInfo getUserInfo() {
|
||||
return userInfo;
|
||||
}
|
||||
|
||||
public void setUserInfo(MarkerUserInfo userInfo) {
|
||||
this.userInfo = userInfo;
|
||||
}
|
||||
|
||||
public MarkerLocation getLocation() {
|
||||
return location;
|
||||
}
|
||||
|
||||
public void setLocation(MarkerLocation location) {
|
||||
this.location = location;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "MarkerShareMusic{" +
|
||||
"bookInfo='" + bookInfo + '\'' +
|
||||
", id=" + id +
|
||||
", likeNumber=" + likeNumber +
|
||||
", location=" + location +
|
||||
", mediaId='" + mediaId + '\'' +
|
||||
", mediaImg='" + mediaImg + '\'' +
|
||||
", mediaName='" + mediaName + '\'' +
|
||||
", mediaSinger='" + mediaSinger + '\'' +
|
||||
", mediaUrl='" + mediaUrl + '\'' +
|
||||
", shareContentText='" + shareContentText + '\'' +
|
||||
", shareType=" + shareType +
|
||||
", type='" + type + '\'' +
|
||||
", userInfo=" + userInfo +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
@@ -1,120 +0,0 @@
|
||||
package com.mogo.eagle.core.data.map.entity;
|
||||
|
||||
import android.text.TextUtils;
|
||||
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* author : donghongyu
|
||||
* e-mail : 1358506549@qq.com
|
||||
* date : 2020-01-1015:47
|
||||
* desc : 用来跟Marker View 绑定使用,内容、状态等设置
|
||||
* version: 1.0
|
||||
*/
|
||||
public class MarkerShowEntity {
|
||||
|
||||
// false - 没选中,true - 选中
|
||||
private boolean isChecked;
|
||||
// false - 非高亮,true - 高亮
|
||||
private boolean isHighlighted;
|
||||
// icon 地址,例如:头像,唱片图片,探路缩略,可能为空展示默认图
|
||||
private String iconUrl;
|
||||
// 要展示的文本
|
||||
private String textContent;
|
||||
// Marker 类型
|
||||
private String markerType;
|
||||
// 绑定 MarkerView 的数据
|
||||
private Object bindObj;
|
||||
//Marker 经纬度位置信息
|
||||
private MarkerLocation markerLocation;
|
||||
|
||||
public boolean isChecked() {
|
||||
return isChecked;
|
||||
}
|
||||
|
||||
public void setChecked(boolean checked) {
|
||||
isChecked = checked;
|
||||
}
|
||||
|
||||
public boolean isHighlighted() {
|
||||
return isHighlighted;
|
||||
}
|
||||
|
||||
public void setHighlighted(boolean highlighted) {
|
||||
isHighlighted = highlighted;
|
||||
}
|
||||
|
||||
public String getIconUrl() {
|
||||
return iconUrl;
|
||||
}
|
||||
|
||||
public void setIconUrl(String iconUrl) {
|
||||
this.iconUrl = iconUrl;
|
||||
}
|
||||
|
||||
public String getTextContent() {
|
||||
if (TextUtils.isEmpty(textContent)) {
|
||||
return "";
|
||||
}
|
||||
return textContent;
|
||||
}
|
||||
|
||||
public void setTextContent(String textContent) {
|
||||
this.textContent = textContent;
|
||||
}
|
||||
|
||||
public String getMarkerType() {
|
||||
return markerType;
|
||||
}
|
||||
|
||||
public void setMarkerType(String markerType) {
|
||||
this.markerType = markerType;
|
||||
}
|
||||
|
||||
public Object getBindObj() {
|
||||
return bindObj;
|
||||
}
|
||||
|
||||
public void setBindObj(Object bindObj) {
|
||||
this.bindObj = bindObj;
|
||||
}
|
||||
|
||||
public MarkerLocation getMarkerLocation() {
|
||||
return markerLocation;
|
||||
}
|
||||
|
||||
public void setMarkerLocation(MarkerLocation markerLocation) {
|
||||
this.markerLocation = markerLocation;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
if (this == o) return true;
|
||||
if (o == null || getClass() != o.getClass()) return false;
|
||||
MarkerShowEntity that = (MarkerShowEntity) o;
|
||||
return Objects.equals(iconUrl, that.iconUrl) &&
|
||||
Objects.equals(textContent, that.textContent) &&
|
||||
Objects.equals(markerType, that.markerType) &&
|
||||
Objects.equals(bindObj, that.bindObj) &&
|
||||
Objects.equals(markerLocation, that.markerLocation);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(iconUrl, textContent, markerType, bindObj, markerLocation);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "MarkerShowEntity{" +
|
||||
"isChecked=" + isChecked +
|
||||
", isHighlighted=" + isHighlighted +
|
||||
", iconUrl='" + iconUrl + '\'' +
|
||||
", textContent='" + textContent + '\'' +
|
||||
", markerType='" + markerType + '\'' +
|
||||
", bindObj=" + bindObj +
|
||||
", markerLocation=" + markerLocation +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
@@ -1,51 +0,0 @@
|
||||
package com.mogo.eagle.core.data.map.entity;
|
||||
|
||||
import com.mogo.utils.sqlite.annotation.DbDatabase;
|
||||
import com.mogo.utils.sqlite.annotation.DbField;
|
||||
import com.mogo.utils.sqlite.annotation.DbTable;
|
||||
|
||||
/**
|
||||
* V2X 被点赞的事件
|
||||
*
|
||||
* @author donghongyu
|
||||
*/
|
||||
@DbDatabase(dbName = "MoGoScenario.db")
|
||||
@DbTable(tableName = "tb_event_zan")
|
||||
public class V2XEventZanData {
|
||||
|
||||
/**
|
||||
* 事件ID
|
||||
*/
|
||||
@DbField(fieldName = "eventId")
|
||||
public String eventId;
|
||||
|
||||
/**
|
||||
* 触发时间
|
||||
*/
|
||||
@DbField(fieldName = "triggerTime")
|
||||
public Long triggerTime;
|
||||
|
||||
public String getEventId() {
|
||||
return eventId;
|
||||
}
|
||||
|
||||
public void setEventId(String eventId) {
|
||||
this.eventId = eventId;
|
||||
}
|
||||
|
||||
public Long getTriggerTime() {
|
||||
return triggerTime;
|
||||
}
|
||||
|
||||
public void setTriggerTime(Long triggerTime) {
|
||||
this.triggerTime = triggerTime;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "V2XEventZanData{" +
|
||||
"eventId=" + eventId +
|
||||
", triggerTime=" + triggerTime +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
@@ -1,97 +0,0 @@
|
||||
package com.mogo.eagle.core.data.map.entity;
|
||||
|
||||
import com.mogo.eagle.core.data.constants.RoomConstants;
|
||||
import com.mogo.utils.sqlite.annotation.DbDatabase;
|
||||
import com.mogo.utils.sqlite.annotation.DbField;
|
||||
import com.mogo.utils.sqlite.annotation.DbTable;
|
||||
|
||||
/**
|
||||
* V2X 道路历史事件
|
||||
*
|
||||
* @author donghongyu
|
||||
*/
|
||||
@DbDatabase(dbName = RoomConstants.DB_NAME_V2X)
|
||||
@DbTable(tableName = RoomConstants.TB_NAME_SCENARIO)
|
||||
public class V2XHistoryScenarioData {
|
||||
|
||||
/**
|
||||
* 事件类型
|
||||
*/
|
||||
@DbField(fieldName = "scenarioType")
|
||||
public Integer scenarioType;
|
||||
|
||||
/**
|
||||
* 事件触发时间
|
||||
*/
|
||||
@DbField(fieldName = "triggerTime")
|
||||
public Long triggerTime;
|
||||
|
||||
/**
|
||||
* 事件json
|
||||
*/
|
||||
@DbField(fieldName = "eventJsonData")
|
||||
public String eventJsonData;
|
||||
|
||||
/**
|
||||
* 事件json HashCode
|
||||
* 只取json中的几个代表性字段,表示唯一性,因为图片地址会经常被改变
|
||||
*/
|
||||
@DbField(fieldName = "eventJsonDataHashCode")
|
||||
public Integer eventJsonDataHashCode;
|
||||
|
||||
/**
|
||||
* 事件是否被处理过了,true-处理过了。false-未处理过
|
||||
*/
|
||||
@DbField(fieldName = "isDispose")
|
||||
public Boolean isDispose;
|
||||
|
||||
public Integer getScenarioType() {
|
||||
return scenarioType;
|
||||
}
|
||||
|
||||
public void setScenarioType(Integer scenarioType) {
|
||||
this.scenarioType = scenarioType;
|
||||
}
|
||||
|
||||
public String getEventJsonData() {
|
||||
return eventJsonData;
|
||||
}
|
||||
|
||||
public void setEventJsonData(String eventJsonData) {
|
||||
this.eventJsonData = eventJsonData;
|
||||
}
|
||||
|
||||
public Long getTriggerTime() {
|
||||
return triggerTime;
|
||||
}
|
||||
|
||||
public void setTriggerTime(Long triggerTime) {
|
||||
this.triggerTime = triggerTime;
|
||||
}
|
||||
|
||||
public Boolean isDispose() {
|
||||
return isDispose;
|
||||
}
|
||||
|
||||
public void setDispose(Boolean dispose) {
|
||||
isDispose = dispose;
|
||||
}
|
||||
|
||||
public Integer getEventJsonDataHashCode() {
|
||||
return eventJsonDataHashCode;
|
||||
}
|
||||
|
||||
public void setEventJsonDataHashCode(Integer eventJsonDataHashCode) {
|
||||
this.eventJsonDataHashCode = eventJsonDataHashCode;
|
||||
}
|
||||
|
||||
@Override
|
||||
public V2XHistoryScenarioData clone() {
|
||||
try {
|
||||
return (V2XHistoryScenarioData) super.clone();
|
||||
} catch (CloneNotSupportedException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return this;
|
||||
}
|
||||
}
|
||||
@@ -1,66 +0,0 @@
|
||||
package com.mogo.eagle.core.data.map.entity;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* 可直播车机基本信息,再通过 /yycp-realtimeLocations/realTimeLocationServer/car/queryNearbyVehicleLiveByLocation/v1
|
||||
* 获取直播信息
|
||||
* @author donghongyu
|
||||
*/
|
||||
public class V2XLiveCarInfoEntity {
|
||||
private String sn;
|
||||
private double lon;
|
||||
private double lat;
|
||||
|
||||
public String getSn() {
|
||||
return sn;
|
||||
}
|
||||
|
||||
public void setSn(String sn) {
|
||||
this.sn = sn;
|
||||
}
|
||||
|
||||
public double getLon() {
|
||||
return lon;
|
||||
}
|
||||
|
||||
public void setLon(double lon) {
|
||||
this.lon = lon;
|
||||
}
|
||||
|
||||
public double getLat() {
|
||||
return lat;
|
||||
}
|
||||
|
||||
public void setLat(double lat) {
|
||||
this.lat = lat;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
if (this == o) {
|
||||
return true;
|
||||
}
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
V2XLiveCarInfoEntity that = (V2XLiveCarInfoEntity) o;
|
||||
return Double.compare(that.lon, lon) == 0 &&
|
||||
Double.compare(that.lat, lat) == 0 &&
|
||||
Objects.equals(sn, that.sn);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(sn, lon, lat);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "V2XLiveCarEntity{" +
|
||||
"sn='" + sn + '\'' +
|
||||
", lon=" + lon +
|
||||
", lat=" + lat +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
@@ -1,87 +0,0 @@
|
||||
package com.mogo.eagle.core.data.v2x;
|
||||
|
||||
import com.mogo.eagle.core.data.map.MogoLatLng;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
||||
/**
|
||||
* @author lixiaopeng
|
||||
* @description
|
||||
* @since 2020/7/29
|
||||
*/
|
||||
public class DrawLineInfo {
|
||||
//报警类型
|
||||
private String type;
|
||||
|
||||
// 起点位置
|
||||
private MogoLatLng startLocation;
|
||||
|
||||
//结束点位置
|
||||
private MogoLatLng endLocation;
|
||||
|
||||
//绘制线的多个点位置
|
||||
private List<MogoLatLng> locations;
|
||||
|
||||
private double heading;
|
||||
|
||||
private float width;
|
||||
|
||||
private boolean hasStopLines;
|
||||
|
||||
public String getType() {
|
||||
return type;
|
||||
}
|
||||
|
||||
public void setType(String type) {
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
public MogoLatLng getStartLocation() {
|
||||
return startLocation;
|
||||
}
|
||||
|
||||
public void setStartLocation(MogoLatLng startLocation) {
|
||||
this.startLocation = startLocation;
|
||||
}
|
||||
|
||||
public MogoLatLng getEndLocation() {
|
||||
return endLocation;
|
||||
}
|
||||
|
||||
public void setEndLocation(MogoLatLng endLocation) {
|
||||
this.endLocation = endLocation;
|
||||
}
|
||||
|
||||
public double getHeading() {
|
||||
return heading;
|
||||
}
|
||||
|
||||
public void setHeading(double heading) {
|
||||
this.heading = heading;
|
||||
}
|
||||
|
||||
public float getWidth() {
|
||||
return width;
|
||||
}
|
||||
|
||||
public void setWidth(float width) {
|
||||
this.width = width;
|
||||
}
|
||||
|
||||
public boolean isHasStopLines() {
|
||||
return hasStopLines;
|
||||
}
|
||||
|
||||
public void setHasStopLines(boolean hasStopLines) {
|
||||
this.hasStopLines = hasStopLines;
|
||||
}
|
||||
|
||||
public List<MogoLatLng> getLocations() {
|
||||
return locations;
|
||||
}
|
||||
|
||||
public void setLocations(List<MogoLatLng> locations) {
|
||||
this.locations = locations;
|
||||
}
|
||||
}
|
||||
@@ -1,280 +0,0 @@
|
||||
|
||||
package com.mogo.eagle.core.data.v2x;
|
||||
|
||||
import android.text.TextUtils;
|
||||
|
||||
import com.google.gson.annotations.Expose;
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
import com.mogo.eagle.core.data.BaseData;
|
||||
import com.mogo.eagle.core.data.map.entity.MarkerLocation;
|
||||
import com.mogo.eagle.core.data.map.entity.MarkerOnlineCar;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.ArrayList;
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
public class V2XAlarmEventRes extends BaseData implements Serializable {
|
||||
@Expose
|
||||
private Result result;
|
||||
|
||||
public Result getResult() {
|
||||
return result;
|
||||
}
|
||||
|
||||
public void setResult(Result result) {
|
||||
this.result = result;
|
||||
}
|
||||
|
||||
public class Result {
|
||||
@Expose
|
||||
@SerializedName(value = "recommendInfo", alternate = {"alarmInfo"})
|
||||
private AlarmInfo alarmInfo;
|
||||
@Expose
|
||||
private ArrayList<MarkerOnlineCar> onlineCar;
|
||||
|
||||
public ArrayList<MarkerOnlineCar> getOnlineCar() {
|
||||
return onlineCar;
|
||||
}
|
||||
|
||||
public void setOnlineCar(ArrayList<MarkerOnlineCar> onlineCar) {
|
||||
this.onlineCar = onlineCar;
|
||||
}
|
||||
|
||||
public AlarmInfo getAlarmInfo() {
|
||||
return alarmInfo;
|
||||
}
|
||||
|
||||
public void setAlarmInfo(AlarmInfo alarmInfo) {
|
||||
this.alarmInfo = alarmInfo;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "Result{" +
|
||||
"alarmInfo=" + alarmInfo +
|
||||
", onlineCar=" + onlineCar +
|
||||
'}';
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public static class AlarmInfo {
|
||||
|
||||
@Expose
|
||||
private ContentData contentData;
|
||||
@Expose
|
||||
private Double distance;
|
||||
@Expose
|
||||
private MarkerLocation location;
|
||||
@Expose
|
||||
private String poiType;
|
||||
@Expose
|
||||
private String tts;
|
||||
@Expose
|
||||
private String type;
|
||||
@Expose
|
||||
private String alarmContent;
|
||||
@Expose
|
||||
private int expireTime;
|
||||
@Expose
|
||||
private int parkingSpaceSurplusNum;
|
||||
|
||||
public ContentData getContentData() {
|
||||
return contentData;
|
||||
}
|
||||
|
||||
public void setContentData(ContentData contentData) {
|
||||
this.contentData = contentData;
|
||||
}
|
||||
|
||||
public Double getDistance() {
|
||||
return distance;
|
||||
}
|
||||
|
||||
public void setDistance(Double distance) {
|
||||
this.distance = distance;
|
||||
}
|
||||
|
||||
public MarkerLocation getLocation() {
|
||||
return location;
|
||||
}
|
||||
|
||||
public void setLocation(MarkerLocation location) {
|
||||
this.location = location;
|
||||
}
|
||||
|
||||
public String getPoiType() {
|
||||
if (TextUtils.isEmpty(poiType)) {
|
||||
return "";
|
||||
}
|
||||
return poiType;
|
||||
}
|
||||
|
||||
public void setPoiType(String poiType) {
|
||||
this.poiType = poiType;
|
||||
}
|
||||
|
||||
public String getTts() {
|
||||
if (TextUtils.isEmpty(tts)) {
|
||||
return "";
|
||||
}
|
||||
return tts;
|
||||
}
|
||||
|
||||
public void setTts(String tts) {
|
||||
this.tts = tts;
|
||||
}
|
||||
|
||||
public String getType() {
|
||||
return type;
|
||||
}
|
||||
|
||||
public void setType(String type) {
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
public String getAlarmContent() {
|
||||
return alarmContent;
|
||||
}
|
||||
|
||||
public void setAlarmContent(String alarmContent) {
|
||||
this.alarmContent = alarmContent;
|
||||
}
|
||||
|
||||
public int getExpireTime() {
|
||||
return expireTime;
|
||||
}
|
||||
|
||||
public void setExpireTime(int expireTime) {
|
||||
this.expireTime = expireTime;
|
||||
}
|
||||
|
||||
public int getParkingSpaceSurplusNum() {
|
||||
return parkingSpaceSurplusNum;
|
||||
}
|
||||
|
||||
public void setParkingSpaceSurplusNum(int parkingSpaceSurplusNum) {
|
||||
this.parkingSpaceSurplusNum = parkingSpaceSurplusNum;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "AlarmInfo{" +
|
||||
"contentData=" + contentData +
|
||||
", distance=" + distance +
|
||||
", location=" + location +
|
||||
", poiType='" + poiType + '\'' +
|
||||
", tts='" + tts + '\'' +
|
||||
", type='" + type + '\'' +
|
||||
", alarmContent='" + alarmContent + '\'' +
|
||||
", expireTime=" + expireTime +
|
||||
", parkingSpaceSurplusNum=" + parkingSpaceSurplusNum +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
|
||||
public class ContentData {
|
||||
|
||||
@Expose
|
||||
private String iconUrl;
|
||||
@Expose
|
||||
private String imgUrl;
|
||||
@Expose
|
||||
private String infoId = ""; // POI 唯一标示 「纠错」或「确认」「点赞」使用
|
||||
@Expose
|
||||
private String title;
|
||||
@Expose
|
||||
private String content;
|
||||
@Expose
|
||||
private String gasPrices;//"[{\"gasCode\":\"95\",\"gasPrice\":10.0},{\"gasCode\":\"98\",\"gasPrice\":23.0}]"
|
||||
@Expose
|
||||
private String styleType;// 内容类型,image-图片类型,video-视频类型
|
||||
@Expose
|
||||
private String carSn;// 如果是用户上报的,则需要返回该字段
|
||||
|
||||
public String getIconUrl() {
|
||||
return iconUrl;
|
||||
}
|
||||
|
||||
public void setIconUrl(String iconUrl) {
|
||||
this.iconUrl = iconUrl;
|
||||
}
|
||||
|
||||
public String getImgUrl() {
|
||||
return imgUrl;
|
||||
}
|
||||
|
||||
public void setImgUrl(String imgUrl) {
|
||||
this.imgUrl = imgUrl;
|
||||
}
|
||||
|
||||
public String getInfoId() {
|
||||
return infoId;
|
||||
}
|
||||
|
||||
public void setInfoId(String infoId) {
|
||||
this.infoId = infoId;
|
||||
}
|
||||
|
||||
public String getTitle() {
|
||||
return title;
|
||||
}
|
||||
|
||||
public void setTitle(String title) {
|
||||
this.title = title;
|
||||
}
|
||||
|
||||
public String getContent() {
|
||||
return content;
|
||||
}
|
||||
|
||||
public void setContent(String content) {
|
||||
this.content = content;
|
||||
}
|
||||
|
||||
public String getGasPrices() {
|
||||
return gasPrices;
|
||||
}
|
||||
|
||||
public void setGasPrices(String gasPrices) {
|
||||
this.gasPrices = gasPrices;
|
||||
}
|
||||
|
||||
public String getStyleType() {
|
||||
return styleType;
|
||||
}
|
||||
|
||||
public void setStyleType(String styleType) {
|
||||
this.styleType = styleType;
|
||||
}
|
||||
|
||||
public String getCarSn() {
|
||||
return carSn;
|
||||
}
|
||||
|
||||
public void setCarSn(String carSn) {
|
||||
this.carSn = carSn;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "ContentData{" +
|
||||
"iconUrl='" + iconUrl + '\'' +
|
||||
", imgUrl='" + imgUrl + '\'' +
|
||||
", infoId='" + infoId + '\'' +
|
||||
", title='" + title + '\'' +
|
||||
", content='" + content + '\'' +
|
||||
", gasPrices='" + gasPrices + '\'' +
|
||||
", styleType='" + styleType + '\'' +
|
||||
", carSn='" + carSn + '\'' +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "V2XAlarmEventMessage{" +
|
||||
"result=" + result +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
@@ -51,7 +51,7 @@ class V2XMarkerCardResult: V2XBaseData(), Serializable {
|
||||
var messageTime: Long = 0
|
||||
|
||||
override fun toString(): String {
|
||||
return "MarkerCardResult(dataType=$dataType, carChat=$carChat, shareMusic=$shareMusic, noveltyInfo=$noveltyInfo, onlineCar=$onlineCar, exploreWay=$exploreWay, messageTime=$messageTime)"
|
||||
return "V2XMarkerCardResult(dataType=$dataType, carChat=$carChat, shareMusic=$shareMusic, noveltyInfo=$noveltyInfo, onlineCar=$onlineCar, exploreWay=$exploreWay, messageTime=$messageTime)"
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -8,8 +8,5 @@ import com.zhjt.mogo.adas.data.bean.UnableLaunchReason
|
||||
*/
|
||||
interface IMoGoAutopilotActionsListener {
|
||||
|
||||
/**
|
||||
* pnc actions 决策 驾驶的意图
|
||||
*/
|
||||
fun onAutopilotAbility(isAutopilotAbility: Boolean, unableAutopilotReasons: ArrayList<UnableLaunchReason>?)
|
||||
}
|
||||
@@ -1,13 +1,10 @@
|
||||
package com.mogo.eagle.core.function.api.autopilot
|
||||
|
||||
import com.zhjt.mogo.adas.data.bean.UnableLaunchReason
|
||||
|
||||
|
||||
/**
|
||||
* 平行驾驶能力 能否启动平行驾驶
|
||||
*/
|
||||
interface IMoGoParallelDrivingActionsListener {
|
||||
|
||||
|
||||
fun onParallelDrivingAbility(isParallelDrivingAbility: Boolean, unableParallelDrivingReasons: ArrayList<UnableLaunchReason>?)
|
||||
fun onParallelDrivingAbility(isParallelDrivingAbility: Boolean)
|
||||
}
|
||||
@@ -1,41 +0,0 @@
|
||||
package com.mogo.eagle.core.function.api.map;
|
||||
|
||||
import android.content.Context;
|
||||
|
||||
import com.alibaba.android.arouter.facade.template.IProvider;
|
||||
import com.mogo.map.location.IMogoGDLocationClient;
|
||||
import com.mogo.map.overlay.IMoGoOverlayManager;
|
||||
import com.mogo.map.uicontroller.IMogoMapUIController;
|
||||
|
||||
/**
|
||||
* @author congtaowang
|
||||
* @since 2019-12-18
|
||||
* <p>
|
||||
* 地图对外接口
|
||||
*/
|
||||
public interface IMogoMapService extends IProvider {
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 地图UI控制
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
IMogoMapUIController getMapUIController();
|
||||
|
||||
|
||||
/**
|
||||
* 覆盖物操作
|
||||
* @return
|
||||
*/
|
||||
IMoGoOverlayManager getOverlayManager();
|
||||
|
||||
/**
|
||||
* 获取高德定位服务
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
IMogoGDLocationClient getGDLocationServer(Context context);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
package com.mogo.eagle.core.function.api.map
|
||||
|
||||
import com.alibaba.android.arouter.facade.template.IProvider
|
||||
import com.mogo.map.location.IMogoGDLocationClient
|
||||
import com.mogo.map.overlay.IMoGoOverlayManager
|
||||
import com.mogo.map.uicontroller.IMogoMapUIController
|
||||
|
||||
interface IMogoMapService :IProvider {
|
||||
|
||||
/**
|
||||
* 地图UI控制
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
fun getMapUIController(mapTag:String): IMogoMapUIController?
|
||||
|
||||
/**
|
||||
* 覆盖物操作
|
||||
* @return
|
||||
*/
|
||||
fun getOverlayManager(): IMoGoOverlayManager
|
||||
|
||||
/**
|
||||
* 获取高德定位服务
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
fun getGDLocationServer(): IMogoGDLocationClient
|
||||
}
|
||||
@@ -1,15 +0,0 @@
|
||||
package com.mogo.eagle.core.function.api.map.listener
|
||||
|
||||
/**
|
||||
*@author xiaoyuzhou
|
||||
*@date 2021/10/15 12:18 下午
|
||||
* 地图样式改变回调监听
|
||||
*/
|
||||
interface IMoGoMapStyleChangeListener {
|
||||
|
||||
/**
|
||||
* 地图样式改变回调监听
|
||||
*/
|
||||
fun onMapStyleModeChange(styleMode: Int)
|
||||
|
||||
}
|
||||
@@ -1,42 +0,0 @@
|
||||
package com.mogo.eagle.core.function.api.map.smp;
|
||||
|
||||
import com.mogo.eagle.core.data.map.MogoLatLng;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author donghongyu
|
||||
* @date 12/10/20 1:36 PM
|
||||
*/
|
||||
public interface IMogoSmallMapProvider {
|
||||
|
||||
/**
|
||||
* 显示面板
|
||||
*/
|
||||
void showPanel();
|
||||
|
||||
/**
|
||||
* 隐藏面板
|
||||
*/
|
||||
void hidePanel();
|
||||
|
||||
/**
|
||||
* 绘制路径线
|
||||
*/
|
||||
void drawablePolyline(List<MogoLatLng> coordinates);
|
||||
|
||||
/**
|
||||
* 清除路径线
|
||||
*/
|
||||
void clearPolyline();
|
||||
|
||||
/**
|
||||
* 查询全揽模式下V2X事件
|
||||
*/
|
||||
default void startQueryV2XEvents() {}
|
||||
|
||||
/**
|
||||
* 清除V2X事件
|
||||
*/
|
||||
default void clearV2XMarkers() {}
|
||||
}
|
||||
@@ -20,4 +20,9 @@ interface ISopSettingListener {
|
||||
*/
|
||||
fun onPointCloudClickEvent(status: Boolean){}
|
||||
|
||||
/**
|
||||
* 自车光圈
|
||||
*/
|
||||
fun onCarApertureClickEvent(status: Boolean){}
|
||||
|
||||
}
|
||||
@@ -3,7 +3,6 @@ package com.mogo.eagle.core.function.call.autopilot
|
||||
import android.util.Log
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoParallelDrivingActionsListener
|
||||
import com.mogo.eagle.core.function.call.base.CallerBase
|
||||
import com.zhjt.mogo.adas.data.bean.UnableLaunchReason
|
||||
|
||||
|
||||
/**
|
||||
@@ -14,23 +13,9 @@ object CallerParallelDrivingActionsListenerManager :
|
||||
@Volatile
|
||||
private var isConnected = false
|
||||
private var isParallelDrivingAbility: Boolean = false
|
||||
private var unableParallelDrivingReasons: ArrayList<UnableLaunchReason>? = null
|
||||
|
||||
init {
|
||||
isParallelDrivingAbility = false
|
||||
unableParallelDrivingReasons = disconnectedReason()
|
||||
}
|
||||
|
||||
private fun disconnectedReason(): ArrayList<UnableLaunchReason> {
|
||||
val list = ArrayList<UnableLaunchReason>()
|
||||
list.add(
|
||||
UnableLaunchReason(
|
||||
UnableLaunchReason.SourceType.LIB,
|
||||
UnableLaunchReason.UnableType.DISCONNECTED,
|
||||
"未连接自动驾驶系统"
|
||||
)
|
||||
)
|
||||
return list
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -40,44 +25,19 @@ object CallerParallelDrivingActionsListenerManager :
|
||||
return isParallelDrivingAbility
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取不能启动平行驾驶的原因
|
||||
* null:表示没有任何原因证,证明isParallelDrivingAbility为true
|
||||
*/
|
||||
fun getUnableParallelDrivingReasons(): ArrayList<UnableLaunchReason>? {
|
||||
return unableParallelDrivingReasons
|
||||
}
|
||||
|
||||
fun setConnected(isConnected: Boolean) {
|
||||
if (this.isConnected != isConnected) {
|
||||
this.isConnected = isConnected
|
||||
this.isParallelDrivingAbility = isConnected
|
||||
unableParallelDrivingReasons = if (isConnected) null else disconnectedReason()
|
||||
notification()
|
||||
}
|
||||
}
|
||||
|
||||
@Synchronized
|
||||
fun invokeParallelDrivingAbility(
|
||||
isAutopilotAbility: Boolean, unableAutopilotReasons: ArrayList<UnableLaunchReason>?
|
||||
) {
|
||||
fun invokeParallelDrivingAbility(isAutopilotAbility: Boolean) {
|
||||
if (isConnected) {
|
||||
var isEquals: Boolean = true
|
||||
if (unableAutopilotReasons != null && this.unableParallelDrivingReasons != null) {
|
||||
unableAutopilotReasons.let { onw ->
|
||||
onw.sortWith(compareBy(UnableLaunchReason::hashCode));
|
||||
this.unableParallelDrivingReasons?.let { old ->
|
||||
old.sortWith(compareBy(UnableLaunchReason::hashCode));
|
||||
isEquals = onw.toTypedArray() contentEquals old.toTypedArray()
|
||||
|
||||
}
|
||||
}
|
||||
} else isEquals =
|
||||
!(unableAutopilotReasons != null || this.unableParallelDrivingReasons != null)
|
||||
|
||||
if (this.isParallelDrivingAbility != isAutopilotAbility || !isEquals) {
|
||||
if (this.isParallelDrivingAbility != isAutopilotAbility) {
|
||||
this.isParallelDrivingAbility = isAutopilotAbility
|
||||
this.unableParallelDrivingReasons = unableAutopilotReasons
|
||||
notification()
|
||||
}
|
||||
}
|
||||
@@ -86,13 +46,12 @@ object CallerParallelDrivingActionsListenerManager :
|
||||
private fun notification() {
|
||||
Log.i(
|
||||
"xfk",
|
||||
"是否可以启动平行驾驶=" + isParallelDrivingAbility + if (unableParallelDrivingReasons == null) "" else unableParallelDrivingReasons.toString()
|
||||
"是否可以启动平行驾驶=$isParallelDrivingAbility"
|
||||
)
|
||||
M_LISTENERS.forEach {
|
||||
val listener = it.value
|
||||
listener.onParallelDrivingAbility(
|
||||
isParallelDrivingAbility,
|
||||
unableParallelDrivingReasons
|
||||
isParallelDrivingAbility
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,15 +1,23 @@
|
||||
package com.mogo.eagle.core.function.call.map
|
||||
|
||||
import com.mogo.eagle.core.data.map.MapRoadInfo.StopLine
|
||||
import com.mogo.eagle.core.data.deva.chain.ChainConstant
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_MAP
|
||||
import com.zhidaoauto.map.data.road.RoadCross
|
||||
import com.zhidaoauto.map.data.road.StopLine
|
||||
import com.zhjt.service.chain.ChainLog
|
||||
import java.util.concurrent.ConcurrentHashMap
|
||||
import kotlin.properties.Delegates
|
||||
|
||||
object CallerMapRoadListenerManager {
|
||||
|
||||
interface OnRoadListener {
|
||||
|
||||
fun onRoadIdInfo(roadId: String)
|
||||
fun onRoadIdInfo(roadId: String) {}
|
||||
|
||||
fun onStopLineInfo(info: StopLine)
|
||||
fun onStopLineInfo(info: StopLine) {}
|
||||
|
||||
fun onRoadChange(cross: Boolean) {}
|
||||
}
|
||||
|
||||
private val listeners by lazy {
|
||||
@@ -42,4 +50,27 @@ object CallerMapRoadListenerManager {
|
||||
entry.value.onStopLineInfo(stopLine)
|
||||
}
|
||||
}
|
||||
|
||||
private var mCross: Int by Delegates.observable(-1) { _, oldValue, newValue ->
|
||||
if (oldValue != newValue) {
|
||||
CallerLogger.d("$M_MAP onRoadChange", newValue)
|
||||
listeners.forEach { entry ->
|
||||
when(newValue){
|
||||
1,2 -> entry.value.onRoadChange(false)
|
||||
else -> entry.value.onRoadChange(true)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ChainLog(
|
||||
linkChainLog = ChainConstant.CHAIN_TYPE_HD_MAP,
|
||||
linkCode = ChainConstant.CHAIN_SOURCE_MAP,
|
||||
nodeAliasCode = ChainConstant.CHAIN_CODE_HD_MAP_ROAD_CROSS,
|
||||
paramIndexes = [0, 1]
|
||||
)
|
||||
fun invokeRoadChange(cross: Int, roadCross: RoadCross) {
|
||||
mCross = cross
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,46 +0,0 @@
|
||||
package com.mogo.eagle.core.function.call.map
|
||||
|
||||
import com.mogo.eagle.core.function.api.map.listener.IMoGoMapStyleChangeListener
|
||||
import com.mogo.eagle.core.function.call.base.CallerBase
|
||||
|
||||
/**
|
||||
* @author xiaoyuzhou
|
||||
* @date 2021/9/30 5:48 下午
|
||||
* 地图 样式改变 监听管理
|
||||
*/
|
||||
object CallerMapStyleListenerManager : CallerBase<IMoGoMapStyleChangeListener>() {
|
||||
|
||||
// 记录地图样式
|
||||
private var mMapStyleMode = 0
|
||||
|
||||
/**
|
||||
* 返回当前的地图皮肤
|
||||
*/
|
||||
fun getMapStyleMode(): Int {
|
||||
return mMapStyleMode
|
||||
}
|
||||
|
||||
override fun doSomeAfterAddListener(tag: String, listener: IMoGoMapStyleChangeListener) {
|
||||
listener.onMapStyleModeChange(mMapStyleMode)
|
||||
}
|
||||
|
||||
/**
|
||||
* 触发 地图样式改变 监听
|
||||
*/
|
||||
fun invokeMapStyleChange() {
|
||||
invokeMapStyleChange(mMapStyleMode)
|
||||
}
|
||||
|
||||
/**
|
||||
* 触发 地图样式改变 监听
|
||||
* @param mapStyleMode 选中状态
|
||||
*/
|
||||
fun invokeMapStyleChange(mapStyleMode: Int) {
|
||||
mMapStyleMode = mapStyleMode
|
||||
M_LISTENERS.forEach {
|
||||
val listener = it.value
|
||||
listener.onMapStyleModeChange(mMapStyleMode)
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,11 +1,9 @@
|
||||
package com.mogo.eagle.core.function.call.map
|
||||
|
||||
import android.content.Context
|
||||
import com.mogo.eagle.core.data.constants.MogoServicePaths
|
||||
import com.mogo.eagle.core.data.map.MogoLocation
|
||||
import com.mogo.eagle.core.function.api.map.IMogoMapService
|
||||
import com.mogo.eagle.core.function.call.base.CallerBase
|
||||
import com.mogo.map.hdcache.IHdCacheListener
|
||||
import com.mogo.map.MogoMap.Companion.DEFAULT
|
||||
import com.mogo.map.location.IMogoGDLocationClient
|
||||
import com.mogo.map.overlay.*
|
||||
import com.mogo.map.uicontroller.IMogoMapUIController
|
||||
@@ -18,35 +16,21 @@ object CallerMapUIServiceManager {
|
||||
)
|
||||
}
|
||||
|
||||
fun getMapUIController(): IMogoMapUIController? {
|
||||
return serviceProvider?.mapUIController
|
||||
}
|
||||
|
||||
fun cacheHDDataByCity(listener: IHdCacheListener) {
|
||||
serviceProvider?.mapUIController?.cacheHDDataByCity(listener)
|
||||
}
|
||||
|
||||
fun cacheHDDataByCityByLonLat(listener: IHdCacheListener, location: MogoLocation) {
|
||||
serviceProvider?.mapUIController?.cacheHDDataByCity(listener, location)
|
||||
}
|
||||
|
||||
fun isCityDataCached(): Boolean {
|
||||
return serviceProvider?.mapUIController?.isCityDataCached ?: false
|
||||
//根据需要,以业务回调的方式对地图进行修改,或直接调用 DEFAULT 地图。
|
||||
fun getMapUIController(mapTag:String = DEFAULT): IMogoMapUIController? {
|
||||
return serviceProvider?.getMapUIController(mapTag)
|
||||
}
|
||||
|
||||
fun getOverlayManager(): IMoGoOverlayManager? {
|
||||
return serviceProvider?.overlayManager
|
||||
return serviceProvider?.getOverlayManager()
|
||||
}
|
||||
|
||||
fun getGDLocationServer(context: Context): IMogoGDLocationClient?{
|
||||
return serviceProvider?.getGDLocationServer(context)
|
||||
}
|
||||
|
||||
fun cancelDownloadCacheData() {
|
||||
serviceProvider?.mapUIController?.cancelDownloadCacheData()
|
||||
fun getGDLocationServer(): IMogoGDLocationClient?{
|
||||
return serviceProvider?.getGDLocationServer()
|
||||
}
|
||||
|
||||
fun getCityCode(): String? {
|
||||
return serviceProvider?.mapUIController?.cityCode
|
||||
return serviceProvider?.getGDLocationServer()?.lastCityCode
|
||||
}
|
||||
|
||||
}
|
||||
@@ -7,7 +7,7 @@ import com.mogo.eagle.core.function.api.map.angle.*
|
||||
|
||||
|
||||
/**
|
||||
* 高精地图视角管理类
|
||||
* 高精地图视角管理类,根据业务需要,以业务回调/直接调用地图 ,对地图进行改变
|
||||
*/
|
||||
object CallerVisualAngleManager {
|
||||
|
||||
@@ -21,7 +21,6 @@ object CallerVisualAngleManager {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
fun changeAngle(scene: Scene) {
|
||||
provider?.changeAngle(scene)
|
||||
}
|
||||
|
||||
@@ -38,4 +38,14 @@ object CallerSopSettingManager: CallerBase<ISopSettingListener>() {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 触发自车光圈事件监听
|
||||
*/
|
||||
fun invokeCarApertureListener(status: Boolean){
|
||||
M_LISTENERS.forEach {
|
||||
val listener = it.value
|
||||
listener.onCarApertureClickEvent(status)
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 862 B |
Binary file not shown.
|
Before Width: | Height: | Size: 862 B |
@@ -1,15 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layer-list xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
<!-- 中心背景 -->
|
||||
<item>
|
||||
<shape
|
||||
android:shape="rectangle"
|
||||
android:useLevel="false">
|
||||
<corners android:radius="@dimen/module_hmi_btn_size" />
|
||||
<!-- 实心 -->
|
||||
<solid android:color="@color/color_323C6F" />
|
||||
</shape>
|
||||
</item>
|
||||
|
||||
</layer-list>
|
||||
@@ -964,11 +964,11 @@ final class DiskLruCache implements Closeable {
|
||||
}
|
||||
|
||||
public File getCleanFile(int i) {
|
||||
return new File(directory, key + "" + i);
|
||||
return new File(directory, key + i);
|
||||
}
|
||||
|
||||
public File getDirtyFile(int i) {
|
||||
return new File(directory, key + "" + i + ".tmp");
|
||||
return new File(directory, key + i + ".tmp");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -21,11 +21,12 @@ import java.io.IOException;
|
||||
import java.io.Reader;
|
||||
import java.io.StringWriter;
|
||||
import java.nio.charset.Charset;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
|
||||
/** Junk drawer of utility methods. */
|
||||
final class Util {
|
||||
static final Charset US_ASCII = Charset.forName("US-ASCII");
|
||||
static final Charset UTF_8 = Charset.forName("UTF-8");
|
||||
static final Charset US_ASCII = StandardCharsets.US_ASCII;
|
||||
static final Charset UTF_8 = StandardCharsets.UTF_8;
|
||||
|
||||
private Util() {
|
||||
}
|
||||
|
||||
@@ -22,11 +22,12 @@ import java.io.IOException;
|
||||
import java.io.Reader;
|
||||
import java.io.StringWriter;
|
||||
import java.nio.charset.Charset;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
|
||||
/** Junk drawer of utility methods. */
|
||||
final class CacheUtil {
|
||||
static final Charset US_ASCII = Charset.forName("US-ASCII");
|
||||
static final Charset UTF_8 = Charset.forName("UTF-8");
|
||||
static final Charset US_ASCII = StandardCharsets.US_ASCII;
|
||||
static final Charset UTF_8 = StandardCharsets.UTF_8;
|
||||
|
||||
private CacheUtil() {
|
||||
}
|
||||
|
||||
@@ -665,7 +665,7 @@ public final class DiskLruCache implements Closeable {
|
||||
Matcher matcher = LEGAL_KEY_PATTERN.matcher(key);
|
||||
if (!matcher.matches()) {
|
||||
throw new IllegalArgumentException("keys must match regex "
|
||||
+ STRING_KEY_PATTERN + ": \"" + key + "\"");
|
||||
+ STRING_KEY_PATTERN + ": " + key);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -8,6 +8,9 @@ import java.util.Date;
|
||||
import java.util.Locale;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
/**
|
||||
* thread not safe , recommend to use {@link TimeUtils}
|
||||
*/
|
||||
public class DateTimeUtils {
|
||||
|
||||
public static final int DATETIME_FIELD_REFERSH = 10; // 刷新时间(分钟),
|
||||
|
||||
@@ -23,6 +23,9 @@ import com.mogo.eagle.core.utilcode.constant.TimeConstants;
|
||||
* blog : http://blankj.com
|
||||
* time : 2016/08/02
|
||||
* desc : utils about time
|
||||
*
|
||||
* DateTimeFormatter or ThreadLocal thread safe
|
||||
*
|
||||
* </pre>
|
||||
*/
|
||||
public final class TimeUtils {
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user