From 5646f5425e5fbbfd774239c55b1745c885369d49 Mon Sep 17 00:00:00 2001 From: xuxinchao <13522809046@163.com> Date: Wed, 30 Mar 2022 11:46:20 +0800 Subject: [PATCH 1/4] =?UTF-8?q?=E5=88=B9=E8=BD=A6=E5=8A=A0=E9=80=9F?= =?UTF-8?q?=E5=BA=A6=E9=98=88=E5=80=BC=E8=AE=BE=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 刹车加速度阈值动态调控,配置入口在调试窗,控制中心,鹰眼参数配置 --- .../core/function/autopilot/adapter/MoGoHandAdasMsgManager.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/function-impl/mogo-core-function-autopilot/src/main/java/com/mogo/eagle/core/function/autopilot/adapter/MoGoHandAdasMsgManager.java b/core/function-impl/mogo-core-function-autopilot/src/main/java/com/mogo/eagle/core/function/autopilot/adapter/MoGoHandAdasMsgManager.java index 535d44baca..6ce4872330 100644 --- a/core/function-impl/mogo-core-function-autopilot/src/main/java/com/mogo/eagle/core/function/autopilot/adapter/MoGoHandAdasMsgManager.java +++ b/core/function-impl/mogo-core-function-autopilot/src/main/java/com/mogo/eagle/core/function/autopilot/adapter/MoGoHandAdasMsgManager.java @@ -148,7 +148,7 @@ public class MoGoHandAdasMsgManager implements //根据加速度判断 是否刹车 if (gnssInfo != null) { //设置刹车信息 - if (gnssInfo.getAcceleration() < -2.5) { + if (gnssInfo.getAcceleration() < SharedPrefsMgr.getInstance(mContext).getFloat(MoGoConfig.BRAKE_ACCELERATION_THRESHOLD,-2.5F)) { brakeLight = 1; } else { brakeLight = 0; From c35e240ad86f585ca03d5beb9cd2aede3cbadb42 Mon Sep 17 00:00:00 2001 From: renwj Date: Wed, 30 Mar 2022 11:49:38 +0800 Subject: [PATCH 2/4] =?UTF-8?q?[feedback]=E9=80=82=E9=85=8D=E6=B2=89?= =?UTF-8?q?=E6=B5=B8=E5=BC=8F=E6=A8=A1=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mogo_core_function_devatools/ext/BadCaseExt.kt | 6 ++++-- .../feedback/biz/FeedBackView.kt | 2 +- .../com/mogo/eagle/core/utilcode/util/BarUtils.java | 10 ++++++++++ 3 files changed, 15 insertions(+), 3 deletions(-) diff --git a/core/function-impl/mogo-core-function-devatools/src/main/java/com/zhjt/mogo_core_function_devatools/ext/BadCaseExt.kt b/core/function-impl/mogo-core-function-devatools/src/main/java/com/zhjt/mogo_core_function_devatools/ext/BadCaseExt.kt index a62b8fecd6..b654967248 100644 --- a/core/function-impl/mogo-core-function-devatools/src/main/java/com/zhjt/mogo_core_function_devatools/ext/BadCaseExt.kt +++ b/core/function-impl/mogo-core-function-devatools/src/main/java/com/zhjt/mogo_core_function_devatools/ext/BadCaseExt.kt @@ -25,6 +25,7 @@ import com.mogo.eagle.core.utilcode.kotlin.lifeCycleScope import com.mogo.eagle.core.utilcode.kotlin.shape import com.mogo.eagle.core.utilcode.reminder.Reminder import com.mogo.eagle.core.utilcode.reminder.api.impl.PopupWindowReminder +import com.mogo.eagle.core.utilcode.util.BarUtils import com.mogo.eagle.core.utilcode.util.WindowUtils import kotlinx.coroutines.delay import kotlinx.coroutines.launch @@ -66,8 +67,9 @@ internal fun Context.toast(text: CharSequence, duration: Long = 2, unit: TimeUni } @SuppressLint("ClickableViewAccessibility") -internal fun Context.pop(content: View, width: Int, height: Int, key: String, fitSystemWindow: Boolean = true, onOuterViewClicked:((focus: View) -> Unit)? = null): () -> Unit { +internal fun Context.pop(content: View, width: Int, height: Int, key: String, onOuterViewClicked:((focus: View) -> Unit)? = null): () -> Unit { val activity = (this as? FragmentActivity) ?: throw IllegalStateException("please use Activity to trigger pop show.") + val isImmersiveMode = BarUtils.isImmersiveMode(activity) var tempReminder: PopupWindowReminder? = null activity.lifecycleScope.launchWhenResumed { val pop = PopupWindow(width, height).also { @@ -128,7 +130,7 @@ internal fun Context.pop(content: View, width: Int, height: Int, key: String, fi } override fun show() { - pop.showAtLocation(activity.window.decorView, Gravity.START, 0, if (fitSystemWindow) WindowUtils.getStatusBarHeight(activity) else 0) + pop.showAtLocation(activity.window.decorView, Gravity.START, 0, if (isImmersiveMode) 0 else BarUtils.getStatusBarHeight()) } override fun isOverride(): Boolean = false } diff --git a/core/function-impl/mogo-core-function-devatools/src/main/java/com/zhjt/mogo_core_function_devatools/feedback/biz/FeedBackView.kt b/core/function-impl/mogo-core-function-devatools/src/main/java/com/zhjt/mogo_core_function_devatools/feedback/biz/FeedBackView.kt index d9f0d42445..c607b16040 100644 --- a/core/function-impl/mogo-core-function-devatools/src/main/java/com/zhjt/mogo_core_function_devatools/feedback/biz/FeedBackView.kt +++ b/core/function-impl/mogo-core-function-devatools/src/main/java/com/zhjt/mogo_core_function_devatools/feedback/biz/FeedBackView.kt @@ -97,7 +97,7 @@ internal class FeedBackView : ConstraintLayout { transitionTo(0) } else { editOutRect.run { - transitionTo(-( it - top + height() + 300.PX)) + transitionTo(-( it - top + height() + 228.PX)) } } }.also { diff --git a/core/mogo-core-utils/src/main/java/com/mogo/eagle/core/utilcode/util/BarUtils.java b/core/mogo-core-utils/src/main/java/com/mogo/eagle/core/utilcode/util/BarUtils.java index 4991f52736..78eae55bdb 100644 --- a/core/mogo-core-utils/src/main/java/com/mogo/eagle/core/utilcode/util/BarUtils.java +++ b/core/mogo-core-utils/src/main/java/com/mogo/eagle/core/utilcode/util/BarUtils.java @@ -733,4 +733,14 @@ public final class BarUtils { } return false; } + + /** + * 当前Activity是否是沉浸式模式 + */ + public static boolean isImmersiveMode(Activity activity) { + Window window = activity.getWindow(); + View decor = window.getDecorView(); + int systemUiVisibility = decor.getSystemUiVisibility(); + return (systemUiVisibility & View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN) != 0; + } } From ccd3f92be46eda576d0ffb53c1fecb634fb0e1f4 Mon Sep 17 00:00:00 2001 From: donghongyu Date: Wed, 30 Mar 2022 11:55:58 +0800 Subject: [PATCH 3/4] =?UTF-8?q?[Update]=20=E5=A2=9E=E5=8A=A0=E6=B3=A8?= =?UTF-8?q?=E9=87=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: donghongyu --- .../src/main/res/layout/fragment_hmi.xml | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/core/function-impl/mogo-core-function-hmi/src/main/res/layout/fragment_hmi.xml b/core/function-impl/mogo-core-function-hmi/src/main/res/layout/fragment_hmi.xml index 4cb2702ebb..e530a19783 100644 --- a/core/function-impl/mogo-core-function-hmi/src/main/res/layout/fragment_hmi.xml +++ b/core/function-impl/mogo-core-function-hmi/src/main/res/layout/fragment_hmi.xml @@ -14,6 +14,7 @@ app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toStartOf="parent" /> + + + + - + + - + + + - + Date: Wed, 30 Mar 2022 12:14:43 +0800 Subject: [PATCH 4/4] opt --- .../function/autopilot/adapter/MoGoHandAdasMsgManager.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/function-impl/mogo-core-function-autopilot/src/main/java/com/mogo/eagle/core/function/autopilot/adapter/MoGoHandAdasMsgManager.java b/core/function-impl/mogo-core-function-autopilot/src/main/java/com/mogo/eagle/core/function/autopilot/adapter/MoGoHandAdasMsgManager.java index 6ce4872330..9af40f9fe6 100644 --- a/core/function-impl/mogo-core-function-autopilot/src/main/java/com/mogo/eagle/core/function/autopilot/adapter/MoGoHandAdasMsgManager.java +++ b/core/function-impl/mogo-core-function-autopilot/src/main/java/com/mogo/eagle/core/function/autopilot/adapter/MoGoHandAdasMsgManager.java @@ -4,6 +4,7 @@ import static com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.M_DEV import android.content.Context; import android.text.TextUtils; +import android.util.Log; import androidx.annotation.Nullable; @@ -107,7 +108,6 @@ public class MoGoHandAdasMsgManager implements @Override public void onAutopilotBrakeLightData(boolean brakeLight) { - } @Override @@ -154,7 +154,7 @@ public class MoGoHandAdasMsgManager implements brakeLight = 0; } if (!isShowTurnLight) { - ThreadUtils.runOnUiThread(() -> CallerHmiManager.INSTANCE.showBrakeLight(brakeLight)); + CallerHmiManager.INSTANCE.showBrakeLight(brakeLight); } } }