From a1c10b4406d8a5e2245a5bf9d74f3151da091bca Mon Sep 17 00:00:00 2001 From: renwj Date: Wed, 17 Aug 2022 11:36:56 +0800 Subject: [PATCH 1/8] =?UTF-8?q?[=E7=BA=BF=E7=A8=8B=E4=BC=98=E5=8C=96]?= =?UTF-8?q?=E4=BB=A3=E7=A0=81=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/build.gradle | 23 +++++---- .../com/mogo/launcher/MogoApplication.java | 47 +++++++++++++++++++ build.gradle | 3 +- 3 files changed, 61 insertions(+), 12 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index 4ca4d03f22..cb8b2f1bab 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -28,17 +28,20 @@ if (!isAndroidTestBuild()) { apply plugin: 'apm-plugin' } +if (!isAndroidTestBuild()) { + apply plugin: 'bytex.threadOpt' + thread_opt { + enable true + enableInDebug true + logLevel "DEBUG" + //白名单中的类不进行替换 + white_list = [ + 'leakcanary.*', + ] + } +} + //if (!isAndroidTestBuild()) { -// apply plugin: 'bytex.threadOpt' -// thread_opt { -// enable true -// enableInDebug true -// rxJavaIoReplacer 'com/mogo/eagle/core/utilcode/util/ThreadUtils@@getIoPool@@()Ljava/util/concurrent/ExecutorService;' -// rxJavaComputationReplacer 'com/mogo/eagle/core/utilcode/util/ThreadUtils@@getCpuPool@@()Ljava/util/concurrent/ExecutorService;' -// coroutineIoReplacer 'com/mogo/eagle/core/utilcode/util/ThreadUtils@@getIoPool@@()Ljava/util/concurrent/ExecutorService;' -// coroutineDefaultReplacer 'com/mogo/eagle/core/utilcode/util/ThreadUtils@@getCpuPool@@()Ljava/util/concurrent/ExecutorService;' -// } -// // /** // * 方便使用systrace工具,在工程侧打点,便于分析工程侧性能问题 // */ diff --git a/app/src/main/java/com/mogo/launcher/MogoApplication.java b/app/src/main/java/com/mogo/launcher/MogoApplication.java index 8f87eca0de..b5953612b9 100644 --- a/app/src/main/java/com/mogo/launcher/MogoApplication.java +++ b/app/src/main/java/com/mogo/launcher/MogoApplication.java @@ -1,9 +1,21 @@ package com.mogo.launcher; import com.mogo.eagle.core.function.main.MainMoGoApplication; +import android.content.Context; +import android.util.Log; + +import androidx.annotation.NonNull; import com.mogo.eagle.core.utilcode.mogo.logger.LogLevel; import com.mogo.eagle.core.utilcode.mogo.logger.Logger; import com.mogo.launcher.crash.CrashSystem; +import com.mogo.thread.ext.core.ThreadManager; +import com.mogo.thread.ext.core.config.ThreadConfig; + +import java.util.concurrent.LinkedBlockingDeque; +import java.util.concurrent.LinkedBlockingQueue; +import java.util.concurrent.RejectedExecutionHandler; +import java.util.concurrent.ThreadPoolExecutor; +import java.util.concurrent.TimeUnit; /** * @author congtaowang @@ -13,6 +25,41 @@ import com.mogo.launcher.crash.CrashSystem; */ public class MogoApplication extends MainMoGoApplication { + @Override + protected void attachBaseContext(Context base) { + super.attachBaseContext(base); + ThreadConfig.Builder builder = new ThreadConfig.Builder().listener(new ThreadConfig.TaskExecuteListener() { + @Override + public boolean isEnabled() { + return true; // 如果返回true,会有后续的回调;如果返回false, 不会有后续的回调 + } + + @Override + public void onExecutorBefore(@NonNull Runnable runnable) { + //每个任务执行前回调 + } + + @Override + public void onExecutorAfter(@NonNull Runnable runnable) { + //每个任务执行后回调 + } + + /** + * @param core 线程池的核心数 + * @param max 线程池的最大线程数 + * @param active 线程池正在活跃的任务数 + * @param completed 线程池已完成的任务数 + */ + @Override + public void onExecutorStateChanged(@NonNull ThreadPoolExecutor pool, int core, int max, int active, long completed) { + //线程池在执行过程,状态变化回调 + //Log.d("POOL", "core:" + core + ";max:" + max + ";active:" + active + ";completed:" + completed); + } + }); + builder.loggable(false); + ThreadManager.INSTANCE.init(builder); + } + @Override protected void initCrashConfig() { CrashSystem crashSystem = CrashSystem.getInstance(this); diff --git a/build.gradle b/build.gradle index 90cb140cd4..f18c4f8215 100644 --- a/build.gradle +++ b/build.gradle @@ -4,7 +4,6 @@ apply from: "javadoc.gradle" buildscript { repositories { - maven { url 'https://maven.aliyun.com/nexus/content/groups/public/' } maven { url "https://artifact.bytedance.com/repository/byteX/" } maven { url 'http://nexus.zhidaoauto.com/repository/maven-releases/' } @@ -33,7 +32,7 @@ buildscript { classpath "com.bytedance.android.byteX:base-plugin:0.3.0" classpath "com.mogo.cloud:hook:${HOOK_LOG_VERSION}" classpath 'com.volcengine:apm_insight_plugin:1.4.1' - classpath 'com.mogo.cloud:thread_opt:1.0.1' + classpath 'com.mogo.cloud:thread_opt:5.0.5' classpath 'com.mogo.cloud:systrace:1.0.1' classpath 'com.google.protobuf:protobuf-gradle-plugin:0.8.18' From 136d9680053554424c09b886b86f12027d01007c Mon Sep 17 00:00:00 2001 From: wangmingjun Date: Wed, 17 Aug 2022 14:04:45 +0800 Subject: [PATCH 2/8] =?UTF-8?q?[2.10.0=20]=20taxi/bus=20=E4=BB=BB=E6=84=8F?= =?UTF-8?q?=E6=A8=A1=E5=BC=8F=E4=B8=8B=E9=83=BD=E6=89=93=E5=BC=80=E8=B0=83?= =?UTF-8?q?=E8=AF=95=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/mogo/och/bus/fragment/BusFragment.java | 4 ++-- .../com/mogo/och/taxi/ui/BaseTaxiTabFragment.java | 12 ++++++------ .../och/taxi/ui/TaxiBeingServerdOrdersFragment.java | 4 ++-- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/OCH/mogo-och-bus/src/main/java/com/mogo/och/bus/fragment/BusFragment.java b/OCH/mogo-och-bus/src/main/java/com/mogo/och/bus/fragment/BusFragment.java index ff6d6b5d2c..6989254ae0 100644 --- a/OCH/mogo-och-bus/src/main/java/com/mogo/och/bus/fragment/BusFragment.java +++ b/OCH/mogo-och-bus/src/main/java/com/mogo/och/bus/fragment/BusFragment.java @@ -71,7 +71,7 @@ public class BusFragment extends BaseBusTabFragment mSwitchLine = findViewById(R.id.switch_line_btn); mLineName = findViewById(R.id.module_och_bus_line_name); - if (DebugConfig.isDebug()) { +// if (DebugConfig.isDebug()) { //任意模式下都打开调试面板 mBus.setOnClickListener(view -> { ToastUtils.showShort("重置了车站状态"); mPresenter.queryBusRoutes(); @@ -83,7 +83,7 @@ public class BusFragment extends BaseBusTabFragment showHideTestBar(); return true; }); - } +// } CallerLogger.INSTANCE.d(M_BUS + TAG, "initView: " + CallerAutoPilotStatusListenerManager.INSTANCE.getAutoPilotStatusInfo().getState()); // 初始化的时候设置 UI 按钮状态 diff --git a/OCH/mogo-och-taxi/src/main/java/com/mogo/och/taxi/ui/BaseTaxiTabFragment.java b/OCH/mogo-och-taxi/src/main/java/com/mogo/och/taxi/ui/BaseTaxiTabFragment.java index e1f8da1bc8..82551ccdac 100644 --- a/OCH/mogo-och-taxi/src/main/java/com/mogo/och/taxi/ui/BaseTaxiTabFragment.java +++ b/OCH/mogo-och-taxi/src/main/java/com/mogo/och/taxi/ui/BaseTaxiTabFragment.java @@ -165,8 +165,8 @@ public abstract class BaseTaxiTabFragment { // onAutopilotStatusChanged(false); @@ -178,7 +178,7 @@ public abstract class BaseTaxiTabFragment { if (groupTestPanel.getVisibility() == View.VISIBLE) { groupTestPanel.setVisibility(View.GONE); @@ -258,7 +258,7 @@ public abstract class BaseTaxiTabFragment Date: Wed, 17 Aug 2022 11:58:52 +0800 Subject: [PATCH 3/8] fix bug and add gd loc --- .../mogo/launcher/stageone/HttpDnsStartUp.kt | 10 +++- gradle.properties | 20 +++---- libraries/mogo-map/build.gradle | 3 + .../mogo/map/location/GDLocationClient.java | 60 +++++++++++++++++++ 4 files changed, 81 insertions(+), 12 deletions(-) create mode 100644 libraries/mogo-map/src/main/java/com/mogo/map/location/GDLocationClient.java diff --git a/app/src/main/java/com/mogo/launcher/stageone/HttpDnsStartUp.kt b/app/src/main/java/com/mogo/launcher/stageone/HttpDnsStartUp.kt index 3a89aa6874..da23467c5e 100644 --- a/app/src/main/java/com/mogo/launcher/stageone/HttpDnsStartUp.kt +++ b/app/src/main/java/com/mogo/launcher/stageone/HttpDnsStartUp.kt @@ -38,6 +38,7 @@ import com.mogo.eagle.core.utilcode.util.AppUtils import com.mogo.eagle.core.utilcode.util.ProcessUtils import com.mogo.eagle.core.utilcode.util.ThreadPoolService import com.mogo.eagle.core.utilcode.util.TimeUtils +import com.mogo.map.location.GDLocationClient import com.mogo.module.common.constants.HostConst import com.rousetime.android_startup.AndroidStartup import com.zhjt.mogo_core_function_devatools.env.EnvChangeManager @@ -74,12 +75,17 @@ class HttpDnsStartUp : AndroidStartup() { override fun create(context: Context): Boolean { this.context = context if (ProcessUtils.isMainProcess(context)) { + initGDLoc() initHttpDns() initCloudClientConfig() } return true } + private fun initGDLoc() { + GDLocationClient.getInstance(context).start() + } + /** * 初始化 HttpDNS ,这里会通过一个接口获取所有鹰眼中使用的微服务域名以及端口号 * 后续的网络请求会通过 HttpDnsInterceptor 进行拦截替换 @@ -242,10 +248,10 @@ class HttpDnsStartUp : AndroidStartup() { linkCode = CHAIN_LINK_CLOUD_SHOW, endpoint = PAD, nodeAliasCode = CHAIN_ALIAS_CODE_HTTP_DNS_CHANGED, - paramIndexes = [0], + paramIndexes = [0,1], clientPkFileName = "sn" ) - override fun onAddressChanged(address: Map?) { + override fun onAddressChanged(cityCode: String, address: Map?) { val dnsCacheIp = mogoHttpDns.getCachedHttpDnsIps( host, HttpDnsConst.HTTP_DNS_ADDRESS_TYPE_HTTP diff --git a/gradle.properties b/gradle.properties index b5a4928f9d..d9283d9abe 100644 --- a/gradle.properties +++ b/gradle.properties @@ -63,23 +63,23 @@ SERVICE_CHAIN_VERSION=1.1.0 LOGLIB_VERSION=1.3.31 ######## MogoAiCloudSDK Version ######## # 网络请求LOGLIB_VERSION -MOGO_NETWORK_VERSION=1.4.3.8 +MOGO_NETWORK_VERSION=1.4.3.17 # 鉴权 -MOGO_PASSPORT_VERSION=1.4.3.8 +MOGO_PASSPORT_VERSION=1.4.3.17 # 常链接 -MOGO_SOCKET_VERSION=1.4.3.8 +MOGO_SOCKET_VERSION=1.4.3.17 # 数据采集 -MOGO_REALTIME_VERSION=1.4.3.8 +MOGO_REALTIME_VERSION=1.4.3.17 # 探路,道路事件发布,获取 -MOGO_TANLU_VERSION=1.4.3.8 +MOGO_TANLU_VERSION=1.4.3.17 # 直播推流 -MOGO_LIVE_VERSION=1.4.3.8 +MOGO_LIVE_VERSION=1.4.3.17 # 直播拉流 -MOGO_TRAFFICLIVE_VERSION=1.4.3.8 +MOGO_TRAFFICLIVE_VERSION=1.4.3.17 # 定位服务 -MOGO_LOCATION_VERSION=1.4.3.8 +MOGO_LOCATION_VERSION=1.4.3.17 # 远程通讯模块 -MOGO_TELEMATIC_VERSION=1.4.3.8 +MOGO_TELEMATIC_VERSION=1.4.3.17 ######## MogoAiCloudSDK Version ######## # 自研地图 MAP_SDK_VERSION=2.4.0.1 @@ -155,7 +155,7 @@ MOGO_OCH_TAXI_VERSION=2.0.66 # mogoAiCloud sdk services MOGO_AICLOUD_SERVICES_SDK_VERSION=2.1.16.10 # v2x-sdk -MOGO_V2X_SDK_VERSION=1.4.3.8 +MOGO_V2X_SDK_VERSION=1.4.3.17 ################# 旧版本架构模块版本 ################# diff --git a/libraries/mogo-map/build.gradle b/libraries/mogo-map/build.gradle index 72a0a91306..f4e1bf9862 100644 --- a/libraries/mogo-map/build.gradle +++ b/libraries/mogo-map/build.gradle @@ -48,6 +48,9 @@ dependencies { kapt rootProject.ext.dependencies.aroutercompiler // 高精地图 implementation rootProject.ext.dependencies.mogocustommap + // 高德地图 + api rootProject.ext.dependencies.amaplocation + if (Boolean.valueOf(USE_MAVEN_PACKAGE)) { implementation rootProject.ext.dependencies.mogo_core_utils implementation rootProject.ext.dependencies.mogomapapi diff --git a/libraries/mogo-map/src/main/java/com/mogo/map/location/GDLocationClient.java b/libraries/mogo-map/src/main/java/com/mogo/map/location/GDLocationClient.java new file mode 100644 index 0000000000..fb2417de14 --- /dev/null +++ b/libraries/mogo-map/src/main/java/com/mogo/map/location/GDLocationClient.java @@ -0,0 +1,60 @@ +package com.mogo.map.location; + +import android.content.Context; +import android.util.Log; + +import com.amap.api.location.AMapLocation; +import com.amap.api.location.AMapLocationClient; +import com.amap.api.location.AMapLocationClientOption; +import com.amap.api.location.AMapLocationListener; + +public class GDLocationClient implements AMapLocationListener { + + private volatile static GDLocationClient gdLocationClient; + private static final byte[] obj = new byte[0]; + + public static GDLocationClient getInstance(Context context) { + if (gdLocationClient == null) { + synchronized (obj) { + if (gdLocationClient == null) { + gdLocationClient = new GDLocationClient(context); + } + } + } + return gdLocationClient; + } + + //声明LocationClient对象 + private final AMapLocationClient mLocationClient; + + private GDLocationClient(Context context) { + mLocationClient = new AMapLocationClient(context); + //初始化定位参数 + //声明mLocationOption对象 + AMapLocationClientOption mLocationOption = new AMapLocationClientOption(); + //设置定位监听 + mLocationClient.setLocationListener(this); + //设置定位模式为高精度模式,Battery_Saving为低功耗模式,Device_Sensors是仅设备模式 + mLocationOption.setLocationMode(AMapLocationClientOption.AMapLocationMode.Hight_Accuracy); + //设置定位间隔,单位毫秒,默认为2000ms + mLocationOption.setInterval(1000); + //设置定位参数 + mLocationClient.setLocationOption(mLocationOption); + } + + public void start() { + mLocationClient.startLocation(); + } + + @Override + public void onLocationChanged(AMapLocation aMapLocation) { + if (aMapLocation != null) { + String cityCode = aMapLocation.getCityCode(); + if (cityCode == null || cityCode.isEmpty()) { + Log.e("0817arrow", "gd city code is null"); + } else { + Log.e("0817arrow", "gd city code is :" + cityCode); + } + } + } +} From 617b34291093931c277a72e56989d9b646f74efa Mon Sep 17 00:00:00 2001 From: zhongchao Date: Wed, 17 Aug 2022 14:29:10 +0800 Subject: [PATCH 4/8] httpdns change --- .../mogo/launcher/stageone/HttpDnsStartUp.kt | 26 +++++++++++-------- .../java/com/mogo/map/AMapViewWrapper.java | 13 ++++++---- .../mogo/map/location/GDLocationClient.java | 17 ++++++++---- 3 files changed, 35 insertions(+), 21 deletions(-) diff --git a/app/src/main/java/com/mogo/launcher/stageone/HttpDnsStartUp.kt b/app/src/main/java/com/mogo/launcher/stageone/HttpDnsStartUp.kt index da23467c5e..d6f973eaf9 100644 --- a/app/src/main/java/com/mogo/launcher/stageone/HttpDnsStartUp.kt +++ b/app/src/main/java/com/mogo/launcher/stageone/HttpDnsStartUp.kt @@ -132,10 +132,8 @@ class HttpDnsStartUp : AndroidStartup() { //设置长链接的secretKey //todo 通过SHA1和包名找中台服务生成,后续包名分渠道,需要做对应操作 clientConfig.secretKey = "YMj2VFDFxJ3Q4gNoZceJ" -// todo 使用旧链路 -// clientConfig.setUseOriginSocket(true); clientConfig.iHttpDnsCurrentLocation = object : IHttpDnsCurrentLocation { - override fun getCurrentLocation(): HttpDnsSimpleLocation? { + override fun getCurrentLocation(): HttpDnsSimpleLocation { val envConfig = EnvChangeManager.getEnvConfig() if (envConfig != null) { return HttpDnsSimpleLocation(envConfig.cityCode, envConfig.lat, envConfig.lon) @@ -147,13 +145,20 @@ class HttpDnsStartUp : AndroidStartup() { mogoLocation = locationClient.lastKnowLocation } val httpDnsSimpleLocation = - if (mogoLocation != null && mogoLocation.latitude != 0.0 && mogoLocation.longitude != 0.0 - ) { - HttpDnsSimpleLocation( - mogoLocation.cityCode, - mogoLocation.latitude, - mogoLocation.longitude - ) + if (mogoLocation != null && mogoLocation.latitude != 0.0 && mogoLocation.longitude != 0.0) { + if(mogoLocation.cityCode.isNullOrEmpty() && !GDLocationClient.getInstance(context).lastCityCode.isNullOrEmpty()){ + HttpDnsSimpleLocation( + GDLocationClient.getInstance(context).lastCityCode, + mogoLocation.latitude, + mogoLocation.longitude + ) + }else{ + HttpDnsSimpleLocation( + mogoLocation.cityCode, + mogoLocation.latitude, + mogoLocation.longitude + ) + } } else { val ciyCode = SharedPrefsMgr.getInstance( @@ -178,7 +183,6 @@ class HttpDnsStartUp : AndroidStartup() { // e.printStackTrace(); HttpDnsSimpleLocation("010", 1.0, 1.0) } - //CallerLogger.INSTANCE.d(M_HMI + TAG, "使用缓存GPS信息:" + httpDnsSimpleLocation); } return httpDnsSimpleLocation } diff --git a/libraries/mogo-map/src/main/java/com/mogo/map/AMapViewWrapper.java b/libraries/mogo-map/src/main/java/com/mogo/map/AMapViewWrapper.java index 340c7ff3fd..1ea27213cb 100644 --- a/libraries/mogo-map/src/main/java/com/mogo/map/AMapViewWrapper.java +++ b/libraries/mogo-map/src/main/java/com/mogo/map/AMapViewWrapper.java @@ -643,6 +643,7 @@ public class AMapViewWrapper implements IMogoMapView, /** * 设置转向灯和刹车灯 + * * @param type :车尾灯类型 time: 闪烁时间 最小500ms 小于500ms 默认为500ms * @param time */ @@ -748,9 +749,11 @@ public class AMapViewWrapper implements IMogoMapView, sysLocation.setSpeed(location.getSpeed()); // 将有效经纬度暂存本地,提供给下一次的Http-DNS使用,防止首次请求位置获取不到 - if (location.getLat() > 0) { - SharedPrefsMgr.getInstance(mMapView.getContext()) - .putString(SharedPrefsConstants.LOCATION_CITY_CODE, location.getCityCode()); + if (location.getLat() > 0 && location.getLon() > 0) { + if (location.getCityCode() != null && !location.getCityCode().isEmpty()) { + SharedPrefsMgr.getInstance(mMapView.getContext()) + .putString(SharedPrefsConstants.LOCATION_CITY_CODE, location.getCityCode()); + } SharedPrefsMgr.getInstance(mMapView.getContext()) .putString(SharedPrefsConstants.LOCATION_LATITUDE, String.valueOf(location.getLat())); SharedPrefsMgr.getInstance(mMapView.getContext()) @@ -1000,7 +1003,7 @@ public class AMapViewWrapper implements IMogoMapView, bean.setAcceleration(gnssInfo.getAcceleration()); bean.setAlt(gnssInfo.getAltitude()); bean.setSystemTime(Double.valueOf(gnssInfo.getSystemTime()).longValue()); - bean.setSatelliteTime(Double.valueOf(gnssInfo.getSatelliteTime()*1000).longValue()); + bean.setSatelliteTime(Double.valueOf(gnssInfo.getSatelliteTime() * 1000).longValue()); bean.setLon(gnssInfo.getLongitude()); bean.setLat(gnssInfo.getLatitude()); bean.setGnss_speed(((float) gnssInfo.getGnssSpeed())); @@ -1053,7 +1056,7 @@ public class AMapViewWrapper implements IMogoMapView, } @Override - public Double getRoadAngle(Double lon,Double lat,float angle) { + public Double getRoadAngle(Double lon, Double lat, float angle) { return MapDataApi.INSTANCE.getRoadRectInfo(lon, lat, angle).getAngle(); } diff --git a/libraries/mogo-map/src/main/java/com/mogo/map/location/GDLocationClient.java b/libraries/mogo-map/src/main/java/com/mogo/map/location/GDLocationClient.java index fb2417de14..cc23b9af97 100644 --- a/libraries/mogo-map/src/main/java/com/mogo/map/location/GDLocationClient.java +++ b/libraries/mogo-map/src/main/java/com/mogo/map/location/GDLocationClient.java @@ -1,12 +1,14 @@ package com.mogo.map.location; import android.content.Context; -import android.util.Log; import com.amap.api.location.AMapLocation; import com.amap.api.location.AMapLocationClient; import com.amap.api.location.AMapLocationClientOption; import com.amap.api.location.AMapLocationListener; +import com.mogo.commons.AbsMogoApplication; +import com.mogo.commons.constants.SharedPrefsConstants; +import com.mogo.eagle.core.utilcode.mogo.storage.SharedPrefsMgr; public class GDLocationClient implements AMapLocationListener { @@ -26,6 +28,7 @@ public class GDLocationClient implements AMapLocationListener { //声明LocationClient对象 private final AMapLocationClient mLocationClient; + private String mCityCode; private GDLocationClient(Context context) { mLocationClient = new AMapLocationClient(context); @@ -50,11 +53,15 @@ public class GDLocationClient implements AMapLocationListener { public void onLocationChanged(AMapLocation aMapLocation) { if (aMapLocation != null) { String cityCode = aMapLocation.getCityCode(); - if (cityCode == null || cityCode.isEmpty()) { - Log.e("0817arrow", "gd city code is null"); - } else { - Log.e("0817arrow", "gd city code is :" + cityCode); + if (cityCode != null && !cityCode.isEmpty()) { + mCityCode = aMapLocation.getCityCode(); + SharedPrefsMgr.getInstance(AbsMogoApplication.getApp()) + .putString(SharedPrefsConstants.LOCATION_CITY_CODE, cityCode); } } } + + public String getLastCityCode() { + return mCityCode; + } } From db38a839c359048bf54c6a4468917586f2da74d2 Mon Sep 17 00:00:00 2001 From: zhongchao Date: Wed, 17 Aug 2022 15:02:39 +0800 Subject: [PATCH 5/8] add socket error callback trace --- .../mogo/launcher/stageone/HttpDnsStartUp.kt | 21 ++++++++++++++++--- .../core/data/deva/chain/ChainConstant.kt | 1 + .../socket/IMogoLifecycleListener.java | 4 ++++ .../socket/MogoAiCloudSocketManager.java | 16 +++++++++++++- 4 files changed, 38 insertions(+), 4 deletions(-) diff --git a/app/src/main/java/com/mogo/launcher/stageone/HttpDnsStartUp.kt b/app/src/main/java/com/mogo/launcher/stageone/HttpDnsStartUp.kt index d6f973eaf9..d381a07a1d 100644 --- a/app/src/main/java/com/mogo/launcher/stageone/HttpDnsStartUp.kt +++ b/app/src/main/java/com/mogo/launcher/stageone/HttpDnsStartUp.kt @@ -146,13 +146,16 @@ class HttpDnsStartUp : AndroidStartup() { } val httpDnsSimpleLocation = if (mogoLocation != null && mogoLocation.latitude != 0.0 && mogoLocation.longitude != 0.0) { - if(mogoLocation.cityCode.isNullOrEmpty() && !GDLocationClient.getInstance(context).lastCityCode.isNullOrEmpty()){ + if (mogoLocation.cityCode.isNullOrEmpty() && !GDLocationClient.getInstance( + context + ).lastCityCode.isNullOrEmpty() + ) { HttpDnsSimpleLocation( GDLocationClient.getInstance(context).lastCityCode, mogoLocation.latitude, mogoLocation.longitude ) - }else{ + } else { HttpDnsSimpleLocation( mogoLocation.cityCode, mogoLocation.latitude, @@ -252,7 +255,7 @@ class HttpDnsStartUp : AndroidStartup() { linkCode = CHAIN_LINK_CLOUD_SHOW, endpoint = PAD, nodeAliasCode = CHAIN_ALIAS_CODE_HTTP_DNS_CHANGED, - paramIndexes = [0,1], + paramIndexes = [0, 1], clientPkFileName = "sn" ) override fun onAddressChanged(cityCode: String, address: Map?) { @@ -333,6 +336,18 @@ class HttpDnsStartUp : AndroidStartup() { CallerLogger.d(SceneConstant.M_HMI + TAG, "socket-onConnectLost") DebugConfig.setDownloadSnapshot(false) } + + @ChainLog( + linkChainLog = CHAIN_LINK_LOG_CONNECT_STATUS, + linkCode = CHAIN_LINK_CLOUD_SHOW, + endpoint = PAD, + nodeAliasCode = CHAIN_ALIAS_CODE_CLOUD_CONNECT_LOST, + paramIndexes = [0, 1], + clientPkFileName = "sn" + ) + override fun onError(code: String, msg: String?) { + CallerLogger.d(SceneConstant.M_HMI + TAG, "socket-onConnectLost") + } }) // 开启Socket长链服务 val lat = location.latitude 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 bc017b4ca1..2c5377b5b0 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 @@ -51,6 +51,7 @@ class ChainConstant { const val CHAIN_ALIAS_CODE_CLOUD_CONNECT_FAIL = "CHAIN_ALIAS_CODE_CLOUD_CONNECT_FAIL" const val CHAIN_ALIAS_CODE_CLOUD_CONNECT_SUCCESS = "CHAIN_ALIAS_CODE_CLOUD_CONNECT_SUCCESS" const val CHAIN_ALIAS_CODE_CLOUD_CONNECT_LOST = "CHAIN_ALIAS_CODE_CLOUD_CONNECT_LOST" + const val CHAIN_ALIAS_CODE_CLOUD_CONNECT_ERROR = "CHAIN_ALIAS_CODE_CLOUD_CONNECT_ERROR" const val CHAIN_ALIAS_CODE_HTTP_DNS_CHANGED = "CHAIN_ALIAS_CODE_HTTP_DNS_CHANGED" const val CHAIN_ALIAS_CODE_INIT_ON_MAP_LOADED = "CHAIN_ALIAS_CODE_INIT_ON_MAP_LOADED" diff --git a/foudations/mogo-aicloud-services-sdk/src/main/java/com/mogo/aicloud/services/socket/IMogoLifecycleListener.java b/foudations/mogo-aicloud-services-sdk/src/main/java/com/mogo/aicloud/services/socket/IMogoLifecycleListener.java index c97877d11c..c708576a0c 100644 --- a/foudations/mogo-aicloud-services-sdk/src/main/java/com/mogo/aicloud/services/socket/IMogoLifecycleListener.java +++ b/foudations/mogo-aicloud-services-sdk/src/main/java/com/mogo/aicloud/services/socket/IMogoLifecycleListener.java @@ -6,4 +6,8 @@ public interface IMogoLifecycleListener { void onConnectSuccess(); void onConnectLost(); + + default void onError(String code, String msg){ + + } } diff --git a/foudations/mogo-aicloud-services-sdk/src/main/java/com/mogo/aicloud/services/socket/MogoAiCloudSocketManager.java b/foudations/mogo-aicloud-services-sdk/src/main/java/com/mogo/aicloud/services/socket/MogoAiCloudSocketManager.java index 295094e447..c6ab9969de 100644 --- a/foudations/mogo-aicloud-services-sdk/src/main/java/com/mogo/aicloud/services/socket/MogoAiCloudSocketManager.java +++ b/foudations/mogo-aicloud-services-sdk/src/main/java/com/mogo/aicloud/services/socket/MogoAiCloudSocketManager.java @@ -4,6 +4,7 @@ import android.content.Context; import androidx.annotation.Keep; +import com.mogo.cloud.socket.IMogoCloudSocketErrorListener; import com.mogo.cloud.socket.IMogoCloudSocketMsgAckListener; import com.mogo.cloud.socket.IMogoCloudSocketOnMessageListener; import com.mogo.cloud.socket.SocketManager; @@ -24,7 +25,7 @@ import java.util.concurrent.ConcurrentHashMap; * 长链实现:基于 netty */ @Keep -public class MogoAiCloudSocketManager extends ConnectionLifecycleListener implements IMogoSocketManager { +public class MogoAiCloudSocketManager extends ConnectionLifecycleListener implements IMogoSocketManager, IMogoCloudSocketErrorListener { private static final String TAG = "MogoAiCloudSocketManager-sdk"; @@ -70,6 +71,7 @@ public class MogoAiCloudSocketManager extends ConnectionLifecycleListener implem this.mAppId = appId; SocketManager.getInstance().init(context, lat, lon); SocketManager.getInstance().registerSocketConnCallback(this); + SocketManager.getInstance().registerSocketErrorCallback(TAG, this); } @Override @@ -140,6 +142,7 @@ public class MogoAiCloudSocketManager extends ConnectionLifecycleListener implem } public synchronized void release() { + SocketManager.getInstance().unregisterSocketErrorCallback(TAG); SocketManager.getInstance().release(); } @@ -212,4 +215,15 @@ public class MogoAiCloudSocketManager extends ConnectionLifecycleListener implem } } } + + @Override + public void onError(int code, String msg) { + if (mLifeCycleListeners.size() > 0) { + for (IMogoLifecycleListener lifecycleListener : mLifeCycleListeners.values()) { + if (lifecycleListener != null) { + lifecycleListener.onError(code + "", msg); + } + } + } + } } From 3faa99998aa41fe6ecf2d7729f1af8d687e2b106 Mon Sep 17 00:00:00 2001 From: wangmingjun Date: Wed, 17 Aug 2022 17:14:00 +0800 Subject: [PATCH 6/8] =?UTF-8?q?[2.10.0]bus=E5=8F=B8=E6=9C=BA=E7=AB=AF?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0"=E7=BB=93=E6=9D=9F=E8=B7=AF=E7=BA=BF"?= =?UTF-8?q?=E6=8C=89=E9=92=AE=EF=BC=8C=E6=8E=A5=E5=8F=A3=E5=BE=85=E5=AE=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mogo/och/bus/fragment/BusFragment.java | 35 ++++++++++-------- .../com/mogo/och/bus/model/BusLineModel.java | 2 +- .../com/mogo/och/bus/model/BusOrderModel.java | 9 ++--- .../mogo/och/bus/net/BusServiceManager.java | 18 ++++++++- .../com/mogo/och/bus/net/IBusApiService.java | 4 +- .../mogo/och/bus/presenter/BusPresenter.java | 4 +- .../src/main/res/layout/fragment_och_bus.xml | 37 +++++++++---------- .../src/main/res/values/strings.xml | 3 +- 8 files changed, 64 insertions(+), 48 deletions(-) diff --git a/OCH/mogo-och-bus/src/main/java/com/mogo/och/bus/fragment/BusFragment.java b/OCH/mogo-och-bus/src/main/java/com/mogo/och/bus/fragment/BusFragment.java index 6989254ae0..04f9c744de 100644 --- a/OCH/mogo-och-bus/src/main/java/com/mogo/och/bus/fragment/BusFragment.java +++ b/OCH/mogo-och-bus/src/main/java/com/mogo/och/bus/fragment/BusFragment.java @@ -50,7 +50,7 @@ public class BusFragment extends BaseBusTabFragment private TextView mLineName; private int mCurrentStation = 0; - private View mBus; +// private View mBus; private BusStationBean startStation = null; private BusStationBean endStation = null; @@ -63,19 +63,20 @@ public class BusFragment extends BaseBusTabFragment @Override protected void initViews() { super.initViews(); - mBus = findViewById(R.id.module_och_bus_tag); +// mBus = findViewById(R.id.module_och_bus_tag); mCurrentStationName = findViewById(R.id.module_och_bus_current_station); mCurrentTag = findViewById(R.id.module_och_bus_current_station_anchor); mNextStationName = findViewById(R.id.module_och_bus_order_end_station); mNextTag = findViewById(R.id.module_och_bus_next_station_anchor); mSwitchLine = findViewById(R.id.switch_line_btn); + mSwitchLine.setTag(0); mLineName = findViewById(R.id.module_och_bus_line_name); // if (DebugConfig.isDebug()) { //任意模式下都打开调试面板 - mBus.setOnClickListener(view -> { - ToastUtils.showShort("重置了车站状态"); - mPresenter.queryBusRoutes(); - }); +// mBus.setOnClickListener(view -> { +// ToastUtils.showShort("重置了车站状态"); +// mPresenter.queryBusRoutes(); +// }); //debug下调用测试面板 mCurrentStationName.setOnLongClickListener(v -> { @@ -235,10 +236,14 @@ public class BusFragment extends BaseBusTabFragment } private void showOrHideSwitchLineBtn(boolean isShow) { - if (isShow){ - mSwitchLine.setVisibility(View.VISIBLE); - }else { - mSwitchLine.setVisibility(View.GONE); + if (isShow){//显示切换路线 +// mSwitchLine.setVisibility(View.VISIBLE); + mSwitchLine.setTag(0); + mSwitchLine.setText(getResources().getString(R.string.bus_switch_line_btn)); + }else {//显示结束路线 +// mSwitchLine.setVisibility(View.GONE); + mSwitchLine.setTag(1); + mSwitchLine.setText(getResources().getString(R.string.bus_close_line_btn)); } } @@ -392,12 +397,12 @@ public class BusFragment extends BaseBusTabFragment ToastUtils.showLong(getResources().getString(R.string.bus_switch_line_btn_warning1)); return; } - if (mCurrentStation > 0) { - ToastUtils.showLong(getResources().getString(R.string.bus_switch_line_btn_warning2)); - return; + if ((int)mSwitchLine.getTag() == 0){//切换路线 + Intent intent = new Intent(getContext(), BusSwitchLineActivity.class); + startActivity(intent); + }else {//结束路线 + mPresenter.resetCurrentLineStatus(); } - Intent intent = new Intent(getContext(), BusSwitchLineActivity.class); - startActivity(intent); } } } diff --git a/OCH/mogo-och-bus/src/main/java/com/mogo/och/bus/model/BusLineModel.java b/OCH/mogo-och-bus/src/main/java/com/mogo/och/bus/model/BusLineModel.java index 3fca5e55d8..0d79156db8 100644 --- a/OCH/mogo-och-bus/src/main/java/com/mogo/och/bus/model/BusLineModel.java +++ b/OCH/mogo-och-bus/src/main/java/com/mogo/och/bus/model/BusLineModel.java @@ -64,7 +64,7 @@ public class BusLineModel { } public void commitSwitchLineId(int lineId){ - BusServiceManager.getInstance().resetStationStatus(mContext,lineId, new IBusServiceCallback() { + BusServiceManager.getInstance().switchLine(mContext,lineId, new IBusServiceCallback() { @Override public void onSuccess(BusRoutesResponse o) { if (mBusLinesCallback != null){ diff --git a/OCH/mogo-och-bus/src/main/java/com/mogo/och/bus/model/BusOrderModel.java b/OCH/mogo-och-bus/src/main/java/com/mogo/och/bus/model/BusOrderModel.java index d875ea8929..9cbe14d3f2 100644 --- a/OCH/mogo-och-bus/src/main/java/com/mogo/och/bus/model/BusOrderModel.java +++ b/OCH/mogo-och-bus/src/main/java/com/mogo/och/bus/model/BusOrderModel.java @@ -11,7 +11,6 @@ import android.location.Location; import android.os.Handler; import android.os.Message; import android.text.TextUtils; -import android.util.Log; import androidx.annotation.NonNull; @@ -444,11 +443,11 @@ public class BusOrderModel { } /** - * 测试、重置站点状态 + * 重置路线站点状态--结束路线,当前路线恢复到始发站 */ - public void debugResetStationStatus() { - CallerLogger.INSTANCE.d( M_BUS + TAG, "测试、重置站点状态"); - BusServiceManager.getInstance().resetStationStatus(mContext, currentLineId + public void resetCurrentLineStatus() { + CallerLogger.INSTANCE.d( M_BUS + TAG, "结束当前路线"); + BusServiceManager.getInstance().resetCurrentLineStatus(mContext, currentLineId , new IBusServiceCallback() { @Override public void onSuccess(BusRoutesResponse o) { diff --git a/OCH/mogo-och-bus/src/main/java/com/mogo/och/bus/net/BusServiceManager.java b/OCH/mogo-och-bus/src/main/java/com/mogo/och/bus/net/BusServiceManager.java index 5ce01cf7c4..14f80cdff6 100644 --- a/OCH/mogo-och-bus/src/main/java/com/mogo/och/bus/net/BusServiceManager.java +++ b/OCH/mogo-och-bus/src/main/java/com/mogo/och/bus/net/BusServiceManager.java @@ -74,13 +74,27 @@ public class BusServiceManager { * @param lineId * @param callback */ - public void resetStationStatus(Context context, int lineId, IBusServiceCallback callback){ - mService.resetStationStatus(MoGoAiCloudClientConfig.getInstance().getServiceAppId() + public void switchLine(Context context, int lineId, IBusServiceCallback callback){ + mService.switchLine(MoGoAiCloudClientConfig.getInstance().getServiceAppId() ,MoGoAiCloudClientConfig.getInstance().getToken(),new BusResetDrivingLineRequest(lineId)) .subscribeOn(Schedulers.io()).observeOn(AndroidSchedulers.mainThread()) .subscribe(getSubscribeImpl(context,callback,"debugResetStationStatus")); } + /** + * 结束当前路线,当前路线状态重置到始发站 + * @param context + * @param lineId + * @param callback + */ + public void resetCurrentLineStatus(Context context, int lineId, IBusServiceCallback callback){ +// mService.switchLine(MoGoAiCloudClientConfig.getInstance().getServiceAppId() +// ,MoGoAiCloudClientConfig.getInstance().getToken(),new BusResetDrivingLineRequest(lineId)) +// .subscribeOn(Schedulers.io()).observeOn(AndroidSchedulers.mainThread()) +// .subscribe(getSubscribeImpl(context,callback,"debugResetStationStatus")); + // TODO 需要重置接口 + } + /** * 离站上报 * @param context diff --git a/OCH/mogo-och-bus/src/main/java/com/mogo/och/bus/net/IBusApiService.java b/OCH/mogo-och-bus/src/main/java/com/mogo/och/bus/net/IBusApiService.java index f4c50754fb..8183fb1e84 100644 --- a/OCH/mogo-och-bus/src/main/java/com/mogo/och/bus/net/IBusApiService.java +++ b/OCH/mogo-och-bus/src/main/java/com/mogo/och/bus/net/IBusApiService.java @@ -42,8 +42,6 @@ public interface IBusApiService { Observable querySiteByCoordinate(@Header ("appId") String appId, @Header("ticket") String ticket, @Body BusQueryLineStationsRequest request); /** - * 重置巴士路线: 点击小巴车tab 或者出车后会使用 - * * @param request 请求参数{"destLine":1,"sn":"F803EB2046PZD00229"} 这个接口是重置bus线路的, 不是重置线路中站点的 * @return 返回值是重置后的车站列表 */ @@ -51,7 +49,7 @@ public interface IBusApiService { // @POST( "/autopilot-car-hailing/car/v2/bus/drivingLine/reset" ) @POST( "/autopilot-car-hailing/car/v2/driver/bus/drivingLine/reset" ) // @POST( "/mock/268/autopilot-car-hailing/bus/api/drivingLine/reset" ) - Observable resetStationStatus(@Header ("appId") String appId, @Header("ticket") String ticket, @Body BusResetDrivingLineRequest request); + Observable switchLine(@Header ("appId") String appId, @Header("ticket") String ticket, @Body BusResetDrivingLineRequest request); /** * 离站,通知服务器 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 fadc4ad8d1..28a590956d 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 @@ -90,8 +90,8 @@ public class BusPresenter extends Presenter BusOrderModel.getInstance().queryBusRoutes(); } - public void debugResetStationStatus() { - BusOrderModel.getInstance().debugResetStationStatus(); + public void resetCurrentLineStatus() { + BusOrderModel.getInstance().resetCurrentLineStatus(); } public void autoDriveToNextStation(boolean isRestart) { diff --git a/OCH/mogo-och-bus/src/main/res/layout/fragment_och_bus.xml b/OCH/mogo-och-bus/src/main/res/layout/fragment_och_bus.xml index c9e7d8a07b..57ae0979a5 100644 --- a/OCH/mogo-och-bus/src/main/res/layout/fragment_och_bus.xml +++ b/OCH/mogo-och-bus/src/main/res/layout/fragment_och_bus.xml @@ -12,7 +12,7 @@ - + + + + + + + + + + + + + + + + + app:layout_constraintTop_toBottomOf="@+id/module_och_bus_line_name" /> 终点: 确认 切换路线 - 自动驾驶中,不可切换路线 + 结束路线 + 自动驾驶状态中,不可切换或结束路线 当前行程未完成,不可切换路线 当前车辆无路线\n请联系运营人员绑定 起点: From f129e2a4fb1750fd7dc9a78f2ce396449550b462 Mon Sep 17 00:00:00 2001 From: wangmingjun Date: Wed, 17 Aug 2022 19:11:32 +0800 Subject: [PATCH 7/8] =?UTF-8?q?[2.10.0]bus=E5=8F=B8=E6=9C=BA=E7=AB=AF?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0"=E8=BF=9B=E7=AB=99"=E6=8C=89=E9=92=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../och/bus/fragment/BaseBusTabFragment.java | 10 ++++++++ .../mogo/och/bus/fragment/BusFragment.java | 5 ++++ .../com/mogo/och/bus/model/BusOrderModel.java | 6 ++--- .../src/main/res/layout/bus_base_fragment.xml | 23 ++++++++++++++++--- .../res/values-xhdpi-2560x1440/dimens.xml | 1 + .../res/values-xhdpi-2560x1600/dimens.xml | 1 + .../src/main/res/values/dimens.xml | 1 + .../src/main/res/values/strings.xml | 1 + 8 files changed, 42 insertions(+), 6 deletions(-) diff --git a/OCH/mogo-och-bus/src/main/java/com/mogo/och/bus/fragment/BaseBusTabFragment.java b/OCH/mogo-och-bus/src/main/java/com/mogo/och/bus/fragment/BaseBusTabFragment.java index c83715f9f1..9a54140635 100644 --- a/OCH/mogo-och-bus/src/main/java/com/mogo/och/bus/fragment/BaseBusTabFragment.java +++ b/OCH/mogo-och-bus/src/main/java/com/mogo/och/bus/fragment/BaseBusTabFragment.java @@ -67,6 +67,7 @@ public abstract class BaseBusTabFragment private RelativeLayout ctvAutopilotStatus; private ImageView ctvAutopilotStatusIv; private TextView ctvAutopilotStatusTv; + private TextView tvArrived; protected TextView tvOperationStatus; protected RelativeLayout mSettingBtn; protected RelativeLayout mBadcaseBtn; @@ -120,6 +121,7 @@ public abstract class BaseBusTabFragment // CallerHmiManager.INSTANCE.setProxyTrafficLightView(mTrafficLightView); tvOperationStatus = findViewById(R.id.module_mogo_och_operation_status); + tvArrived = findViewById(R.id.module_mogo_och_arrived_tv); flSpeed = (FrameLayout) findViewById(R.id.fl_speed); mTrafficDataView = (TrafficDataView) findViewById(R.id.bus_arc); @@ -198,6 +200,10 @@ public abstract class BaseBusTabFragment tvOperationStatus.setOnClickListener(view -> { onChangeOperationStatus(); }); + + tvArrived.setOnClickListener(view -> { + onArriveStation(); + }); mSettingBtn = findViewById(R.id.module_mogo_och_setting_layout); mSettingBtn.setOnClickListener(v -> { @@ -226,6 +232,8 @@ public abstract class BaseBusTabFragment } } + protected abstract void onArriveStation(); + private void updateSwitchMapIcon(){ if (MogoMapUIController.getInstance().getCurrentMapVisualAngle().isLongSight()) { mSwitchMapModeImage.setImageResource(R.drawable.bus_switch_map_long); @@ -284,6 +292,7 @@ public abstract class BaseBusTabFragment getActivity().runOnUiThread(() -> { slidePanelView.setText(text); slidePanelView.setVisibility(View.VISIBLE); + tvArrived.setClickable(false); }); } } @@ -294,6 +303,7 @@ public abstract class BaseBusTabFragment public void hideSlidePanel() { getActivity().runOnUiThread(() -> { slidePanelView.setVisibility(View.GONE); + tvArrived.setClickable(true); }); } diff --git a/OCH/mogo-och-bus/src/main/java/com/mogo/och/bus/fragment/BusFragment.java b/OCH/mogo-och-bus/src/main/java/com/mogo/och/bus/fragment/BusFragment.java index 04f9c744de..4d6f097d3b 100644 --- a/OCH/mogo-och-bus/src/main/java/com/mogo/och/bus/fragment/BusFragment.java +++ b/OCH/mogo-och-bus/src/main/java/com/mogo/och/bus/fragment/BusFragment.java @@ -106,6 +106,11 @@ public class BusFragment extends BaseBusTabFragment mSwitchLine.setOnClickListener(this); } + @Override + protected void onArriveStation() { + mPresenter.onAutopilotArriveAtStation(null); + } + @Override protected void debugArrivedStation() { mPresenter.onAutopilotArriveAtStation(null); diff --git a/OCH/mogo-och-bus/src/main/java/com/mogo/och/bus/model/BusOrderModel.java b/OCH/mogo-och-bus/src/main/java/com/mogo/och/bus/model/BusOrderModel.java index 9cbe14d3f2..19b236c0c7 100644 --- a/OCH/mogo-och-bus/src/main/java/com/mogo/och/bus/model/BusOrderModel.java +++ b/OCH/mogo-och-bus/src/main/java/com/mogo/och/bus/model/BusOrderModel.java @@ -519,9 +519,9 @@ public class BusOrderModel { ) private void leaveStationSuccess(BusRoutesResult result, boolean isRestart) { renderBusStationsStatus(result); - if (slidePannelHideCallback != null) { - slidePannelHideCallback.hideSlidePanel(); - } +// if (slidePannelHideCallback != null) { +// slidePannelHideCallback.hideSlidePanel(); +// } //开启自动驾驶 startAutopilot(isRestart); if (isGoingToNextStation) { diff --git a/OCH/mogo-och-bus/src/main/res/layout/bus_base_fragment.xml b/OCH/mogo-och-bus/src/main/res/layout/bus_base_fragment.xml index 4bd073fff0..1c385e0809 100644 --- a/OCH/mogo-och-bus/src/main/res/layout/bus_base_fragment.xml +++ b/OCH/mogo-och-bus/src/main/res/layout/bus_base_fragment.xml @@ -82,8 +82,8 @@ android:background="@drawable/bus_switch_map_bg" android:elevation="@dimen/bus_dp_10" android:padding="@dimen/bus_dp_20" - app:layout_constraintBottom_toBottomOf="@+id/module_mogo_och_operation_status" - app:layout_constraintLeft_toRightOf="@+id/module_mogo_och_operation_status" + app:layout_constraintBottom_toBottomOf="@+id/module_mogo_och_arrived_tv" + app:layout_constraintLeft_toRightOf="@+id/module_mogo_och_arrived_tv" android:gravity="center" android:orientation="horizontal"> @@ -109,6 +109,22 @@ app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintLeft_toLeftOf="parent"/> + + + + android:src="@drawable/bad_case_selector" /> 40px + 32px 13px 12px 350px diff --git a/OCH/mogo-och-bus/src/main/res/values-xhdpi-2560x1600/dimens.xml b/OCH/mogo-och-bus/src/main/res/values-xhdpi-2560x1600/dimens.xml index db56121992..dee684f3e6 100644 --- a/OCH/mogo-och-bus/src/main/res/values-xhdpi-2560x1600/dimens.xml +++ b/OCH/mogo-och-bus/src/main/res/values-xhdpi-2560x1600/dimens.xml @@ -91,6 +91,7 @@ 40px + 32px 13px 12px 350px diff --git a/OCH/mogo-och-bus/src/main/res/values/dimens.xml b/OCH/mogo-och-bus/src/main/res/values/dimens.xml index 85e4768fcc..ce34734e02 100644 --- a/OCH/mogo-och-bus/src/main/res/values/dimens.xml +++ b/OCH/mogo-och-bus/src/main/res/values/dimens.xml @@ -89,6 +89,7 @@ 270px 30px + 30px 13px 12px 288px diff --git a/OCH/mogo-och-bus/src/main/res/values/strings.xml b/OCH/mogo-och-bus/src/main/res/values/strings.xml index 9e4403ea0d..992ab6c19c 100644 --- a/OCH/mogo-och-bus/src/main/res/values/strings.xml +++ b/OCH/mogo-och-bus/src/main/res/values/strings.xml @@ -25,4 +25,5 @@ 当前站点: 下一站: 自动驾驶状态为0不可用 + 进站 From 0493dbb63a61307689b47531b0bec094395db1f0 Mon Sep 17 00:00:00 2001 From: zhongchao Date: Wed, 17 Aug 2022 19:47:29 +0800 Subject: [PATCH 8/8] update version of eagle and change the test view --- .../src/main/res/layout/view_pnc_actions.xml | 3 ++- gradle.properties | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/core/function-impl/mogo-core-function-hmi/src/main/res/layout/view_pnc_actions.xml b/core/function-impl/mogo-core-function-hmi/src/main/res/layout/view_pnc_actions.xml index c1092a0b63..1c49ca55d1 100644 --- a/core/function-impl/mogo-core-function-hmi/src/main/res/layout/view_pnc_actions.xml +++ b/core/function-impl/mogo-core-function-hmi/src/main/res/layout/view_pnc_actions.xml @@ -8,7 +8,8 @@ android:id="@+id/tvHmiPncActions" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:textSize="@dimen/sp_30" + android:textSize="@dimen/sp_38" + android:textColor="#FFFFFF" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toStartOf="parent" diff --git a/gradle.properties b/gradle.properties index d9283d9abe..bacab69b30 100644 --- a/gradle.properties +++ b/gradle.properties @@ -90,8 +90,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=2090000 -versionName=2.9.0 +versionCode=2100000 +versionName=2.10.0 ################# 新架构模块Maven版本管理 ################# MOGO_CORE_FUNCTION_AUTOPILOT_VERSION=0.0.58.10