From 5f160b0688796f05700d45e59b601a4a8ecbaf5c Mon Sep 17 00:00:00 2001 From: donghongyu Date: Mon, 23 May 2022 12:49:09 +0800 Subject: [PATCH 1/9] =?UTF-8?q?=E3=80=8CChange=E3=80=8D=20=E7=82=B9?= =?UTF-8?q?=E4=BA=91=E9=AB=98=E7=B2=BE=E5=9C=B0=E5=9B=BE=E9=9B=86=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: donghongyu --- .../autopilot/adapter/MoGoAdasListenerImpl.kt | 6 +- .../eagle/core/function/map/MapFragment.java | 1 + .../function/map/MapPointCloudSubscriber.kt | 48 ++++++++++++ .../IMoGoAutopilotPointCloudListener.kt | 20 +++++ ...allerAutopilotPointCloudListenerManager.kt | 73 +++++++++++++++++++ gradle.properties | 2 +- 6 files changed, 147 insertions(+), 3 deletions(-) create mode 100644 core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/map/MapPointCloudSubscriber.kt create mode 100644 core/mogo-core-function-api/src/main/java/com/mogo/eagle/core/function/api/autopilot/IMoGoAutopilotPointCloudListener.kt create mode 100644 core/mogo-core-function-call/src/main/java/com/mogo/eagle/core/function/call/autopilot/CallerAutopilotPointCloudListenerManager.kt diff --git a/core/function-impl/mogo-core-function-autopilot/src/main/java/com/mogo/eagle/core/function/autopilot/adapter/MoGoAdasListenerImpl.kt b/core/function-impl/mogo-core-function-autopilot/src/main/java/com/mogo/eagle/core/function/autopilot/adapter/MoGoAdasListenerImpl.kt index 58b6a19d99..1ab3f18cc3 100644 --- a/core/function-impl/mogo-core-function-autopilot/src/main/java/com/mogo/eagle/core/function/autopilot/adapter/MoGoAdasListenerImpl.kt +++ b/core/function-impl/mogo-core-function-autopilot/src/main/java/com/mogo/eagle/core/function/autopilot/adapter/MoGoAdasListenerImpl.kt @@ -3,7 +3,6 @@ package com.mogo.eagle.core.function.autopilot.adapter import chassis.VehicleStateOuterClass import com.mogo.eagle.core.data.config.FunctionBuildConfig import com.mogo.eagle.core.data.config.HdMapBuildConfig -import com.mogo.eagle.core.data.deva.chain.ChainConstant import com.mogo.eagle.core.data.deva.chain.ChainConstant.Companion.CHAIN_ALIAS_CODE_ADAS_MESSAGE_AUTOPILOT_ARRIVE import com.mogo.eagle.core.data.deva.chain.ChainConstant.Companion.CHAIN_ALIAS_CODE_ADAS_MESSAGE_AUTOPILOT_GUARDIAN import com.mogo.eagle.core.data.deva.chain.ChainConstant.Companion.CHAIN_ALIAS_CODE_ADAS_MESSAGE_AUTOPILOT_RECORD @@ -33,10 +32,11 @@ import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotCarConfigListe import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotCarStatusListenerManager.invokeAutopilotCarStateData import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotIdentifyListenerManager import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotIdentifyListenerManager.invokeAutopilotIdentifyDataUpdate -import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotRecordListenerManager.invokeAutopilotRecordResult import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotIdentifyListenerManager.invokeAutopilotWarnMessage import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotPlanningListenerManager.invokeAutopilotRotting import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotPlanningListenerManager.invokeAutopilotTrajectory +import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotPointCloudListenerManager +import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotRecordListenerManager.invokeAutopilotRecordResult import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotVehicleStateListenerManager import com.mogo.eagle.core.function.call.map.CallerMapUIServiceManager import com.zhidao.support.adas.high.AdasManager @@ -241,6 +241,8 @@ class MoGoAdasListenerImpl : OnAdasListener { override fun onPointCloud(header: MessagePad.Header?, pointCloud: PointCloud.LidarPointCloud?) { //点云数据透传 + //Logger.d("pointCloud","pointCloud"+pointCloud); + CallerAutopilotPointCloudListenerManager.invokeAutopilotPointCloudDataUpdate(header,pointCloud) } override fun onBasicInfoReq( diff --git a/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/map/MapFragment.java b/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/map/MapFragment.java index d236338a9f..a4dce21da3 100644 --- a/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/map/MapFragment.java +++ b/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/map/MapFragment.java @@ -172,6 +172,7 @@ public class MapFragment extends MvpFragment // TODO 临时初始化地图监听工控机、OBU等数据监听器,用于感知元素绘制 MapIdentifySubscriber.Companion.getInstance(); + MapPointCloudSubscriber.Companion.getInstance(); } @Override diff --git a/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/map/MapPointCloudSubscriber.kt b/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/map/MapPointCloudSubscriber.kt new file mode 100644 index 0000000000..df873ea8ed --- /dev/null +++ b/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/map/MapPointCloudSubscriber.kt @@ -0,0 +1,48 @@ +package com.mogo.eagle.core.function.map + +import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotPointCloudListener +import com.mogo.eagle.core.function.api.base.IMoGoSubscriber +import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotPointCloudListenerManager +import com.mogo.eagle.core.utilcode.mogo.logger.Logger +import com.zhidao.support.adas.high.common.PointCloudDecoder +import com.zhidaoauto.map.sdk.open.business.PointCloudHelper +import mogo.telematics.pad.MessagePad +import rule_segement.PointCloud + +/** + * 订阅点云数据 + * 数据来源:工控机、OBU、云端下发 + * + * @author donghongyu + */ +class MapPointCloudSubscriber private constructor() : IMoGoSubscriber, IMoGoAutopilotPointCloudListener { + + private val TAG = "MapPointCloudSubscriber" + + init { + onCrate() + } + + companion object { + val instance: MapPointCloudSubscriber by lazy(mode = LazyThreadSafetyMode.SYNCHRONIZED) { + MapPointCloudSubscriber() + } + } + + override fun onCrate() { + CallerAutopilotPointCloudListenerManager.addListener(TAG, this) + + } + + override fun onDestroy() { + CallerAutopilotPointCloudListenerManager.removeListener(TAG) + + } + + + override fun onAutopilotPointCloudDataUpdate(header: MessagePad.Header?, pointCloud: PointCloud.LidarPointCloud?) { + val data = PointCloudDecoder.decode(header, pointCloud) + val result = PointCloudHelper.updatePointCloudData(data, false, true, true) + //Logger.d(TAG, "result=$result") + } +} \ No newline at end of file diff --git a/core/mogo-core-function-api/src/main/java/com/mogo/eagle/core/function/api/autopilot/IMoGoAutopilotPointCloudListener.kt b/core/mogo-core-function-api/src/main/java/com/mogo/eagle/core/function/api/autopilot/IMoGoAutopilotPointCloudListener.kt new file mode 100644 index 0000000000..9437bad03a --- /dev/null +++ b/core/mogo-core-function-api/src/main/java/com/mogo/eagle/core/function/api/autopilot/IMoGoAutopilotPointCloudListener.kt @@ -0,0 +1,20 @@ +package com.mogo.eagle.core.function.api.autopilot + +import mogo.telematics.pad.MessagePad +import rule_segement.PointCloud + +/** + * @author xiaoyuzhou + * @date 2021/11/1 5:57 下午 + * 感知识别回调 + */ +interface IMoGoAutopilotPointCloudListener { + + /** + * 点云数据 + * + * @param pointCloud 点云数据 + */ + fun onAutopilotPointCloudDataUpdate(header: MessagePad.Header?, pointCloud: PointCloud.LidarPointCloud?) + +} \ No newline at end of file diff --git a/core/mogo-core-function-call/src/main/java/com/mogo/eagle/core/function/call/autopilot/CallerAutopilotPointCloudListenerManager.kt b/core/mogo-core-function-call/src/main/java/com/mogo/eagle/core/function/call/autopilot/CallerAutopilotPointCloudListenerManager.kt new file mode 100644 index 0000000000..b4e8d6350c --- /dev/null +++ b/core/mogo-core-function-call/src/main/java/com/mogo/eagle/core/function/call/autopilot/CallerAutopilotPointCloudListenerManager.kt @@ -0,0 +1,73 @@ +package com.mogo.eagle.core.function.call.autopilot + +import androidx.annotation.Nullable +import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotIdentifyListener +import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotPointCloudListener +import com.mogo.eagle.core.function.call.base.CallerBase +import mogo.telematics.pad.MessagePad +import perception.TrafficLightOuterClass +import rule_segement.PointCloud +import java.util.concurrent.ConcurrentHashMap + +/** + * @author xiaoyuzhou + * @date 2021/9/30 5:48 下午 + * 点云数据管理 + */ +object CallerAutopilotPointCloudListenerManager : CallerBase() { + + // 存储所有注册了监听的对象,invokeXXXX进行遍历回调,将信息同步 + private val M_AUTOPILOT_IDENTIFY_LISTENERS: ConcurrentHashMap = + ConcurrentHashMap() + + /** + * 添加 域控制器感知数据 监听 + * @param tag 标记,用来注销监听使用 + * @param listener 监听回调 + */ + fun addListener( + @Nullable tag: String, + @Nullable listener: IMoGoAutopilotPointCloudListener + ) { + if (M_AUTOPILOT_IDENTIFY_LISTENERS.containsKey(tag)) { + return + } + M_AUTOPILOT_IDENTIFY_LISTENERS[tag] = listener + } + + /** + * 删除监听 + * @param tag 标记,用来注销监听使用 + */ + fun removeListener(@Nullable tag: String) { + if (!M_AUTOPILOT_IDENTIFY_LISTENERS.containsKey(tag)) { + return + } + M_AUTOPILOT_IDENTIFY_LISTENERS.remove(tag) + } + + /** + * 删除自动驾驶按钮选中监听 + * @param listener 要删除的监听对象 + */ + fun removeListener(@Nullable listener: IMoGoAutopilotPointCloudListener) { + M_AUTOPILOT_IDENTIFY_LISTENERS.forEach { + if (it.value == listener) { + M_AUTOPILOT_IDENTIFY_LISTENERS.remove(it.key) + } + } + } + + /** + * 识别交通元素数据发生更新 回调 + */ + @Synchronized + fun invokeAutopilotPointCloudDataUpdate(header: MessagePad.Header?, pointCloud: PointCloud.LidarPointCloud?) { + M_AUTOPILOT_IDENTIFY_LISTENERS.forEach { + val tag = it.key + val listener = it.value + listener.onAutopilotPointCloudDataUpdate(header,pointCloud) + } + } + +} \ No newline at end of file diff --git a/gradle.properties b/gradle.properties index d47e0194e9..fcfc0cc7c4 100644 --- a/gradle.properties +++ b/gradle.properties @@ -82,7 +82,7 @@ MOGO_LOCATION_VERSION=1.3.59 MOGO_TELEMATIC_VERSION=1.3.59 ######## MogoAiCloudSDK Version ######## # 自研地图 -MAP_SDK_VERSION=2.1.1.2 +MAP_SDK_VERSION=2.2.0.1 MAP_SDK_OPERATION_VERSION=1.0.13 # websocket WEBSOCKET_VERSION=1.1.7 From 2292651b14ef0f62fd2b96676a98798ff3d8ca3e Mon Sep 17 00:00:00 2001 From: donghongyu Date: Mon, 23 May 2022 19:59:47 +0800 Subject: [PATCH 2/9] =?UTF-8?q?=E3=80=8CChange=E3=80=8D=20=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=E6=8E=A7=E5=88=B6=E7=82=B9=E4=BA=91=E7=BB=98=E5=88=B6?= =?UTF-8?q?=E7=9A=84=E5=AD=97=E6=AE=B5isDrawPointCloudData?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: donghongyu --- .../core/function/map/MapPointCloudSubscriber.kt | 13 +++++++------ .../eagle/core/data/config/FunctionBuildConfig.kt | 9 +++++++++ 2 files changed, 16 insertions(+), 6 deletions(-) diff --git a/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/map/MapPointCloudSubscriber.kt b/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/map/MapPointCloudSubscriber.kt index df873ea8ed..d141a6467f 100644 --- a/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/map/MapPointCloudSubscriber.kt +++ b/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/map/MapPointCloudSubscriber.kt @@ -1,9 +1,9 @@ package com.mogo.eagle.core.function.map +import com.mogo.eagle.core.data.config.FunctionBuildConfig import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotPointCloudListener import com.mogo.eagle.core.function.api.base.IMoGoSubscriber import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotPointCloudListenerManager -import com.mogo.eagle.core.utilcode.mogo.logger.Logger import com.zhidao.support.adas.high.common.PointCloudDecoder import com.zhidaoauto.map.sdk.open.business.PointCloudHelper import mogo.telematics.pad.MessagePad @@ -36,13 +36,14 @@ class MapPointCloudSubscriber private constructor() : IMoGoSubscriber, IMoGoAuto override fun onDestroy() { CallerAutopilotPointCloudListenerManager.removeListener(TAG) - } - override fun onAutopilotPointCloudDataUpdate(header: MessagePad.Header?, pointCloud: PointCloud.LidarPointCloud?) { - val data = PointCloudDecoder.decode(header, pointCloud) - val result = PointCloudHelper.updatePointCloudData(data, false, true, true) - //Logger.d(TAG, "result=$result") + // 根据配置动态控制点云是否绘制 + if (FunctionBuildConfig.isDrawPointCloudData) { + val data = PointCloudDecoder.decode(header, pointCloud) + val result = PointCloudHelper.updatePointCloudData(data, false, true, true) + //Logger.d(TAG, "result=$result") + } } } \ No newline at end of file diff --git a/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/config/FunctionBuildConfig.kt b/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/config/FunctionBuildConfig.kt index 49227e0797..44193c016c 100644 --- a/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/config/FunctionBuildConfig.kt +++ b/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/config/FunctionBuildConfig.kt @@ -77,6 +77,15 @@ object FunctionBuildConfig { @JvmField var isDrawObuIdentifyData = true + /** + * 地图是否绘制 点云数据 + * true - 绘制 + * false - 不绘制 + */ + @Volatile + @JvmField + var isDrawPointCloudData = true + /** * 地图是否忽略判断条件直接绘制工控机引导线数据&全局路径规划 * 用于调试 From 778156c2a2fb92d64a958a93e982e7040ad6a390 Mon Sep 17 00:00:00 2001 From: xuxinchao <13522809046@163.com> Date: Tue, 24 May 2022 12:21:30 +0800 Subject: [PATCH 3/9] =?UTF-8?q?=E8=B0=83=E8=AF=95=E7=AA=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 增加点云数据渲染控制 --- .../hmi/ui/setting/DebugSettingView.kt | 15 ++++++++++++++- .../src/main/res/layout/view_debug_setting.xml | 18 +++++++++++++++++- 2 files changed, 31 insertions(+), 2 deletions(-) diff --git a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/setting/DebugSettingView.kt b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/setting/DebugSettingView.kt index 5c3ea8b1ce..e015e89428 100644 --- a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/setting/DebugSettingView.kt +++ b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/setting/DebugSettingView.kt @@ -545,11 +545,17 @@ class DebugSettingView @JvmOverloads constructor( } - // 演示模式,上一次勾选的数据 + // 强制绘制引导线 tbIsDrawAutopilotTrajectoryData.setOnCheckedChangeListener { _, isChecked -> FunctionBuildConfig.isIgnoreConditionsDrawAutopilotTrajectoryData = isChecked } + //TODO + tbIsDrawPath.setOnCheckedChangeListener { _, isChecked -> + + } + + // 初始化 GSP数据源 数据 rgGpsProvider.check( when (FunctionBuildConfig.gpsProvider) { @@ -598,6 +604,13 @@ class DebugSettingView @JvmOverloads constructor( // FunctionBuildConfig.isDrawObuIdentifyData = isChecked // } + //初始化点云数据渲染情况 + tbDrawPointCloudData.isChecked = FunctionBuildConfig.isDrawPointCloudData + //是否渲染点云数据 + tbDrawPointCloudData.setOnCheckedChangeListener { _, isChecked -> + FunctionBuildConfig.isDrawPointCloudData = isChecked + } + // 模拟自动驾驶中 tbChangeAutoPilotStatus.setOnCheckedChangeListener { _, isChecked -> CallerAutoPilotManager.setControlAutopilotCarAuto(isChecked) diff --git a/core/function-impl/mogo-core-function-hmi/src/main/res/layout/view_debug_setting.xml b/core/function-impl/mogo-core-function-hmi/src/main/res/layout/view_debug_setting.xml index 67f4f1cbcc..cf4407f0b7 100644 --- a/core/function-impl/mogo-core-function-hmi/src/main/res/layout/view_debug_setting.xml +++ b/core/function-impl/mogo-core-function-hmi/src/main/res/layout/view_debug_setting.xml @@ -1450,10 +1450,11 @@ android:textOn="强制绘制引导线" android:textSize="@dimen/dp_24" app:layout_constraintLeft_toLeftOf="parent" - app:layout_constraintRight_toLeftOf="@id/tbIsDrawAutopilotTrajectoryData" + app:layout_constraintRight_toLeftOf="@id/tbIsDrawPath" app:layout_constraintTop_toBottomOf="@id/tbIsDrawIdentifyData" /> + + Date: Tue, 24 May 2022 14:03:38 +0800 Subject: [PATCH 4/9] =?UTF-8?q?[taxi/bus-d=20270]=20=E4=BF=AE=E5=A4=8Dtaxi?= =?UTF-8?q?=E5=8F=B8=E6=9C=BA=E7=AB=AF=E9=81=97=E7=95=99bug=EF=BC=9A?= =?UTF-8?q?=E8=AE=A2=E5=8D=95=E5=8F=96=E6=B6=88=EF=BC=8C=E5=8F=B3=E5=B0=8F?= =?UTF-8?q?=E8=A7=92=E5=B0=8F=E5=9C=B0=E5=9B=BE=E7=BA=BF=E8=B7=AF=E6=9C=AA?= =?UTF-8?q?=E6=B8=85=E9=99=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mogo/och/taxi/ui/TaxiBeingServerdOrdersFragment.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/OCH/mogo-och-taxi/src/main/java/com/mogo/och/taxi/ui/TaxiBeingServerdOrdersFragment.java b/OCH/mogo-och-taxi/src/main/java/com/mogo/och/taxi/ui/TaxiBeingServerdOrdersFragment.java index 14cb6b72e7..9c7d29330a 100644 --- a/OCH/mogo-och-taxi/src/main/java/com/mogo/och/taxi/ui/TaxiBeingServerdOrdersFragment.java +++ b/OCH/mogo-och-taxi/src/main/java/com/mogo/och/taxi/ui/TaxiBeingServerdOrdersFragment.java @@ -22,6 +22,7 @@ import com.mogo.commons.debug.DebugConfig; import com.mogo.commons.voice.AIAssist; import com.mogo.eagle.core.data.map.CenterLine; import com.mogo.eagle.core.function.call.map.CallerHDMapManager; +import com.mogo.eagle.core.function.call.map.CallerSmpManager; import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger; import com.mogo.eagle.core.utilcode.mogo.toast.TipToast; import com.mogo.eagle.core.utilcode.util.DateTimeUtils; @@ -447,6 +448,7 @@ public class TaxiBeingServerdOrdersFragment extends BaseTaxiUIFragment implement showOrHideNavi(false); setOrRemoveMapMaker(false, TaxiConst.TAXI_START_MAP_MAKER,order.startSitePoint,R.raw.star_marker); setOrRemoveMapMaker(false, TaxiConst.TAXI_END_MAP_MAKER,order.endSitePoint,R.raw.end_marker); + clearSmallMapRouteLine(); break; case ArriveAtStart: case UserArriveAtStart: @@ -546,6 +548,7 @@ public class TaxiBeingServerdOrdersFragment extends BaseTaxiUIFragment implement setOrRemoveMapMaker(false, TaxiConst.TAXI_START_MAP_MAKER,mCurrentOrder.startSitePoint,R.raw.star_marker); setOrRemoveMapMaker(false, TaxiConst.TAXI_END_MAP_MAKER,mCurrentOrder.endSitePoint,R.raw.end_marker); } + clearSmallMapRouteLine(); //提交取消订单后的回调 TipToast.tip("订单取消成功"); //更新界面 @@ -553,6 +556,10 @@ public class TaxiBeingServerdOrdersFragment extends BaseTaxiUIFragment implement showOrHideNavi(false); } + private void clearSmallMapRouteLine() { + CallerSmpManager.clearPolyline(); + } + /** * 订单流转debug START */ From ad80d7318c078bc9eec5c56fdfa4391c9d186753 Mon Sep 17 00:00:00 2001 From: liujing Date: Tue, 24 May 2022 14:07:37 +0800 Subject: [PATCH 5/9] =?UTF-8?q?ui--taxi=E6=96=B9=E5=90=91=E7=9B=98?= =?UTF-8?q?=E8=B7=9D=E4=B8=8A=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/res/layout/taxi_p_base_fragment.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OCH/mogo-och-taxi-passenger/src/main/res/layout/taxi_p_base_fragment.xml b/OCH/mogo-och-taxi-passenger/src/main/res/layout/taxi_p_base_fragment.xml index 3e6850fea4..0cfb6db266 100644 --- a/OCH/mogo-och-taxi-passenger/src/main/res/layout/taxi_p_base_fragment.xml +++ b/OCH/mogo-och-taxi-passenger/src/main/res/layout/taxi_p_base_fragment.xml @@ -11,7 +11,7 @@ android:layout_width="@dimen/dp_630" android:layout_height="@dimen/dp_630" android:layout_marginLeft="-59px" - android:layout_marginTop="@dimen/dp_20" + android:layout_marginTop="-40px" app:layout_constraintLeft_toLeftOf="parent" app:layout_constraintTop_toTopOf="parent" /> From 9327821c3d319921775876a43f825a33459626a6 Mon Sep 17 00:00:00 2001 From: liujing Date: Tue, 24 May 2022 15:16:27 +0800 Subject: [PATCH 6/9] =?UTF-8?q?=E6=B8=90=E5=8F=98=E8=89=B2=E6=96=B9?= =?UTF-8?q?=E5=90=91=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../eagle/core/function/hmi/ui/widget/SteeringWheelView.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/widget/SteeringWheelView.java b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/widget/SteeringWheelView.java index fddda077d6..c5da489cbf 100644 --- a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/widget/SteeringWheelView.java +++ b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/widget/SteeringWheelView.java @@ -77,13 +77,13 @@ public class SteeringWheelView extends ConstraintLayout { steeringCircularV = findViewById(R.id.steering_circular); steeringCircularV.setBackWidth(8); steeringCircularV.setBackColor(R.color.hmi_light_back_bg); - steeringCircularV.setProgColor(R.color.hmi_light_blue, R.color.hmi_dark_blue); + steeringCircularV.setProgColor(R.color.hmi_dark_blue, R.color.hmi_light_blue); steeringCircularV.setProgress((int) (180 * 100) / 360, 1000); if (AppIdentityModeUtils.isTaxi(FunctionBuildConfig.appIdentityMode)) { steeringCircularVAlpha = findViewById(R.id.steering_circular_alpha); steeringCircularVAlpha.setBackWidth(8); steeringCircularVAlpha.setBackColor(R.color.hmi_clear_00); - steeringCircularVAlpha.setProgColor(R.color.hmi_light_blue_alpha_00, R.color.hmi_light_blue_alpha_ff); + steeringCircularVAlpha.setProgColor(R.color.hmi_light_blue_alpha_ff, R.color.hmi_light_blue_alpha_00); steeringCircularVAlpha.setBlurMaskFilter(BlurMaskFilter.Blur.NORMAL, 12); steeringCircularVAlpha.setProgress((int) (180 * 100) / 360, 1000); } From 4bebe56baaf363fe7a2c540977f282c3d394b227 Mon Sep 17 00:00:00 2001 From: xuxinchao <13522809046@163.com> Date: Tue, 24 May 2022 15:28:09 +0800 Subject: [PATCH 7/9] =?UTF-8?q?MAP=E6=8E=A8=E6=8B=89=E5=8D=87=E7=BA=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 增加本地“下载中”状态记忆(效能有一个下载准备中的过程,此时不会发送状态,但鹰眼本地需要更改状态) --- .../core/function/hmi/ui/MoGoHmiFragment.kt | 3 ++ .../hmi/ui/widget/SystemVersionView.kt | 51 +++++++++++-------- .../eagle/core/data/constants/MoGoConfig.kt | 2 + 3 files changed, 35 insertions(+), 21 deletions(-) diff --git a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/MoGoHmiFragment.kt b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/MoGoHmiFragment.kt index d4bfe4bdae..6cce19c533 100644 --- a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/MoGoHmiFragment.kt +++ b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/MoGoHmiFragment.kt @@ -18,6 +18,7 @@ import com.mogo.eagle.core.data.bindingcar.IPCUpgradeStateInfo import com.mogo.eagle.core.data.camera.CameraEntity import com.mogo.eagle.core.data.config.FunctionBuildConfig import com.mogo.eagle.core.data.config.HmiBuildConfig +import com.mogo.eagle.core.data.constants.MoGoConfig import com.mogo.eagle.core.data.constants.MoGoFragmentPaths import com.mogo.eagle.core.data.enums.SidePattern import com.mogo.eagle.core.data.enums.WarningDirectionEnum @@ -57,6 +58,7 @@ import com.mogo.eagle.core.function.hmi.ui.widget.V2XNotificationView import com.mogo.eagle.core.utilcode.mogo.AppIdentityModeUtils import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_HMI +import com.mogo.eagle.core.utilcode.mogo.storage.SharedPrefsMgr import com.mogo.eagle.core.utilcode.util.ThreadUtils import com.mogo.eagle.core.utilcode.util.TimeUtils import com.mogo.eagle.core.utilcode.util.ToastUtils @@ -979,6 +981,7 @@ class MoGoHmiFragment : MvpFragment(), override fun confirm() { //确认升级 CallerBindingcarManager.getBindingcarProvider().upgradeConfirm(images, padSn, releaseId) + SharedPrefsMgr.getInstance(requireContext()).putBoolean(MoGoConfig.CONFIRM_UPGRADE,true) adUpgradeDialog?.dismiss() adUpgradeDialog = null } diff --git a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/widget/SystemVersionView.kt b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/widget/SystemVersionView.kt index 5c264610d0..afe5cc8751 100644 --- a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/widget/SystemVersionView.kt +++ b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/widget/SystemVersionView.kt @@ -9,6 +9,7 @@ import com.mogo.cloud.passport.MoGoAiCloudClient import com.mogo.eagle.core.data.autopilot.AutopilotStatusInfo import com.mogo.eagle.core.data.bindingcar.AdUpgradeStateHelper import com.mogo.eagle.core.data.bindingcar.IPCUpgradeStateInfo +import com.mogo.eagle.core.data.constants.MoGoConfig import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_HMI import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotStatusListener import com.mogo.eagle.core.function.api.bindingcar.IMoGoBindingCarListener @@ -18,6 +19,7 @@ import com.mogo.eagle.core.function.call.bindingcar.CallerBindingcarManager import com.mogo.eagle.core.function.call.hmi.CallerHmiManager import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger import com.mogo.eagle.core.function.hmi.R +import com.mogo.eagle.core.utilcode.mogo.storage.SharedPrefsMgr import com.mogo.eagle.core.utilcode.util.AppUtils import com.mogo.eagle.core.utilcode.util.ThreadUtils import com.mogo.eagle.core.utilcode.util.ToastUtils @@ -65,20 +67,20 @@ class SystemVersionView @JvmOverloads constructor( //工控机版本视图点击事件 ivAdVersion.setOnClickListener { CallerLogger.i("$M_HMI$$TAG", "ad version view clicked") - if(AdUpgradeStateHelper.isUpgradeableStatus()){ - if(autopilotStatus == 2){ - //当前处于自动驾驶状态,不可进行升级,Toast提示 - ToastUtils.showShort("升级前请先退出自动驾驶模式") - }else{ - dockerList?.let { - //弹窗提示,确认是否进行工控机升级 - CallerHmiManager.showAdUpgradeDialog(it, - MoGoAiCloudClient.getInstance().aiCloudClientConfig.sn, - "" - ) - } - } - } +// if(AdUpgradeStateHelper.isUpgradeableStatus()){ +// if(autopilotStatus == 2){ +// //当前处于自动驾驶状态,不可进行升级,Toast提示 +// ToastUtils.showShort("升级前请先退出自动驾驶模式") +// }else{ +// dockerList?.let { +// //弹窗提示,确认是否进行工控机升级 +// CallerHmiManager.showAdUpgradeDialog(it, +// MoGoAiCloudClient.getInstance().aiCloudClientConfig.sn, +// "" +// ) +// } +// } +// } ipcUpgradeStateInfo?.let { when { AdUpgradeStateHelper.isDownloading(it.status) -> { @@ -124,6 +126,14 @@ class SystemVersionView @JvmOverloads constructor( } + if(SharedPrefsMgr.getInstance(context).getBoolean(MoGoConfig.CONFIRM_UPGRADE,false)){ + //将角标改为“下载中” + ivAdStatus?.setImageResource(R.drawable.icon_downloading) + ivAdVersion?.setBackgroundResource(R.drawable.version_latest_background) + //设置状态为不可升级 + AdUpgradeStateHelper.setUpgradeableStatus(false) + } + } /** @@ -177,43 +187,42 @@ class SystemVersionView @JvmOverloads constructor( ivAdStatus?.setImageResource(R.drawable.icon_latest_version) adCircularProgressView?.visibility = View.GONE ivAdVersion?.setBackgroundResource(R.drawable.version_latest_background) + SharedPrefsMgr.getInstance(context).putBoolean(MoGoConfig.CONFIRM_UPGRADE,false) } AdUpgradeStateHelper.isDownloadFinish(status) ->{ //升级中,将状态设为“升级中”角标,并隐藏进度条 ivAdStatus?.setImageResource(R.drawable.icon_upgrading) adCircularProgressView?.visibility = View.GONE ivAdVersion?.setBackgroundResource(R.drawable.version_latest_background) + SharedPrefsMgr.getInstance(context).putBoolean(MoGoConfig.CONFIRM_UPGRADE,false) } AdUpgradeStateHelper.isUpgrading(status) ->{ //升级中,将状态设为“升级中”角标,并隐藏进度条 ivAdStatus?.setImageResource(R.drawable.icon_upgrading) adCircularProgressView?.visibility = View.GONE ivAdVersion?.setBackgroundResource(R.drawable.version_latest_background) - } - - AdUpgradeStateHelper.isUpgrading(status) ->{ - //升级中,将状态设为“升级中”角标,并隐藏进度条 - ivAdStatus?.setImageResource(R.drawable.icon_upgrading) - adCircularProgressView?.visibility = View.GONE - ivAdVersion?.setBackgroundResource(R.drawable.version_latest_background) + SharedPrefsMgr.getInstance(context).putBoolean(MoGoConfig.CONFIRM_UPGRADE,false) } AdUpgradeStateHelper.isUpgradeSuccess(status) -> { //升级成功,将状态设为“最新版”角标,并隐藏进度条 ivAdStatus?.setImageResource(R.drawable.icon_latest_version) adCircularProgressView?.visibility = View.GONE ivAdVersion?.setBackgroundResource(R.drawable.version_latest_background) + SharedPrefsMgr.getInstance(context).putBoolean(MoGoConfig.CONFIRM_UPGRADE,false) } AdUpgradeStateHelper.isUpgradeFailed(status) -> { //升级失败,将状态设为“升级失败”角标,并隐藏进度条 ivAdStatus?.setImageResource(R.drawable.icon_upgrade_failed) adCircularProgressView?.visibility = View.GONE ivAdVersion?.setBackgroundResource(R.drawable.version_latest_background) + SharedPrefsMgr.getInstance(context).putBoolean(MoGoConfig.CONFIRM_UPGRADE,false) } else -> { //其他状态,均显示“最新版”,并隐藏进度条 ivAdStatus?.setImageResource(R.drawable.icon_latest_version) adCircularProgressView?.visibility = View.GONE ivAdVersion?.setBackgroundResource(R.drawable.version_latest_background) + SharedPrefsMgr.getInstance(context).putBoolean(MoGoConfig.CONFIRM_UPGRADE,false) } } } diff --git a/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/constants/MoGoConfig.kt b/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/constants/MoGoConfig.kt index 815eb08e8e..3323461ada 100644 --- a/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/constants/MoGoConfig.kt +++ b/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/constants/MoGoConfig.kt @@ -23,4 +23,6 @@ object MoGoConfig { //根据加速度判断是否刹车阈值 const val BRAKE_ACCELERATION_THRESHOLD = "BRAKE_ACCELERATION_THRESHOLD" + const val CONFIRM_UPGRADE = "CONFIRM_UPGRADE" + } \ No newline at end of file From 1e15ba3526a85f611e912baf5db2afb43f9198a8 Mon Sep 17 00:00:00 2001 From: lixiaopeng Date: Tue, 24 May 2022 18:00:13 +0800 Subject: [PATCH 8/9] opt --- .../bindingcar/network/BindingcarNetWorkManager.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/core/function-impl/mogo-core-function-bindingcar/src/main/java/com/mogo/eagle/core/function/bindingcar/network/BindingcarNetWorkManager.java b/core/function-impl/mogo-core-function-bindingcar/src/main/java/com/mogo/eagle/core/function/bindingcar/network/BindingcarNetWorkManager.java index 196052c82d..641bb20b53 100644 --- a/core/function-impl/mogo-core-function-bindingcar/src/main/java/com/mogo/eagle/core/function/bindingcar/network/BindingcarNetWorkManager.java +++ b/core/function-impl/mogo-core-function-bindingcar/src/main/java/com/mogo/eagle/core/function/bindingcar/network/BindingcarNetWorkManager.java @@ -12,6 +12,7 @@ import com.mogo.eagle.core.network.MoGoRetrofitFactory; import com.mogo.eagle.core.network.utils.GsonUtil; import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger; import com.mogo.eagle.core.utilcode.mogo.storage.SharedPrefsMgr; +import com.mogo.eagle.core.utilcode.mogo.toast.TipToast; import com.mogo.eagle.core.utilcode.util.GsonUtils; import com.mogo.module.common.constants.HostConst; @@ -60,7 +61,7 @@ public class BindingcarNetWorkManager { // String macAddress = "48:b0:2d:3a:bc:78"; // String sn = "X20202203105S688HZ"; - Log.d("liyz", "getBindingcarInfo -- widevineIDWithMd5 = " + widevineIDWithMd5 + "--macAddress = " +macAddress + "--screenType = " + screenType); + Log.d("liyz", "getBindingcarInfo -- widevineIDWithMd5 = " + widevineIDWithMd5 + "--macAddress = " + macAddress + "--screenType = " + screenType); BindingcarRequest request = new BindingcarRequest(macAddress, widevineIDWithMd5, screenType); RequestBody requestBody = RequestBody.create(MediaType.get("application/json;charset=UTF-8"), GsonUtil.jsonFromObject(request)); mBindingcarApiService.getBindingcarInfo(token, requestBody) @@ -80,6 +81,8 @@ public class BindingcarNetWorkManager { CallerHmiManager.INSTANCE.showBindingcarDialog(); } else if (info.getData().getCompare().equals("3")) { CallerHmiManager.INSTANCE.showModifyBindingcarDialog(); + } else if (info.getData().getCompare().equals("null")) { + TipToast.shortTip("当前工控机没有入库"); } SharedPrefsMgr.getInstance(context).putString(SharedPrefsConstants.CAR_INFO, GsonUtils.toJson(info.getData())); From 287c57fc29a0ea7590c463098a1f83613f1a7c8d Mon Sep 17 00:00:00 2001 From: donghongyu Date: Tue, 24 May 2022 18:40:59 +0800 Subject: [PATCH 9/9] =?UTF-8?q?=E3=80=8CChange=E3=80=8D=20=E5=85=B3?= =?UTF-8?q?=E9=97=AD=E7=82=B9=E4=BA=91=E9=BB=98=E8=AE=A4=E7=BB=98=E5=88=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: donghongyu --- .../java/com/mogo/eagle/core/data/config/FunctionBuildConfig.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/config/FunctionBuildConfig.kt b/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/config/FunctionBuildConfig.kt index 44193c016c..260fb56fcd 100644 --- a/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/config/FunctionBuildConfig.kt +++ b/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/config/FunctionBuildConfig.kt @@ -57,7 +57,7 @@ object FunctionBuildConfig { */ @Volatile @JvmField - var isDrawIdentifyData = true + var isDrawIdentifyData = false /** * 地图是否绘制Adas识别回调的「未知类型」Marker