Merge branch 'dev_robotaxi-d_230912_6.1.0' into dev_minibus-d_230919_6.1.0

This commit is contained in:
yangyakun
2023-09-26 11:32:30 +08:00
3 changed files with 21 additions and 17 deletions

View File

@@ -209,7 +209,7 @@ class MainFragment : MvpFragment<MainFragment?, BusPassengerPresenter?>(), IMogo
}
}
fun setCarModle(rawInfo: Int) {
fun setCarModel(rawInfo: Int) {
getMapUIController()?.changeCurrentIcon(rawInfo)
HdMapBuildConfig.currentCarVrIconRes = rawInfo
}

View File

@@ -150,9 +150,6 @@ class MogoTrafficLightManager : IMoGoChassisLocationGCJ02Listener,
private fun outOfCrossRange(){
CallerLogger.d(M_V2X + TAG, "离开路口 , inRange:$inRange")
if(!inRange){
return
}
CallerTrafficLightListenerManager.invokeEnterCrossRoad(false)
inRange = false
trafficLightResult = null

View File

@@ -125,20 +125,20 @@ class MyLocationStyle(
}
@Synchronized
private fun drawCar(bitmap: Bitmap) {
private fun drawCar(bitmap: Bitmap): Boolean {
if (CompileConfig.DEBUG) {
Log.i(TAG, "markerop---selfop--drawCarstart")
}
if (mMarker != null) {
mMarker?.setIcon(bitmap)
return
return true
}
if ((mMapController?.isSurfaceCreated()) == true) {
if (executeFlag.get()) {
return
return false
}
if (mMarker != null) {
return
return false
}
executeFlag.set(true)
val lon = mLonLat.lon
@@ -154,16 +154,19 @@ class MyLocationStyle(
if (CompileConfig.DEBUG) {
Log.i(TAG, "autoop--selfop--markerop--drawCar:${mMarker?.getId()}")
}
return true
} catch (e: Exception) {
mMarker = null
return false
} finally {
executeFlag.set(false)
}
}
return false
}
private fun draw3DCar(resId: Int) {
private fun draw3DCar(resId: Int): Boolean{
if (CompileConfig.DEBUG) {
Log.i(
TAG,
@@ -196,17 +199,17 @@ class MyLocationStyle(
}
carId = resId
return
return true
}
if ((mMapController?.isSurfaceCreated()) ?: false) {
if (CompileConfig.DEBUG) {
Log.i(TAG, "markerop---selfop--draw3DCarstartmapView SurfaceCreated")
}
if (executeFlag.get()) {
return
return false
}
if (mMarker != null) {
return
return false
}
executeFlag.set(true)
val lon = mLonLat.lon
@@ -238,15 +241,18 @@ class MyLocationStyle(
"autoop--selfop--markerop--draw3DCar:${mMarker?.getId()},${resId},${options.getMarkerIconName()}"
)
}
return true
} catch (e: Exception) {
if (CompileConfig.DEBUG) {
Log.e(TAG, "autoop--selfop--markerop--draw3DCar:${mMarker?.getId()}", e)
}
mMarker = null
return false
} finally {
executeFlag.set(false)
}
}
return false
}
fun setLonLat(lonLat: LonLat, angle: Double) {
@@ -339,7 +345,7 @@ class MyLocationStyle(
mMarker?.setScale(scale)
}
fun myLocationIcon(carResId: Int, is3D: Boolean): MyLocationStyle {
fun myLocationIcon(carResId: Int, is3D: Boolean): Boolean {
mMapController?.getClerk()?.add("$is3D,$carResId")
if (CompileConfig.DEBUG) {
Log.i(
@@ -352,22 +358,23 @@ class MyLocationStyle(
this.is3D = is3D
if (is3D) {
this.car3DResId = carResId
draw3DCar(carResId)
return draw3DCar(carResId)
} else {
this.carResId = carResId
val bitmap = BitmapFactory.decodeResource(mContext?.resources, carResId)
carId = carResId
bitmap?.let {
if (this.myLocationIcon != null) {
this.myLocationIcon?.recycle()
this.myLocationIcon = null
}
drawCar(it)
return drawCar(it)
}
carId = carResId
}
}
return this
return false
}
fun myLocationIcon(carResId: Int): MyLocationStyle {