Commit 9a5a9c84 authored by p x's avatar p x
Browse files

最后调试一下模拟演示

parent 47aedf2b
......@@ -9,6 +9,8 @@ package com.sd.cavphmi.highmap
* @constructor Create empty Tile json bean
*/
class TileJsonBean {
//联通智网的地图
/* var host: String = MyContants.HOST_MAP
var tiles3d = listOf(
// "/gis_data/3dtiles/road/CurbStrip/tileset.json",
......@@ -40,7 +42,7 @@ class TileJsonBean {
// "/gis_data/3dtiles/vegetation/Tree/tileset.json"//树
)*/
//我本地的
//我本地的轻量化地图,需要用nginx部署在服务器上
var host: String = "http://192.168.60.218"
var tiles3d = listOf(
"/data/avp/01road/tileset.json",
......
......@@ -244,22 +244,22 @@ class MainVm @Inject constructor(
* 联网车辆位姿数据
*/
fun subVehicle(): StateFlow<CarVehicle> {
// if (isMock) {
//// mockVM.subVehicle(carVehicle)
// viewModelScope.launch {
// delay(20000)
// //模拟泊车
// mockVM.onVehicleMockPark(carVehicle, v2xStartBean)
// delay(3000)
// //模拟叫车
// mockVM.onVehicleMockCall(carVehicle, targetPre, v2xStartBean)
// }
// } else {
var url = "${MyContants.HOST}/api/avpweb/hmi/monitor/v1/monitorDrivenStatus"
carCb.url = url
var body = RequestBodyUtil.toRequestBody(mapOf("id" to MyContants.VEHICLEID))
avpDataRepo.getCarPose(url, body, carCb)
// }
if (isMock) {
// mockVM.subVehicle(carVehicle)
viewModelScope.launch {
delay(20000)
//模拟泊车
mockVM.onVehicleMockPark(carVehicle, v2xStartBean)
delay(3000)
//模拟叫车
mockVM.onVehicleMockCall(carVehicle, targetPre, v2xStartBean)
}
} else {
// var url = "${MyContants.HOST}/api/avpweb/hmi/monitor/v1/monitorDrivenStatus"
// carCb.url = url
// var body = RequestBodyUtil.toRequestBody(mapOf("id" to MyContants.VEHICLEID))
// avpDataRepo.getCarPose(url, body, carCb)
}
return carVehicle
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment