From 8f4c942273f87d71fc59d7901aa29a12fb342654 Mon Sep 17 00:00:00 2001 From: zhongchao Date: Mon, 16 Jan 2023 18:28:28 +0800 Subject: [PATCH 1/4] [2.13.2] update map version to fix anim --- gradle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle.properties b/gradle.properties index a18de3eb6b..ee97352165 100644 --- a/gradle.properties +++ b/gradle.properties @@ -85,7 +85,7 @@ MOGO_LOCATION_VERSION=1.4.3.27 MOGO_TELEMATIC_VERSION=1.4.3.27 ######## MogoAiCloudSDK Version ######## # 自研地图 -MAP_SDK_VERSION=2.9.0.14_test_05 +MAP_SDK_VERSION=2.9.0.14_test_06 MAP_SDK_OPERATION_VERSION=1.1.4.1 # websocket WEBSOCKET_VERSION=1.1.7 From 00cdf059fa44980a0ef0cd8833a3d7db5a3d8a18 Mon Sep 17 00:00:00 2001 From: lixiaopeng Date: Mon, 16 Jan 2023 18:30:49 +0800 Subject: [PATCH 2/4] =?UTF-8?q?[2.13.2]=20=E6=B7=BB=E5=8A=A0rsi30s?= =?UTF-8?q?=E9=97=B4=E9=9A=94=EF=BC=8C=E7=BA=A2=E7=BB=BF=E7=81=AF=E8=B7=B3?= =?UTF-8?q?=E5=8F=98=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../obu/mogo/MogoPrivateObuNewManager.kt | 123 +++++++++++------- 1 file changed, 74 insertions(+), 49 deletions(-) diff --git a/core/function-impl/mogo-core-function-obu-mogo/src/main/java/com/mogo/eagle/core/function/obu/mogo/MogoPrivateObuNewManager.kt b/core/function-impl/mogo-core-function-obu-mogo/src/main/java/com/mogo/eagle/core/function/obu/mogo/MogoPrivateObuNewManager.kt index d273114fcb..e56034195f 100644 --- a/core/function-impl/mogo-core-function-obu-mogo/src/main/java/com/mogo/eagle/core/function/obu/mogo/MogoPrivateObuNewManager.kt +++ b/core/function-impl/mogo-core-function-obu-mogo/src/main/java/com/mogo/eagle/core/function/obu/mogo/MogoPrivateObuNewManager.kt @@ -195,11 +195,11 @@ class MogoPrivateObuNewManager private constructor() { appId = data.warningMsg.warningData[0].warningType.toString() status = data.warningMsg.warningData[0].status - //15秒内同一个事件只出现一次 + //30秒内同一个事件只出现一次 if (rvMap.containsKey(appId)) { var oldTime = rvMap[appId] var timeDiff = (System.currentTimeMillis() - oldTime!!) / 1000 - if (timeDiff < 15) { + if (timeDiff < 30) { return } rvMap.remove(appId) @@ -421,11 +421,11 @@ class MogoPrivateObuNewManager private constructor() { } } - //15秒内同一个事件只出现一次 + //30秒内同一个事件只出现一次 if (rsiMap.containsKey(appId)) { var oldTime = rsiMap[appId] var timeDiff = (System.currentTimeMillis() - oldTime!!) / 1000 - if (timeDiff < 15) { + if (timeDiff < 30) { return } rsiMap.remove(appId) @@ -603,11 +603,11 @@ class MogoPrivateObuNewManager private constructor() { when (data.warningMsg.warningData[0].status) { MogoObuConstants.STATUS.ADD -> { // 添加 //更新模型的颜色 - //15秒内同一个事件只出现一次 + //30秒内同一个事件只出现一次 if (rsmMap.containsKey(v2xType)) { var oldTime = rsmMap[v2xType] var timeDiff = (System.currentTimeMillis() - oldTime!!) / 1000 - if (timeDiff < 15) { + if (timeDiff < 30) { return } rsmMap.remove(v2xType) @@ -965,6 +965,7 @@ class MogoPrivateObuNewManager private constructor() { isShowGreenWave = false isShowRunRedLight = false isYellowLight = false + lightCountDownTemp = 0 } } } @@ -975,6 +976,9 @@ class MogoPrivateObuNewManager private constructor() { private var isShowGreenWave = false private var isShowRunRedLight = false + private var lightCountDownTemp : Int = 0 + + /** * 修改红绿灯 */ @@ -1095,64 +1099,85 @@ class MogoPrivateObuNewManager private constructor() { when (currentLight.light) { // 灯光不可用 0 -> { - // CallerHmiManager.showWarningTrafficLight(0, 3) CallerObuTrafficLightListenerManager.invokeObuTrafficLight(0) } // 红灯 2, 3 -> { - if (!isRedLight) { - CallerHmiManager.disableWarningV2X(appId.toString()) - isRedLight = true - } - isGreenLight = false - isYellowLight = false - // CallerHmiManager.showWarningTrafficLight(1, 3) - CallerObuTrafficLightListenerManager.invokeObuTrafficLight(1) - val red = currentLight.countDown.toInt() - CallerHmiManager.changeCountdownRed(red) - Log.d("lixp", " ------- red --------- = $red ----isGreenLight = $isGreenLight") - if (red == 1) { - //延迟3秒 红 绿 黄 - UiThreadHandler.postDelayed({ - if (!isGreenLight) { //如果3s后,没有变绿灯,删除红绿灯显示 - CallerHmiManager.disableWarningTrafficLight() - } - }, 3000) + if (!isGreenLight) { //只有不是是绿灯,才能展示跳转到红灯 + if (!isRedLight) { + CallerHmiManager.disableWarningV2X(appId.toString()) + isRedLight = true + } + isGreenLight = false + isYellowLight = false + CallerObuTrafficLightListenerManager.invokeObuTrafficLight(1) + val red = currentLight.countDown.toInt() + Log.e("lixp", " ----11--- red --------- = $red ----lightCountDownTemp = $lightCountDownTemp ----isGreenLight = $isGreenLight") + //记录当前红灯的上一帧的值 10,9,10 + if (lightCountDownTemp < red) { + return + } + lightCountDownTemp = red + + CallerHmiManager.changeCountdownRed(red) + if (red == 1) { + //延迟3秒 红 绿 黄 + Log.d("lixp", " ----22--- red --------- = $red ----lightCountDownTemp = $lightCountDownTemp ----isGreenLight = $isGreenLight") + UiThreadHandler.postDelayed({ + if (!isGreenLight) { //如果3s后,没有变绿灯,删除红绿灯显示 + CallerHmiManager.disableWarningTrafficLight() + } + }, 3000) + } } } // 绿灯 4, 5, 6 -> { - if (!isGreenLight) { - CallerHmiManager.disableWarningV2X(appId.toString()) - isGreenLight = true - } - isRedLight = false - isYellowLight = false - // CallerHmiManager.showWarningTrafficLight(3, 3) - CallerObuTrafficLightListenerManager.invokeObuTrafficLight(3) - val green = currentLight.countDown.toInt() - CallerHmiManager.changeCountdownGreen(green) - if (green == 1) { - Log.d("lixp", " ------- green --------- = $green ----isYellowLight = $isYellowLight") - UiThreadHandler.postDelayed({ - if (!isYellowLight) { //如果3s后,没有变黄灯,删除红绿灯显示 - CallerHmiManager.disableWarningTrafficLight() - } - }, 3000) + if (!isYellowLight) { //只有不是黄灯的时候,才能跳转到绿灯 + if (!isGreenLight) { + CallerHmiManager.disableWarningV2X(appId.toString()) + isGreenLight = true + } + isRedLight = false + isYellowLight = false + CallerObuTrafficLightListenerManager.invokeObuTrafficLight(3) + val green = currentLight.countDown.toInt() + Log.e("lixp", " ----11--- green --------- = $green ---lightCountDownTemp = $lightCountDownTemp ----isYellowLight = $isYellowLight") + if (lightCountDownTemp < green) { + return + } + lightCountDownTemp = green + + CallerHmiManager.changeCountdownGreen(green) + if (green == 1) { + Log.d("lixp", " ----22--- green --------- = $green ---lightCountDownTemp = $lightCountDownTemp ----isYellowLight = $isYellowLight") + UiThreadHandler.postDelayed({ + if (!isYellowLight) { //如果3s后,没有变黄灯,删除红绿灯显示 + CallerHmiManager.disableWarningTrafficLight() + } + }, 3000) + } } } // 黄灯 7, 8 -> { - if (!isYellowLight) { - isYellowLight = true + if (!isRedLight) { + if (!isYellowLight) { + isYellowLight = true + } + CallerHmiManager.disableWarningV2X(appId.toString()) + CallerObuTrafficLightListenerManager.invokeObuTrafficLight(2) + val yellow = currentLight.countDown.toInt() + Log.d("lixp", " ------- yellow --------- = $yellow ---lightCountDownTemp = $lightCountDownTemp ----isYellowLight = $isYellowLight") + if (lightCountDownTemp < yellow) { + return + } + lightCountDownTemp = yellow + + CallerHmiManager.changeCountdownYellow(yellow) } - CallerHmiManager.disableWarningV2X(appId.toString()) - // CallerHmiManager.showWarningTrafficLight(2, 3) - CallerObuTrafficLightListenerManager.invokeObuTrafficLight(2) - val yellow = currentLight.countDown.toInt() - CallerHmiManager.changeCountdownYellow(yellow) } } } From 1bc335dcf3d8137bd6dcef50592f664b9c367a68 Mon Sep 17 00:00:00 2001 From: lixiaopeng Date: Mon, 16 Jan 2023 18:52:49 +0800 Subject: [PATCH 3/4] [2.13.2] opt --- .../obu/mogo/MogoPrivateObuNewManager.kt | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/core/function-impl/mogo-core-function-obu-mogo/src/main/java/com/mogo/eagle/core/function/obu/mogo/MogoPrivateObuNewManager.kt b/core/function-impl/mogo-core-function-obu-mogo/src/main/java/com/mogo/eagle/core/function/obu/mogo/MogoPrivateObuNewManager.kt index e56034195f..9956595731 100644 --- a/core/function-impl/mogo-core-function-obu-mogo/src/main/java/com/mogo/eagle/core/function/obu/mogo/MogoPrivateObuNewManager.kt +++ b/core/function-impl/mogo-core-function-obu-mogo/src/main/java/com/mogo/eagle/core/function/obu/mogo/MogoPrivateObuNewManager.kt @@ -1114,10 +1114,10 @@ class MogoPrivateObuNewManager private constructor() { val red = currentLight.countDown.toInt() Log.e("lixp", " ----11--- red --------- = $red ----lightCountDownTemp = $lightCountDownTemp ----isGreenLight = $isGreenLight") //记录当前红灯的上一帧的值 10,9,10 - if (lightCountDownTemp < red) { - return - } - lightCountDownTemp = red +// if (lightCountDownTemp < red) { +// return +// } +// lightCountDownTemp = red CallerHmiManager.changeCountdownRed(red) if (red == 1) { @@ -1144,10 +1144,10 @@ class MogoPrivateObuNewManager private constructor() { CallerObuTrafficLightListenerManager.invokeObuTrafficLight(3) val green = currentLight.countDown.toInt() Log.e("lixp", " ----11--- green --------- = $green ---lightCountDownTemp = $lightCountDownTemp ----isYellowLight = $isYellowLight") - if (lightCountDownTemp < green) { - return - } - lightCountDownTemp = green +// if (lightCountDownTemp < green) { +// return +// } +// lightCountDownTemp = green CallerHmiManager.changeCountdownGreen(green) if (green == 1) { @@ -1171,10 +1171,10 @@ class MogoPrivateObuNewManager private constructor() { CallerObuTrafficLightListenerManager.invokeObuTrafficLight(2) val yellow = currentLight.countDown.toInt() Log.d("lixp", " ------- yellow --------- = $yellow ---lightCountDownTemp = $lightCountDownTemp ----isYellowLight = $isYellowLight") - if (lightCountDownTemp < yellow) { - return - } - lightCountDownTemp = yellow +// if (lightCountDownTemp < yellow) { +// return +// } +// lightCountDownTemp = yellow CallerHmiManager.changeCountdownYellow(yellow) } From 4fadeb98f661dc52aadb4b0dec5228dccf5d5be2 Mon Sep 17 00:00:00 2001 From: lixiaopeng Date: Mon, 16 Jan 2023 21:32:28 +0800 Subject: [PATCH 4/4] =?UTF-8?q?[2.13.2]=20=E6=B3=A8=E9=87=8A=E7=BA=A2?= =?UTF-8?q?=E7=BB=BF=E7=81=AF=E8=B7=B3=E5=8F=98=E5=AE=B9=E9=94=99=E6=9C=BA?= =?UTF-8?q?=E5=88=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../obu/mogo/MogoPrivateObuNewManager.kt | 86 +++++++++++-------- 1 file changed, 48 insertions(+), 38 deletions(-) diff --git a/core/function-impl/mogo-core-function-obu-mogo/src/main/java/com/mogo/eagle/core/function/obu/mogo/MogoPrivateObuNewManager.kt b/core/function-impl/mogo-core-function-obu-mogo/src/main/java/com/mogo/eagle/core/function/obu/mogo/MogoPrivateObuNewManager.kt index 9956595731..e22a0d3f7e 100644 --- a/core/function-impl/mogo-core-function-obu-mogo/src/main/java/com/mogo/eagle/core/function/obu/mogo/MogoPrivateObuNewManager.kt +++ b/core/function-impl/mogo-core-function-obu-mogo/src/main/java/com/mogo/eagle/core/function/obu/mogo/MogoPrivateObuNewManager.kt @@ -965,7 +965,9 @@ class MogoPrivateObuNewManager private constructor() { isShowGreenWave = false isShowRunRedLight = false isYellowLight = false - lightCountDownTemp = 0 +// lightCountDownRed = 1 +// lightCountDownGreen = 1 +// lightCountDownYellow = 1 } } } @@ -976,7 +978,9 @@ class MogoPrivateObuNewManager private constructor() { private var isShowGreenWave = false private var isShowRunRedLight = false - private var lightCountDownTemp : Int = 0 +// private var lightCountDownRed : Int = 1 +// private var lightCountDownGreen : Int = 1 +// private var lightCountDownYellow : Int = 1 /** @@ -1103,81 +1107,87 @@ class MogoPrivateObuNewManager private constructor() { } // 红灯 2, 3 -> { - if (!isGreenLight) { //只有不是是绿灯,才能展示跳转到红灯 +// if (!isGreenLight) { //只有不是是绿灯,才能展示跳转到红灯 if (!isRedLight) { CallerHmiManager.disableWarningV2X(appId.toString()) isRedLight = true } isGreenLight = false isYellowLight = false +// lightCountDownYellow = 1 +// lightCountDownGreen = 1 + CallerObuTrafficLightListenerManager.invokeObuTrafficLight(1) val red = currentLight.countDown.toInt() - Log.e("lixp", " ----11--- red --------- = $red ----lightCountDownTemp = $lightCountDownTemp ----isGreenLight = $isGreenLight") - //记录当前红灯的上一帧的值 10,9,10 -// if (lightCountDownTemp < red) { +// Log.e("lixp", " ----11--- red --------- = $red ----lightCountDownRed = $lightCountDownRed ----isGreenLight = $isGreenLight") +// //记录当前红灯的上一帧的值 10,9,10 +// if (lightCountDownRed == 1) { //最后一个灯态是1 +// lightCountDownRed = red +// } +// +// if (lightCountDownRed < red) { //10 9 // return // } -// lightCountDownTemp = red - +// lightCountDownRed = red +// Log.e("lixp", " ----22--- red --------- = $red ----lightCountDownRed = $lightCountDownRed ----isGreenLight = $isGreenLight") CallerHmiManager.changeCountdownRed(red) - if (red == 1) { - //延迟3秒 红 绿 黄 - Log.d("lixp", " ----22--- red --------- = $red ----lightCountDownTemp = $lightCountDownTemp ----isGreenLight = $isGreenLight") - UiThreadHandler.postDelayed({ - if (!isGreenLight) { //如果3s后,没有变绿灯,删除红绿灯显示 - CallerHmiManager.disableWarningTrafficLight() - } - }, 3000) - } - } +// } } // 绿灯 4, 5, 6 -> { - if (!isYellowLight) { //只有不是黄灯的时候,才能跳转到绿灯 +// if (!isYellowLight) { //只有不是黄灯的时候,才能跳转到绿灯 if (!isGreenLight) { CallerHmiManager.disableWarningV2X(appId.toString()) isGreenLight = true } isRedLight = false isYellowLight = false +// lightCountDownRed = 1 +// lightCountDownYellow = 1 + CallerObuTrafficLightListenerManager.invokeObuTrafficLight(3) val green = currentLight.countDown.toInt() - Log.e("lixp", " ----11--- green --------- = $green ---lightCountDownTemp = $lightCountDownTemp ----isYellowLight = $isYellowLight") -// if (lightCountDownTemp < green) { +// Log.e("lixp", " ----11--- green --------- = $green ---lightCountDownGreen = $lightCountDownGreen ----isYellowLight = $isYellowLight") +// if (lightCountDownGreen == 1) { +// lightCountDownGreen = green +// } +// +// if (lightCountDownGreen < green) { // return // } -// lightCountDownTemp = green - +// lightCountDownGreen = green +// Log.d("lixp", " ----22--- green --------- = $green ---lightCountDownGreen = $lightCountDownGreen ----isYellowLight = $isYellowLight") CallerHmiManager.changeCountdownGreen(green) - if (green == 1) { - Log.d("lixp", " ----22--- green --------- = $green ---lightCountDownTemp = $lightCountDownTemp ----isYellowLight = $isYellowLight") - UiThreadHandler.postDelayed({ - if (!isYellowLight) { //如果3s后,没有变黄灯,删除红绿灯显示 - CallerHmiManager.disableWarningTrafficLight() - } - }, 3000) - } - } +// } } // 黄灯 7, 8 -> { - if (!isRedLight) { +// if (!isRedLight) { //黄灯只能跳转绿灯 if (!isYellowLight) { isYellowLight = true } + isRedLight = false + isGreenLight = false +// lightCountDownRed = 1 +// lightCountDownGreen = 1 + CallerHmiManager.disableWarningV2X(appId.toString()) CallerObuTrafficLightListenerManager.invokeObuTrafficLight(2) val yellow = currentLight.countDown.toInt() - Log.d("lixp", " ------- yellow --------- = $yellow ---lightCountDownTemp = $lightCountDownTemp ----isYellowLight = $isYellowLight") -// if (lightCountDownTemp < yellow) { +// Log.e("lixp", " -----11-- yellow --------- = $yellow ---lightCountDownYellow = $lightCountDownYellow ----isYellowLight = $isYellowLight") +// if (lightCountDownYellow == 1) { +// lightCountDownYellow = yellow +// } +// +// if (lightCountDownYellow < yellow) { // return // } -// lightCountDownTemp = yellow - +// lightCountDownYellow = yellow +// Log.d("lixp", " -----22-- yellow --------- = $yellow ---lightCountDownYellow = $lightCountDownYellow ----isYellowLight = $isYellowLight") CallerHmiManager.changeCountdownYellow(yellow) } } - } +// } }