From 1630025d787bc9ee930e59e68bfbb2122249e6f2 Mon Sep 17 00:00:00 2001 From: lixiaopeng Date: Thu, 22 Dec 2022 16:23:50 +0800 Subject: [PATCH 1/4] =?UTF-8?q?[2.13.0]=20=E4=BF=AE=E6=94=B9=E9=AD=94?= =?UTF-8?q?=E6=96=B9=E5=8D=95=E5=87=BB=E7=9A=84=E6=97=B6=E9=97=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../function/main/MainLauncherActivity.java | 20 +++++++------------ 1 file changed, 7 insertions(+), 13 deletions(-) diff --git a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/main/MainLauncherActivity.java b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/main/MainLauncherActivity.java index 5f48387e2e..0338363c76 100644 --- a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/main/MainLauncherActivity.java +++ b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/main/MainLauncherActivity.java @@ -219,7 +219,7 @@ public class MainLauncherActivity extends MainActivity implements IMogoIntentLis if (event.getAction() == KeyEvent.ACTION_DOWN) { pressADownTime = System.currentTimeMillis(); CallerLogger.INSTANCE.d(M_F + "MoFangManager", "dispatchKeyEvent A down pressADownTime = " + pressADownTime + "---" + (pressADownTime - startPressTime) + "----isCombinationKey = " + isCombinationKey + "--pressBDownTime = " + pressBDownTime); - if ((pressADownTime - startPressTime) > 320 && (pressADownTime - startPressTime) < 1300 && pressBDownTime > 0) { + if ((pressADownTime - startPressTime) > 360 && (pressADownTime - startPressTime) < 1300 && pressBDownTime > 0) { if (isShowToast) { ToastUtils.showShort("方块 A 按AB组合 -2 "); } @@ -238,7 +238,7 @@ public class MainLauncherActivity extends MainActivity implements IMogoIntentLis } else if (event.getAction() == KeyEvent.ACTION_UP) { pressAUpTime = System.currentTimeMillis(); CallerLogger.INSTANCE.d(M_F + "MoFangManager", "dispatchKeyEvent A up pressAUpTime = " + pressAUpTime + "---" + (pressAUpTime - startPressTime) + "--pressBDownTime = " + pressBDownTime); - if ((pressAUpTime - startPressTime) < 300 && isCombinationKey != 3) { + if ((pressAUpTime - startPressTime) < 350 && isCombinationKey != 3) { isCombinationKey = 1; if (isShowToast) { ToastUtils.showShort("方块 单击A -1 "); @@ -259,7 +259,7 @@ public class MainLauncherActivity extends MainActivity implements IMogoIntentLis if (event.getAction() == KeyEvent.ACTION_DOWN) { pressBDownTime = System.currentTimeMillis(); CallerLogger.INSTANCE.d(M_F + "MoFangManager", "dispatchKeyEvent B down pressBDownTime = " + pressBDownTime + "--差-" + (pressBDownTime - startPressTime) + "---isCombinationKey = " + isCombinationKey + "--pressADownTime = " + pressADownTime); - if ((pressBDownTime - startPressTime) > 320 && (pressBDownTime - startPressTime) < 1300 && pressADownTime > 0) { + if ((pressBDownTime - startPressTime) > 360 && (pressBDownTime - startPressTime) < 1300 && pressADownTime > 0) { if (isShowToast) { ToastUtils.showShort("方块 B 按AB组合 "); } @@ -278,7 +278,7 @@ public class MainLauncherActivity extends MainActivity implements IMogoIntentLis } else if (event.getAction() == KeyEvent.ACTION_UP) { pressBUpTime = System.currentTimeMillis(); CallerLogger.INSTANCE.d(M_F + "MoFangManager", "dispatchKeyEvent B up pressBUpTime = " + pressBUpTime + "--差-" + (pressBUpTime - startPressTime) + "--pressADownTime = " + pressADownTime); - if ((pressBUpTime - startPressTime) < 300 && isCombinationKey != 3) { + if ((pressBUpTime - startPressTime) < 350 && isCombinationKey != 3) { if (isShowToast) { ToastUtils.showShort("方块 单击B 0 "); } @@ -301,7 +301,6 @@ public class MainLauncherActivity extends MainActivity implements IMogoIntentLis pressCDownTime = System.currentTimeMillis(); CallerLogger.INSTANCE.d(M_F + "MoFangManager", "dispatchKeyEvent 方块 长按C 无操作 time dif = " + (pressCDownTime - startPressTime)); if ((pressCDownTime - startPressTime) > 1320) { - CallerLogger.INSTANCE.d(M_F + "MoFangManager", "dispatchKeyEvent 方块 长按C 无操作 "); if (isShowToast) { ToastUtils.showShort("方块 长按C 无操作 "); } @@ -310,8 +309,7 @@ public class MainLauncherActivity extends MainActivity implements IMogoIntentLis pressCUpTime = System.currentTimeMillis(); isPressEnd = false; CallerLogger.INSTANCE.d(M_F + "MoFangManager", "dispatchKeyEvent 方块 单击C ← 向左变道 time dif = " + (pressCUpTime - startPressTime)); - if ((pressCUpTime - startPressTime) < 300) { - CallerLogger.INSTANCE.d(M_F + "MoFangManager", "dispatchKeyEvent 方块 单击C ← 向左变道 "); + if ((pressCUpTime - startPressTime) < 350) { if (isShowToast) { ToastUtils.showShort("方块 单击C ← 向左变道 "); } @@ -324,7 +322,6 @@ public class MainLauncherActivity extends MainActivity implements IMogoIntentLis pressDDownTime = System.currentTimeMillis(); CallerLogger.INSTANCE.d(M_F + "MoFangManager", "dispatchKeyEvent 方块 长按D 无操作 time dif = " + (pressDDownTime - startPressTime)); if ((pressDDownTime - startPressTime) > 1320) { - CallerLogger.INSTANCE.d(M_F + "MoFangManager", "dispatchKeyEvent 方块 长按D 无操作 "); if (isShowToast) { ToastUtils.showShort("方块 长按D 无操作 "); } @@ -333,11 +330,10 @@ public class MainLauncherActivity extends MainActivity implements IMogoIntentLis pressDUpTime = System.currentTimeMillis(); isPressEnd = false; CallerLogger.INSTANCE.d(M_F + "MoFangManager", "dispatchKeyEvent 方块 单击D → 向右变道 time dif = " + (pressDUpTime - startPressTime)); - if ((pressDUpTime - startPressTime) < 300) { + if ((pressDUpTime - startPressTime) < 350) { if (isShowToast) { ToastUtils.showShort("方块 单击D → 向右变道 "); } - CallerLogger.INSTANCE.d(M_F + "MoFangManager", "dispatchKeyEvent 方块 单击D → 向右变道 "); CallerAutoPilotManager.INSTANCE.sendOperatorChangeLaneRight(); } } @@ -350,7 +346,6 @@ public class MainLauncherActivity extends MainActivity implements IMogoIntentLis if (isShowToast) { ToastUtils.showShort("方块 长按E 鸣笛 "); } - CallerLogger.INSTANCE.d(M_F + "MoFangManager", "dispatchKeyEvent 方块 长按E 鸣笛 "); CallerAutoPilotManager.INSTANCE.sendOperatorSetHorn(1); if (timerHorn == null) { timerHorn = new Timer(); @@ -367,11 +362,10 @@ public class MainLauncherActivity extends MainActivity implements IMogoIntentLis pressEUpTime = System.currentTimeMillis(); isPressEnd = false; CallerLogger.INSTANCE.d(M_F + "MoFangManager", "方块 单击E 开启自动驾驶 time dif = " + (pressEUpTime - startPressTime)); - if ((pressEUpTime - startPressTime) < 300) { + if ((pressEUpTime - startPressTime) < 350) { if (isShowToast) { ToastUtils.showShort("方块 单击E 开启自动驾驶 "); } - CallerLogger.INSTANCE.d(M_F + "MoFangManager", "dispatchKeyEvent 方块 单击E 开启自动驾驶 = " + CallerAutoPilotStatusListenerManager.INSTANCE.getAutoPilotStatusInfo().getAutopilotControlParameters()); CallerAutoPilotManager.INSTANCE.startAutoPilot(CallerAutoPilotStatusListenerManager.INSTANCE.getAutoPilotStatusInfo().getAutopilotControlParameters()); } } From d111fd905c88c104cb934b0fb9951e8c9e3ce7a8 Mon Sep 17 00:00:00 2001 From: chenfufeng Date: Thu, 22 Dec 2022 16:56:01 +0800 Subject: [PATCH 2/4] =?UTF-8?q?[Opt]=E5=8E=BB=E6=8E=89LeakCanary?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 原因: 性能测试的时候经常出现崩溃且,目前项目中就一个Activity内存泄漏基本不存在, 就算有影响也很小 --- app/build.gradle | 4 ++-- core/function-impl/mogo-core-function-hmi/build.gradle | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index 1548f70962..8c6c04e3dd 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -255,8 +255,8 @@ dependencies { implementation rootProject.ext.dependencies.arouter implementation rootProject.ext.dependencies.boostmultidex - debugImplementation rootProject.ext.dependencies.debugleakcanary - releaseImplementation rootProject.ext.dependencies.releaseleakcanary +// debugImplementation rootProject.ext.dependencies.debugleakcanary +// releaseImplementation rootProject.ext.dependencies.releaseleakcanary implementation rootProject.ext.dependencies.android_start_up implementation rootProject.ext.dependencies.lancetx_runtime diff --git a/core/function-impl/mogo-core-function-hmi/build.gradle b/core/function-impl/mogo-core-function-hmi/build.gradle index 6aedc92099..49f06ebcfa 100644 --- a/core/function-impl/mogo-core-function-hmi/build.gradle +++ b/core/function-impl/mogo-core-function-hmi/build.gradle @@ -65,8 +65,8 @@ dependencies { // implementation rootProject.ext.dependencies.crashSdk implementation rootProject.ext.dependencies.boostmultidex - debugImplementation rootProject.ext.dependencies.debugleakcanary - releaseImplementation rootProject.ext.dependencies.releaseleakcanary +// debugImplementation rootProject.ext.dependencies.debugleakcanary +// releaseImplementation rootProject.ext.dependencies.releaseleakcanary implementation rootProject.ext.dependencies.arouter kapt rootProject.ext.dependencies.aroutercompiler From ce4ba80238e677b49a9b08e6f31154849811589c Mon Sep 17 00:00:00 2001 From: xuxinchao Date: Thu, 22 Dec 2022 17:55:49 +0800 Subject: [PATCH 3/4] =?UTF-8?q?[2.13.0]fix=E9=9A=90=E8=97=8F=E5=BC=8F?= =?UTF-8?q?=E7=BE=8E=E5=8C=96=E6=A8=A1=E5=BC=8F=E5=BC=80=E5=85=B3=E5=92=8C?= =?UTF-8?q?=E8=B0=83=E8=AF=95=E9=9D=A2=E6=9D=BF=E3=80=81=E8=BF=90=E8=90=A5?= =?UTF-8?q?=E9=9D=A2=E6=9D=BF=E4=B8=8D=E5=90=8C=E6=AD=A5=E9=80=A0=E6=88=90?= =?UTF-8?q?=E7=9A=84=E5=B4=A9=E6=BA=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../hmi/ui/setting/DebugSettingView.kt | 22 +++++++----- .../function/hmi/ui/setting/SOPSettingView.kt | 34 +++++++++++++++---- 2 files changed, 42 insertions(+), 14 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 d29227f462..c98bbfc1e0 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 @@ -83,7 +83,6 @@ import com.zhidao.support.adas.high.other.permission.BackgrounderPermission import com.zhjt.mogo_core_function_devatools.env.* import kotlinx.android.synthetic.main.view_debug_setting.view.* import kotlinx.android.synthetic.main.view_debug_setting.view.tbRouteDynamicEffect -import kotlinx.android.synthetic.main.view_sop_setting.view.* import mogo.telematics.pad.MessagePad import mogo_msg.MogoReportMsg import java.text.SimpleDateFormat @@ -583,15 +582,15 @@ class DebugSettingView @JvmOverloads constructor( tbIsDemoMode.isChecked = FunctionBuildConfig.isDemoMode // 演示模式 - tbIsDemoMode.setOnCheckedChangeListener { _, isChecked -> - CallerHmiManager.updateStatusBarLeftView(isChecked, "demoMode", DemoModeView(context)) - CallerAutoPilotManager.setDemoMode(isChecked) - if (!isChecked) { + tbIsDemoMode.setOnCheckedChangeListener { _, _ -> + FunctionBuildConfig.isDemoMode = !FunctionBuildConfig.isDemoMode + CallerHmiManager.updateStatusBarLeftView(FunctionBuildConfig.isDemoMode, "demoMode", DemoModeView(context)) + CallerAutoPilotManager.setDemoMode(FunctionBuildConfig.isDemoMode) + if (!FunctionBuildConfig.isDemoMode) { //关闭美化模式时,通知工控机 - CallerAutoPilotManager.setIPCDemoMode(isChecked) + CallerAutoPilotManager.setIPCDemoMode(FunctionBuildConfig.isDemoMode) } - FunctionBuildConfig.isDemoMode = isChecked - tbIsDrawAutopilotTrajectoryData.isEnabled = !isChecked + tbIsDrawAutopilotTrajectoryData.isEnabled = !FunctionBuildConfig.isDemoMode if (!FunctionBuildConfig.isDemoMode) { tbIsDrawAutopilotTrajectoryData.isChecked = false } @@ -1833,6 +1832,13 @@ class DebugSettingView @JvmOverloads constructor( mUnknownIdentifyDataSize = 0 mTrajectoryInfoSize = 0 mRouteInfoSize = 0 + + if(FunctionBuildConfig.isDemoMode){ + tbIsDemoMode.text = "关闭美化模式" + }else{ + tbIsDemoMode.text = "开启美化模式" + } + } /** 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 3038b11206..ca74993d5a 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 @@ -20,9 +20,11 @@ import com.mogo.eagle.core.utilcode.mogo.AppIdentityModeUtils import com.mogo.eagle.core.utilcode.util.ToastUtils import com.mogo.eagle.core.function.business.routeoverlay.RouteStrategy import com.mogo.eagle.core.function.hmi.ui.widget.DemoModeView +import com.mogo.eagle.core.utilcode.util.UiThreadHandler import kotlinx.android.synthetic.main.view_debug_setting.view.* import kotlinx.android.synthetic.main.view_sop_setting.view.* import kotlinx.android.synthetic.main.view_sop_setting.view.tbRouteDynamicEffect +import java.util.* /** * SOP设置窗口 @@ -153,14 +155,14 @@ class SOPSettingView @JvmOverloads constructor( // 演示模式,上一次勾选的数据 tbDemoMode.isChecked = FunctionBuildConfig.isDemoMode // 演示模式 - tbDemoMode.setOnCheckedChangeListener { _, isChecked -> - CallerHmiManager.updateStatusBarLeftView(isChecked, "demoMode", DemoModeView(context)) - CallerAutoPilotManager.setDemoMode(isChecked) - if (!isChecked) { + tbDemoMode.setOnCheckedChangeListener { _, _ -> + FunctionBuildConfig.isDemoMode = !FunctionBuildConfig.isDemoMode + CallerHmiManager.updateStatusBarLeftView(FunctionBuildConfig.isDemoMode, "demoMode", DemoModeView(context)) + CallerAutoPilotManager.setDemoMode(FunctionBuildConfig.isDemoMode) + if (!FunctionBuildConfig.isDemoMode) { //关闭美化模式时,通知工控机 - CallerAutoPilotManager.setIPCDemoMode(isChecked) + CallerAutoPilotManager.setIPCDemoMode(FunctionBuildConfig.isDemoMode) } - FunctionBuildConfig.isDemoMode = isChecked } //只在司机端设置美化模式开关功能 if (AppIdentityModeUtils.isPassenger(FunctionBuildConfig.appIdentityMode)) { @@ -246,12 +248,32 @@ class SOPSettingView @JvmOverloads constructor( CallerDevaToolsFuncConfigListenerManager.registerDevaToolsFuncConfigListener( FuncBizConfig.FOUNDATION, TAG, true, this ) + // 开启定时查询速度 + Timer().schedule(timerTaskRefresh, Date(), 500) } override fun onDetachedFromWindow() { super.onDetachedFromWindow() // 移除 业务配置监听 CallerDevaToolsFuncConfigListenerManager.unRegisterDevaToolsFuncConfigListener(FuncBizConfig.FOUNDATION, TAG) + try { + timerTaskRefresh.cancel() + } catch (e: Exception) { + e.printStackTrace() + } + } + + private val timerTaskRefresh = object : TimerTask(){ + override fun run() { + UiThreadHandler.post{ + if(FunctionBuildConfig.isDemoMode){ + tbDemoMode.text = "关闭美化模式" + }else{ + tbDemoMode.text = "开启美化模式" + } + } + } + } override fun updateBizView(type: String, lock: Boolean) { From a102aab3c0ed09e972a431e99e43a0169afb00e9 Mon Sep 17 00:00:00 2001 From: xuxinchao Date: Thu, 22 Dec 2022 18:35:11 +0800 Subject: [PATCH 4/4] =?UTF-8?q?[2.13.0]fix=E5=BD=95=E5=8C=85=E5=88=97?= =?UTF-8?q?=E8=A1=A8=E5=8F=96=E6=B6=88=E5=BD=95=E5=8C=85Item=E9=94=99?= =?UTF-8?q?=E8=AF=AFBug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../eagle/core/function/hmi/ui/msgbox/DriverMsgBoxListView.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/msgbox/DriverMsgBoxListView.kt b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/msgbox/DriverMsgBoxListView.kt index 175799523d..c533b958d7 100644 --- a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/msgbox/DriverMsgBoxListView.kt +++ b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/msgbox/DriverMsgBoxListView.kt @@ -201,8 +201,8 @@ class DriverMsgBoxListView @JvmOverloads constructor( @Subscribe(threadMode = ThreadMode.MAIN) fun notifyList(msgBoxList: MsgBoxBean){ badCaseList?.let { - it.remove(msgBoxList) driverMsgBoxListAdapter?.notifyItemRemoved(it.indexOf(msgBoxList)) + it.remove(msgBoxList) } } } \ No newline at end of file