[6.1.0] fix bug of cross road , spilt the cross and cross change to identify false

This commit is contained in:
zhongchao
2023-09-25 16:57:57 +08:00
parent f4e9144dbe
commit 906f9c29f2
2 changed files with 17 additions and 8 deletions

View File

@@ -51,11 +51,14 @@ object CallerMapRoadListenerManager {
}
}
private var mCross: Boolean by Delegates.observable(false) { _, oldValue, newValue ->
private var mCross: Int by Delegates.observable(-1) { _, oldValue, newValue ->
if (oldValue != newValue) {
CallerLogger.d("$M_MAP onRoadChange", newValue)
listeners.forEach { entry ->
entry.value.onRoadChange(newValue)
when(newValue){
1,2 -> entry.value.onRoadChange(false)
else -> entry.value.onRoadChange(true)
}
}
}
}
@@ -66,7 +69,7 @@ object CallerMapRoadListenerManager {
nodeAliasCode = ChainConstant.CHAIN_CODE_HD_MAP_ROAD_CROSS,
paramIndexes = [0, 1]
)
fun invokeRoadChange(cross: Boolean, roadCross: RoadCross) {
fun invokeRoadChange(cross: Int, roadCross: RoadCross) {
mCross = cross
}