[2.13.2] merge

This commit is contained in:
zhongchao
2023-01-05 17:59:04 +08:00
50 changed files with 623 additions and 433 deletions

View File

@@ -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

View File

@@ -65,7 +65,6 @@ import com.mogo.eagle.core.function.call.map.*
import com.mogo.eagle.core.function.call.map.CallerVisualAngleManager.Scene.Turning
import com.mogo.eagle.core.function.call.monitor.CallerMonitorManager
import com.mogo.eagle.core.function.call.msgbox.CallerMsgBoxManager
import com.mogo.eagle.core.function.call.telematic.CallerTelematicManager
import com.mogo.eagle.core.function.hmi.R
import com.mogo.eagle.core.function.hmi.notification.WarningFloat
import com.mogo.eagle.core.function.hmi.notification.anim.DefaultAnimator
@@ -74,7 +73,6 @@ import com.mogo.eagle.core.function.hmi.ui.bindingcar.ToBindingCarDialog
import com.mogo.eagle.core.function.hmi.ui.bindingcar.UpgradeAppDialog
import com.mogo.eagle.core.function.hmi.ui.camera.CameraListView
import com.mogo.eagle.core.function.hmi.ui.camera.RoadVideoDialog
import com.mogo.eagle.core.function.hmi.ui.msgbox.PassengerMsgBoxBubbleView
import com.mogo.eagle.core.function.hmi.ui.notice.NoticeCheckDialog
import com.mogo.eagle.core.function.hmi.ui.notice.NoticeTrafficDialog
import com.mogo.eagle.core.function.hmi.ui.setting.DebugSettingView
@@ -91,6 +89,7 @@ import com.mogo.eagle.core.function.main.utils.DisplayEffectsHelper
import com.mogo.eagle.core.utilcode.kotlin.*
import com.mogo.eagle.core.utilcode.mogo.AppIdentityModeUtils
import com.mogo.eagle.core.utilcode.mogo.logger.*
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant
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.mogo.toast.TipToast
@@ -101,7 +100,6 @@ import com.mogo.eagle.core.utilcode.reminder.api.impl.*
import com.mogo.eagle.core.utilcode.util.*
import com.mogo.eagle.core.utilcode.util.TimeUtils
import com.mogo.eagle.core.utilcode.util.TimeUtils.millis2String
import com.mogo.map.MogoMap
import com.zhidao.support.adas.high.common.MogoReport.Code.Error.EMAP.*
import com.zhjt.mogo_core_function_devatools.badcase.consts.BadCaseConfig
import com.zhjt.service_biz.BizConfig
@@ -1381,6 +1379,7 @@ class MoGoHmiFragment : MvpFragment<MoGoHmiContract.View?, HmiPresenter?>(),
* 显示转向灯效果 if (HmiBuildConfig.isShowBadCaseView) {
*/
override fun showTurnLight(light: Int) {
CallerLogger.d("${SceneConstant.M_DEVA}${"TurnLight"}", "---showTurnLight = $light ---isLeftLight = $isLeftLight ---isRightLight = $isRightLight")
if (HmiBuildConfig.isShowTurnLightView) {
ThreadUtils.runOnUiThread {
if (light == 1 || light == 2) {
@@ -1394,26 +1393,28 @@ class MoGoHmiFragment : MvpFragment<MoGoHmiContract.View?, HmiPresenter?>(),
CallerVisualAngleManager.changeVisualAngle(Turning(false))
}
}
if (light == 1) {
if (light == 1) { //左转灯
if (!isLeftLight) {
isLeftLight = true
isRightLight = false
isDisappare = false
//TODO
CallerLogger.d("${SceneConstant.M_DEVA}${"TurnLight"}", "---showTurnLight ---light = 1")
CallerMapUIServiceManager.getMapUIController()?.setCarLightsType(4, 500)
}
} else if (light == 2) {
} else if (light == 2) { //右转灯
if (!isRightLight) {
isRightLight = true
isLeftLight = false
isDisappare = false
CallerLogger.d("${SceneConstant.M_DEVA}${"TurnLight"}", "---showTurnLight ---light = 2")
CallerMapUIServiceManager.getMapUIController()?.setCarLightsType(2, 500)
}
} else {
if (!isDisappare) {
if (!isDisappare) { //默认 不亮灯
isDisappare = true
isLeftLight = false
isRightLight = false
CallerLogger.d("${SceneConstant.M_DEVA}${"TurnLight"}", "---showTurnLight ---light other")
CallerMapUIServiceManager.getMapUIController()?.setCarLightsType(3, 500)
}
}
@@ -1436,11 +1437,13 @@ class MoGoHmiFragment : MvpFragment<MoGoHmiContract.View?, HmiPresenter?>(),
if (light == 1) { //刹车灯亮
if (!isBrake) {
isBrake = true
CallerLogger.d("${SceneConstant.M_DEVA}${"BrakeLight"}", " showBrakeLight light = 1 ")
CallerMapUIServiceManager.getMapUIController()?.setCarLightsType(0, 500)
}
} else {
if (isBrake) {
if (isBrake) {//默认 不亮灯
isBrake = false
CallerLogger.d("${SceneConstant.M_DEVA}${"BrakeLight"}", " showBrakeLight light != 1 ")
CallerMapUIServiceManager.getMapUIController()?.setCarLightsType(3, 500)
}
}

View File

@@ -177,6 +177,7 @@ class DriverMsgBoxListView @JvmOverloads constructor(
}
MsgCategory.RECORD_BAG -> {
badCaseList?.add(0,msgBoxList)
badCaseList?.let { driverMsgBoxListAdapter?.setData(it) }
}
}
}
@@ -201,8 +202,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)
}
}
}

View File

@@ -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
}
@@ -1842,6 +1841,13 @@ class DebugSettingView @JvmOverloads constructor(
mUnknownIdentifyDataSize = 0
mTrajectoryInfoSize = 0
mRouteInfoSize = 0
if(FunctionBuildConfig.isDemoMode){
tbIsDemoMode.text = "关闭美化模式"
}else{
tbIsDemoMode.text = "开启美化模式"
}
}
/**

View File

@@ -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) {

View File

@@ -204,22 +204,22 @@ public class MainLauncherActivity extends MainActivity implements IMogoIntentLis
*/
@Override
public boolean dispatchKeyEvent(KeyEvent event) {
// CallerLogger.INSTANCE.d(M_F + "MoFangManager", "dispatchKeyEvent code = " + event.getKeyCode() + "--action = " + event.getAction() + "----" + event);
CallerLogger.INSTANCE.d(M_F + "MoFangManager", "dispatchKeyEvent code = " + event.getKeyCode() + "--action = " + event.getAction() + "----" + event);
String bluetoothName = SharedPrefsMgr.getInstance(getContext()).getString(MfConstants.BLUETOOTH_NAME);
if (!isPressEnd) {
CallerLogger.INSTANCE.d(M_F + "MoFangManager","dispatchKeyEvent bluetoothName = " + bluetoothName);
CallerLogger.INSTANCE.d(M_F + "MoFangManager","dispatchKeyEvent ---1--- bluetoothName = " + bluetoothName);
}
if (bluetoothName.equals("MINI_KEYBOARD")) {
if (!isPressEnd) {
isPressEnd = true;
startPressTime = System.currentTimeMillis();
}
CallerLogger.INSTANCE.d(M_F + "MoFangManager","dispatchKeyEvent ---2--- bluetoothName = " + bluetoothName + "--- code = " + event.getKeyCode() + "--action = " + event.getAction());
if (event.getKeyCode() == KeyEvent.KEYCODE_A) { //单击 -1长按无操作AB组合-2
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 ");
}
@@ -299,8 +299,8 @@ public class MainLauncherActivity extends MainActivity implements IMogoIntentLis
} else if (event.getKeyCode() == KeyEvent.KEYCODE_C) { //单击左变道,长按无操作
if (event.getAction() == KeyEvent.ACTION_DOWN) {
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 无操作 ");
}
@@ -308,8 +308,8 @@ public class MainLauncherActivity extends MainActivity implements IMogoIntentLis
} else if (event.getAction() == KeyEvent.ACTION_UP) {
pressCUpTime = System.currentTimeMillis();
isPressEnd = false;
if ((pressCUpTime - startPressTime) < 300) {
CallerLogger.INSTANCE.d(M_F + "MoFangManager", "dispatchKeyEvent 方块 单击C ← 向左变道 ");
CallerLogger.INSTANCE.d(M_F + "MoFangManager", "dispatchKeyEvent 方块 单击C ← 向左变道 time dif = " + (pressCUpTime - startPressTime));
if ((pressCUpTime - startPressTime) < 350) {
if (isShowToast) {
ToastUtils.showShort("方块 单击C ← 向左变道 ");
}
@@ -320,8 +320,8 @@ public class MainLauncherActivity extends MainActivity implements IMogoIntentLis
} else if (event.getKeyCode() == KeyEvent.KEYCODE_D) { //单击向右变道,双击无操作
if (event.getAction() == KeyEvent.ACTION_DOWN) {
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 无操作 ");
}
@@ -329,11 +329,11 @@ public class MainLauncherActivity extends MainActivity implements IMogoIntentLis
} else if (event.getAction() == KeyEvent.ACTION_UP) {
pressDUpTime = System.currentTimeMillis();
isPressEnd = false;
if ((pressDUpTime - startPressTime) < 300) {
CallerLogger.INSTANCE.d(M_F + "MoFangManager", "dispatchKeyEvent 方块 单击D → 向右变道 time dif = " + (pressDUpTime - startPressTime));
if ((pressDUpTime - startPressTime) < 350) {
if (isShowToast) {
ToastUtils.showShort("方块 单击D → 向右变道 ");
}
CallerLogger.INSTANCE.d(M_F + "MoFangManager", "dispatchKeyEvent 方块 单击D → 向右变道 ");
CallerAutoPilotManager.INSTANCE.sendOperatorChangeLaneRight();
}
}
@@ -341,11 +341,11 @@ public class MainLauncherActivity extends MainActivity implements IMogoIntentLis
} else if (event.getKeyCode() == KeyEvent.KEYCODE_E) { //单击启动自驾,长按鸣笛
if (event.getAction() == KeyEvent.ACTION_DOWN) {
pressEDownTime = System.currentTimeMillis();
CallerLogger.INSTANCE.d(M_F + "MoFangManager", "dispatchKeyEvent 方块 长按E 鸣笛 time dif = " + (pressEDownTime - startPressTime));
if ((pressEDownTime - startPressTime) > 1320) {
if (isShowToast) {
ToastUtils.showShort("方块 长按E 鸣笛 ");
}
CallerLogger.INSTANCE.d(M_F + "MoFangManager", "dispatchKeyEvent 方块 长按E 鸣笛 ");
CallerAutoPilotManager.INSTANCE.sendOperatorSetHorn(1);
if (timerHorn == null) {
timerHorn = new Timer();
@@ -361,11 +361,11 @@ public class MainLauncherActivity extends MainActivity implements IMogoIntentLis
} else if (event.getAction() == KeyEvent.ACTION_UP) {
pressEUpTime = System.currentTimeMillis();
isPressEnd = false;
if ((pressEUpTime - startPressTime) < 300) {
CallerLogger.INSTANCE.d(M_F + "MoFangManager", "方块 单击E 开启自动驾驶 time dif = " + (pressEUpTime - startPressTime));
if ((pressEUpTime - startPressTime) < 350) {
if (isShowToast) {
ToastUtils.showShort("方块 单击E 开启自动驾驶 ");
}
CallerLogger.INSTANCE.d(M_F + "MoFangManager", "dispatchKeyEvent 方块 单击E 开启自动驾驶 ");
CallerAutoPilotManager.INSTANCE.startAutoPilot(CallerAutoPilotStatusListenerManager.INSTANCE.getAutoPilotStatusInfo().getAutopilotControlParameters());
}
}