From d06c9b56fc2cc5a77c790ef24b68676972b51cb7 Mon Sep 17 00:00:00 2001 From: wangmingjun Date: Thu, 21 Sep 2023 15:58:20 +0800 Subject: [PATCH 01/12] =?UTF-8?q?[6.1.0]=20=E4=BB=BB=E5=8A=A1=E4=B8=BA?= =?UTF-8?q?=E7=A9=BA,=E6=B8=85=E7=A9=BA=E7=BE=8E=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../taxi/ui/task/TaxiCurrentTaskFragment.kt | 20 ++++++++----------- .../mogo/och/taxi/ui/task/TaxiTaskModel.kt | 7 ++----- 2 files changed, 10 insertions(+), 17 deletions(-) diff --git a/OCH/taxi/unmanned-driver/src/main/java/com/mogo/och/taxi/ui/task/TaxiCurrentTaskFragment.kt b/OCH/taxi/unmanned-driver/src/main/java/com/mogo/och/taxi/ui/task/TaxiCurrentTaskFragment.kt index c02256f181..b9c0a1276a 100644 --- a/OCH/taxi/unmanned-driver/src/main/java/com/mogo/och/taxi/ui/task/TaxiCurrentTaskFragment.kt +++ b/OCH/taxi/unmanned-driver/src/main/java/com/mogo/och/taxi/ui/task/TaxiCurrentTaskFragment.kt @@ -117,18 +117,14 @@ class TaxiCurrentTaskFragment : BaseFragment(), TAG, "hasCurrentTask = $hasCurrentTask" ) - try { - if (hasCurrentTask) { - noTaskData.visibility = View.GONE - mCurrentTaskLayout.visibility = View.VISIBLE - } else { - noTaskData.visibility = View.VISIBLE - noOrderDataTv.text = "暂无进行中订单" - mCurrentTaskLayout.visibility = View.GONE - taskOtherInfo.text = "距离 -- 公里, 用时 -- 分钟" - } - } catch (e: NullPointerException) { //可能会出现订单信息已经轮询回来,但进行中页面控件还未初始化完成的情况 - TaxiTaskModel.clearCurrentOCHOrder() + if (hasCurrentTask) { + noTaskData.visibility = View.GONE + mCurrentTaskLayout.visibility = View.VISIBLE + } else { + noTaskData.visibility = View.VISIBLE + noOrderDataTv.text = "暂无进行中订单" + mCurrentTaskLayout.visibility = View.GONE + taskOtherInfo.text = "距离 -- 公里, 用时 -- 分钟" } } diff --git a/OCH/taxi/unmanned-driver/src/main/java/com/mogo/och/taxi/ui/task/TaxiTaskModel.kt b/OCH/taxi/unmanned-driver/src/main/java/com/mogo/och/taxi/ui/task/TaxiTaskModel.kt index a2e1d7f630..24bb58a87d 100644 --- a/OCH/taxi/unmanned-driver/src/main/java/com/mogo/och/taxi/ui/task/TaxiTaskModel.kt +++ b/OCH/taxi/unmanned-driver/src/main/java/com/mogo/och/taxi/ui/task/TaxiTaskModel.kt @@ -724,6 +724,7 @@ object TaxiTaskModel { listener.onTaskWithOrderDataChanged(null) } } + clearCurrentOCHOrder() return } @@ -1329,18 +1330,14 @@ object TaxiTaskModel { * 清除任务订单信息 */ fun clearCurrentOCHOrder() { - mCurrentTaskWithOrder = null - mDriveToNearestStationTask = null clearAutopilotControlParameters() - TaxiTrajectoryManager.getInstance().syncTrajectoryInfo() - SharedPrefsMgr.getInstance(mContext).remove(TaxiUnmannedConst.SP_KEY_OCH_TAXI_ORDER) isRestartAutopilot = false if (FunctionBuildConfig.isDemoMode) { // 当美化模式(演示模式)开启时: 取消或订单已完成时,置false FunctionBuildConfig.isIgnoreConditionsDrawAutopilotTrajectoryData = false CallerAutoPilotControlManager.setIgnoreConditionDraw(false) CallerAutoPilotControlManager.setIPCDemoMode(false) - d(TAG, "美化模式-ignore:置为false(已完成or清除当前订单)") + d(TAG, "美化模式-ignore:置为false(已完成or清除当前任务)") } } From 0df219c58a1e118be0e0d7b2b54faf042c719fd3 Mon Sep 17 00:00:00 2001 From: renwj Date: Thu, 21 Sep 2023 16:57:38 +0800 Subject: [PATCH 02/12] =?UTF-8?q?[6.1.0][=E8=BD=A6=E5=89=8D=E5=BC=95?= =?UTF-8?q?=E5=AF=BC=E7=BA=BF]=20=E4=BC=98=E5=8C=96=E5=9B=A0=E8=87=AA?= =?UTF-8?q?=E9=A9=BE=E7=8A=B6=E6=80=81=E6=9C=AA=E5=90=8C=E6=AD=A5=EF=BC=8C?= =?UTF-8?q?=E5=AF=BC=E8=87=B4=E5=BC=95=E5=AF=BC=E7=BA=BF=E6=9C=AA=E7=BB=98?= =?UTF-8?q?=E5=88=B6=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../routeoverlay/MogoRouteOverlayManager.java | 77 ++----------------- .../data/autopilot/AutopilotStatusInfo.kt | 6 ++ .../CallerAutoPilotStatusListenerManager.kt | 17 ++++ 3 files changed, 29 insertions(+), 71 deletions(-) diff --git a/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/business/routeoverlay/MogoRouteOverlayManager.java b/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/business/routeoverlay/MogoRouteOverlayManager.java index 9f022ffb9e..49b6c17ac4 100644 --- a/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/business/routeoverlay/MogoRouteOverlayManager.java +++ b/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/business/routeoverlay/MogoRouteOverlayManager.java @@ -30,14 +30,10 @@ import system_master.SystemStatusInfo; public class MogoRouteOverlayManager implements IMoGoPlanningTrajectoryListener, - IMoGoAutopilotStatusListener, IMoGoChassisLocationGCJ02Listener { private static volatile MogoRouteOverlayManager sInstance; private static final String TAG = "Route"; - private final AtomicBoolean isArriveAtStation = new AtomicBoolean(false); - private final AtomicInteger autopilotMode = new AtomicInteger(0); - private final LinkedList> queue = new LinkedList<>(); private MogoRouteOverlayManager() { @@ -46,7 +42,6 @@ public class MogoRouteOverlayManager implements public void init() { CallerPlanningTrajectoryListenerManager.INSTANCE.addListener(TAG, this); - CallerAutoPilotStatusListenerManager.INSTANCE.addListener(TAG, this); CallerChassisLocationGCJ02ListenerManager.INSTANCE.addListener(TAG, 20,this); } @@ -75,14 +70,16 @@ public class MogoRouteOverlayManager implements if (gnssInfo == null) { return; } - Log.d(TAG, "-- onChassisLocationGCJ02 -- 1 ---" + ":auto-mode:" + autopilotMode.get() + ", isArriveAtStation: " + isArriveAtStation.get()); - if (isArriveAtStation.get() && autopilotMode.get() != 2) { + int autoPilotState = CallerAutoPilotStatusListenerManager.INSTANCE.getState(); + boolean isArriveAtStation = CallerAutoPilotStatusListenerManager.INSTANCE.isArriveAtStation(); + Log.d(TAG, "-- onChassisLocationGCJ02 -- 1 ---" + ":auto-mode:" + autoPilotState + ", isArriveAtStation: " + isArriveAtStation); + if (isArriveAtStation && autoPilotState != 2) { RouteOverlayDrawer.getInstance().clearMogoRouteOverlay(); return; } - Log.d(TAG, "-- onChassisLocationGCJ02 -- 2 ---" + "auto-mode:" + autopilotMode.get() + ", isDemoMode:" + FunctionBuildConfig.isDemoMode + ", force:" + FunctionBuildConfig.isForceDrawAutopilotTrajectoryByDebugSettingView); + Log.d(TAG, "-- onChassisLocationGCJ02 -- 2 ---" + "auto-mode:" + autoPilotState + ", isDemoMode:" + FunctionBuildConfig.isDemoMode + ", force:" + FunctionBuildConfig.isForceDrawAutopilotTrajectoryByDebugSettingView); boolean force = FunctionBuildConfig.isForceDrawAutopilotTrajectoryByDebugSettingView || FunctionBuildConfig.isDemoMode && FunctionBuildConfig.isIgnoreConditionsDrawAutopilotTrajectoryData; - if (!force && autopilotMode.get() != 2) { + if (!force && autoPilotState != 2) { RouteOverlayDrawer.getInstance().clearMogoRouteOverlay(); return; } @@ -96,66 +93,4 @@ public class MogoRouteOverlayManager implements } } } - - @Override - public void onAutopilotStatusResponse(int state) { - if (state == 2) { - isArriveAtStation.set(false); - } - Log.d(TAG, "-- onAutopilotStatusResponse ---: state:" + state); - this.autopilotMode.set(state); - } - - @Override - public void onAutopilotStatusResponse(@NotNull AutopilotStatusInfo autoPilotStatusInfo) { - } - - @Override - public void onAutopilotArriveAtStation(MessagePad.ArrivalNotification arrivalNotification) { - Log.d(TAG, "-- onAutopilotArriveAtStation --- 1 ---"); - if (arrivalNotification == null) { - return; - } - Log.d(TAG, "-- onAutopilotArriveAtStation --- 2 ---"); - if(!HdMapBuildConfig.isMapLoaded){ - return; - } - Log.d(TAG, "-- onAutopilotArriveAtStation --- 3 ---"); - if (!isArriveAtStation.get()) { - isArriveAtStation.set(true); - } - } - - - @Override - public void onAutopilotSNRequest() { - - } - - @Override - public void onAutopilotGuardian(MogoReportMsg.MogoReportMessage guardianInfo) { - - } - - @Override - public void onAutopilotIpcConnectStatusChanged(int status, @androidx.annotation.Nullable String reason) { - } - - @Override - public void onAutopilotStatusRespByQuery(@NonNull SystemStatusInfo.StatusInfo status) { - } - - @Override - public void onSystemStatus(@NonNull SsmInfo.SsmStatusInf statusInf) { - } - - @Override - public void onAutopilotRouteLineId(long lineId) { - - } - - @Override - public void onAutopilotDockerInfo(@NonNull String dockerVersion) { - } - } diff --git a/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/autopilot/AutopilotStatusInfo.kt b/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/autopilot/AutopilotStatusInfo.kt index 030332407f..afe5bf3a52 100644 --- a/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/autopilot/AutopilotStatusInfo.kt +++ b/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/autopilot/AutopilotStatusInfo.kt @@ -70,6 +70,12 @@ open class AutopilotStatusInfo : Serializable, Cloneable { @Volatile var autopilotControlParameters: AutopilotControlParameters? = null + /** + * 是否到站 + */ + @Volatile + var isArriveAtStation: Boolean = false + override fun toString(): String { return "connectIP=$connectIP, connectPort=$connectPort, " + "connectStatus=$connectStatus, connectDescribe=$connectStatusDescribe, version=$version, dockVersion=$dockVersion," + diff --git a/core/mogo-core-function-call/src/main/java/com/mogo/eagle/core/function/call/autopilot/CallerAutoPilotStatusListenerManager.kt b/core/mogo-core-function-call/src/main/java/com/mogo/eagle/core/function/call/autopilot/CallerAutoPilotStatusListenerManager.kt index 70ef154e84..9f614cc914 100644 --- a/core/mogo-core-function-call/src/main/java/com/mogo/eagle/core/function/call/autopilot/CallerAutoPilotStatusListenerManager.kt +++ b/core/mogo-core-function-call/src/main/java/com/mogo/eagle/core/function/call/autopilot/CallerAutoPilotStatusListenerManager.kt @@ -34,6 +34,7 @@ object CallerAutoPilotStatusListenerManager : CallerBase if (oldValue != newValue) { + fixAtStationState(newValue) M_LISTENERS.forEach { val listener = it.value listener.onAutopilotStatusResponse(newValue) @@ -41,6 +42,19 @@ object CallerAutoPilotStatusListenerManager : CallerBase if (!oldValue.contentEquals(newValue)) { M_LISTENERS.forEach { @@ -105,6 +119,8 @@ object CallerAutoPilotStatusListenerManager : CallerBase Date: Thu, 21 Sep 2023 17:34:56 +0800 Subject: [PATCH 03/12] =?UTF-8?q?[6.1.0]=20=E8=B7=9D=E7=A6=BB=E8=BE=83?= =?UTF-8?q?=E5=B0=8F=E6=97=B6=EF=BC=8C=E6=80=BB=E8=80=97=E6=97=B6=E4=B8=BA?= =?UTF-8?q?0=E5=88=86=E9=92=9F=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/mogo/och/taxi/ui/task/TaxiTaskModel.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/OCH/taxi/unmanned-driver/src/main/java/com/mogo/och/taxi/ui/task/TaxiTaskModel.kt b/OCH/taxi/unmanned-driver/src/main/java/com/mogo/och/taxi/ui/task/TaxiTaskModel.kt index 24bb58a87d..902e4f6994 100644 --- a/OCH/taxi/unmanned-driver/src/main/java/com/mogo/och/taxi/ui/task/TaxiTaskModel.kt +++ b/OCH/taxi/unmanned-driver/src/main/java/com/mogo/och/taxi/ui/task/TaxiTaskModel.kt @@ -88,6 +88,7 @@ import system_master.SsmInfo import system_master.SystemStatusInfo import java.util.concurrent.ConcurrentHashMap import java.util.concurrent.TimeUnit +import kotlin.math.ceil /** * @author: wangmingjun @@ -857,7 +858,7 @@ object TaxiTaskModel { val listener = it.value listener.onOrderTripInfoChanged( data.data.mileage, - data.data.duration.toInt() + ceil(data.data.duration.toDouble()).toInt() //向上取整 ) } } From b04631f9158c32ab7161cdc4d7e3894f29248d45 Mon Sep 17 00:00:00 2001 From: wangmingjun Date: Thu, 21 Sep 2023 17:43:31 +0800 Subject: [PATCH 04/12] =?UTF-8?q?[6.1.0]=20=E6=B7=BB=E5=8A=A0=E8=87=AA?= =?UTF-8?q?=E9=A9=BE=E7=8A=B6=E6=80=81=E8=BF=94=E5=9B=9E=E6=97=A5=E5=BF=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/mogo/och/taxi/ui/task/TaxiTaskModel.kt | 1 + 1 file changed, 1 insertion(+) diff --git a/OCH/taxi/unmanned-driver/src/main/java/com/mogo/och/taxi/ui/task/TaxiTaskModel.kt b/OCH/taxi/unmanned-driver/src/main/java/com/mogo/och/taxi/ui/task/TaxiTaskModel.kt index 902e4f6994..e3d70e0c41 100644 --- a/OCH/taxi/unmanned-driver/src/main/java/com/mogo/och/taxi/ui/task/TaxiTaskModel.kt +++ b/OCH/taxi/unmanned-driver/src/main/java/com/mogo/och/taxi/ui/task/TaxiTaskModel.kt @@ -271,6 +271,7 @@ object TaxiTaskModel { override fun onAutopilotStatusResponse(autoPilotStatusInfo: AutopilotStatusInfo) {} override fun onAutopilotStatusResponse(state: Int) { + i(TAG, "onAutopilotStatusResponse autopilotsState= $state") if (state == IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_RUNNING) { DebugView.printInfoMsg("[自驾状态变化] afterValue=STATUS_AUTOPILOT_RUNNING,meaning=自动驾驶中") mADASStatusCallback?.onAutopilotRunning() From 1b721ce9c0fb266d8fc57d25e9325b9dac093d36 Mon Sep 17 00:00:00 2001 From: xuxinchao Date: Thu, 21 Sep 2023 18:59:57 +0800 Subject: [PATCH 05/12] =?UTF-8?q?[6.1.0]=E4=BF=AE=E5=A4=8D=E8=87=AA?= =?UTF-8?q?=E8=BD=A6=E5=85=89=E5=9C=88=E9=BB=98=E8=AE=A4=E6=98=BE=E7=A4=BA?= =?UTF-8?q?=E7=8A=B6=E6=80=81=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../eagle/core/function/hmi/ui/setting/SOPSettingView.kt | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/setting/SOPSettingView.kt b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/setting/SOPSettingView.kt index e530ef6e2c..c887f5020f 100644 --- a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/setting/SOPSettingView.kt +++ b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/setting/SOPSettingView.kt @@ -382,7 +382,12 @@ internal class SOPSettingView @JvmOverloads constructor( } //自车光圈 - scCarAperture.isChecked = FunctionBuildConfig.isDisplayAnimEnable + if(FunctionBuildConfig.isDrawPointCloudData){ + //如果点云效果是打开的,则自车光圈也跟随打开 + scCarAperture.isChecked = true + }else{ + scCarAperture.isChecked = FunctionBuildConfig.isDisplayAnimEnable + } scCarAperture.setOnCheckedChangeListener { compoundButton, isChecked -> CallerMapUIServiceManager.getMapUIController()?.setDisplayAnimEnable(isChecked) hmiAction("SOP 是否展示自车光圈,",isChecked) From c348f42531c5175796b9fb48ca68b262fa3644f1 Mon Sep 17 00:00:00 2001 From: xinfengkun Date: Thu, 21 Sep 2023 19:05:11 +0800 Subject: [PATCH 06/12] =?UTF-8?q?[610]=E5=8D=87=E7=BA=A7OBU=20SDK=E7=89=88?= =?UTF-8?q?=E6=9C=AC=20=E8=A7=A3=E5=86=B3=E6=97=A0=E6=B3=95=E6=96=AD?= =?UTF-8?q?=E5=BC=80=E8=BF=9E=E6=8E=A5=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config.gradle b/config.gradle index a1248e8a96..3d2c35ab87 100644 --- a/config.gradle +++ b/config.gradle @@ -89,7 +89,7 @@ ext { // obu sdk obusdk : "com.zhidao.enterprise.smartv2x:smartv2x:1.0.0.3", - mogoobu : 'com.mogo.support.obu:mogo-obu:1.1.1', + mogoobu : 'com.mogo.support.obu:mogo-obu:1.1.2', // google googlezxing : "com.google.zxing:core:3.3.3", From 98b899db89405760643c356d0093d4afccbbb8cb Mon Sep 17 00:00:00 2001 From: wangmingjun Date: Fri, 22 Sep 2023 11:50:53 +0800 Subject: [PATCH 07/12] =?UTF-8?q?[6.1.0]=20=E5=8E=BB=E6=8E=89=E5=88=B9?= =?UTF-8?q?=E8=BD=A6=E6=9A=82=E5=81=9C=E5=90=AF=E8=87=AA=E9=A9=BE=E5=80=92?= =?UTF-8?q?=E8=AE=A1=E6=97=B6=E7=9A=84=E9=9C=80=E6=B1=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/mogo/och/taxi/ui/base/TaxiFragment.kt | 12 ++++++------ .../java/com/mogo/och/taxi/ui/task/TaxiTaskModel.kt | 4 ++-- .../src/main/res/layout/taxi_debug_order.xml | 2 ++ 3 files changed, 10 insertions(+), 8 deletions(-) diff --git a/OCH/taxi/unmanned-driver/src/main/java/com/mogo/och/taxi/ui/base/TaxiFragment.kt b/OCH/taxi/unmanned-driver/src/main/java/com/mogo/och/taxi/ui/base/TaxiFragment.kt index 25c61b6c7f..580cee3f6d 100644 --- a/OCH/taxi/unmanned-driver/src/main/java/com/mogo/och/taxi/ui/base/TaxiFragment.kt +++ b/OCH/taxi/unmanned-driver/src/main/java/com/mogo/och/taxi/ui/base/TaxiFragment.kt @@ -283,12 +283,12 @@ class TaxiFragment : BaseTaxiTabFragment(), findViewById(R.id.test_bar_route)?.setOnClickListener { testRouteInfoUpload() } - findViewById(R.id.test_brake)?.setOnClickListener { - TaxiTaskModel.handleBrakeStatusChange(false) - } - findViewById(R.id.test_resume_brake)?.setOnClickListener { - TaxiTaskModel.handleBrakeStatusChange(true) - } +// findViewById(R.id.test_brake)?.setOnClickListener { +// TaxiTaskModel.handleBrakeStatusChange(false) +// } +// findViewById(R.id.test_resume_brake)?.setOnClickListener { +// TaxiTaskModel.handleBrakeStatusChange(true) +// } findViewById(R.id.test_parallel_driver)?.setOnClickListener { stopAutoStartAutopilot() } diff --git a/OCH/taxi/unmanned-driver/src/main/java/com/mogo/och/taxi/ui/task/TaxiTaskModel.kt b/OCH/taxi/unmanned-driver/src/main/java/com/mogo/och/taxi/ui/task/TaxiTaskModel.kt index e3d70e0c41..22ff483477 100644 --- a/OCH/taxi/unmanned-driver/src/main/java/com/mogo/och/taxi/ui/task/TaxiTaskModel.kt +++ b/OCH/taxi/unmanned-driver/src/main/java/com/mogo/och/taxi/ui/task/TaxiTaskModel.kt @@ -444,8 +444,8 @@ object TaxiTaskModel { } override fun brakeStatusChanged(isBrakeAvailable: Boolean) { - //刹车: true 松开, false 踩下 - handleBrakeStatusChange(isBrakeAvailable) + //刹车: true 松开, false 踩下 2020.9.23刹车需求暂时下掉 +// handleBrakeStatusChange(isBrakeAvailable) } } diff --git a/OCH/taxi/unmanned-driver/src/main/res/layout/taxi_debug_order.xml b/OCH/taxi/unmanned-driver/src/main/res/layout/taxi_debug_order.xml index 09a3044e16..646b94ab4e 100644 --- a/OCH/taxi/unmanned-driver/src/main/res/layout/taxi_debug_order.xml +++ b/OCH/taxi/unmanned-driver/src/main/res/layout/taxi_debug_order.xml @@ -57,6 +57,7 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Mock刹车" + android:visibility="gone" android:textSize="12sp" />