From ea8a15c92288510e178e57daa9abbaa091f1ae9c Mon Sep 17 00:00:00 2001 From: wangmingjun Date: Wed, 28 Jun 2023 19:35:40 +0800 Subject: [PATCH 01/23] =?UTF-8?q?[3.3.0]=20bus=E5=8F=B8=E6=9C=BA=E7=AB=AF?= =?UTF-8?q?=E5=81=B6=E7=8E=B0=E5=88=B0=E7=AB=99=E9=97=AE=E9=A2=98(?= =?UTF-8?q?=E7=BB=8F=E7=BA=AC=E5=BA=A6=E9=83=A8=E5=88=86=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E6=88=AA=E5=8F=96=E6=9C=89=E9=97=AE=E9=A2=98=E9=80=A0=E6=88=90?= =?UTF-8?q?)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/mogo/och/common/module/utils/NumberFormatUtil.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/OCH/mogo-och-common-module/src/main/java/com/mogo/och/common/module/utils/NumberFormatUtil.java b/OCH/mogo-och-common-module/src/main/java/com/mogo/och/common/module/utils/NumberFormatUtil.java index 1af162ef26..2a88ec1dd2 100644 --- a/OCH/mogo-och-common-module/src/main/java/com/mogo/och/common/module/utils/NumberFormatUtil.java +++ b/OCH/mogo-och-common-module/src/main/java/com/mogo/och/common/module/utils/NumberFormatUtil.java @@ -30,7 +30,8 @@ public class NumberFormatUtil { */ public static String cutOutNumber(double num,int cutNum){ try{ - BigDecimal bg = new BigDecimal(num).setScale(cutNum, RoundingMode.DOWN); + //注:将double类型转成String类型再处理截取。 使用double部分数据截取有问题 + BigDecimal bg = new BigDecimal(String.valueOf(num)).setScale(cutNum, RoundingMode.DOWN); return String.valueOf(bg.doubleValue()); }catch (Exception e){ From 6c28f9031f1fbcd9663464a8fd60db5cb9b322d2 Mon Sep 17 00:00:00 2001 From: zhongchao Date: Wed, 28 Jun 2023 22:01:34 +0800 Subject: [PATCH 02/23] [3.3.0] fix bug of request global path --- .../server/AsyncDataToAutopilotServer.kt | 21 ++--- .../core/function/smp/view/SmallMapView.kt | 77 +++++++++++-------- 2 files changed, 55 insertions(+), 43 deletions(-) diff --git a/core/function-impl/mogo-core-function-datacenter/src/main/java/com/mogo/eagle/core/function/datacenter/autopilot/server/AsyncDataToAutopilotServer.kt b/core/function-impl/mogo-core-function-datacenter/src/main/java/com/mogo/eagle/core/function/datacenter/autopilot/server/AsyncDataToAutopilotServer.kt index 95484f5cfd..9fcbef0a67 100644 --- a/core/function-impl/mogo-core-function-datacenter/src/main/java/com/mogo/eagle/core/function/datacenter/autopilot/server/AsyncDataToAutopilotServer.kt +++ b/core/function-impl/mogo-core-function-datacenter/src/main/java/com/mogo/eagle/core/function/datacenter/autopilot/server/AsyncDataToAutopilotServer.kt @@ -41,22 +41,23 @@ class AsyncDataToAutopilotServer private constructor() : IMoGoTrafficLightListen } override fun onAutopilotStatusResponse(state: Int) { + bizLog(SceneConstant.M_D_C + TAG, "自动驾驶状态变化:$state,准备请求全局路线") createSubscribe?.let { if (!it.isDisposed) { bizLog(SceneConstant.M_D_C + TAG, "自动驾驶状态变化,取消前置轨迹请求,间隔2s重新请求底盘轨迹") createSubscribe?.dispose() } - when (state) { - IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_RUNNING -> { - createSubscribe = Observable.timer(2000L, TimeUnit.MILLISECONDS) - .observeOn(AndroidSchedulers.mainThread()) - .subscribe { - bizLog(SceneConstant.M_D_C + TAG, "请求底盘轨迹") - CallerAutoPilotControlManager.getGlobalPath() - } - } - else -> {} + } + when (state) { + IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_RUNNING -> { + createSubscribe = Observable.timer(2000L, TimeUnit.MILLISECONDS) + .observeOn(AndroidSchedulers.mainThread()) + .subscribe { + bizLog(SceneConstant.M_D_C + TAG, "请求底盘轨迹") + CallerAutoPilotControlManager.getGlobalPath() + } } + else -> {} } } diff --git a/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/smp/view/SmallMapView.kt b/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/smp/view/SmallMapView.kt index 6203de28d4..3aa07d4e19 100644 --- a/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/smp/view/SmallMapView.kt +++ b/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/smp/view/SmallMapView.kt @@ -48,6 +48,7 @@ class SmallMapView @JvmOverloads constructor( private var mCameraUpdate: CameraUpdate? = null private var mContext: Context? = null private var mLocation: MogoLocation? = null + private var globalPathResp: MessagePad.GlobalPathResp? = null companion object { const val TAG = "SmallMapView" @@ -121,12 +122,7 @@ class SmallMapView @JvmOverloads constructor( ) ) // 绘制线 - mPolyline = mAMap!!.addPolyline( - PolylineOptions() - .addAll(mCoordinatesLatLng) - .color(Color.argb(255, 31, 127, 255)) - .width(12f) - ) + mPolyline?.points = mCoordinatesLatLng CallerLogger.d( SceneConstant.M_MAP + TAG, "SmallMapView drawPolyline size is = ${mCoordinatesLatLng.size} ") } @@ -136,8 +132,7 @@ class SmallMapView @JvmOverloads constructor( @UiThread fun clearPolyline() { if (mPolyline != null) { - mPolyline!!.remove() - mPolyline = null + mPolyline!!.points = null } if (mStartMarker != null) { mStartMarker!!.isVisible = false @@ -157,6 +152,12 @@ class SmallMapView @JvmOverloads constructor( CallerChassisLocationGCJ02ListenerManager.addListener(TAG, 10, this) CallerPlanningRottingListenerManager.addListener(TAG, this) CallerAutoPilotStatusListenerManager.addListener(TAG, this) + + mPolyline = mAMap!!.addPolyline( + PolylineOptions() + .color(Color.argb(255, 31, 127, 255)) + .width(12f) + ) } private fun initAMapView() { @@ -311,43 +312,53 @@ class SmallMapView @JvmOverloads constructor( } override fun onAutopilotStatusResponse(state: Int) { - if (state != 2) { + if(state == 2){ + drawRotting() + }else{ UiThreadHandler.post { clearPolyline() } } } + override fun onAutopilotRouteLineId(lineId: Long) { + super.onAutopilotRouteLineId(lineId) + if(lineId == 0L){ + this.globalPathResp = null + } + } + + private fun drawRotting(){ + globalPathResp?.let { + val latLngList: MutableList = ArrayList() + for (routeModel in globalPathResp!!.wayPointsList) { + latLngList.add(MogoLatLng(routeModel.latitude, routeModel.longitude)) + } + CallerLogger.d( + SceneConstant.M_MAP + TAG, "SmallMapView latLngList.size = ${latLngList.size}") + if (latLngList.size > 0) { + UiThreadHandler.post { + convert(latLngList) + drawablePolyline() + } + } else { + UiThreadHandler.post { + CallerLogger.d( + SceneConstant.M_MAP + TAG, "SmallMapView latLngList.size = ${latLngList.size} clearPolyline ---->") + clearPolyline() + } + } + } + } + override fun onAutopilotRotting(globalPathResp: MessagePad.GlobalPathResp?) { CallerLogger.d( SceneConstant.M_MAP + TAG, "SmallMapView globalPathResp = $globalPathResp") if (globalPathResp == null || globalPathResp.wayPointsList.size == 0) { return } - if(CallerAutoPilotStatusListenerManager.getState() != 2){ - UiThreadHandler.post { - clearPolyline() - } - return - } - val latLngList: MutableList = ArrayList() - for (routeModel in globalPathResp.wayPointsList) { - latLngList.add(MogoLatLng(routeModel.latitude, routeModel.longitude)) - } - CallerLogger.d( - SceneConstant.M_MAP + TAG, "SmallMapView latLngList.size = ${latLngList.size}") - if (latLngList.size > 0) { - UiThreadHandler.post { - convert(latLngList) - drawablePolyline() - } - } else { - UiThreadHandler.post { - CallerLogger.d( - SceneConstant.M_MAP + TAG, "SmallMapView latLngList.size = ${latLngList.size} clearPolyline ---->") - clearPolyline() - } - } + this.globalPathResp = globalPathResp + drawRotting() } override fun onInterceptTouchEvent(ev: MotionEvent?): Boolean { From 06f857326571d866589e2e16a37bc2aa164e8b35 Mon Sep 17 00:00:00 2001 From: yangyakun Date: Thu, 29 Jun 2023 10:51:01 +0800 Subject: [PATCH 03/23] add todo --- .../manager/distancemamager/TrajectoryAndDistanceManager.kt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/OCH/mogo-och-common-module/src/main/java/com/mogo/och/common/module/manager/distancemamager/TrajectoryAndDistanceManager.kt b/OCH/mogo-och-common-module/src/main/java/com/mogo/och/common/module/manager/distancemamager/TrajectoryAndDistanceManager.kt index 8d80a3f7be..fffccac800 100644 --- a/OCH/mogo-och-common-module/src/main/java/com/mogo/och/common/module/manager/distancemamager/TrajectoryAndDistanceManager.kt +++ b/OCH/mogo-och-common-module/src/main/java/com/mogo/och/common/module/manager/distancemamager/TrajectoryAndDistanceManager.kt @@ -69,6 +69,9 @@ object TrajectoryAndDistanceManager: IMoGoPlanningRottingListener{ //上一次计算最近点的缓存 private var preCarLocationIndexInTrajectory = 0 + // TODO: 计算整个轨迹的长度 + // TODO: 计算轨迹点之间的长度、及轨迹点间最大长度 + init { CallerPlanningRottingListenerManager.addListener(TAG, this) } @@ -317,6 +320,7 @@ object TrajectoryAndDistanceManager: IMoGoPlanningRottingListener{ location.longitude, location.latitude ) } + d(M_OCHCOMMON+ TAG,"距离终点:$lastSumLength") if(distanceListeners.size>0) { distanceListeners.forEach { //val tag = it.key From 5c0b5351de33476e7a5fb0cc3843bec2999f05e1 Mon Sep 17 00:00:00 2001 From: zhongchao Date: Thu, 29 Jun 2023 11:34:43 +0800 Subject: [PATCH 04/23] [3.3.0] fix bug of amap line problem ,and change the log --- .../datacenter/autopilot/server/AsyncDataToAutopilotServer.kt | 2 +- .../java/com/mogo/eagle/core/function/smp/view/SmallMapView.kt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/core/function-impl/mogo-core-function-datacenter/src/main/java/com/mogo/eagle/core/function/datacenter/autopilot/server/AsyncDataToAutopilotServer.kt b/core/function-impl/mogo-core-function-datacenter/src/main/java/com/mogo/eagle/core/function/datacenter/autopilot/server/AsyncDataToAutopilotServer.kt index 9fcbef0a67..97815c2539 100644 --- a/core/function-impl/mogo-core-function-datacenter/src/main/java/com/mogo/eagle/core/function/datacenter/autopilot/server/AsyncDataToAutopilotServer.kt +++ b/core/function-impl/mogo-core-function-datacenter/src/main/java/com/mogo/eagle/core/function/datacenter/autopilot/server/AsyncDataToAutopilotServer.kt @@ -41,7 +41,7 @@ class AsyncDataToAutopilotServer private constructor() : IMoGoTrafficLightListen } override fun onAutopilotStatusResponse(state: Int) { - bizLog(SceneConstant.M_D_C + TAG, "自动驾驶状态变化:$state,准备请求全局路线") + bizLog(SceneConstant.M_D_C + TAG, "自动驾驶状态变化:$state") createSubscribe?.let { if (!it.isDisposed) { bizLog(SceneConstant.M_D_C + TAG, "自动驾驶状态变化,取消前置轨迹请求,间隔2s重新请求底盘轨迹") diff --git a/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/smp/view/SmallMapView.kt b/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/smp/view/SmallMapView.kt index 3aa07d4e19..fa6fa59c1d 100644 --- a/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/smp/view/SmallMapView.kt +++ b/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/smp/view/SmallMapView.kt @@ -132,7 +132,7 @@ class SmallMapView @JvmOverloads constructor( @UiThread fun clearPolyline() { if (mPolyline != null) { - mPolyline!!.points = null + mPolyline!!.points = emptyList() } if (mStartMarker != null) { mStartMarker!!.isVisible = false From 3a69cc47d16104ce7f11555bdfa263002dc0cb96 Mon Sep 17 00:00:00 2001 From: zhongchao Date: Thu, 29 Jun 2023 11:54:04 +0800 Subject: [PATCH 05/23] [3.3.0] vol --- .../src/main/java/com/mogo/och/bus/presenter/BusPresenter.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OCH/mogo-och-bus/src/main/java/com/mogo/och/bus/presenter/BusPresenter.java b/OCH/mogo-och-bus/src/main/java/com/mogo/och/bus/presenter/BusPresenter.java index d41c027b53..f34b660231 100644 --- a/OCH/mogo-och-bus/src/main/java/com/mogo/och/bus/presenter/BusPresenter.java +++ b/OCH/mogo-och-bus/src/main/java/com/mogo/och/bus/presenter/BusPresenter.java @@ -50,7 +50,7 @@ public class BusPresenter extends Presenter private static final String TAG = "BusPresenter"; - private int currentAutopilotStatus = -1; + private volatile int currentAutopilotStatus = -1; private final List mStationList = new ArrayList<>(); private int mCurrentStation = 0; From a1284f485e1d8e0f34f2d33fd4acc98c89d72776 Mon Sep 17 00:00:00 2001 From: renwj Date: Thu, 29 Jun 2023 14:50:29 +0800 Subject: [PATCH 06/23] =?UTF-8?q?[3.3.0][=E9=AD=94=E6=96=B9]=20=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=E9=AD=94=E6=96=B9=E8=B0=83=E8=AF=95=E5=BC=80=E5=85=B3?= =?UTF-8?q?=E7=8A=B6=E6=80=81=E6=8C=81=E4=B9=85=E5=8C=96;=E6=9B=B4?= =?UTF-8?q?=E6=94=B9=E9=AD=94=E6=96=B9Toast=E7=9A=84=E5=AE=9E=E7=8E=B0?= =?UTF-8?q?=E6=96=B9=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../launcher/lancet/WindowCallbackLancet.java | 8 +- .../mofang/MoGoMoFangProviderImpl.kt | 85 +++++++++++++------ 2 files changed, 61 insertions(+), 32 deletions(-) diff --git a/app/src/main/java/com/mogo/launcher/lancet/WindowCallbackLancet.java b/app/src/main/java/com/mogo/launcher/lancet/WindowCallbackLancet.java index ce542d056a..80865299b8 100644 --- a/app/src/main/java/com/mogo/launcher/lancet/WindowCallbackLancet.java +++ b/app/src/main/java/com/mogo/launcher/lancet/WindowCallbackLancet.java @@ -69,7 +69,7 @@ public class WindowCallbackLancet { @Override public void onViewAttachedToWindow(@NonNull View v) { try { - v.getViewTreeObserver().addOnGlobalFocusChangeListener(listener); + v.getRootView().getViewTreeObserver().addOnGlobalFocusChangeListener(listener); isAdd = true; } catch (Throwable t) { t.printStackTrace(); @@ -79,7 +79,7 @@ public class WindowCallbackLancet { public void onViewDetachedFromWindow(@NonNull View v) { try { if (isAdd) { - v.getViewTreeObserver().removeOnGlobalFocusChangeListener(listener); + v.getRootView().getViewTreeObserver().removeOnGlobalFocusChangeListener(listener); } } catch (Throwable t) { t.printStackTrace(); @@ -99,7 +99,7 @@ public class WindowCallbackLancet { @Override public void onViewAttachedToWindow(@NonNull View v) { try { - v.getViewTreeObserver().addOnGlobalFocusChangeListener(listener); + v.getRootView().getViewTreeObserver().addOnGlobalFocusChangeListener(listener); isAdd = true; } catch (Throwable t) { t.printStackTrace(); @@ -109,7 +109,7 @@ public class WindowCallbackLancet { public void onViewDetachedFromWindow(@NonNull View v) { try { if (isAdd) { - v.getViewTreeObserver().removeOnGlobalFocusChangeListener(listener); + v.getRootView().getViewTreeObserver().removeOnGlobalFocusChangeListener(listener); } } catch (Throwable t) { t.printStackTrace(); diff --git a/core/function-impl/mogo-core-function-devatools/src/main/java/com/zhjt/mogo_core_function_devatools/mofang/MoGoMoFangProviderImpl.kt b/core/function-impl/mogo-core-function-devatools/src/main/java/com/zhjt/mogo_core_function_devatools/mofang/MoGoMoFangProviderImpl.kt index 6057743514..a65afbaa0f 100644 --- a/core/function-impl/mogo-core-function-devatools/src/main/java/com/zhjt/mogo_core_function_devatools/mofang/MoGoMoFangProviderImpl.kt +++ b/core/function-impl/mogo-core-function-devatools/src/main/java/com/zhjt/mogo_core_function_devatools/mofang/MoGoMoFangProviderImpl.kt @@ -3,17 +3,23 @@ package com.zhjt.mogo_core_function_devatools.mofang import android.annotation.* import android.app.* import android.bluetooth.* +import android.graphics.* +import android.graphics.drawable.ColorDrawable import android.util.* import android.view.* import android.view.Window.Callback +import android.widget.TextView import android.widget.Toast +import androidx.appcompat.app.AppCompatActivity +import androidx.core.view.* +import androidx.lifecycle.* import com.mogo.core.mofang.connect.MoFangManager import com.mogo.core.mofang.connect.device.* import com.mogo.core.mofang.connect.listener.* import com.mogo.eagle.core.function.api.devatools.mofang.* import com.mogo.eagle.core.function.api.devatools.mofang.IMoGoMoFangProvider.OnMoFangStatusListener -import com.mogo.eagle.core.utilcode.util.UiThreadHandler -import com.mogo.eagle.core.utilcode.util.Utils +import com.mogo.eagle.core.utilcode.floating.* +import com.mogo.eagle.core.utilcode.util.* import com.zhjt.mogo_core_function_devatools.mofang.MoFangAnalyticUtils.Companion.EVENT_BATTERY import com.zhjt.mogo_core_function_devatools.mofang.MoFangAnalyticUtils.Companion.EVENT_BATTERY_VALUE import com.zhjt.mogo_core_function_devatools.mofang.MoFangAnalyticUtils.Companion.EVENT_INPUT @@ -24,6 +30,8 @@ import com.zhjt.mogo_core_function_devatools.mofang.MoFangAnalyticUtils.Companio import com.zhjt.mogo_core_function_devatools.mofang.MoFangAnalyticUtils.Companion.EVENT_SUB_DISCONNECT_SUCCESS import com.zhjt.mogo_core_function_devatools.mofang.MoFangAnalyticUtils.Companion.EVENT_SUB_START_CONNECT import com.zhjt.mogo_core_function_devatools.mofang.MoFangAnalyticUtils.Companion.EVENT_SUB_START_DISCONNECT +import kotlinx.coroutines.* +import me.jessyan.autosize.utils.AutoSizeUtils import java.util.concurrent.ConcurrentHashMap import java.util.concurrent.atomic.AtomicBoolean import java.util.concurrent.atomic.AtomicInteger @@ -33,9 +41,9 @@ internal class MoGoMoFangProviderImpl: IMoGoMoFangProvider, OnMoFangDeviceListen companion object { private const val TAG = "MoGoMoFangProviderImpl" - } - private val battery by lazy { AtomicInteger(0) } + private const val SP_KEY_TEST_ENABLE = "sp_mofang_test_enable" + } private val listeners by lazy { ConcurrentHashMap() } @@ -43,12 +51,15 @@ internal class MoGoMoFangProviderImpl: IMoGoMoFangProvider, OnMoFangDeviceListen private val linkedLog by lazy { MoFangLinkedLog().also { executor.setLinkedLog(it) } } - private val isTest by lazy { AtomicBoolean(false) } + private val isTest by lazy { AtomicBoolean(SPUtils.getInstance().getBoolean(SP_KEY_TEST_ENABLE)) } - private val toast by lazy { AtomicReference() } + private var toast: MoGoPopWindow? = null + + private var job: Job? = null override fun enableTest(enable: Boolean) { isTest.set(enable) + SPUtils.getInstance().put(SP_KEY_TEST_ENABLE, enable) } override fun isEnableTest(): Boolean { @@ -126,13 +137,10 @@ internal class MoGoMoFangProviderImpl: IMoGoMoFangProvider, OnMoFangDeviceListen override fun onBluetoothBatteryChanged(battery: Int) { linkedLog.record(mapOf("callback" to "onBluetoothBatteryChanged:$battery")) MoFangAnalyticUtils.track(EVENT_BATTERY, mutableMapOf(EVENT_BATTERY_VALUE to "$battery")) - if (this.battery.get() != battery) { - UiThreadHandler.post { - listeners.values.forEach { - it.onMoFangBatteryChanged(battery) - } + UiThreadHandler.post { + listeners.values.forEach { + it.onMoFangBatteryChanged(battery) } - this.battery.set(battery) } } @@ -167,13 +175,9 @@ internal class MoGoMoFangProviderImpl: IMoGoMoFangProvider, OnMoFangDeviceListen } override fun onBluetoothKeyBoardCombineClicked(vararg keyCodes: Int) { - val keycodesText = keyCodes.joinToString(",") { KeyEvent.keyCodeToString(it) } + val keycodesText = keyCodes.joinToString(",") { KeyEvent.keyCodeToString(it).replace("KEYCODE_", "", true) } if (isTest.get()) { - toast.get()?.cancel() - Toast.makeText(Utils.getApp(), "组合键[$keycodesText]触发了\n[正式使用时,请关闭运营面板上的\"魔方指令\"测试开关]", Toast.LENGTH_SHORT).also { - toast.set(it) - }.show() - return + showToast("组合键[$keycodesText]触发了") } try { MoFangAnalyticUtils.track(EVENT_INPUT, mutableMapOf(EVENT_INPUT_SUB_KEYCODE to keycodesText, EVENT_INPUT_SUB_TYPE to "3")) @@ -188,11 +192,7 @@ internal class MoGoMoFangProviderImpl: IMoGoMoFangProvider, OnMoFangDeviceListen override fun onBluetoothKeyBoardLongClicked(keyCode: Int) { if (isTest.get()) { - toast.get()?.cancel() - Toast.makeText(Utils.getApp(), "长按键[${KeyEvent.keyCodeToString(keyCode)}]触发了\n[正式使用时,请关闭运营面板上的\"魔方指令\"测试开关]", Toast.LENGTH_SHORT).also { - toast.set(it) - }.show() - return + showToast("长按键[${KeyEvent.keyCodeToString(keyCode).replace("KEYCODE_", "", true)}]触发了") } try { MoFangAnalyticUtils.track(EVENT_INPUT, mutableMapOf(EVENT_INPUT_SUB_KEYCODE to keyCode.toString(), EVENT_INPUT_SUB_TYPE to "2")) @@ -210,11 +210,7 @@ internal class MoGoMoFangProviderImpl: IMoGoMoFangProvider, OnMoFangDeviceListen override fun onBluetoothKeyboardClicked(keyCode: Int) { val keycodeText = KeyEvent.keyCodeToString(keyCode) if (isTest.get()) { - toast.get()?.cancel() - Toast.makeText(Utils.getApp(), "单击键[$keycodeText]触发了\n[正式使用时,请关闭运营面板上的\"魔方指令\"测试开关]", Toast.LENGTH_SHORT).also { - toast.set(it) - }.show() - return + showToast("单击键[${keycodeText.replace("KEYCODE_", "", true)}]触发了") } try { MoFangAnalyticUtils.track(EVENT_INPUT, mutableMapOf(EVENT_INPUT_SUB_KEYCODE to keyCode.toString(), EVENT_INPUT_SUB_TYPE to "1")) @@ -229,6 +225,39 @@ internal class MoGoMoFangProviderImpl: IMoGoMoFangProvider, OnMoFangDeviceListen } } + private fun showToast(text: String) { + toast?.hide() + val activity = AppStateManager.currentActivity() + if (activity !is AppCompatActivity) { + return + } + val padding = AutoSizeUtils.dp2px(activity, 10.0f) + MoGoPopWindow.Builder() + .attachToActivity(activity) + .contentView(TextView(activity).also { + it.setPadding(padding) + it.setTextColor(Color.WHITE) + it.background = ColorDrawable(Color.BLACK) + it.textSize = AutoSizeUtils.sp2px(activity, 12f).toFloat() + it.text = text + }) + .width(WindowManager.LayoutParams.WRAP_CONTENT) + .height(WindowManager.LayoutParams.WRAP_CONTENT) + .gravityInActivity(Gravity.BOTTOM or Gravity.CENTER_HORIZONTAL) + .offsetY(AutoSizeUtils.dp2px(activity, 200.0f)) + .onDismissed { + toast = null + } + .onShowed { + job?.cancel() + activity.lifecycleScope.launch { + delay(2000) + toast?.hide() + }.also { job = it } + } + .build().also { toast = it }.show() + } + override fun onBluetoothKeyboardEvent(event: KeyEvent) { } override fun onBluetoothKeyboardInputInvalid() { From cdcb2928783217e9ba2b27b433347a005c0ff52c Mon Sep 17 00:00:00 2001 From: zhongchao Date: Thu, 29 Jun 2023 14:55:07 +0800 Subject: [PATCH 07/23] [3.3.0] update version code to 3.3.0 --- gradle.properties | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gradle.properties b/gradle.properties index 1aa5db1eef..146ea7130c 100644 --- a/gradle.properties +++ b/gradle.properties @@ -93,8 +93,8 @@ WEBSOCKET_VERSION=1.1.7 applicationId=com.mogo.launcer applicationName=IntelligentPilot # RoboBus司机端:2.5.1;RoboTaxi司机端:2.5.1;RoboTaxi乘客端:1.0.0 -versionCode=3020000 -versionName=3.2.0 +versionCode=3030000 +versionName=3.3.0 ################# 新架构模块Maven版本管理 ################# MOGO_CORE_FUNCTION_HMI_VERSION=0.0.58.10 From d5425214e8d7d8a4ca0669fd306f8b09f110d4f2 Mon Sep 17 00:00:00 2001 From: renwj Date: Thu, 29 Jun 2023 21:08:45 +0800 Subject: [PATCH 08/23] =?UTF-8?q?[3.3.0][=E9=AD=94=E6=96=B9]=20=E4=BC=98?= =?UTF-8?q?=E5=8C=96=E7=94=B5=E9=87=8F=E5=92=8C=E6=8F=90=E9=AB=98=E8=BF=9E?= =?UTF-8?q?=E6=8E=A5=E7=A8=B3=E5=AE=9A=E6=80=A7?= 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 e696522f27..0538e951be 100644 --- a/config.gradle +++ b/config.gradle @@ -218,7 +218,7 @@ ext { weak_network : "com.mogo.weak:network:1.0.0", - mofang_runtime : "com.mogo.eagle.mofang.core:runtime:1.0.0" + mofang_runtime : "com.mogo.eagle.core.mofang:runtime:2.0.0" ] android = [ launcherApplicationId : "com.mogo.launcher", From 0f6b477f1564a9078e6dc3d77b08ad900f6fd161 Mon Sep 17 00:00:00 2001 From: zhongchao Date: Fri, 30 Jun 2023 10:25:29 +0800 Subject: [PATCH 09/23] [3.3.0] code opt --- .../obu/MogoPrivateObuNewManager.kt | 39 ++++++++++--------- 1 file changed, 20 insertions(+), 19 deletions(-) diff --git a/core/function-impl/mogo-core-function-datacenter/src/main/java/com/mogo/eagle/core/function/datacenter/obu/MogoPrivateObuNewManager.kt b/core/function-impl/mogo-core-function-datacenter/src/main/java/com/mogo/eagle/core/function/datacenter/obu/MogoPrivateObuNewManager.kt index a53663f34b..504cb86c39 100644 --- a/core/function-impl/mogo-core-function-datacenter/src/main/java/com/mogo/eagle/core/function/datacenter/obu/MogoPrivateObuNewManager.kt +++ b/core/function-impl/mogo-core-function-datacenter/src/main/java/com/mogo/eagle/core/function/datacenter/obu/MogoPrivateObuNewManager.kt @@ -115,7 +115,7 @@ class MogoPrivateObuNewManager private constructor() : OnUpgradeListener { } fun setHvInfoSendCycle(time: Int) { - ObuManager.getInstance().setHvInfoPushCycle(time); + ObuManager.getInstance().setHvInfoPushCycle(time) } /** @@ -136,8 +136,8 @@ class MogoPrivateObuNewManager private constructor() : OnUpgradeListener { */ fun deleteObuFile() { UiThreadHandler.post { - var isDeleteSuccess = FileUtils.delete(Config.downLoadObuPath) - var isDeleteUnzipSuccess = FileUtils.delete(Config.downLoadUnzipObuPath) + val isDeleteSuccess = FileUtils.delete(Config.downLoadObuPath) + val isDeleteUnzipSuccess = FileUtils.delete(Config.downLoadUnzipObuPath) CallerLogger.d( "$M_OBU${MogoObuConst.TAG_UPGRADE_OBU}", "deleteObuFile isDeleteSuccess = $isDeleteSuccess ----isDeleteUnzipSuccess = $isDeleteUnzipSuccess" @@ -154,11 +154,11 @@ class MogoPrivateObuNewManager private constructor() : OnUpgradeListener { /** * 传递obu升级包给硬件 - * @param upgradePackage 升级包文件绝对路径 只能包含 升级包MD5文件和升级包文件 - * @param isUpgradeNow 是否立即升级 + * upgradePackage 升级包文件绝对路径 只能包含 升级包MD5文件和升级包文件 + * isUpgradeNow 是否立即升级 * false:OBU设备下次上电时执行升级程序 * ture: OBU设备立即执行升级程序 TODO 警告:执行立即升级时请确保车辆是静止状态。车辆在运行过程中升级设备可能会影响驾驶,严重时可能造成安全隐患!!! - * @param listener 升级回调 + * listener 升级回调 * @return 是否调用成功 */ fun uploadObuPack(filePathArray: Array) { @@ -231,8 +231,11 @@ class MogoPrivateObuNewManager private constructor() : OnUpgradeListener { } override fun onObuCallResult(result: BaseResult?) { + if(result == null){ + return + } val builder = StringBuilder("调用结果:\n") - when (result!!.function) { + when (result.function) { MogoObuConstants.CALL_FUNCTION.CONFIG -> { val configResult = result as MogoObuCallConfigResult builder.append(configResult.type.desc).append("配置调用= ") @@ -624,13 +627,13 @@ class MogoPrivateObuNewManager private constructor() : OnUpgradeListener { ) { CallerLogger.d( "$M_OBU${MogoObuConst.TAG_MOGO_NEW_OBU}", - "onMogoObuRsmWarning ------> ${data.toString()}" + "onMogoObuRsmWarning ------> ${data?.toString()}" ) if (HmiBuildConfig.isShowObuV2iView) { if (HmiBuildConfig.isShowObuWeaknessTrafficView) { // 交通参与者类型 0x0:未知 UNKNOWN | 1机动车 2:非机动车 NON_MOTOR | 3:行人 PEDESTRIAN 4:obu if (data != null && data.participant != null) { - var v2xType = when (data.participant.ptcType) { + val v2xType = when (data.participant.ptcType) { 1 -> { //机动车 EventTypeEnumNew.TYPE_USECASE_ID_VRUCW_MOTOR_VEHICLES.poiType } @@ -646,7 +649,6 @@ class MogoPrivateObuNewManager private constructor() : OnUpgradeListener { } val ttsContent = EventTypeEnumNew.getWarningTts(v2xType) val alertContent = EventTypeEnumNew.getWarningContent(v2xType) - var level = -1 val direction = getMessageDirection(data.participant.targetPosition) CallerLogger.d( "$M_OBU${MogoObuConst.TAG_MOGO_NEW_OBU}", @@ -654,10 +656,9 @@ class MogoPrivateObuNewManager private constructor() : OnUpgradeListener { ) when (data.status) { MogoObuShowConstants.STATUS.ADD -> { // 添加 - // 更新数据,模型变色的时候是不是update,如果不是更新,可能导致模型不变色,(add的时候,是否有level高的) TODO + // 更新数据,模型变色的时候是不是update,如果不是更新,可能导致模型不变色,(add的时候,是否有level高的) TrafficDataConvertUtilsNew.cvxPtcThreatIndInfo2TrafficData(data) ?.let { - TrafficMarkerDrawer.updateITrafficThreatLevelInfo(it) } } @@ -666,7 +667,7 @@ class MogoPrivateObuNewManager private constructor() : OnUpgradeListener { } MogoObuShowConstants.STATUS.DELETE -> { // 删除 - // 更新数据 TODO 删除原来的,改变颜色,删除marker。不影响别的模型添加 + // 更新数据 删除原来的,改变颜色,删除marker。不影响别的模型添加 TrafficDataConvertUtilsNew.cvxPtcThreatIndInfo2TrafficData(data) ?.let { // 事件结束,还原交通参与者颜色 @@ -681,7 +682,7 @@ class MogoPrivateObuNewManager private constructor() : OnUpgradeListener { //预警status if (data.warningMsg != null && data.warningMsg.warningDataList != null && data.warningMsg.warningDataList.size > 0) { - level = data.warningMsg.warningDataList[0].warningLevel //默认是1个 + val level = data.warningMsg.warningDataList[0].warningLevel //默认是1个 CallerLogger.d( "$M_OBU${MogoObuConst.TAG_MOGO_NEW_OBU}", "onMogoObuRsmWarning ---status---> ${data.status} ---data.warningMsg.warningData[0].status = ${data.warningMsg.warningDataList[0].status} ---v2xType = $v2xType ---alertContent = $alertContent ---ttsContent = $ttsContent ---level = $level" @@ -784,7 +785,7 @@ class MogoPrivateObuNewManager private constructor() : OnUpgradeListener { /** * 构造对应展示数据和场景 根据obu的场景,add change delete确定是否展示 * @param appId 使用WarningTypeEnum获取icon、提示内容、tts内容 - * @see com.mogo.module.common.enums.EventTypeEnumNew + * @see com.mogo.eagle.core.data.enums.EventTypeEnumNew * EventTypeEnumNew在定义的id为了防止重复,和原始数据是不一样的,有对应关系 */ private fun handleSdkObu( @@ -999,7 +1000,7 @@ class MogoPrivateObuNewManager private constructor() : OnUpgradeListener { // 添加 MogoObuShowConstants.STATUS.ADD, MogoObuShowConstants.STATUS.UPDATE -> { - if (lights != null && lights.isNotEmpty()) { + if (lights.isNotEmpty()) { changeTrafficLightStatus(appId, lights) } } @@ -1066,8 +1067,8 @@ class MogoPrivateObuNewManager private constructor() : OnUpgradeListener { if (HmiBuildConfig.isShowGreenWaveView) { if (!isShowGreenWave) { isShowGreenWave = true - var minSpeedTemp = Math.round(currentLight.suggestMinSpeed * 3.6) - var maxSpeedTemp = Math.round(currentLight.suggestMaxSpeed * 3.6) + var minSpeedTemp = (currentLight.suggestMinSpeed * 3.6).roundToInt() + val maxSpeedTemp = (currentLight.suggestMaxSpeed * 3.6).roundToInt() if (minSpeedTemp == maxSpeedTemp) { minSpeedTemp -= 5 } @@ -1087,7 +1088,7 @@ class MogoPrivateObuNewManager private constructor() : OnUpgradeListener { val maxSpeed = currentLight.suggestMaxSpeed if (maxSpeed > 0) { - var currentSpeed = + val currentSpeed = CallerChassisLocationGCJ02ListenerManager.getChassisLocationGCJ02().gnssSpeed.toDouble() if (currentSpeed > 0) { ttsContentNew = From 6f51faf6909322da3397604b1d11d28addeb5cf9 Mon Sep 17 00:00:00 2001 From: renwj Date: Fri, 30 Jun 2023 15:03:58 +0800 Subject: [PATCH 10/23] =?UTF-8?q?[3.3.0][=E9=AD=94=E6=96=B9]=20=E4=BC=98?= =?UTF-8?q?=E5=8C=96=E8=BF=9E=E6=8E=A5=E7=A8=B3=E5=AE=9A=E6=80=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config.gradle | 2 +- .../mofang/MoGoMoFangProviderImpl.kt | 7 ++++++- .../eagle/core/function/hmi/ui/setting/SOPSettingView.kt | 5 ++++- 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/config.gradle b/config.gradle index 0538e951be..087d80e74b 100644 --- a/config.gradle +++ b/config.gradle @@ -218,7 +218,7 @@ ext { weak_network : "com.mogo.weak:network:1.0.0", - mofang_runtime : "com.mogo.eagle.core.mofang:runtime:2.0.0" + mofang_runtime : "com.mogo.eagle.core.mofang:runtime:2.0.5" ] android = [ launcherApplicationId : "com.mogo.launcher", diff --git a/core/function-impl/mogo-core-function-devatools/src/main/java/com/zhjt/mogo_core_function_devatools/mofang/MoGoMoFangProviderImpl.kt b/core/function-impl/mogo-core-function-devatools/src/main/java/com/zhjt/mogo_core_function_devatools/mofang/MoGoMoFangProviderImpl.kt index a65afbaa0f..a4ed1a2a8f 100644 --- a/core/function-impl/mogo-core-function-devatools/src/main/java/com/zhjt/mogo_core_function_devatools/mofang/MoGoMoFangProviderImpl.kt +++ b/core/function-impl/mogo-core-function-devatools/src/main/java/com/zhjt/mogo_core_function_devatools/mofang/MoGoMoFangProviderImpl.kt @@ -51,7 +51,7 @@ internal class MoGoMoFangProviderImpl: IMoGoMoFangProvider, OnMoFangDeviceListen private val linkedLog by lazy { MoFangLinkedLog().also { executor.setLinkedLog(it) } } - private val isTest by lazy { AtomicBoolean(SPUtils.getInstance().getBoolean(SP_KEY_TEST_ENABLE)) } + private val isTest by lazy { AtomicBoolean(SPUtils.getInstance().getBoolean(SP_KEY_TEST_ENABLE) && isConnected()) } private var toast: MoGoPopWindow? = null @@ -292,4 +292,9 @@ internal class MoGoMoFangProviderImpl: IMoGoMoFangProvider, OnMoFangDeviceListen Toast.makeText(Utils.getApp(), "检测到魔方未正确连接,请在系统蓝牙设置页面,找到魔方并配对连接...", Toast.LENGTH_SHORT).show() } } + + override fun onBluetoothKeyboardAbnormalDisconnected(status: Int) { + Log.d(TAG, "--- onBluetoothKeyboardAbnormalDisconnected(status: $status) ---") + linkedLog.record(mapOf("callback" to "onBluetoothKeyboardAbnormalDisconnected:$status")) + } } \ No newline at end of file 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 5fde15f7d2..62bf041148 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 @@ -320,7 +320,7 @@ internal class SOPSettingView @JvmOverloads constructor( } } - mfTest.isEnabled = true + mfTest.isEnabled = mf?.isConnected() ?: false mfTest.isChecked = mf?.isEnableTest() ?: false mfTest.setOnCheckedChangeListener { _, isChecked -> mf?.enableTest(isChecked) @@ -410,6 +410,8 @@ internal class SOPSettingView @JvmOverloads constructor( mfStatusLayout?.also { it.hideLoadingView() it.setClickedTextAndTag("断开魔方连接", 0) + mfTest?.isEnabled = true + mfTest?.isChecked = CallerDevaToolsManager.mofang()?.isEnableTest() ?: false } } @@ -417,6 +419,7 @@ internal class SOPSettingView @JvmOverloads constructor( mfStatusLayout?.also { it.hideLoadingView() it.setClickedTextAndTag("开始连接魔方", 1) + mfTest?.isEnabled = false } } From 9fdf2b51dc0551738f14c4ae790069b3efe914e1 Mon Sep 17 00:00:00 2001 From: zhongchao Date: Fri, 30 Jun 2023 16:06:58 +0800 Subject: [PATCH 11/23] [3.3.0] add log --- .../com/mogo/eagle/function/biz/v2x/V2XBizTrace.kt | 5 +---- .../eagle/function/biz/v2x/v2n/V2XEventManager.kt | 2 +- .../function/biz/v2x/v2n/pnc/V2NIdentifyDrawer.kt | 1 + .../v2x/v2n/scenario/scene/airoad/AiRoadMarker.kt | 13 ------------- .../scenario/scene/road/V2XRoadEventScenario.java | 3 ++- 5 files changed, 5 insertions(+), 19 deletions(-) diff --git a/core/function-impl/mogo-core-function-biz/src/main/java/com/mogo/eagle/function/biz/v2x/V2XBizTrace.kt b/core/function-impl/mogo-core-function-biz/src/main/java/com/mogo/eagle/function/biz/v2x/V2XBizTrace.kt index 2e65d11008..0317364f70 100644 --- a/core/function-impl/mogo-core-function-biz/src/main/java/com/mogo/eagle/function/biz/v2x/V2XBizTrace.kt +++ b/core/function-impl/mogo-core-function-biz/src/main/java/com/mogo/eagle/function/biz/v2x/V2XBizTrace.kt @@ -1,6 +1,5 @@ package com.mogo.eagle.function.biz.v2x -import com.mogo.commons.debug.DebugConfig import com.mogo.eagle.core.data.deva.chain.ChainConstant import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_V2X @@ -17,9 +16,7 @@ class V2XBizTrace { paramIndexes = [0, 1] ) fun onAck(data: Any, data1: Any) { - if (DebugConfig.isDebug()) { - CallerLogger.d("$M_V2X${data.toString()}", data1) - } + CallerLogger.d("$M_V2X${data.toString()}", data1) } } } \ No newline at end of file diff --git a/core/function-impl/mogo-core-function-biz/src/main/java/com/mogo/eagle/function/biz/v2x/v2n/V2XEventManager.kt b/core/function-impl/mogo-core-function-biz/src/main/java/com/mogo/eagle/function/biz/v2x/v2n/V2XEventManager.kt index e91545a014..40e98389fc 100644 --- a/core/function-impl/mogo-core-function-biz/src/main/java/com/mogo/eagle/function/biz/v2x/v2n/V2XEventManager.kt +++ b/core/function-impl/mogo-core-function-biz/src/main/java/com/mogo/eagle/function/biz/v2x/v2n/V2XEventManager.kt @@ -207,7 +207,7 @@ object V2XEventManager : IMoGoChassisLocationGCJ02Listener, IV2XCallback, return } } - CallerLogger.d("$M_V2X$TAG", "poiType : $poiType , 触发道路事件") + V2XBizTrace.onAck("$M_V2X$TAG","poiType : $poiType , 触发道路事件") CallerHmiManager.warningV2X( poiType, tts, diff --git a/core/function-impl/mogo-core-function-biz/src/main/java/com/mogo/eagle/function/biz/v2x/v2n/pnc/V2NIdentifyDrawer.kt b/core/function-impl/mogo-core-function-biz/src/main/java/com/mogo/eagle/function/biz/v2x/v2n/pnc/V2NIdentifyDrawer.kt index 592a529b26..1bfea7b0eb 100644 --- a/core/function-impl/mogo-core-function-biz/src/main/java/com/mogo/eagle/function/biz/v2x/v2n/pnc/V2NIdentifyDrawer.kt +++ b/core/function-impl/mogo-core-function-biz/src/main/java/com/mogo/eagle/function/biz/v2x/v2n/pnc/V2NIdentifyDrawer.kt @@ -76,6 +76,7 @@ internal object V2NIdentifyDrawer { val distance = CoordinateUtils.calculateLineDistance(itx.longitude, itx.latitude, car.longitude, car.latitude) val alertContent = getAlertContent(poiType, distance.toDouble()) val ttsContent = getTtsContent(poiType, distance.toDouble()) + V2XBizTrace.onAck("V2NIdentifyDrawer","绘制poi事件:$poiType") saveMsgBox(MsgBoxBean(V2X, V2XMsg(poiType, alertContent, ttsContent))) CallerHmiManager.warningV2X(poiType, alertContent, ttsContent, object : IMoGoWarningStatusListener { override fun onShow() { diff --git a/core/function-impl/mogo-core-function-biz/src/main/java/com/mogo/eagle/function/biz/v2x/v2n/scenario/scene/airoad/AiRoadMarker.kt b/core/function-impl/mogo-core-function-biz/src/main/java/com/mogo/eagle/function/biz/v2x/v2n/scenario/scene/airoad/AiRoadMarker.kt index 6a7bbadd8c..861dd2d1f1 100644 --- a/core/function-impl/mogo-core-function-biz/src/main/java/com/mogo/eagle/function/biz/v2x/v2n/scenario/scene/airoad/AiRoadMarker.kt +++ b/core/function-impl/mogo-core-function-biz/src/main/java/com/mogo/eagle/function/biz/v2x/v2n/scenario/scene/airoad/AiRoadMarker.kt @@ -5,7 +5,6 @@ import android.graphics.Color import android.os.Handler import android.os.HandlerThread import android.os.Looper -import android.util.Log import android.view.animation.DecelerateInterpolator import androidx.core.util.Pair import com.mogo.eagle.core.data.map.MogoLatLng @@ -83,7 +82,6 @@ class AiRoadMarker { marker.entity?.apply { roadMarker.drawMarkers(this, wrapper) } } if (drawRoadLine) { - Log.d(TAG, "--- marker --- 1 ---") //施工中心点前方的自车行驶方向上300米距离 val l1 = MogoMap.getInstance().mogoMap.getCenterLineRangeInfo( marker.poi_lon, @@ -92,7 +90,6 @@ class AiRoadMarker { 300f ) //施工中心点后方的自车行驶方向上300米距离 - Log.d(TAG, "--- marker --- 3 --- l1:$l1") V2XBizTrace.onAck("$TAG --- marker --- 3 --- l1:", l1) val l2 = MogoMap.getInstance().mogoMap.getCenterLineRangeInfo( marker.poi_lon, @@ -101,11 +98,9 @@ class AiRoadMarker { -300f ) if (l1.points.isEmpty() || l2.points.isEmpty()) { - Log.d(TAG, " --- marker --- 3 --- return ----") V2XBizTrace.onAck("$TAG --- marker --- 3 --- return ----", "") return@post } - Log.d(TAG, " --- marker --- 4 --- l2: $l2") V2XBizTrace.onAck("$TAG --- marker --- 4 --- l2:", l2) val points = LinkedList() if (l2 != null && l2.points.isNotEmpty()) { @@ -115,7 +110,6 @@ class AiRoadMarker { } val centerX = marker.poi_lon val centerY = marker.poi_lat - Log.d(TAG, "--- marker --- 5 --- marker: $marker") V2XBizTrace.onAck("$TAG --- marker --- 5 --- marker:", marker) val farthestPoint = marker.polygon?.let { var find: Pair = Pair(centerX, centerY) @@ -136,7 +130,6 @@ class AiRoadMarker { MogoLatLng(find.second, find.first) } ?: MogoLatLng(centerY, centerX) marker.farthestPoint = Pair(farthestPoint.lon, farthestPoint.lat) - Log.d(TAG, "--- marker --- 6 --- marker:$marker") V2XBizTrace.onAck("$TAG --- marker --- 6 --- marker:", marker) if (l1 != null && l1.points.isNotEmpty()) { for (l in l1.points) { @@ -169,7 +162,6 @@ class AiRoadMarker { builder.points(points) builder.colors(colors) builder.setVisible(true) - Log.d(TAG, "--- marker --- 7 --- points:${points.size}") V2XBizTrace.onAck("$TAG --- marker --- 7 --- points:", "${points.size}") val line = overlayManager?.showOrUpdateLine(builder.build()) if (line != null) { @@ -186,10 +178,8 @@ class AiRoadMarker { private fun removeLine() { val old = line.get() - Log.d(TAG, " --- removeRedLine --- 1") V2XBizTrace.onAck("$TAG --- removeRedLine --- 1", "") if (old != null) { - Log.d(TAG,"--- removeRedLine --- 2") V2XBizTrace.onAck("$TAG --- removeRedLine --- 2", "") line.set(null) old.delegate?.remove() @@ -198,7 +188,6 @@ class AiRoadMarker { private fun unMarker(marker: Marker) { v2nDrawHandler.post { - Log.d(TAG,"$TAG --- unMarker ---") V2XBizTrace.onAck("$TAG --- unMarker ---", "") this.marker.set(null) removeLine() @@ -209,13 +198,11 @@ class AiRoadMarker { } fun receive() { - Log.d(TAG, " --- receive --- 1 ---") V2XBizTrace.onAck("$TAG --- receive --- 1 ---", "") val poi = this.marker.get() val car = CallerChassisLocationWGS84ListenerManager.getChassisLocationWGS84() if (poi != null) { val distance = CoordinateUtils.calculateLineDistance(car.longitude, car.latitude, poi.poi_lon, poi.poi_lat) - Log.d(TAG ," --- receive --- 2 ---car:[${car.longitude}, ${car.latitude}] -> poi:[${poi.poi_lon}, ${poi.poi_lat}] --> distance:$distance") V2XBizTrace.onAck( "$TAG --- receive --- 2 ---", "car:[${car.longitude}, ${car.latitude}] -> poi:[${poi.poi_lon}, ${poi.poi_lat}] --> distance:$distance" diff --git a/core/function-impl/mogo-core-function-biz/src/main/java/com/mogo/eagle/function/biz/v2x/v2n/scenario/scene/road/V2XRoadEventScenario.java b/core/function-impl/mogo-core-function-biz/src/main/java/com/mogo/eagle/function/biz/v2x/v2n/scenario/scene/road/V2XRoadEventScenario.java index be0d509a70..0af5af6b95 100644 --- a/core/function-impl/mogo-core-function-biz/src/main/java/com/mogo/eagle/function/biz/v2x/v2n/scenario/scene/road/V2XRoadEventScenario.java +++ b/core/function-impl/mogo-core-function-biz/src/main/java/com/mogo/eagle/function/biz/v2x/v2n/scenario/scene/road/V2XRoadEventScenario.java @@ -17,6 +17,7 @@ import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotControlManager import com.mogo.eagle.core.function.call.hmi.CallerHmiManager; import com.mogo.eagle.core.function.call.map.CallerVisualAngleManager; import com.mogo.eagle.core.function.call.msgbox.CallerMsgBoxManager; +import com.mogo.eagle.function.biz.v2x.V2XBizTrace; import com.mogo.eagle.function.biz.v2x.v2n.scenario.impl.AbsV2XScenario; import com.mogo.eagle.function.biz.v2x.v2n.scenario.view.IV2XMarker; import com.mogo.eagle.core.network.utils.GsonUtil; @@ -44,7 +45,7 @@ public class V2XRoadEventScenario extends AbsV2XScenario imp @Override public void init(V2XMessageEntity v2XMessageEntity) { try { - Logger.d(TAG, "v2XMessageEntity:" + GsonUtil.jsonFromObject(v2XMessageEntity)); + V2XBizTrace.Companion.onAck("v2XMessageEntity",GsonUtil.jsonFromObject(v2XMessageEntity)); V2XRoadEventEntity v2XRoadEventEntity = v2XMessageEntity.getContent(); if (v2XRoadEventEntity != null) { if (!isSameScenario(v2XMessageEntity)) { From e66dad36968ca7a3bc01c459d6488ac2c7c77b7f Mon Sep 17 00:00:00 2001 From: wangmingjun Date: Fri, 30 Jun 2023 18:39:47 +0800 Subject: [PATCH 12/23] =?UTF-8?q?[3.3.0]=20=E4=BC=98=E5=8C=96=E5=B8=A7?= =?UTF-8?q?=E5=8A=A8=E7=94=BB=E5=B7=A5=E5=85=B7=E7=B1=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mogo/och/bus/presenter/BusPresenter.java | 4 +--- .../module/utils/AnimatorDrawableUtil.java | 23 +++++++++++++++++-- 2 files changed, 22 insertions(+), 5 deletions(-) diff --git a/OCH/mogo-och-bus/src/main/java/com/mogo/och/bus/presenter/BusPresenter.java b/OCH/mogo-och-bus/src/main/java/com/mogo/och/bus/presenter/BusPresenter.java index f34b660231..c823b12043 100644 --- a/OCH/mogo-och-bus/src/main/java/com/mogo/och/bus/presenter/BusPresenter.java +++ b/OCH/mogo-och-bus/src/main/java/com/mogo/och/bus/presenter/BusPresenter.java @@ -264,9 +264,7 @@ public class BusPresenter extends Presenter * 测试使用 */ public void debugAutoPilotStatus(int status) { - AutopilotStatusInfo info = new AutopilotStatusInfo(); - info.setState(status); - onAutopilotStatusResponse(info); + onAutopilotStatusResponse(status); } @Override diff --git a/OCH/mogo-och-common-module/src/main/java/com/mogo/och/common/module/utils/AnimatorDrawableUtil.java b/OCH/mogo-och-common-module/src/main/java/com/mogo/och/common/module/utils/AnimatorDrawableUtil.java index 513bfa6c34..5ac904ccf4 100644 --- a/OCH/mogo-och-common-module/src/main/java/com/mogo/och/common/module/utils/AnimatorDrawableUtil.java +++ b/OCH/mogo-och-common-module/src/main/java/com/mogo/och/common/module/utils/AnimatorDrawableUtil.java @@ -34,6 +34,8 @@ public class AnimatorDrawableUtil { private ImageView mImageView = null; //图片资源的ID列表 private List mResourceIdList = null; + //图片bitmap列表 + private List mBitmapList = null; //定时任务器 private final Timer mTimer = new Timer(); //定时任务 @@ -54,10 +56,17 @@ public class AnimatorDrawableUtil { mImageView = imageview; if(mResourceIdList==null){ mResourceIdList = new ArrayList(); + mBitmapList = new ArrayList<>(); }else{ mResourceIdList.clear(); + mBitmapList.clear(); } mResourceIdList.addAll(resourceIdList); + + //在初始化时候就将资源文件decode + for (int i = 0; i <= resourceIdList.size(); i++){ + mBitmapList.add(readBitMap(mImageView.getContext(),resourceIdList.get(i))); + } } /** @@ -67,14 +76,19 @@ public class AnimatorDrawableUtil { this.mImageView = imageview; if(mResourceIdList==null){ mResourceIdList = new ArrayList(); + mBitmapList = new ArrayList<>(); }else{ mResourceIdList.clear(); + mBitmapList.clear(); } loadFromXml(context, resourceId, new OnParseListener() { @Override public void onParse(List res) { mResourceIdList.addAll(res); + for (int i = 0; i <= res.size(); i++){ + mBitmapList.add(readBitMap(mImageView.getContext(),res.get(i))); + } } }); } @@ -219,8 +233,13 @@ public class AnimatorDrawableUtil { case MSG_START: { if (mFrameIndex >= 0 && mFrameIndex < mResourceIdList.size() && mState == STATE_RUNNING) { //这里不能使用image.setImageResource 因为源码中也是创建了bitmap 所以这里我们自己创建 - Bitmap bitmap=readBitMap(mImageView.getContext(),mResourceIdList.get(mFrameIndex)); - mImageView.setImageBitmap(bitmap); + if (mBitmapList != null && mBitmapList.size()-1 >= mFrameIndex){ + Bitmap bitmap= mBitmapList.get(mFrameIndex); + mImageView.setImageBitmap(bitmap); + }else { + Bitmap bitmap=readBitMap(mImageView.getContext(),mResourceIdList.get(mFrameIndex)); + mImageView.setImageBitmap(bitmap); + } mFrameIndex++; } } From 08d024d5916eb1496bcc18e171a5e54eb0a7a985 Mon Sep 17 00:00:00 2001 From: renwj Date: Fri, 30 Jun 2023 19:28:23 +0800 Subject: [PATCH 13/23] =?UTF-8?q?[3.3.0][=E6=97=A5=E5=BF=97]=20=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0=E5=85=A8=E9=87=8F=E6=97=A5=E5=BF=97=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config.gradle | 3 +- .../mogo-core-function-devatools/build.gradle | 1 + .../DevaToolsProvider.kt | 11 ++++ .../logcat/MoGoLogRecordProviderImpl.kt | 54 +++++++++++++++++++ .../logcat/uploader/LogRecordUploader.kt | 11 ++++ .../api/devatools/IDevaToolsProvider.kt | 7 +++ .../logcat/IMoGoLogRecordProvider.kt | 14 +++++ 7 files changed, 100 insertions(+), 1 deletion(-) create mode 100644 core/function-impl/mogo-core-function-devatools/src/main/java/com/zhjt/mogo_core_function_devatools/logcat/MoGoLogRecordProviderImpl.kt create mode 100644 core/function-impl/mogo-core-function-devatools/src/main/java/com/zhjt/mogo_core_function_devatools/logcat/uploader/LogRecordUploader.kt create mode 100644 core/mogo-core-function-api/src/main/java/com/mogo/eagle/core/function/api/devatools/logcat/IMoGoLogRecordProvider.kt diff --git a/config.gradle b/config.gradle index 087d80e74b..e988b6635d 100644 --- a/config.gradle +++ b/config.gradle @@ -218,7 +218,8 @@ ext { weak_network : "com.mogo.weak:network:1.0.0", - mofang_runtime : "com.mogo.eagle.core.mofang:runtime:2.0.5" + mofang_runtime : "com.mogo.eagle.core.mofang:runtime:2.0.5", + log_runtime : "com.mogo.eagle.core.log.record:runtime:1.0.0" ] android = [ launcherApplicationId : "com.mogo.launcher", diff --git a/core/function-impl/mogo-core-function-devatools/build.gradle b/core/function-impl/mogo-core-function-devatools/build.gradle index 45d6b48c23..cdeaff375c 100644 --- a/core/function-impl/mogo-core-function-devatools/build.gradle +++ b/core/function-impl/mogo-core-function-devatools/build.gradle @@ -90,6 +90,7 @@ dependencies { implementation rootProject.ext.dependencies.koomnative implementation rootProject.ext.dependencies.koomxhook implementation rootProject.ext.dependencies.mofang_runtime + implementation rootProject.ext.dependencies.log_runtime implementation group: "com.tencent.matrix", name: "matrix-android-lib", version: MATRIX_VERSION, changing: true implementation group: "com.tencent.matrix", name: "matrix-android-commons", version: MATRIX_VERSION, changing: true implementation group: "com.tencent.matrix", name: "matrix-trace-canary", version: MATRIX_VERSION, changing: true diff --git a/core/function-impl/mogo-core-function-devatools/src/main/java/com/zhjt/mogo_core_function_devatools/DevaToolsProvider.kt b/core/function-impl/mogo-core-function-devatools/src/main/java/com/zhjt/mogo_core_function_devatools/DevaToolsProvider.kt index f9fe09bb17..45f0186f5c 100644 --- a/core/function-impl/mogo-core-function-devatools/src/main/java/com/zhjt/mogo_core_function_devatools/DevaToolsProvider.kt +++ b/core/function-impl/mogo-core-function-devatools/src/main/java/com/zhjt/mogo_core_function_devatools/DevaToolsProvider.kt @@ -20,6 +20,7 @@ import com.mogo.eagle.core.function.api.devatools.IDevaToolsProvider import com.mogo.eagle.core.function.api.devatools.apm.* import com.mogo.eagle.core.function.api.devatools.strict.* import com.mogo.eagle.core.function.api.devatools.download.* +import com.mogo.eagle.core.function.api.devatools.logcat.* import com.mogo.eagle.core.function.api.devatools.mofang.* import com.mogo.eagle.core.function.api.lookaround.* import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger @@ -43,6 +44,7 @@ import com.zhjt.mogo_core_function_devatools.env.EnvChangeManager import com.zhjt.mogo_core_function_devatools.funcconfig.FuncConfigCenter.Companion.bizConfigCenter import com.zhjt.mogo_core_function_devatools.funcconfig.FuncConfigImpl import com.zhjt.mogo_core_function_devatools.koom.KoomInitTask +import com.zhjt.mogo_core_function_devatools.logcat.* import com.zhjt.mogo_core_function_devatools.logcatch.MogoLogCatchManager import com.zhjt.mogo_core_function_devatools.lookaround.* import com.zhjt.mogo_core_function_devatools.matrix.DynamicConfigImpl @@ -79,6 +81,8 @@ class DevaToolsProvider : IDevaToolsProvider { private val mofangProvider by lazy { MoGoMoFangProviderImpl() } + private val logRecordProvider by lazy { MoGoLogRecordProviderImpl() } + @Volatile private var mDockerVersion: String? = null @@ -113,6 +117,11 @@ class DevaToolsProvider : IDevaToolsProvider { (mContext as? Application)?.also { mofangProvider.init(it) } + + mContext?.also { + logRecordProvider.init(it) + logRecordProvider.start() + } } override fun checkMonitorDb() { @@ -366,4 +375,6 @@ class DevaToolsProvider : IDevaToolsProvider { override fun lookAroundDataProvider(): IMoGoLookAroundProvider = lookAroundDataProvider override fun mofang(): IMoGoMoFangProvider = mofangProvider + + override fun logRecord(): IMoGoLogRecordProvider = logRecordProvider } \ No newline at end of file diff --git a/core/function-impl/mogo-core-function-devatools/src/main/java/com/zhjt/mogo_core_function_devatools/logcat/MoGoLogRecordProviderImpl.kt b/core/function-impl/mogo-core-function-devatools/src/main/java/com/zhjt/mogo_core_function_devatools/logcat/MoGoLogRecordProviderImpl.kt new file mode 100644 index 0000000000..81558aa2e6 --- /dev/null +++ b/core/function-impl/mogo-core-function-devatools/src/main/java/com/zhjt/mogo_core_function_devatools/logcat/MoGoLogRecordProviderImpl.kt @@ -0,0 +1,54 @@ +package com.zhjt.mogo_core_function_devatools.logcat + +import android.content.* +import android.os.Process +import android.util.* +import com.mogo.core.log.record.* +import com.mogo.core.log.record.config.* +import com.mogo.eagle.core.function.api.devatools.logcat.* +import com.mogo.eagle.core.utilcode.util.* +import com.zhjt.mogo_core_function_devatools.logcat.uploader.* +import kotlinx.coroutines.* +import java.io.* +import java.util.concurrent.TimeUnit.MINUTES +import java.util.concurrent.atomic.AtomicBoolean + +internal class MoGoLogRecordProviderImpl: IMoGoLogRecordProvider { + + private val flag by lazy { AtomicBoolean(false) } + + private val scope by lazy { CoroutineScope(Dispatchers.IO + SupervisorJob()) } + + override fun init(context: Context) { + LogcatManager.init(LogcatConfig.Builder().context(context) + .recordPeriod(MINUTES.toMillis(3)) + .maxSizeInLogDir((1 * 1024 * 1024 * 1024).toLong()) //1G的最大容量 + .recordDir(File(context.getExternalFilesDir(null), "logcat")) + .pid(Process.myPid()) + .uploader(LogRecordUploader())) + } + + + override fun start() { + if (flag.get()) { + return + } + flag.set(true) + LogcatManager.start() + } + + override fun stop() { + if (!flag.get()) { + return + } + flag.set(false) + LogcatManager.stop() + } + + override fun upload(startTime: Long, endTime: Long) { + scope.launch { + val result = LogcatManager.upload(startTime, endTime) + Log.d(TAG, "上传日志:[startTime:$startTime, endTime: $endTime], 结果: $result") + } + } +} \ No newline at end of file diff --git a/core/function-impl/mogo-core-function-devatools/src/main/java/com/zhjt/mogo_core_function_devatools/logcat/uploader/LogRecordUploader.kt b/core/function-impl/mogo-core-function-devatools/src/main/java/com/zhjt/mogo_core_function_devatools/logcat/uploader/LogRecordUploader.kt new file mode 100644 index 0000000000..4f03953bf8 --- /dev/null +++ b/core/function-impl/mogo-core-function-devatools/src/main/java/com/zhjt/mogo_core_function_devatools/logcat/uploader/LogRecordUploader.kt @@ -0,0 +1,11 @@ +package com.zhjt.mogo_core_function_devatools.logcat.uploader + +import com.mogo.core.log.record.config.uploader.* +import com.mogo.core.log.record.model.* + +internal class LogRecordUploader: ILogcatUploader { + + override suspend fun upload(startTime: Long, endTime: Long, generatedZipPath: String): UploadState { + throw AssertionError("Not Implementation") + } +} \ No newline at end of file diff --git a/core/mogo-core-function-api/src/main/java/com/mogo/eagle/core/function/api/devatools/IDevaToolsProvider.kt b/core/mogo-core-function-api/src/main/java/com/mogo/eagle/core/function/api/devatools/IDevaToolsProvider.kt index 3f81643828..3105a75a5e 100644 --- a/core/mogo-core-function-api/src/main/java/com/mogo/eagle/core/function/api/devatools/IDevaToolsProvider.kt +++ b/core/mogo-core-function-api/src/main/java/com/mogo/eagle/core/function/api/devatools/IDevaToolsProvider.kt @@ -14,6 +14,7 @@ import com.mogo.eagle.core.data.msgbox.MsgBoxBean import com.mogo.eagle.core.function.api.devatools.apm.* import com.mogo.eagle.core.function.api.devatools.strict.* import com.mogo.eagle.core.function.api.devatools.download.* +import com.mogo.eagle.core.function.api.devatools.logcat.* import com.mogo.eagle.core.function.api.devatools.mofang.* import com.mogo.eagle.core.function.api.lookaround.* import com.mogo.eagle.core.function.api.upgrade.* @@ -218,4 +219,10 @@ interface IDevaToolsProvider : IProvider { * 魔方功能提供者 */ fun mofang(): IMoGoMoFangProvider + + + /** + * 日志记录功能 + */ + fun logRecord(): IMoGoLogRecordProvider } \ No newline at end of file diff --git a/core/mogo-core-function-api/src/main/java/com/mogo/eagle/core/function/api/devatools/logcat/IMoGoLogRecordProvider.kt b/core/mogo-core-function-api/src/main/java/com/mogo/eagle/core/function/api/devatools/logcat/IMoGoLogRecordProvider.kt new file mode 100644 index 0000000000..cd78b7ac77 --- /dev/null +++ b/core/mogo-core-function-api/src/main/java/com/mogo/eagle/core/function/api/devatools/logcat/IMoGoLogRecordProvider.kt @@ -0,0 +1,14 @@ +package com.mogo.eagle.core.function.api.devatools.logcat + +import android.content.Context + +interface IMoGoLogRecordProvider { + + fun init(context: Context) + + fun start() + + fun stop() + + fun upload(startTime: Long, endTime: Long) +} \ No newline at end of file From 2eb576b529beea34fd0a8eb5786477eacc0e11ec Mon Sep 17 00:00:00 2001 From: xuxinchao Date: Mon, 3 Jul 2023 15:56:32 +0800 Subject: [PATCH 14/23] =?UTF-8?q?[3.3.0]=E4=BB=96=E8=BD=A6=E8=B6=85?= =?UTF-8?q?=E9=80=9F=E6=8F=90=E7=A4=BA=E6=96=87=E6=A1=88=E6=9B=B4=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../datacenter/obu/MogoObuDcCombineManager.kt | 37 +++++++++++++------ 1 file changed, 25 insertions(+), 12 deletions(-) diff --git a/core/function-impl/mogo-core-function-datacenter/src/main/java/com/mogo/eagle/core/function/datacenter/obu/MogoObuDcCombineManager.kt b/core/function-impl/mogo-core-function-datacenter/src/main/java/com/mogo/eagle/core/function/datacenter/obu/MogoObuDcCombineManager.kt index 7b4f7e6b00..8a9aaf228a 100644 --- a/core/function-impl/mogo-core-function-datacenter/src/main/java/com/mogo/eagle/core/function/datacenter/obu/MogoObuDcCombineManager.kt +++ b/core/function-impl/mogo-core-function-datacenter/src/main/java/com/mogo/eagle/core/function/datacenter/obu/MogoObuDcCombineManager.kt @@ -129,18 +129,31 @@ class MogoObuDcCombineManager private constructor() : IMoGoObuWarningRsiListener } alertContent = EventTypeEnumNew.getWarningContent(appId) ttsContent = EventTypeEnumNew.getWarningTts(appId) - alertContent = String.format( //事件才有影响范围 - alertContent, - Math.round(rsiWarningData.warningMsgList[0].distance).toString(), - Math.round(rsiWarningData.warningMsgList[0].eventRadius).toString() - ) - ttsContent = String.format( - ttsContent, - ConvertUtils.intToChinese( - rsiWarningData.warningMsgList[0].distance.roundToInt()), - ConvertUtils.intToChinese( - rsiWarningData.warningMsgList[0].eventRadius.roundToInt()) - ) + //他车超速行驶 + if(EventTypeEnumNew.TYPE_USECASE_ID_SLW.poiType == appId){ + //同向正后方、同向邻道左后方、同向邻道右后方 提示他车超速行驶 + if(rsiWarningData.warningMsgList[0].targetPosition == MogoObuShowConstants.VEH_TARGET_POSITION.BEHEAD_IN_LANE + || rsiWarningData.warningMsgList[0].targetPosition == MogoObuShowConstants.VEH_TARGET_POSITION.BEHEAD_LEFT + || rsiWarningData.warningMsgList[0].targetPosition == MogoObuShowConstants.VEH_TARGET_POSITION.BEHEAD_RIGHT){ + alertContent = String.format(alertContent, direction.desc) + ttsContent = String.format(ttsContent, direction.desc) + }else{ + return + } + }else{ + alertContent = String.format( //事件才有影响范围 + alertContent, + Math.round(rsiWarningData.warningMsgList[0].distance).toString(), + Math.round(rsiWarningData.warningMsgList[0].eventRadius).toString() + ) + ttsContent = String.format( + ttsContent, + ConvertUtils.intToChinese( + rsiWarningData.warningMsgList[0].distance.roundToInt()), + ConvertUtils.intToChinese( + rsiWarningData.warningMsgList[0].eventRadius.roundToInt()) + ) + } } //车内标牌 From 64693f4a2b869a8e2479b39dbb62e662382e7176 Mon Sep 17 00:00:00 2001 From: xuxinchao Date: Mon, 3 Jul 2023 18:55:19 +0800 Subject: [PATCH 15/23] =?UTF-8?q?[3.3.0]=E4=BB=96=E8=BD=A6=E8=B6=85?= =?UTF-8?q?=E9=80=9F=E6=9B=B4=E6=96=B0=E6=B6=88=E6=81=AF=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../core/function/datacenter/obu/MogoObuDcCombineManager.kt | 4 ++++ .../core/function/datacenter/obu/MogoPrivateObuNewManager.kt | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/core/function-impl/mogo-core-function-datacenter/src/main/java/com/mogo/eagle/core/function/datacenter/obu/MogoObuDcCombineManager.kt b/core/function-impl/mogo-core-function-datacenter/src/main/java/com/mogo/eagle/core/function/datacenter/obu/MogoObuDcCombineManager.kt index 8a9aaf228a..62be1f6cb6 100644 --- a/core/function-impl/mogo-core-function-datacenter/src/main/java/com/mogo/eagle/core/function/datacenter/obu/MogoObuDcCombineManager.kt +++ b/core/function-impl/mogo-core-function-datacenter/src/main/java/com/mogo/eagle/core/function/datacenter/obu/MogoObuDcCombineManager.kt @@ -303,6 +303,10 @@ class MogoObuDcCombineManager private constructor() : IMoGoObuWarningRsiListener } MogoObuShowConstants.STATUS.UPDATE -> { // 更新 + if(EventTypeEnumNew.TYPE_USECASE_ID_SLW.poiType == appId){ + saveObuToDcData(appId, alertContent, ttsContent) + showWarning(appId, alertContent, ttsContent, direction) + } } // 删除 diff --git a/core/function-impl/mogo-core-function-datacenter/src/main/java/com/mogo/eagle/core/function/datacenter/obu/MogoPrivateObuNewManager.kt b/core/function-impl/mogo-core-function-datacenter/src/main/java/com/mogo/eagle/core/function/datacenter/obu/MogoPrivateObuNewManager.kt index 504cb86c39..5029e4e954 100644 --- a/core/function-impl/mogo-core-function-datacenter/src/main/java/com/mogo/eagle/core/function/datacenter/obu/MogoPrivateObuNewManager.kt +++ b/core/function-impl/mogo-core-function-datacenter/src/main/java/com/mogo/eagle/core/function/datacenter/obu/MogoPrivateObuNewManager.kt @@ -595,6 +595,10 @@ class MogoPrivateObuNewManager private constructor() : OnUpgradeListener { } MogoObuShowConstants.STATUS.UPDATE -> { // 更新 + if(EventTypeEnumNew.TYPE_USECASE_ID_SLW.poiType == appId){ + saveObuData(appId, alertContent, ttsContent) + showWarning(appId, alertContent, ttsContent, direction) + } } MogoObuShowConstants.STATUS.DELETE -> { // 删除 From 840a7a7a589aabe847bbf6bb5c1cfbf09eebfd6a Mon Sep 17 00:00:00 2001 From: wangmingjun Date: Tue, 4 Jul 2023 11:45:57 +0800 Subject: [PATCH 16/23] =?UTF-8?q?[3.3.0]=20=E8=A7=A3=E5=86=B3=E5=B8=A7?= =?UTF-8?q?=E5=8A=A8=E7=94=BB=E5=B7=A5=E5=85=B7=E7=B1=BB=E5=B4=A9=E6=BA=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mogo/och/common/module/utils/AnimatorDrawableUtil.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/OCH/mogo-och-common-module/src/main/java/com/mogo/och/common/module/utils/AnimatorDrawableUtil.java b/OCH/mogo-och-common-module/src/main/java/com/mogo/och/common/module/utils/AnimatorDrawableUtil.java index 5ac904ccf4..df497db14a 100644 --- a/OCH/mogo-och-common-module/src/main/java/com/mogo/och/common/module/utils/AnimatorDrawableUtil.java +++ b/OCH/mogo-och-common-module/src/main/java/com/mogo/och/common/module/utils/AnimatorDrawableUtil.java @@ -64,7 +64,7 @@ public class AnimatorDrawableUtil { mResourceIdList.addAll(resourceIdList); //在初始化时候就将资源文件decode - for (int i = 0; i <= resourceIdList.size(); i++){ + for (int i = 0; i <= resourceIdList.size()-1; i++){ mBitmapList.add(readBitMap(mImageView.getContext(),resourceIdList.get(i))); } } @@ -86,7 +86,7 @@ public class AnimatorDrawableUtil { @Override public void onParse(List res) { mResourceIdList.addAll(res); - for (int i = 0; i <= res.size(); i++){ + for (int i = 0; i <= res.size()-1; i++){ mBitmapList.add(readBitMap(mImageView.getContext(),res.get(i))); } } From aa1e40a8cada72a72deb59a1af4b69d9a3dabb50 Mon Sep 17 00:00:00 2001 From: renwj Date: Tue, 4 Jul 2023 12:03:26 +0800 Subject: [PATCH 17/23] =?UTF-8?q?[3.3.0][=E6=97=A5=E5=BF=97]=20=E5=9C=A8?= =?UTF-8?q?=E8=B0=83=E8=AF=95=E9=9D=A2=E6=9D=BF=E6=B7=BB=E5=8A=A0=E5=AF=BC?= =?UTF-8?q?=E5=87=BA=E5=85=A8=E9=87=8F=E6=97=A5=E5=BF=97=E5=85=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config.gradle | 2 +- .../logcat/MoGoLogRecordProviderImpl.kt | 28 +++++++++++- .../hmi/ui/setting/DebugSettingView.kt | 35 +++++++++++++++ .../main/res/layout/view_debug_setting.xml | 44 +++++++++++++++++++ .../logcat/IMoGoLogRecordProvider.kt | 3 ++ .../call/devatools/CallerDevaToolsManager.kt | 3 ++ .../src/main/res/xml/provider_paths.xml | 1 + 7 files changed, 113 insertions(+), 3 deletions(-) diff --git a/config.gradle b/config.gradle index e988b6635d..f237a3ad74 100644 --- a/config.gradle +++ b/config.gradle @@ -219,7 +219,7 @@ ext { weak_network : "com.mogo.weak:network:1.0.0", mofang_runtime : "com.mogo.eagle.core.mofang:runtime:2.0.5", - log_runtime : "com.mogo.eagle.core.log.record:runtime:1.0.0" + log_runtime : "com.mogo.eagle.core.log.record:runtime:1.0.6" ] android = [ launcherApplicationId : "com.mogo.launcher", diff --git a/core/function-impl/mogo-core-function-devatools/src/main/java/com/zhjt/mogo_core_function_devatools/logcat/MoGoLogRecordProviderImpl.kt b/core/function-impl/mogo-core-function-devatools/src/main/java/com/zhjt/mogo_core_function_devatools/logcat/MoGoLogRecordProviderImpl.kt index 81558aa2e6..509435a7ba 100644 --- a/core/function-impl/mogo-core-function-devatools/src/main/java/com/zhjt/mogo_core_function_devatools/logcat/MoGoLogRecordProviderImpl.kt +++ b/core/function-impl/mogo-core-function-devatools/src/main/java/com/zhjt/mogo_core_function_devatools/logcat/MoGoLogRecordProviderImpl.kt @@ -5,6 +5,7 @@ import android.os.Process import android.util.* import com.mogo.core.log.record.* import com.mogo.core.log.record.config.* +import com.mogo.core.log.record.config.crash.* import com.mogo.eagle.core.function.api.devatools.logcat.* import com.mogo.eagle.core.utilcode.util.* import com.zhjt.mogo_core_function_devatools.logcat.uploader.* @@ -20,12 +21,31 @@ internal class MoGoLogRecordProviderImpl: IMoGoLogRecordProvider { private val scope by lazy { CoroutineScope(Dispatchers.IO + SupervisorJob()) } override fun init(context: Context) { + val zipDir = File(context.getExternalFilesDir(null), "logcat/zip") LogcatManager.init(LogcatConfig.Builder().context(context) - .recordPeriod(MINUTES.toMillis(3)) - .maxSizeInLogDir((1 * 1024 * 1024 * 1024).toLong()) //1G的最大容量 + .recordPeriod(MINUTES.toMillis(1)) // 1分钟一个文件 + .maxSizeInLogDir((512 * 1024 * 1024).toLong()) // 512M最大容量 .recordDir(File(context.getExternalFilesDir(null), "logcat")) .pid(Process.myPid()) + .generateZipDir(zipDir.absolutePath) + .crashConfig(CrashConfig.Builder() + .enabled(true) + .crashDir(File(context.getExternalFilesDir(null), "logcat/crash")) + .javaCrash(true) + .anr(true) + .build()) .uploader(LogRecordUploader())) + scope.launch { + try { + if (zipDir.exists()) { + zipDir.listFiles()?.forEach { + it.delete() + } + } + } catch (t: Throwable) { + t.printStackTrace() + } + } } @@ -51,4 +71,8 @@ internal class MoGoLogRecordProviderImpl: IMoGoLogRecordProvider { Log.d(TAG, "上传日志:[startTime:$startTime, endTime: $endTime], 结果: $result") } } + + override fun export(): File? { + return LogcatManager.export() + } } \ No newline at end of file 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 9d8a58dba7..d6701babf6 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 @@ -5,7 +5,9 @@ import android.app.Activity import android.content.ClipData import android.content.ClipboardManager import android.content.Context +import android.content.Intent import android.graphics.Color +import android.net.* import android.os.Build import android.os.Process import android.text.Html @@ -16,6 +18,7 @@ import androidx.annotation.RequiresApi import androidx.appcompat.widget.PopupMenu import androidx.constraintlayout.widget.ConstraintLayout import androidx.core.content.ContextCompat +import androidx.core.content.FileProvider import androidx.core.view.* import androidx.lifecycle.lifecycleScope import chassis.Chassis @@ -1363,6 +1366,38 @@ internal class DebugSettingView @JvmOverloads constructor( } } + //导出全量日志 + exportAllLogs?.onClick { v -> + v.visibility = View.INVISIBLE + logLoadingView?.visibility = View.VISIBLE + v.scope.launch(Dispatchers.IO) { + val file = CallerDevaToolsManager.logcat()?.export() + if (file != null && file.exists()) { + withContext(Dispatchers.Main) { + var activity = AppStateManager.currentActivity() + while (activity == null) { + delay(2000) + activity = AppStateManager.currentActivity() + if (activity != null) { + break + } + } + activity?.startActivity(Intent.createChooser(Intent().also { + it.action = Intent.ACTION_SEND + it.type = "application/zip" + it.putExtra(Intent.EXTRA_STREAM, FileProvider.getUriForFile(activity, "${activity.packageName}.fileProvider", file)) + }, "分享全量日志压缩包到")) + } + } else { + ToastUtils.showShort("全量日志压缩文件生成失败") + } + withContext(Dispatchers.Main) { + logLoadingView?.visibility = View.INVISIBLE + exportAllLogs?.visibility = View.VISIBLE + } + } + } + /** * 展示、关闭日志过滤面板 */ diff --git a/core/function-impl/mogo-core-function-hmi/src/main/res/layout/view_debug_setting.xml b/core/function-impl/mogo-core-function-hmi/src/main/res/layout/view_debug_setting.xml index 4d1d24f308..f5cefbfa4e 100644 --- a/core/function-impl/mogo-core-function-hmi/src/main/res/layout/view_debug_setting.xml +++ b/core/function-impl/mogo-core-function-hmi/src/main/res/layout/view_debug_setting.xml @@ -2217,6 +2217,50 @@ + + + + + + + + + + + + + \ No newline at end of file From c1e65611d53841223fdcaa1fa2998af4b5beb531 Mon Sep 17 00:00:00 2001 From: zhongchao Date: Tue, 4 Jul 2023 12:16:04 +0800 Subject: [PATCH 18/23] [3.3.0] fix possible bug --- .../DevaToolsProvider.kt | 4 ++-- .../trace/TraceManager.kt | 12 +++++------- .../eagle/core/function/main/MainActivity.kt | 4 ++-- .../eagle/core/data/deva/chain/ChainConstant.kt | 16 ++++++---------- 4 files changed, 15 insertions(+), 21 deletions(-) diff --git a/core/function-impl/mogo-core-function-devatools/src/main/java/com/zhjt/mogo_core_function_devatools/DevaToolsProvider.kt b/core/function-impl/mogo-core-function-devatools/src/main/java/com/zhjt/mogo_core_function_devatools/DevaToolsProvider.kt index 45f0186f5c..46d186b687 100644 --- a/core/function-impl/mogo-core-function-devatools/src/main/java/com/zhjt/mogo_core_function_devatools/DevaToolsProvider.kt +++ b/core/function-impl/mogo-core-function-devatools/src/main/java/com/zhjt/mogo_core_function_devatools/DevaToolsProvider.kt @@ -204,8 +204,8 @@ class DevaToolsProvider : IDevaToolsProvider { } @ChainLog( - linkChainLog = ChainConstant.CHAIN_TYPE_ANR, - linkCode = ChainConstant.CHAIN_SOURCE_ANR, + linkChainLog = ChainConstant.CHAIN_TYPE_ANR_LEAK, + linkCode = ChainConstant.CHAIN_SOURCE_ANR_LEAK, nodeAliasCode = ChainConstant.CHAIN_CODE_RECORD_ANR, paramIndexes = [0] ) diff --git a/core/function-impl/mogo-core-function-devatools/src/main/java/com/zhjt/mogo_core_function_devatools/trace/TraceManager.kt b/core/function-impl/mogo-core-function-devatools/src/main/java/com/zhjt/mogo_core_function_devatools/trace/TraceManager.kt index d3b6199847..898f6e2e72 100644 --- a/core/function-impl/mogo-core-function-devatools/src/main/java/com/zhjt/mogo_core_function_devatools/trace/TraceManager.kt +++ b/core/function-impl/mogo-core-function-devatools/src/main/java/com/zhjt/mogo_core_function_devatools/trace/TraceManager.kt @@ -72,9 +72,7 @@ class TraceManager : IMoGoCloudListener, IMoGoAutopilotCarConfigListener { FwBuild(true, -1, pkgName + ChainConstant.CHAIN_LINK_LOG_ADAS_TRAFFIC_LIGHT) fwBuildMap[ChainConstant.CHAIN_TYPE_HMI] = FwBuild(true, -1, pkgName + ChainConstant.CHAIN_LINK_LOG_HMI_ACTIONS) - fwBuildMap[ChainConstant.CHAIN_TYPE_NATIVE_LEAK] = - FwBuild(true, -1, pkgName + ChainConstant.CHAIN_LINK_LOG_RECORD_NATIVE_LEAK) - fwBuildMap[ChainConstant.CHAIN_TYPE_ANR] = + fwBuildMap[ChainConstant.CHAIN_TYPE_ANR_LEAK] = FwBuild(true, -1, pkgName + ChainConstant.CHAIN_LINK_LOG_RECORD_ANR) fwBuildMap[ChainConstant.CHAIN_TYPE_V2X] = FwBuild(true, -1, pkgName + ChainConstant.CHAIN_LINK_LOG_V2X) @@ -102,9 +100,7 @@ class TraceManager : IMoGoCloudListener, IMoGoAutopilotCarConfigListener { ChainLogParam(true, "ADAS红绿灯数据") traceInfoCache[ChainConstant.CHAIN_TYPE_HMI] = ChainLogParam(true, "人机交互行为") - traceInfoCache[ChainConstant.CHAIN_TYPE_NATIVE_LEAK] = - ChainLogParam(true, "Native Leak Record") - traceInfoCache[ChainConstant.CHAIN_TYPE_ANR] = + traceInfoCache[ChainConstant.CHAIN_TYPE_ANR_LEAK] = ChainLogParam(true, "ANR Record") traceInfoCache[ChainConstant.CHAIN_TYPE_V2X] = ChainLogParam(true, "V2X(V2N/V2I)") @@ -113,8 +109,10 @@ class TraceManager : IMoGoCloudListener, IMoGoAutopilotCarConfigListener { traceInfoCache[ChainConstant.CHAIN_TYPE_WEAK_NETWORK] = ChainLogParam(true, "WeakNetWork Record") + MoGoAiCloudClientConfig.getInstance() + FileWriteManager.getInstance() - .init(context, MoGoAiCloudClientConfig.getInstance().sn, pkgName, fwBuildMap) + .init(context, "", pkgName, fwBuildMap) FileWriteManager.getInstance().registerListener { type -> val param = traceInfoCache[type] param?.let { diff --git a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/main/MainActivity.kt b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/main/MainActivity.kt index 0eda4869c8..581cc04d84 100644 --- a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/main/MainActivity.kt +++ b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/main/MainActivity.kt @@ -260,8 +260,8 @@ open class MainActivity : MvpActivity(), MainView, } @ChainLog( - linkChainLog = ChainConstant.CHAIN_TYPE_NATIVE_LEAK, - linkCode = ChainConstant.CHAIN_SOURCE_LEAK, + linkChainLog = ChainConstant.CHAIN_TYPE_ANR_LEAK, + linkCode = ChainConstant.CHAIN_SOURCE_ANR_LEAK, nodeAliasCode = ChainConstant.CHAIN_CODE_RECORD_NATIVE_LEAK, paramIndexes = [0] ) diff --git a/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/deva/chain/ChainConstant.kt b/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/deva/chain/ChainConstant.kt index 2caf6765d9..8f521ee60e 100644 --- a/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/deva/chain/ChainConstant.kt +++ b/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/deva/chain/ChainConstant.kt @@ -14,10 +14,8 @@ class ChainConstant { const val CHAIN_SOURCE_MAP = 3 // 人机交互 const val CHAIN_SOURCE_HMI = 4 - // Native内存泄漏 - const val CHAIN_SOURCE_LEAK = 10 // ANR - const val CHAIN_SOURCE_ANR = 11 + const val CHAIN_SOURCE_ANR_LEAK = 11 // 弱网监测 const val CHAIN_SOURCE_WEAK_NETWORK = 12 // OCH业务 @@ -31,12 +29,11 @@ class ChainConstant { const val CHAIN_TYPE_SOCKET_VEHICLE = 5 // 底盘数据 const val CHAIN_TYPE_SOCKET_TRAFFIC_LIGHT = 6 // 多元红绿灯聚合数据 const val CHAIN_TYPE_HMI = 7 // 包括魔方和应用按钮点击 - const val CHAIN_TYPE_NATIVE_LEAK = 100 - const val CHAIN_TYPE_V2X = 200 // V2X(V2I、V2N) - const val CHAIN_TYPE_HD_MAP = 300 - const val CHAIN_TYPE_ANR = 400 - const val CHAIN_TYPE_WEAK_NETWORK = 500 - const val CHAIN_TYPE_OCH = 600 + const val CHAIN_TYPE_V2X = 100 // V2X(V2I、V2N) + const val CHAIN_TYPE_HD_MAP = 200 + const val CHAIN_TYPE_ANR_LEAK = 300 + const val CHAIN_TYPE_WEAK_NETWORK = 400 + const val CHAIN_TYPE_OCH = 500 const val CHAIN_LINK_LOG_INIT = "-eagleInitStatus" const val CHAIN_LINK_LOG_ADAS_GNSS = "-adasGnssInfo" @@ -46,7 +43,6 @@ class ChainConstant { const val CHAIN_LINK_LOG_ADAS_VEHICLE = "-adasVehicle" const val CHAIN_LINK_LOG_ADAS_TRAFFIC_LIGHT = "-UnionTrafficLight" const val CHAIN_LINK_LOG_HMI_ACTIONS = "-eagleHMIActions" - const val CHAIN_LINK_LOG_RECORD_NATIVE_LEAK = "-eagleRecordNativeLeak" const val CHAIN_LINK_LOG_V2X = "-eagleCloudWSV2X" const val CHAIN_LINK_LOG_HD_MAP_BIZ = "-eagleHDMapBiz" const val CHAIN_LINK_LOG_RECORD_ANR = "-eagleRecordANR" From e1e978625e2910e18936b5a23a336687bbac462f Mon Sep 17 00:00:00 2001 From: xuxinchao Date: Tue, 4 Jul 2023 13:02:30 +0800 Subject: [PATCH 19/23] =?UTF-8?q?[3.3.0]RSM=E6=96=87=E6=A1=88=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=E6=91=A9=E6=89=98=E8=BD=A6->=E6=9C=BA=E5=8A=A8?= =?UTF-8?q?=E8=BD=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/mogo/eagle/core/data/enums/EventTypeEnumNew.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/enums/EventTypeEnumNew.kt b/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/enums/EventTypeEnumNew.kt index 0c6d50aa0a..b75b52388f 100644 --- a/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/enums/EventTypeEnumNew.kt +++ b/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/enums/EventTypeEnumNew.kt @@ -218,8 +218,8 @@ enum class EventTypeEnumNew( 1001.toString(), "碰撞预警", poiTypeSrcVr = R.drawable.icon_warning_v2x_motorcycle_collision, - content = "前方摩托车闯入", - tts = "前方摩托车闯入" + content = "前方机动车闯入", + tts = "前方机动车闯入" ), TYPE_USECASE_ID_VRUCW_NOT_MOTOR_VEHICLES( 1002.toString(), From 98642960347d6e703be6e4cca66ea6ae6ed13d46 Mon Sep 17 00:00:00 2001 From: wangmingjun Date: Tue, 4 Jul 2023 16:46:40 +0800 Subject: [PATCH 20/23] =?UTF-8?q?[3.3.0]=20bus=E4=B9=98=E5=AE=A2=E5=B1=8F?= =?UTF-8?q?=E8=A7=86=E9=A2=91=E5=B8=83=E5=B1=80=E9=97=AE=E9=A2=98=E8=B0=83?= =?UTF-8?q?=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/jinlvvan/res/layout/bus_p_route_fragment.xml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/OCH/mogo-och-bus-passenger/src/jinlvvan/res/layout/bus_p_route_fragment.xml b/OCH/mogo-och-bus-passenger/src/jinlvvan/res/layout/bus_p_route_fragment.xml index a99b9ec46e..a92d7350f4 100644 --- a/OCH/mogo-och-bus-passenger/src/jinlvvan/res/layout/bus_p_route_fragment.xml +++ b/OCH/mogo-och-bus-passenger/src/jinlvvan/res/layout/bus_p_route_fragment.xml @@ -41,7 +41,8 @@ android:id="@+id/driver_info_bg" android:layout_width="@dimen/bus_p_route_info_panel_width" android:layout_height="0dp" - app:layout_constraintBottom_toTopOf="@+id/busPLineMapView" + android:layout_marginBottom="@dimen/bus_p_route_line_map_view_height" + app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintRight_toRightOf="parent" app:layout_constraintTop_toTopOf="parent"> From da00e4dce54184a20a8114a7e86cd09e404afe46 Mon Sep 17 00:00:00 2001 From: aibingbing Date: Tue, 4 Jul 2023 17:16:48 +0800 Subject: [PATCH 21/23] =?UTF-8?q?[Bus=20Passenger]=20feat:=20Bus=E6=A8=A1?= =?UTF-8?q?=E5=BC=8F-=E9=87=91=E6=97=85=E6=98=9F=E8=BE=B0=E8=BD=A6-?= =?UTF-8?q?=E4=B9=98=E5=AE=A2=E5=B1=8F=20=E5=A2=9E=E5=8A=A0=E5=AE=A3?= =?UTF-8?q?=E4=BC=A0=E8=A7=86=E9=A2=91=E5=A4=9A=E5=B1=8F=E5=B1=95=E7=A4=BA?= =?UTF-8?q?=EF=BC=88=E7=9B=AE=E5=89=8D=E4=B8=BB=E8=A6=81=E4=B8=BA=E8=A1=A1?= =?UTF-8?q?=E9=98=B3=E6=BC=94=E7=A4=BA=E8=BD=A6=EF=BC=89=EF=BC=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../bus/passenger/MogoOCHBusPassenger.java | 5 + app/config/tempConfig.json | 208 ++++++++++++++++++ 2 files changed, 213 insertions(+) diff --git a/OCH/mogo-och-bus-passenger/src/jinlvvan/java/com/mogo/och/bus/passenger/MogoOCHBusPassenger.java b/OCH/mogo-och-bus-passenger/src/jinlvvan/java/com/mogo/och/bus/passenger/MogoOCHBusPassenger.java index 0969ca9ad4..3690ed62c9 100644 --- a/OCH/mogo-och-bus-passenger/src/jinlvvan/java/com/mogo/och/bus/passenger/MogoOCHBusPassenger.java +++ b/OCH/mogo-och-bus-passenger/src/jinlvvan/java/com/mogo/och/bus/passenger/MogoOCHBusPassenger.java @@ -46,6 +46,11 @@ public class MogoOCHBusPassenger implements IMogoOCH { this.mActivity = activity; this.mContainerId = containerId; showFragment(); + + if (AppIdentityModeUtils.isJL(FunctionBuildConfig.appIdentityMode)) { + MultiDisplayUtils.INSTANCE.startActWithSecond(activity, VideoPlayerActivity.class); + } + return null; } diff --git a/app/config/tempConfig.json b/app/config/tempConfig.json index 87f52a3f09..438c1f8b68 100644 --- a/app/config/tempConfig.json +++ b/app/config/tempConfig.json @@ -64,6 +64,70 @@ } ] }, + "buspassengerochjl": { + "ads": [ + { + "path": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1676357256102/1.jpg", + "type": 0, + "cacheImgPath": "", + "title": "1" + }, + { + "path": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1676357382357/2.png", + "type": 0, + "cacheImgPath": "", + "title": "2" + }, + { + "path": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1676357557335/3.mp4", + "type": 1, + "cacheImgPath": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1676357382357/2.png", + "title": "3" + }, + { + "path": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1676357598483/4.jpg", + "type": 0, + "cacheImgPath": "", + "title": "4" + }, + { + "path": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1676357834634/5.m4v", + "type": 0, + "cacheImgPath": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1676357598483/4.jpg", + "title": "5" + }, + { + "path": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1676358660379/6.m4v", + "type": 1, + "cacheImgPath": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1676357598483/4.jpg", + "title": "6" + }, + { + "path": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1676360154589/7.jpg", + "type": 0, + "cacheImgPath": "", + "title": "7" + }, + { + "path": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1676360185500/8.jpg", + "type": 0, + "cacheImgPath": "", + "title": "8" + }, + { + "path": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1676360224773/9.png", + "type": 0, + "cacheImgPath": "", + "title": "9" + }, + { + "path": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1676360274126/10.mp4", + "type": 1, + "cacheImgPath": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1676360224773/9.png", + "title": "10" + } + ] + }, "shuttlepassengerochm2": { "ads": [ { @@ -146,6 +210,70 @@ } ] }, + "buspassengerochjl": { + "ads": [ + { + "path": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1676357256102/1.jpg", + "type": 0, + "cacheImgPath": "", + "title": "1" + }, + { + "path": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1676357382357/2.png", + "type": 0, + "cacheImgPath": "", + "title": "2" + }, + { + "path": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1676357557335/3.mp4", + "type": 1, + "cacheImgPath": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1676357382357/2.png", + "title": "3" + }, + { + "path": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1676357598483/4.jpg", + "type": 0, + "cacheImgPath": "", + "title": "4" + }, + { + "path": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1676357834634/5.m4v", + "type": 0, + "cacheImgPath": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1676357598483/4.jpg", + "title": "5" + }, + { + "path": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1676358660379/6.m4v", + "type": 1, + "cacheImgPath": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1676357598483/4.jpg", + "title": "6" + }, + { + "path": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1676360154589/7.jpg", + "type": 0, + "cacheImgPath": "", + "title": "7" + }, + { + "path": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1676360185500/8.jpg", + "type": 0, + "cacheImgPath": "", + "title": "8" + }, + { + "path": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1676360224773/9.png", + "type": 0, + "cacheImgPath": "", + "title": "9" + }, + { + "path": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1676360274126/10.mp4", + "type": 1, + "cacheImgPath": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1676360224773/9.png", + "title": "10" + } + ] + }, "shuttlepassengerochm2": { "ads": [ { @@ -180,6 +308,22 @@ } ] }, + "buspassengerochjl": { + "ads": [ + { + "path": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1681210971943/yangmadou.mp4", + "type": 1, + "cacheImgPath": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1680774790614/yangmadao_photo.jpg", + "title": "1" + }, + { + "path": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1681210971943/yangmadou.mp4", + "type": 1, + "cacheImgPath": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1680774790614/yangmadao_photo.jpg", + "title": "2" + } + ] + }, "shuttlepassengerochm2": { "ads": [ { @@ -262,6 +406,70 @@ } ] }, + "buspassenger": { + "ads": [ + { + "path": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1676357256102/1.jpg", + "type": 0, + "cacheImgPath": "", + "title": "1" + }, + { + "path": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1676357382357/2.png", + "type": 0, + "cacheImgPath": "", + "title": "2" + }, + { + "path": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1676357557335/3.mp4", + "type": 1, + "cacheImgPath": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1676357382357/2.png", + "title": "3" + }, + { + "path": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1676357598483/4.jpg", + "type": 0, + "cacheImgPath": "", + "title": "4" + }, + { + "path": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1676357834634/5.m4v", + "type": 0, + "cacheImgPath": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1676357598483/4.jpg", + "title": "5" + }, + { + "path": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1676358660379/6.m4v", + "type": 1, + "cacheImgPath": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1676357598483/4.jpg", + "title": "6" + }, + { + "path": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1676360154589/7.jpg", + "type": 0, + "cacheImgPath": "", + "title": "7" + }, + { + "path": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1676360185500/8.jpg", + "type": 0, + "cacheImgPath": "", + "title": "8" + }, + { + "path": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1676360224773/9.png", + "type": 0, + "cacheImgPath": "", + "title": "9" + }, + { + "path": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1676360274126/10.mp4", + "type": 1, + "cacheImgPath": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1676360224773/9.png", + "title": "10" + } + ] + }, "shuttlepassengerm2": { "ads": [ { From 09a9a8c56c48ccbc9bb5cefe0414b1243d490790 Mon Sep 17 00:00:00 2001 From: aibingbing Date: Tue, 4 Jul 2023 17:19:53 +0800 Subject: [PATCH 22/23] =?UTF-8?q?[=E5=AE=A3=E4=BC=A0=E8=A7=86=E9=A2=91]=20?= =?UTF-8?q?fix:=20=E7=AC=AC5=E4=B8=AA=E5=AE=A3=E4=BC=A0=E8=A7=86=E9=A2=91?= =?UTF-8?q?=E6=92=AD=E6=94=BE=E5=BC=82=E5=B8=B8=E9=97=AE=E9=A2=98=EF=BC=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/config/tempConfig.json | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/app/config/tempConfig.json b/app/config/tempConfig.json index 438c1f8b68..6b5b6e6a76 100644 --- a/app/config/tempConfig.json +++ b/app/config/tempConfig.json @@ -28,7 +28,7 @@ }, { "path": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1676357834634/5.m4v", - "type": 0, + "type": 1, "cacheImgPath": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1676357598483/4.jpg", "title": "5" }, @@ -92,7 +92,7 @@ }, { "path": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1676357834634/5.m4v", - "type": 0, + "type": 1, "cacheImgPath": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1676357598483/4.jpg", "title": "5" }, @@ -174,7 +174,7 @@ }, { "path": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1676357834634/5.m4v", - "type": 0, + "type": 1, "cacheImgPath": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1676357598483/4.jpg", "title": "5" }, @@ -238,7 +238,7 @@ }, { "path": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1676357834634/5.m4v", - "type": 0, + "type": 1, "cacheImgPath": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1676357598483/4.jpg", "title": "5" }, @@ -370,7 +370,7 @@ }, { "path": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1676357834634/5.m4v", - "type": 0, + "type": 1, "cacheImgPath": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1676357598483/4.jpg", "title": "5" }, @@ -434,7 +434,7 @@ }, { "path": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1676357834634/5.m4v", - "type": 0, + "type": 1, "cacheImgPath": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1676357598483/4.jpg", "title": "5" }, From b36fc3794b97d9c670d1b212c1beae106acc8227 Mon Sep 17 00:00:00 2001 From: xuxinchao Date: Tue, 4 Jul 2023 17:49:24 +0800 Subject: [PATCH 23/23] =?UTF-8?q?[3.3.0]=E8=B0=83=E6=95=B4=E7=BA=A2?= =?UTF-8?q?=E7=BB=BF=E7=81=AF=E5=80=92=E8=AE=A1=E6=97=B6=E6=96=87=E5=AD=97?= =?UTF-8?q?=E9=97=B4=E8=B7=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/res/layout/hmi_view_traffic_light.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/function-impl/mogo-core-function-hmi/src/main/res/layout/hmi_view_traffic_light.xml b/core/function-impl/mogo-core-function-hmi/src/main/res/layout/hmi_view_traffic_light.xml index cd31442233..b7667cf45c 100644 --- a/core/function-impl/mogo-core-function-hmi/src/main/res/layout/hmi_view_traffic_light.xml +++ b/core/function-impl/mogo-core-function-hmi/src/main/res/layout/hmi_view_traffic_light.xml @@ -32,7 +32,7 @@ android:textStyle="bold" app:layout_constraintTop_toTopOf="parent" app:layout_constraintLeft_toRightOf="@id/hmi_traffic_light_iv" - android:layout_marginStart="-30dp" + android:layout_marginStart="-40dp" />