[3.4.0] change the crossid get before traffic light request cross road and adjust time to 1000

This commit is contained in:
zhongchao
2023-08-04 18:48:35 +08:00
parent 5fe8769337
commit be52387aa3
2 changed files with 5 additions and 5 deletions

View File

@@ -58,10 +58,8 @@ class MogoTrafficLightManager : IMoGoChassisLocationGCJ02Listener {
}
firstLoopCrossRoad = false
mLocation?.let { it ->
val tileId = CallerMapUIServiceManager.getMapUIController()
?.getTileId(it.longitude, it.latitude) ?: 0
trafficLightNetWorkModel.requestRoadID(
tileId, it.latitude, it.longitude, it.heading,
it.latitude, it.longitude, it.heading,
{
mThreadHandler?.sendEmptyMessage(MSG_WHAT_STOP_SEARCH_CROSS_ROAD)
roadIDResult = it

View File

@@ -4,6 +4,7 @@ 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
@@ -18,7 +19,6 @@ class TrafficLightNetWorkModel {
}
fun requestRoadID(
tileID: Long,
lat: Double,
lon: Double,
bearing: Double,
@@ -28,8 +28,10 @@ class TrafficLightNetWorkModel {
request<BaseResponse<RoadIDResult>>("requestRoadID") {
loader {
apiCall {
val tileId = CallerMapUIServiceManager.getMapUIController()
?.getTileId(lon, lat) ?: 0
val map = hashMapOf<String, String>()
val roadIDRequestData = RoadIDRequestData(tileID, lat, lon, bearing)
val roadIDRequestData = RoadIDRequestData(tileId, lat, lon, bearing)
map["sn"] = MoGoAiCloudClientConfig.getInstance().sn
map["data"] = GsonUtils.toJson(roadIDRequestData)
getNetWorkApi().getFrontRoadID(map)