[2.13.0-arch-opt] dispatch upload
This commit is contained in:
@@ -41,6 +41,7 @@ class DispatchAutoPilotManager private constructor() :
|
||||
private const val MSG_SOCKET_TYPE = 501000
|
||||
private const val MSG_TYPE_SHOW_DIALOG = 0
|
||||
private const val MSG_TYPE_UPLOAD_AUTOPILOT_STATUS = 1
|
||||
private const val MSG_TYPE_UPLOAD_AUTOPILOT_ROTTING = 2
|
||||
|
||||
val dispatchAutoPilotManager by lazy(LazyThreadSafetyMode.SYNCHRONIZED) {
|
||||
DispatchAutoPilotManager()
|
||||
@@ -68,6 +69,16 @@ class DispatchAutoPilotManager private constructor() :
|
||||
getAutoPilotStatusInfo().reason
|
||||
)
|
||||
sendEmptyMessageDelayed(MSG_TYPE_UPLOAD_AUTOPILOT_STATUS, 1000L)
|
||||
} else if(msg.what == MSG_TYPE_UPLOAD_AUTOPILOT_ROTTING){
|
||||
val data = msg.obj as MessagePad.GlobalPathResp
|
||||
val list: MutableList<AutopilotRouteInfo.RouteModels> = ArrayList()
|
||||
for (location in data.wayPointsList) {
|
||||
val routeModels = AutopilotRouteInfo.RouteModels()
|
||||
routeModels.lat = location.latitude
|
||||
routeModels.lon = location.longitude
|
||||
list.add(routeModels)
|
||||
}
|
||||
dispatchServiceModel.uploadAutopilotRoute(list)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -165,14 +176,10 @@ class DispatchAutoPilotManager private constructor() :
|
||||
if (globalPathResp == null || globalPathResp.wayPointsList.isEmpty()) {
|
||||
return
|
||||
}
|
||||
val list: MutableList<AutopilotRouteInfo.RouteModels> = ArrayList()
|
||||
for (location in globalPathResp.wayPointsList) {
|
||||
val routeModels = AutopilotRouteInfo.RouteModels()
|
||||
routeModels.lat = location.latitude
|
||||
routeModels.lon = location.longitude
|
||||
list.add(routeModels)
|
||||
}
|
||||
dispatchServiceModel.uploadAutopilotRoute(list)
|
||||
val message = Message()
|
||||
message.what = MSG_TYPE_UPLOAD_AUTOPILOT_ROTTING
|
||||
message.obj = globalPathResp
|
||||
handler.sendMessage(message)
|
||||
}
|
||||
|
||||
override fun onAutopilotArriveAtStation(arrivalNotification: MessagePad.ArrivalNotification?) {
|
||||
|
||||
@@ -76,7 +76,7 @@ class DispatchServiceModel private constructor() {
|
||||
fun uploadAutopilotRoute(list: List<RouteModels?>?) {
|
||||
val sn = MoGoAiCloudClientConfig.getInstance().sn
|
||||
val reportedRoute = ReportedRoute(sn, GsonUtil.jsonFromObject(list))
|
||||
val map: MutableMap<String, Any> = HashMap()
|
||||
val map: MutableMap<String, String> = HashMap()
|
||||
map["sn"] = sn
|
||||
map["data"] = GsonUtil.jsonFromObject(reportedRoute)
|
||||
mAdasApiService.uploadAutopilotRoute(map)
|
||||
|
||||
@@ -15,7 +15,7 @@ interface IDispatchAdasApiService {
|
||||
*/
|
||||
@FormUrlEncoded
|
||||
@POST("eagle-eye-dns/eagle-eye-dns/dataService/autoDriver/receiveCarPreSetPath")
|
||||
fun uploadAutopilotRoute(@FieldMap parameters: Map<String, Any>): Observable<BaseData>
|
||||
fun uploadAutopilotRoute(@FieldMap parameters: Map<String, String>): Observable<BaseData>
|
||||
|
||||
/**
|
||||
* 上报自动驾驶调度处理结果 服务于业务调度
|
||||
|
||||
@@ -102,7 +102,6 @@ class IdentifyOriginDataDrawer : Identify {
|
||||
@SuppressLint("NewApi")
|
||||
private fun filterTrafficData(trafficData: List<TrackedObject>): HashMap<String, TrackedObject> {
|
||||
mFilterTrafficData.clear()
|
||||
trafficDataUuidList.clear()
|
||||
for (data in trafficData) {
|
||||
// 过滤掉未知感知数据
|
||||
if (TrackerSourceColorHelper.filterData(data)) {
|
||||
@@ -110,13 +109,12 @@ class IdentifyOriginDataDrawer : Identify {
|
||||
}
|
||||
var temp: TrackedObject = data
|
||||
val uuid = "" + data.uuid
|
||||
//首次过来的数据不添加,首次未添加的感知物在调用完绘制方法后再塞入cache map
|
||||
val cacheData = mMarkersCaches[uuid]
|
||||
if (cacheData != null) {
|
||||
val color = TrackerSourceColorHelper.getDefaultColor(data)
|
||||
temp = data.toBuilder().setColor(color).build()
|
||||
mFilterTrafficData[uuid] = temp
|
||||
}
|
||||
mFilterTrafficData[uuid] = temp
|
||||
mMarkersCaches[uuid] = temp
|
||||
trafficDataUuidList.add(uuid)
|
||||
}
|
||||
|
||||
@@ -2,7 +2,6 @@ package com.mogo.eagle.core.function.business.identify;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.os.Build;
|
||||
import android.util.Log;
|
||||
|
||||
import androidx.annotation.RequiresApi;
|
||||
|
||||
|
||||
@@ -3,7 +3,6 @@ package com.mogo.map;
|
||||
import android.annotation.SuppressLint;
|
||||
import android.content.Context;
|
||||
import android.graphics.Point;
|
||||
import android.util.Log;
|
||||
import android.util.Pair;
|
||||
|
||||
import com.mogo.eagle.core.data.config.FunctionBuildConfig;
|
||||
@@ -126,9 +125,6 @@ public class AMapWrapper implements IMogoMap {
|
||||
MarkerSimpleData markerOptions = ObjectUtils.fromTrafficData(trackedObject);
|
||||
if (markerOptions != null) {
|
||||
markerOptionsArrayList.add(markerOptions);
|
||||
if(markerOptions.id == 65061){
|
||||
Log.i("emArrow","time :" + markerOptions.time + " , lat : " + markerOptions.lat + " , lon : " + markerOptions.lon);
|
||||
}
|
||||
}
|
||||
});
|
||||
long time = markerOptionsArrayList.get(0).getTime();
|
||||
|
||||
Reference in New Issue
Block a user