From 33252206358c3f09347b42a83ec5e6f900e6ea95 Mon Sep 17 00:00:00 2001 From: lixiaopeng Date: Thu, 28 Apr 2022 18:25:20 +0800 Subject: [PATCH 1/3] fixed bug --- .../hmi/notification/WarningFloatWindowHelper.kt | 6 ++++-- .../core/function/hmi/ui/setting/DebugSettingView.kt | 11 ++++++++--- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/notification/WarningFloatWindowHelper.kt b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/notification/WarningFloatWindowHelper.kt index db7881ef3f..4a0ff636b6 100644 --- a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/notification/WarningFloatWindowHelper.kt +++ b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/notification/WarningFloatWindowHelper.kt @@ -89,8 +89,10 @@ internal class WarningFloatWindowHelper( // 将浮窗布局文件添加到父容器frameLayout中,并返回该浮窗文件 val floatingView = config.layoutView?.also { try { - val parent = (it.parent as ViewGroup) - parent.removeAllViews() + if (it.parent != null) { + val parent = (it.parent as ViewGroup) + parent.removeAllViews() + } } catch (e: Exception) { e.printStackTrace() } 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 623824d7f6..d4d2eb4e49 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 @@ -1413,10 +1413,15 @@ class DebugSettingView @JvmOverloads constructor( AppConfigInfo.widevineIDMd5 = DeviceIdUtils.getWidevineIDWithMd5(AbsMogoApplication.getApp()) } - AppConfigInfo.mogoSN = MoGoAiCloudClient.getInstance().aiCloudClientConfig.sn - AppConfigInfo.mogoToken = MoGoAiCloudClient.getInstance().aiCloudClientConfig.token + if (MoGoAiCloudClient.getInstance().aiCloudClientConfig != null) { + AppConfigInfo.mogoSN = MoGoAiCloudClient.getInstance().aiCloudClientConfig.sn + AppConfigInfo.mogoToken = MoGoAiCloudClient.getInstance().aiCloudClientConfig.token + } + AppConfigInfo.netMode = DebugConfig.getNetMode() - AppConfigInfo.mapSdkVersion = MogoMap.getInstance().mogoMap.mapVersion + if (MogoMap.getInstance().mogoMap != null) { + AppConfigInfo.mapSdkVersion = MogoMap.getInstance().mogoMap.mapVersion + } AppConfigInfo.isConnectNet = NetworkUtils.isConnected(context) AppConfigInfo.isConnectSocket = DebugConfig.isDownloadSnapshot() From 88093fadd55f53a412b15590a91ad2c5769ee0a7 Mon Sep 17 00:00:00 2001 From: liujing Date: Tue, 10 May 2022 17:51:49 +0800 Subject: [PATCH 2/3] =?UTF-8?q?[add]=20taxi=20=20bus=E4=B9=98=E5=AE=A2?= =?UTF-8?q?=E5=B1=8F=E6=96=B9=E5=90=91=E7=9B=98UI?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../hmi/ui/widget/SteeringWheelView.java | 8 +- .../drawable-xxhdpi/bg_steering_outer_bus.xml | 13 +++ ...g_outer.xml => bg_steering_outer_taxi.xml} | 0 .../drawable-xxhdpi/bg_steering_wheel_bus.xml | 9 ++ ...g_wheel.xml => bg_steering_wheel_taxi.xml} | 0 .../drawable-xxhdpi/streeing_wheel_rotate.xml | 23 ----- .../res/layout/hmi_steering_wheel_bus.xml | 93 +++++++++++++++++++ .../res/layout/hmi_steering_wheel_taxi.xml | 2 +- 8 files changed, 123 insertions(+), 25 deletions(-) create mode 100644 core/function-impl/mogo-core-function-hmi/src/main/res/drawable-xxhdpi/bg_steering_outer_bus.xml rename core/function-impl/mogo-core-function-hmi/src/main/res/drawable-xxhdpi/{bg_steering_outer.xml => bg_steering_outer_taxi.xml} (100%) create mode 100644 core/function-impl/mogo-core-function-hmi/src/main/res/drawable-xxhdpi/bg_steering_wheel_bus.xml rename core/function-impl/mogo-core-function-hmi/src/main/res/drawable-xxhdpi/{bg_steering_wheel.xml => bg_steering_wheel_taxi.xml} (100%) delete mode 100644 core/function-impl/mogo-core-function-hmi/src/main/res/drawable-xxhdpi/streeing_wheel_rotate.xml create mode 100644 core/function-impl/mogo-core-function-hmi/src/main/res/layout/hmi_steering_wheel_bus.xml 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 c66620d1ff..b9e4a4b6cb 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 @@ -14,11 +14,13 @@ import androidx.annotation.Nullable; import androidx.constraintlayout.widget.ConstraintLayout; import com.mogo.eagle.core.data.autopilot.AutopilotStatusInfo; +import com.mogo.eagle.core.data.config.FunctionBuildConfig; import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotStatusListener; import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotVehicleStateListener; import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager; import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotVehicleStateListenerManager; import com.mogo.eagle.core.function.hmi.R; +import com.mogo.eagle.core.utilcode.mogo.AppIdentityModeUtils; import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger; import com.mogo.eagle.core.utilcode.util.ThreadUtils; @@ -55,7 +57,11 @@ public class SteeringWheelView extends ConstraintLayout { public SteeringWheelView(@NonNull Context context, @Nullable AttributeSet attrs) { super(context, attrs); Log.d(TAG, "2"); - LayoutInflater.from(context).inflate(R.layout.hmi_steering_wheel_taxi, this); + if (AppIdentityModeUtils.isBus(FunctionBuildConfig.appIdentityMode)) { + LayoutInflater.from(context).inflate(R.layout.hmi_steering_wheel_bus, this); + } else { + LayoutInflater.from(context).inflate(R.layout.hmi_steering_wheel_taxi, this); + } initView(); CallerAutoPilotStatusListenerManager.INSTANCE.addListener(TAG, mGoAutopilotStatusListener); CallerAutopilotVehicleStateListenerManager.INSTANCE.addListener(TAG, mIMoGoAutopilotVehicleStateListener); diff --git a/core/function-impl/mogo-core-function-hmi/src/main/res/drawable-xxhdpi/bg_steering_outer_bus.xml b/core/function-impl/mogo-core-function-hmi/src/main/res/drawable-xxhdpi/bg_steering_outer_bus.xml new file mode 100644 index 0000000000..f5e1da1a55 --- /dev/null +++ b/core/function-impl/mogo-core-function-hmi/src/main/res/drawable-xxhdpi/bg_steering_outer_bus.xml @@ -0,0 +1,13 @@ + + + + + + + + + \ No newline at end of file diff --git a/core/function-impl/mogo-core-function-hmi/src/main/res/drawable-xxhdpi/bg_steering_outer.xml b/core/function-impl/mogo-core-function-hmi/src/main/res/drawable-xxhdpi/bg_steering_outer_taxi.xml similarity index 100% rename from core/function-impl/mogo-core-function-hmi/src/main/res/drawable-xxhdpi/bg_steering_outer.xml rename to core/function-impl/mogo-core-function-hmi/src/main/res/drawable-xxhdpi/bg_steering_outer_taxi.xml diff --git a/core/function-impl/mogo-core-function-hmi/src/main/res/drawable-xxhdpi/bg_steering_wheel_bus.xml b/core/function-impl/mogo-core-function-hmi/src/main/res/drawable-xxhdpi/bg_steering_wheel_bus.xml new file mode 100644 index 0000000000..156cc4f0e0 --- /dev/null +++ b/core/function-impl/mogo-core-function-hmi/src/main/res/drawable-xxhdpi/bg_steering_wheel_bus.xml @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/core/function-impl/mogo-core-function-hmi/src/main/res/drawable-xxhdpi/bg_steering_wheel.xml b/core/function-impl/mogo-core-function-hmi/src/main/res/drawable-xxhdpi/bg_steering_wheel_taxi.xml similarity index 100% rename from core/function-impl/mogo-core-function-hmi/src/main/res/drawable-xxhdpi/bg_steering_wheel.xml rename to core/function-impl/mogo-core-function-hmi/src/main/res/drawable-xxhdpi/bg_steering_wheel_taxi.xml diff --git a/core/function-impl/mogo-core-function-hmi/src/main/res/drawable-xxhdpi/streeing_wheel_rotate.xml b/core/function-impl/mogo-core-function-hmi/src/main/res/drawable-xxhdpi/streeing_wheel_rotate.xml deleted file mode 100644 index d78c62cc72..0000000000 --- a/core/function-impl/mogo-core-function-hmi/src/main/res/drawable-xxhdpi/streeing_wheel_rotate.xml +++ /dev/null @@ -1,23 +0,0 @@ - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/core/function-impl/mogo-core-function-hmi/src/main/res/layout/hmi_steering_wheel_bus.xml b/core/function-impl/mogo-core-function-hmi/src/main/res/layout/hmi_steering_wheel_bus.xml new file mode 100644 index 0000000000..258956925c --- /dev/null +++ b/core/function-impl/mogo-core-function-hmi/src/main/res/layout/hmi_steering_wheel_bus.xml @@ -0,0 +1,93 @@ + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/core/function-impl/mogo-core-function-hmi/src/main/res/layout/hmi_steering_wheel_taxi.xml b/core/function-impl/mogo-core-function-hmi/src/main/res/layout/hmi_steering_wheel_taxi.xml index a6725a415a..bf88f0d590 100644 --- a/core/function-impl/mogo-core-function-hmi/src/main/res/layout/hmi_steering_wheel_taxi.xml +++ b/core/function-impl/mogo-core-function-hmi/src/main/res/layout/hmi_steering_wheel_taxi.xml @@ -26,7 +26,7 @@ android:layout_marginLeft="@dimen/dp_85" android:layout_marginTop="@dimen/dp_130" android:layout_marginRight="@dimen/dp_85" - android:indeterminateDrawable="@drawable/bg_steering_outer" + android:indeterminateDrawable="@drawable/bg_steering_outer_taxi" app:layout_constraintLeft_toLeftOf="parent" app:layout_constraintRight_toRightOf="parent" app:layout_constraintTop_toTopOf="parent" /> From ee87cfa3fec96ed074282364d848d5e8205c9eb0 Mon Sep 17 00:00:00 2001 From: liujing Date: Tue, 10 May 2022 18:16:51 +0800 Subject: [PATCH 3/3] =?UTF-8?q?busUI,=E5=B7=A6=E6=AD=A3=E5=8F=B3=E8=B4=9F?= =?UTF-8?q?=E9=80=BB=E8=BE=91=E4=BF=AE=E6=94=B9,=E5=BE=85=E9=AA=8C?= =?UTF-8?q?=E8=AF=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/res/layout/bus_p_base_fragment.xml | 11 ++++++----- .../function/hmi/ui/widget/SteeringWheelView.java | 10 +++++----- 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/OCH/mogo-och-bus-passenger/src/main/res/layout/bus_p_base_fragment.xml b/OCH/mogo-och-bus-passenger/src/main/res/layout/bus_p_base_fragment.xml index ae8970ff66..523a6fc82d 100644 --- a/OCH/mogo-och-bus-passenger/src/main/res/layout/bus_p_base_fragment.xml +++ b/OCH/mogo-och-bus-passenger/src/main/res/layout/bus_p_base_fragment.xml @@ -6,12 +6,13 @@ + 0) { steeringTVR.setVisibility(View.INVISIBLE); steeringTVL.setVisibility(View.VISIBLE); steeringTVL.setText(String.valueOf((int) steering) + "°"); - } else if (steeringTVR != null && steering >= 0) { + } else if (steeringTVR != null && steering <= 0) { steeringTVL.setVisibility(View.INVISIBLE); steeringTVR.setVisibility(View.VISIBLE); steeringTVR.setText(String.valueOf((int) steering) + "°"); @@ -175,7 +175,7 @@ public class SteeringWheelView extends ConstraintLayout { Log.d(TAG, "onAutopilotSteeringData error"); } animationWithSteeringData(steering); - steeringCircularV.setProgress((int) (steering * 100) / 360, 1000); + steeringCircularV.setProgress((int) (-steering * 100) / 360, 1000); } });