From 204e239ca64fbc19d476bf08b9a394010efb5c0e Mon Sep 17 00:00:00 2001 From: donghongyu Date: Thu, 23 Jun 2022 15:43:26 +0800 Subject: [PATCH 1/8] =?UTF-8?q?=E3=80=8CChange=E3=80=8D=20=E7=BB=9F?= =?UTF-8?q?=E4=B8=80gradle=E4=BE=9D=E8=B5=96=E9=85=8D=E7=BD=AE=E4=BF=A1?= =?UTF-8?q?=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: donghongyu --- OCH/mogo-och-bus-passenger/build.gradle | 4 ++-- OCH/mogo-och-common-module/build.gradle | 6 +++--- OCH/mogo-och-taxi-passenger/build.gradle | 4 ++-- OCH/mogo-och-taxi/build.gradle | 4 ++-- app_ipc_monitoring/build.gradle | 2 +- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/OCH/mogo-och-bus-passenger/build.gradle b/OCH/mogo-och-bus-passenger/build.gradle index 6fad532472..4bc7c0fd4c 100644 --- a/OCH/mogo-och-bus-passenger/build.gradle +++ b/OCH/mogo-och-bus-passenger/build.gradle @@ -47,8 +47,8 @@ dependencies { implementation rootProject.ext.dependencies.kotlinstdlibjdk7 implementation rootProject.ext.dependencies.androidxappcompat implementation rootProject.ext.dependencies.arouter - implementation 'androidx.recyclerview:recyclerview:1.1.0' - implementation 'com.google.android.material:material:1.2.1' + implementation rootProject.ext.dependencies.androidxrecyclerview + implementation rootProject.ext.dependencies.material annotationProcessor rootProject.ext.dependencies.aroutercompiler implementation rootProject.ext.dependencies.rxandroid implementation rootProject.ext.dependencies.androidxconstraintlayout diff --git a/OCH/mogo-och-common-module/build.gradle b/OCH/mogo-och-common-module/build.gradle index eae2f7ed3b..1f74335527 100644 --- a/OCH/mogo-och-common-module/build.gradle +++ b/OCH/mogo-och-common-module/build.gradle @@ -27,9 +27,9 @@ android { dependencies { implementation fileTree(dir: "libs", include: ["*.jar"]) implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version" - implementation 'androidx.core:core-ktx:1.1.0' - implementation 'androidx.appcompat:appcompat:1.1.0' - implementation 'com.google.android.material:material:1.2.1' + implementation rootProject.ext.dependencies.androidxccorektx + implementation rootProject.ext.dependencies.androidxappcompat + implementation rootProject.ext.dependencies.material testImplementation 'junit:junit:4.12' androidTestImplementation 'androidx.test.ext:junit:1.1.1' androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0' diff --git a/OCH/mogo-och-taxi-passenger/build.gradle b/OCH/mogo-och-taxi-passenger/build.gradle index 65642e14a3..11d05e4d51 100644 --- a/OCH/mogo-och-taxi-passenger/build.gradle +++ b/OCH/mogo-och-taxi-passenger/build.gradle @@ -47,8 +47,8 @@ dependencies { implementation rootProject.ext.dependencies.kotlinstdlibjdk7 implementation rootProject.ext.dependencies.androidxappcompat implementation rootProject.ext.dependencies.arouter - implementation 'androidx.recyclerview:recyclerview:1.1.0' - implementation 'com.google.android.material:material:1.2.1' + implementation rootProject.ext.dependencies.androidxrecyclerview + implementation rootProject.ext.dependencies.material annotationProcessor rootProject.ext.dependencies.aroutercompiler implementation rootProject.ext.dependencies.rxandroid implementation rootProject.ext.dependencies.androidxconstraintlayout diff --git a/OCH/mogo-och-taxi/build.gradle b/OCH/mogo-och-taxi/build.gradle index 480688206d..11d63d9a60 100644 --- a/OCH/mogo-och-taxi/build.gradle +++ b/OCH/mogo-och-taxi/build.gradle @@ -47,8 +47,8 @@ dependencies { implementation rootProject.ext.dependencies.kotlinstdlibjdk7 implementation rootProject.ext.dependencies.androidxappcompat implementation rootProject.ext.dependencies.arouter - implementation 'androidx.recyclerview:recyclerview:1.1.0' - implementation 'com.google.android.material:material:1.2.1' + implementation rootProject.ext.dependencies.androidxrecyclerview + implementation rootProject.ext.dependencies.material annotationProcessor rootProject.ext.dependencies.aroutercompiler implementation rootProject.ext.dependencies.rxandroid implementation rootProject.ext.dependencies.androidxconstraintlayout diff --git a/app_ipc_monitoring/build.gradle b/app_ipc_monitoring/build.gradle index a023efe6fa..d5b0726d9b 100644 --- a/app_ipc_monitoring/build.gradle +++ b/app_ipc_monitoring/build.gradle @@ -63,7 +63,7 @@ dependencies { implementation rootProject.ext.dependencies.material implementation rootProject.ext.dependencies.androidxconstraintlayout implementation rootProject.ext.dependencies.androidxappcompat - implementation 'androidx.recyclerview:recyclerview:1.2.0' + implementation rootProject.ext.dependencies.androidxrecyclerview testImplementation 'junit:junit:4.13.2' androidTestImplementation 'androidx.test.ext:junit:1.1.3' androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0' From e9e54c6b56d5986bf4f368298db9612132b2841a Mon Sep 17 00:00:00 2001 From: zhongchao Date: Thu, 23 Jun 2022 16:05:13 +0800 Subject: [PATCH 2/8] checkout hengyang_yingyan logic --- .../function/map/identify/TrackManager.java | 15 ++++-- .../core/function/map/identify/TrackObj.java | 50 ++++++++++--------- 2 files changed, 38 insertions(+), 27 deletions(-) diff --git a/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/map/identify/TrackManager.java b/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/map/identify/TrackManager.java index b22d89de6c..6493eff69a 100644 --- a/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/map/identify/TrackManager.java +++ b/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/map/identify/TrackManager.java @@ -31,7 +31,7 @@ public class TrackManager { return TrackOwner.trackManager; } - public static double LIMIT_SPEED = 0.5; + public static double LIMIT_SPEED = 0.3; /** * marker缓存队列 @@ -89,7 +89,16 @@ public class TrackManager { data = cache; trackObj = cacheTrack; } - //todo OBU相关后面通过增加字段判断数据来源进行融合,不融合衡阳验收分支功能 + // 颜色处理 OBU相关 先处理缓存帧,后处理新感知帧,因为存在obu感知更新 +// String cacheId = "" + cache.getUuid(); +// if (cacheId.startsWith("7476") && cache.getUuid() > 10000) { +// Log.d("hy uuid : " + cacheId, "缓存物为OBU数据,更新物体类型和颜色为OBU"); +// data = data.toBuilder().setType(cache.getType()).setColor(cache.getColor()).build(); +// } +// if (uuid.startsWith("7476") && data.getUuid() > 10000) { +// Log.d("hy uuid : " + uuid, "出现OBU感知物体"); +// data = data.toBuilder().setType(data.getType()).setColor(data.getColor()).build(); +// } } uuid = findSameValue; data = trackObj.updateObj(data); @@ -98,7 +107,6 @@ public class TrackManager { } cellIdCaches.forcePut(uuid, trackObj.getCellIdPos()); mMarkersCaches.put(uuid, trackObj); - Log.d("hy uuid : " + uuid, " 显示物体,塞入set"); trafficDataUuidList.add(uuid); } //todo 将上次没被删除掉物体加入集合,造成延迟删除,对运动物体不友好 @@ -131,7 +139,6 @@ public class TrackManager { } } trafficDataUuidList.forEach(uuid -> { - Log.d("hy uuid : " + uuid, " 移除物体"); removeKey(uuid); }); //todo bus存在时间回溯,将id重置,会有id复用问题,导致鹰眼展示元素缺少 diff --git a/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/map/identify/TrackObj.java b/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/map/identify/TrackObj.java index aab75dffd4..2675b96016 100644 --- a/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/map/identify/TrackObj.java +++ b/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/map/identify/TrackObj.java @@ -21,21 +21,21 @@ import mogo.telematics.pad.MessagePad; public class TrackObj { private final CircleQueue circleQueue = new CircleQueue(10); - private final KalmanFilter kalmanFilter; //卡尔曼结果 + // private final KalmanFilter kalmanFilter; //卡尔曼结果 private S2CellId s2CellId; //s2 id权重 private S2LatLng s2LatLng; //s2 经纬度 private long recentlyTime; //用于缓存帧数判断,暂定缓存1秒数据,中间如果有物体未出现,1秒后删除 private double roadAngle; //道路航向 private double headingDelta; //航向角德尔塔 - private int[] typeArray = new int[5]; - private double typeWeight; //类型权重 + private int[] typeArray = new int[3]; + private int typeWeight; //类型权重 private double lat; private double lon; private double speedAverage; private com.zhidaoauto.map.sdk.open.road.CenterLine centerLineInfo = null; public TrackObj(MessagePad.TrackedObject data) { - kalmanFilter = new KalmanFilter(data.getLongitude(), data.getLatitude(), 0.0000005); +// kalmanFilter = new KalmanFilter(data.getLongitude(), data.getLatitude(), 0.0000005); circleQueue.addQueue(new ObjQueue(data.getHeading(), data.getSpeed(), data.getType())); recentlyTime = Double.valueOf(data.getSatelliteTime() * 1000).longValue(); lat = data.getLatitude(); @@ -57,7 +57,6 @@ public class TrackObj { correct(); recentlyTime = Double.valueOf(data.getSatelliteTime() * 1000).longValue(); -// Log.d("calHeading uuid : " + cacheData.getUuid(), "result heading : " + cacheData.getHeading() + " speed : " + cacheData.getSpeed()); circleQueue.addQueue(new ObjQueue(cacheData.getHeading(), cacheData.getSpeed(), cacheData.getType())); return cacheData; } @@ -70,17 +69,14 @@ public class TrackObj { @SuppressLint("NewApi") private void calAverageSpeedAndType() { - - if (circleQueue.size() >= 5) { + if (circleQueue.size() >= 3) { //计算平均速度 - List objQueueList = circleQueue.getLastFiveFrame(); - speedAverage = (objQueueList.get(0).getSpeed() + objQueueList.get(1).getSpeed() + objQueueList.get(2).getSpeed() + objQueueList.get(3).getSpeed() + objQueueList.get(4).getSpeed()) / 5; + List objQueueList = circleQueue.getLastThreeFrame(); + speedAverage = (objQueueList.get(0).getSpeed() + objQueueList.get(1).getSpeed() + objQueueList.get(2).getSpeed()) / 3; //计算类型 typeArray[0] = objQueueList.get(0).getType(); typeArray[1] = objQueueList.get(1).getType(); typeArray[2] = objQueueList.get(2).getType(); - typeArray[3] = objQueueList.get(3).getType(); - typeArray[4] = objQueueList.get(4).getType(); } else { double cal = 0; List objQueueList = circleQueue.getPreFrame(); @@ -90,9 +86,16 @@ public class TrackObj { } speedAverage = cal / objQueueList.size(); } - Log.d("hy uuid : " + cacheData.getUuid()," 类型 : " + Arrays.toString(typeArray)); typeArray = Arrays.stream(typeArray).sorted().toArray(); - typeWeight = typeArray[typeArray.length / 2]; + typeWeight = typeArray[typeArray.length / 2] == 0 ? cacheData.getType() : typeArray[typeArray.length / 2]; + + // 重新给静止物体赋值速度 + if (relativeStatic()) { + double calSpeed = circleQueue.getLastFrame().getSpeed(); + if (cacheData.getSpeed() != 0.0 && calSpeed == 0.0 && cacheData.getSpeed() >= 0.19444) { + cacheData = cacheData.toBuilder().setSpeed(0.19444).build(); + } + } } private void calLoc() { @@ -100,7 +103,11 @@ public class TrackObj { if (relativeStatic()) { double angle = roadAngle != 0 ? roadAngle : cacheData.getHeading(); if (centerLineInfo == null && isFourWheelType()) { - centerLineInfo = MapDataApi.INSTANCE.getCenterLineInfo(lon, lat, (float) angle); + try { + centerLineInfo = MapDataApi.INSTANCE.getCenterLineInfo(lon, lat, (float) angle); + }catch (Exception e){ + Log.d("hy uuid : " + cacheData.getUuid(), "道路获取异常"); + } if (centerLineInfo != null && centerLineInfo.getPoints() != null && !centerLineInfo.getPoints().isEmpty()) { double[] matchedPoint = PointInterpolatorUtil.mergeToRoad(cacheData.getLongitude(), cacheData.getLatitude(), centerLineInfo.getPoints()); if (matchedPoint[0] > 0 || matchedPoint[1] > 0) { @@ -108,17 +115,16 @@ public class TrackObj { lat = matchedPoint[1]; s2LatLng = S2LatLng.fromDegrees(cacheData.getLatitude(), cacheData.getLongitude()); s2CellId = S2CellId.fromLatLng(s2LatLng).parent(22); - Log.d("hy uuid : " + cacheData.getUuid(), " 更新定位 lon : " + matchedPoint[0] + " , lat : " + matchedPoint[1]); +// Log.d("hy uuid : " + cacheData.getUuid(), " 更新定位 lon : " + matchedPoint[0] + " , lat : " + matchedPoint[1]); } else { centerLineInfo = null; - Log.d("hy uuid : " + cacheData.getUuid(), "计算结果出现问题 : " + matchedPoint[0] + " , " + matchedPoint[1]); +// Log.d("hy uuid : " + cacheData.getUuid(), "计算结果出现问题 : " + matchedPoint[0] + " , " + matchedPoint[1]); } } else { centerLineInfo = null; - Log.d("hy uuid : " + cacheData.getUuid(), "未获取到道路数据"); +// Log.d("hy uuid : " + cacheData.getUuid(), "未获取到道路数据"); } } - Log.d("hy uuid : " + cacheData.getUuid(), " 静止使用定位数据 lon : " + lon + " , lat : " + lat); cacheData = cacheData.toBuilder().setLongitude(lon).setLatitude(lat).build(); } else { centerLineInfo = null; @@ -128,7 +134,7 @@ public class TrackObj { lon = cacheData.getLongitude(); s2LatLng = S2LatLng.fromDegrees(cacheData.getLatitude(), cacheData.getLongitude()); s2CellId = S2CellId.fromLatLng(s2LatLng).parent(22); - Log.d("hy uuid : " + cacheData.getUuid(), " 开始移动 lon : " + lon + " , lat : " + lat); +// Log.d("hy uuid : " + cacheData.getUuid(), " 开始移动 lon : " + lon + " , lat : " + lat); // cacheData = cacheData.toBuilder().setLongitude(lonLat[0]).setLatitude(lonLat[1]).build(); } } @@ -166,11 +172,9 @@ public class TrackObj { if (centerLine != null && centerLine.getAngle() != 0) { cacheData = cacheData.toBuilder().setHeading(centerLine.getAngle()).build(); } else { -// Log.d("hy uuid : " + cacheData.getUuid(), "未获取到道路航向,使用上一帧 : " + circleQueue.getLastFrame().getHeading()); cacheData = cacheData.toBuilder().setHeading(circleQueue.getLastFrame().getHeading()).build(); } } else { -// Log.d("hy uuid : " + cacheData.getUuid(), "未获取到道路航向,使用上一帧 : " + circleQueue.getLastFrame().getHeading()); cacheData = cacheData.toBuilder().setHeading(circleQueue.getLastFrame().getHeading()).build(); } @@ -200,8 +204,8 @@ public class TrackObj { public boolean isFourWheelType() { return typeWeight != TrafficTypeEnum.TYPE_TRAFFIC_ID_PEOPLE.getType() - || typeWeight != TrafficTypeEnum.TYPE_TRAFFIC_ID_BICYCLE.getType() - || typeWeight != TrafficTypeEnum.TYPE_TRAFFIC_ID_MOTO.getType(); + && typeWeight != TrafficTypeEnum.TYPE_TRAFFIC_ID_BICYCLE.getType() + && typeWeight != TrafficTypeEnum.TYPE_TRAFFIC_ID_MOTO.getType(); } @Override From ebb88145aa53857c16f04e018e01c7158edf3e1f Mon Sep 17 00:00:00 2001 From: xuxinchao <13522809046@163.com> Date: Thu, 23 Jun 2022 16:07:40 +0800 Subject: [PATCH 3/8] =?UTF-8?q?=E7=BA=A2=E7=BB=BF=E7=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 红绿灯Bus司机端增加信号来源显示 --- .../ui/BusPassengerTrafficLightView.java | 5 +- .../mogo/och/bus/ui/BusTrafficLightView.java | 5 +- .../ui/TaxiPassengerTrafficLightView.java | 5 +- .../och/taxi/ui/TaxiTrafficLightView.java | 5 +- .../V2XTrafficLightBroadcastReceiver.kt | 2 +- .../core/function/hmi/ui/MoGoHmiFragment.kt | 7 +- .../hmi/ui/widget/SingleTrafficLightView.kt | 79 +++++++++++++++---- .../hmi/ui/widget/TrafficLightView.kt | 3 +- .../res/layout/hmi_view_traffic_light.xml | 36 ++++++++- .../res/values-xhdpi-2560x1440/dimens.xml | 6 +- .../src/main/res/values/dimens.xml | 6 +- .../obu/mogo/MogoPrivateObuManager.kt | 8 +- .../trafficlight/TrafficLightHMIManager.kt | 8 +- .../core/TrafficLightDispatcher.kt | 6 +- .../api/hmi/view/IViewTrafficLight.kt | 3 +- .../api/hmi/warning/IMoGoWaringProvider.kt | 3 +- .../function/call/hmi/CallerHmiManager.kt | 5 +- 17 files changed, 143 insertions(+), 49 deletions(-) diff --git a/OCH/mogo-och-bus-passenger/src/main/java/com/mogo/och/bus/passenger/ui/BusPassengerTrafficLightView.java b/OCH/mogo-och-bus-passenger/src/main/java/com/mogo/och/bus/passenger/ui/BusPassengerTrafficLightView.java index 4c75d3d6b3..e021a8675b 100644 --- a/OCH/mogo-och-bus-passenger/src/main/java/com/mogo/och/bus/passenger/ui/BusPassengerTrafficLightView.java +++ b/OCH/mogo-och-bus-passenger/src/main/java/com/mogo/och/bus/passenger/ui/BusPassengerTrafficLightView.java @@ -49,10 +49,11 @@ public class BusPassengerTrafficLightView extends IViewTrafficLight { * 展示红绿灯预警 * * @param checkLightId 0-都是默认,1-红,2-黄,3-绿 + * @param lightSource 1:云端下发;2:自车感知 */ @Override - public void showWarningTrafficLight(int checkLightId) { - super.showWarningTrafficLight(checkLightId); + public void showWarningTrafficLight(int checkLightId,int lightSource) { + super.showWarningTrafficLight(checkLightId,lightSource); mCurrentLightId = checkLightId; updateTrafficLightIcon(checkLightId); } diff --git a/OCH/mogo-och-bus/src/main/java/com/mogo/och/bus/ui/BusTrafficLightView.java b/OCH/mogo-och-bus/src/main/java/com/mogo/och/bus/ui/BusTrafficLightView.java index c8cee1dff0..4b25021821 100644 --- a/OCH/mogo-och-bus/src/main/java/com/mogo/och/bus/ui/BusTrafficLightView.java +++ b/OCH/mogo-och-bus/src/main/java/com/mogo/och/bus/ui/BusTrafficLightView.java @@ -46,10 +46,11 @@ public class BusTrafficLightView extends IViewTrafficLight { * 展示红绿灯预警 * * @param checkLightId 0-都是默认,1-红,2-黄,3-绿 + * @param lightSource 1:云端下发;2:自车感知 */ @Override - public void showWarningTrafficLight(int checkLightId) { - super.showWarningTrafficLight(checkLightId); + public void showWarningTrafficLight(int checkLightId,int lightSource) { + super.showWarningTrafficLight(checkLightId,lightSource); mCurrentLightId = checkLightId; updateTrafficLightIcon(checkLightId); } diff --git a/OCH/mogo-och-taxi-passenger/src/main/java/com/mogo/och/taxi/passenger/ui/TaxiPassengerTrafficLightView.java b/OCH/mogo-och-taxi-passenger/src/main/java/com/mogo/och/taxi/passenger/ui/TaxiPassengerTrafficLightView.java index fb66ed8c3e..b963ae8829 100644 --- a/OCH/mogo-och-taxi-passenger/src/main/java/com/mogo/och/taxi/passenger/ui/TaxiPassengerTrafficLightView.java +++ b/OCH/mogo-och-taxi-passenger/src/main/java/com/mogo/och/taxi/passenger/ui/TaxiPassengerTrafficLightView.java @@ -49,10 +49,11 @@ public class TaxiPassengerTrafficLightView extends IViewTrafficLight { * 展示红绿灯预警 * * @param checkLightId 0-都是默认,1-红,2-黄,3-绿 + * @param lightSource 1:云端下发;2:自车感知 */ @Override - public void showWarningTrafficLight(int checkLightId) { - super.showWarningTrafficLight(checkLightId); + public void showWarningTrafficLight(int checkLightId,int lightSource) { + super.showWarningTrafficLight(checkLightId,lightSource); mCurrentLightId = checkLightId; updateTrafficLightIcon(checkLightId); } diff --git a/OCH/mogo-och-taxi/src/main/java/com/mogo/och/taxi/ui/TaxiTrafficLightView.java b/OCH/mogo-och-taxi/src/main/java/com/mogo/och/taxi/ui/TaxiTrafficLightView.java index cc5b0a3ffb..41db23e822 100644 --- a/OCH/mogo-och-taxi/src/main/java/com/mogo/och/taxi/ui/TaxiTrafficLightView.java +++ b/OCH/mogo-och-taxi/src/main/java/com/mogo/och/taxi/ui/TaxiTrafficLightView.java @@ -46,10 +46,11 @@ public class TaxiTrafficLightView extends IViewTrafficLight { * 展示红绿灯预警 * * @param checkLightId 0-都是默认,1-红,2-黄,3-绿 + * @param lightSource 1:云端下发;2:自车感知 */ @Override - public void showWarningTrafficLight(int checkLightId) { - super.showWarningTrafficLight(checkLightId); + public void showWarningTrafficLight(int checkLightId,int lightSource) { + super.showWarningTrafficLight(checkLightId,lightSource); mCurrentLightId = checkLightId; updateTrafficLightIcon(checkLightId); } diff --git a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/receiver/V2XTrafficLightBroadcastReceiver.kt b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/receiver/V2XTrafficLightBroadcastReceiver.kt index 52ee8a21df..b6599e45b2 100644 --- a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/receiver/V2XTrafficLightBroadcastReceiver.kt +++ b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/receiver/V2XTrafficLightBroadcastReceiver.kt @@ -57,7 +57,7 @@ class V2XTrafficLightBroadcastReceiver : BroadcastReceiver() { * @param trafficLightCountDown 对应交通灯倒计时,如果倒计时为0,则disable */ private fun dispatchShowWaring(trafficLightCheckType: Int, trafficLightCountDown: Int) { - CallerHmiManager.showWarningTrafficLight(trafficLightCheckType) + CallerHmiManager.showWarningTrafficLight(trafficLightCheckType,1) when(trafficLightCheckType){ 1 -> CallerHmiManager.changeCountdownRed(trafficLightCountDown) 2 -> CallerHmiManager.changeCountdownYellow(trafficLightCountDown) diff --git a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/MoGoHmiFragment.kt b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/MoGoHmiFragment.kt index 2eb1df4849..0c6d2a09b0 100644 --- a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/MoGoHmiFragment.kt +++ b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/MoGoHmiFragment.kt @@ -78,7 +78,7 @@ import kotlin.collections.ArrayList * 预警图层 */ @Route(path = MoGoFragmentPaths.PATH_FRAGMENT_HMI) -class MoGoHmiFragment : MvpFragment(), + class MoGoHmiFragment : MvpFragment(), IMoGoWaringProvider, IMoGoHmiViewProxy, MoGoHmiContract.View, @@ -618,9 +618,10 @@ class MoGoHmiFragment : MvpFragment(), * 展示红绿灯预警 * * @param checkLightId 0-都是默认不亮起,1-红,2-黄,3-绿 + * @param lightSource 1:云端下发;2:自车感知 */ - override fun showWarningTrafficLight(checkLightId: Int) { - mViewTrafficLight?.showWarningTrafficLight(checkLightId) + override fun showWarningTrafficLight(checkLightId: Int,lightSource: Int) { + mViewTrafficLight?.showWarningTrafficLight(checkLightId,lightSource) } override fun isWarningTrafficLightShow(): Boolean { diff --git a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/widget/SingleTrafficLightView.kt b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/widget/SingleTrafficLightView.kt index 399a8a98ea..b856ecf35e 100644 --- a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/widget/SingleTrafficLightView.kt +++ b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/widget/SingleTrafficLightView.kt @@ -5,9 +5,11 @@ import android.util.AttributeSet import android.view.LayoutInflater import android.view.View import android.widget.ImageView -import androidx.core.view.marginLeft +import android.widget.TextView +import com.mogo.eagle.core.data.config.FunctionBuildConfig import com.mogo.eagle.core.function.api.hmi.view.IViewTrafficLight import com.mogo.eagle.core.function.hmi.R +import com.mogo.eagle.core.utilcode.mogo.AppIdentityModeUtils import com.mogo.eagle.core.utilcode.util.UiThreadHandler /** @@ -21,6 +23,8 @@ class SingleTrafficLightView @JvmOverloads constructor( private var mLightIconIV: ImageView? = null private var mLightIconBG: ImageView? = null private var mLightTimeTV: GradientTextView? = null + private var mLightSourceTV: TextView? = null + private var mLightSourceDivider: View? = null private var mCurrentLightId = 0 init { @@ -32,17 +36,20 @@ class SingleTrafficLightView @JvmOverloads constructor( mLightIconIV = findViewById(R.id.hmi_traffic_light_iv) mLightIconBG = findViewById(R.id.hmi_traffic_light_bg) mLightTimeTV = findViewById(R.id.hmi_traffic_light_time_tv) + mLightSourceTV = findViewById(R.id.hmi_traffic_light_source) + mLightSourceDivider = findViewById(R.id.hmi_traffic_light_divider) } /** * 展示红绿灯预警 * * @param checkLightId 0-都是默认,1-红,2-黄,3-绿 + * @param lightSource 1:云端下发;2:自车感知 */ - override fun showWarningTrafficLight(checkLightId: Int) { - super.showWarningTrafficLight(checkLightId) + override fun showWarningTrafficLight(checkLightId: Int,lightSource: Int) { + super.showWarningTrafficLight(checkLightId,lightSource) mCurrentLightId = checkLightId - updateTrafficLightIcon(checkLightId) + updateTrafficLightIcon(checkLightId,lightSource) } /** @@ -59,11 +66,26 @@ class SingleTrafficLightView @JvmOverloads constructor( override fun disableCountdown() { super.disableCountdown() UiThreadHandler.post { - val lp = this.layoutParams as MarginLayoutParams - lp.width = context.resources.getDimension(R.dimen.hmi_traffic_light_icon_size).toInt() - this.layoutParams = lp - mLightTimeTV!!.visibility = GONE - mLightIconBG!!.layoutParams.width = context.resources.getDimension(R.dimen.dp_124).toInt() + // 小巴车的司机端需要展示红绿灯信号来源 + if(AppIdentityModeUtils.isDriver(FunctionBuildConfig.appIdentityMode) + && AppIdentityModeUtils.isBus(FunctionBuildConfig.appIdentityMode)){ + val lp = this.layoutParams as MarginLayoutParams + lp.width = context.resources.getDimension(R.dimen.dp_325).toInt() + this.layoutParams = lp + mLightSourceTV!!.visibility = VISIBLE + mLightSourceDivider!!.visibility = VISIBLE + mLightTimeTV!!.visibility = GONE + mLightSourceTV!!.setPadding(0,0,75,0) + mLightIconBG!!.layoutParams.width = context.resources.getDimension(R.dimen.dp_310).toInt() + }else{ + val lp = this.layoutParams as MarginLayoutParams + lp.width = context.resources.getDimension(R.dimen.hmi_traffic_light_icon_size).toInt() + this.layoutParams = lp + mLightTimeTV!!.visibility = GONE + mLightSourceDivider!!.visibility = View.GONE + mLightSourceTV!!.visibility = View.GONE + mLightIconBG!!.layoutParams.width = context.resources.getDimension(R.dimen.dp_124).toInt() + } } } @@ -149,8 +171,9 @@ class SingleTrafficLightView @JvmOverloads constructor( * 更新红绿灯icon * * @param lightId 0-都是默认,1-红,2-黄,3-绿 + * @param lightSource 1:云端下发;2:自车感知 */ - private fun updateTrafficLightIcon(lightId: Int) { + private fun updateTrafficLightIcon(lightId: Int,lightSource: Int) { UiThreadHandler.post { when (lightId) { 1 -> { @@ -167,15 +190,41 @@ class SingleTrafficLightView @JvmOverloads constructor( } else -> this@SingleTrafficLightView.visibility = GONE } + when(lightSource){ + 1 -> { + mLightSourceTV!!.text = "云端下发" + } + 2 -> { + mLightSourceTV!!.text = "自车感知" + } + else -> { + mLightSourceTV!!.visibility = GONE + } + } } } private fun resetView(){ - val lp = this.layoutParams as MarginLayoutParams - lp.width = context.resources.getDimension(R.dimen.hmi_traffic_light_layout_width).toInt() - this.layoutParams = lp - mLightTimeTV!!.visibility = View.VISIBLE - mLightIconBG!!.layoutParams.width = context.resources.getDimension(R.dimen.hmi_traffic_light_bg_width).toInt() + // 小巴车的司机端需要展示红绿灯信号来源 + if(AppIdentityModeUtils.isDriver(FunctionBuildConfig.appIdentityMode) + && AppIdentityModeUtils.isBus(FunctionBuildConfig.appIdentityMode)){ + val lp = this.layoutParams as MarginLayoutParams + lp.width = context.resources.getDimension(R.dimen.hmi_traffic_light_bus_layout_width).toInt() + this.layoutParams = lp + mLightTimeTV!!.visibility = View.VISIBLE + mLightSourceDivider!!.visibility = View.VISIBLE + mLightSourceTV!!.visibility = View.VISIBLE + mLightSourceTV!!.setPadding(0,0,0,0) + mLightIconBG!!.layoutParams.width = context.resources.getDimension(R.dimen.hmi_traffic_light_bus_bg_width).toInt() + }else{ + val lp = this.layoutParams as MarginLayoutParams + lp.width = context.resources.getDimension(R.dimen.hmi_traffic_light_layout_width).toInt() + this.layoutParams = lp + mLightTimeTV!!.visibility = View.VISIBLE + mLightSourceDivider!!.visibility = View.GONE + mLightSourceTV!!.visibility = View.GONE + mLightIconBG!!.layoutParams.width = context.resources.getDimension(R.dimen.hmi_traffic_light_bg_width).toInt() + } } } \ 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/widget/TrafficLightView.kt b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/widget/TrafficLightView.kt index 2c0c4d797a..c8406f16bd 100644 --- a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/widget/TrafficLightView.kt +++ b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/widget/TrafficLightView.kt @@ -30,8 +30,9 @@ class TrafficLightView @JvmOverloads constructor( * 展示红绿灯预警 * * @param checkLightId 0-都是默认,1-红,2-黄,3-绿 + * @param lightSource 1:云端下发;2:自车感知 */ - override fun showWarningTrafficLight(checkLightId: Int) { + override fun showWarningTrafficLight(checkLightId: Int,lightSource: Int) { UiThreadHandler.post { visibility = View.VISIBLE when (checkLightId) { 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 de6e81a0df..611771006c 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 @@ -1,19 +1,21 @@ + app:layout_constraintTop_toTopOf="parent" + /> + + + android:layout_marginEnd="@dimen/dp_30" + /> + + \ No newline at end of file diff --git a/core/function-impl/mogo-core-function-hmi/src/main/res/values-xhdpi-2560x1440/dimens.xml b/core/function-impl/mogo-core-function-hmi/src/main/res/values-xhdpi-2560x1440/dimens.xml index 6aed16e240..f41ddbbc1e 100644 --- a/core/function-impl/mogo-core-function-hmi/src/main/res/values-xhdpi-2560x1440/dimens.xml +++ b/core/function-impl/mogo-core-function-hmi/src/main/res/values-xhdpi-2560x1440/dimens.xml @@ -39,15 +39,19 @@ 1066px 225px + 400px 154px 60px 40px 28px 210px + 385px 120px 15px 17px 154px - 130px + 71px 60px + 32px + \ No newline at end of file diff --git a/core/function-impl/mogo-core-function-hmi/src/main/res/values/dimens.xml b/core/function-impl/mogo-core-function-hmi/src/main/res/values/dimens.xml index 00e9e6bef4..cdcf2f99ff 100644 --- a/core/function-impl/mogo-core-function-hmi/src/main/res/values/dimens.xml +++ b/core/function-impl/mogo-core-function-hmi/src/main/res/values/dimens.xml @@ -45,15 +45,19 @@ 120px 225px + 400px 154px 60px 40px 28px 210px + 385px 120px 15px 17px 154px - 130px + 71px 60px + 32px + \ No newline at end of file diff --git a/core/function-impl/mogo-core-function-obu-mogo/src/main/java/com/mogo/eagle/core/function/obu/mogo/MogoPrivateObuManager.kt b/core/function-impl/mogo-core-function-obu-mogo/src/main/java/com/mogo/eagle/core/function/obu/mogo/MogoPrivateObuManager.kt index eb73dc2276..4261480252 100644 --- a/core/function-impl/mogo-core-function-obu-mogo/src/main/java/com/mogo/eagle/core/function/obu/mogo/MogoPrivateObuManager.kt +++ b/core/function-impl/mogo-core-function-obu-mogo/src/main/java/com/mogo/eagle/core/function/obu/mogo/MogoPrivateObuManager.kt @@ -664,7 +664,7 @@ class MogoPrivateObuManager private constructor() { when (currentLight.phase) { // 灯光不可用 0x0 -> { - CallerHmiManager.showWarningTrafficLight(0) + CallerHmiManager.showWarningTrafficLight(0,2) } // 红灯 0x1 -> { @@ -673,7 +673,7 @@ class MogoPrivateObuManager private constructor() { isRedLight = true } isGreenLight = false - CallerHmiManager.showWarningTrafficLight(1) + CallerHmiManager.showWarningTrafficLight(1,2) val red = currentLight.count_down.toInt() CallerHmiManager.changeCountdownRed(red) @@ -688,7 +688,7 @@ class MogoPrivateObuManager private constructor() { isGreenLight = true } isRedLight = false - CallerHmiManager.showWarningTrafficLight(3) + CallerHmiManager.showWarningTrafficLight(3,2) val green = currentLight.count_down.toInt() CallerHmiManager.changeCountdownGreen(green) //防止数据出现问题的容错 @@ -733,7 +733,7 @@ class MogoPrivateObuManager private constructor() { // 黄灯 0x3 -> { CallerHmiManager.disableWarningV2X(appId.toString()) - CallerHmiManager.showWarningTrafficLight(2) + CallerHmiManager.showWarningTrafficLight(2,2) val yellow = currentLight.count_down.toInt() CallerHmiManager.changeCountdownYellow(yellow) CallerHmiManager.changeCountdownGreen(0) diff --git a/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/trafficlight/TrafficLightHMIManager.kt b/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/trafficlight/TrafficLightHMIManager.kt index 66ce2bb505..247cea2317 100644 --- a/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/trafficlight/TrafficLightHMIManager.kt +++ b/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/trafficlight/TrafficLightHMIManager.kt @@ -24,7 +24,7 @@ class TrafficLightHMIManager { currentTrafficLight?.let { if (!initView) { initView = true - CallerHmiManager.showWarningTrafficLight(0) + CallerHmiManager.showWarningTrafficLight(0,1) } callerHMIToChangeLight(it) } @@ -38,19 +38,19 @@ class TrafficLightHMIManager { } when { trafficLightStatus.isGreen() || trafficLightStatus.isFlashGreen() -> { - CallerHmiManager.showWarningTrafficLight(3) + CallerHmiManager.showWarningTrafficLight(3,1) CallerHmiManager.changeCountdownGreen(remain) // CallerHmiManager.changeCountdownRed(-1) // CallerHmiManager.changeCountdownYellow(-1) } trafficLightStatus.isYellow() -> { - CallerHmiManager.showWarningTrafficLight(2) + CallerHmiManager.showWarningTrafficLight(2,1) CallerHmiManager.changeCountdownYellow(remain) // CallerHmiManager.changeCountdownGreen(-1) // CallerHmiManager.changeCountdownRed(-1) } trafficLightStatus.isRed() -> { - CallerHmiManager.showWarningTrafficLight(1) + CallerHmiManager.showWarningTrafficLight(1,1) CallerHmiManager.changeCountdownRed(remain) // CallerHmiManager.changeCountdownGreen(-1) // CallerHmiManager.changeCountdownYellow(-1) diff --git a/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/trafficlight/core/TrafficLightDispatcher.kt b/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/trafficlight/core/TrafficLightDispatcher.kt index c9ae0ed908..49e2be29a1 100644 --- a/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/trafficlight/core/TrafficLightDispatcher.kt +++ b/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/trafficlight/core/TrafficLightDispatcher.kt @@ -67,17 +67,17 @@ class TrafficLightDispatcher : IMoGoAutopilotIdentifyListener , IMoGoTrafficLigh when (light.state) { TrafficLightOuterClass.LightState.STATE_RED -> { //红灯 - CallerHmiManager.showWarningTrafficLight(1) + CallerHmiManager.showWarningTrafficLight(1,2) CallerHmiManager.changeCountdownGreen(0) } TrafficLightOuterClass.LightState.STATE_YELLOW -> { //黄灯 - CallerHmiManager.showWarningTrafficLight(2) + CallerHmiManager.showWarningTrafficLight(2,2) CallerHmiManager.changeCountdownGreen(0) } TrafficLightOuterClass.LightState.STATE_GREEN -> { //绿灯 - CallerHmiManager.showWarningTrafficLight(3) + CallerHmiManager.showWarningTrafficLight(3,2) CallerHmiManager.changeCountdownGreen(0) } else -> {} diff --git a/core/mogo-core-function-api/src/main/java/com/mogo/eagle/core/function/api/hmi/view/IViewTrafficLight.kt b/core/mogo-core-function-api/src/main/java/com/mogo/eagle/core/function/api/hmi/view/IViewTrafficLight.kt index 3c38f4a32f..42bebf7c4c 100644 --- a/core/mogo-core-function-api/src/main/java/com/mogo/eagle/core/function/api/hmi/view/IViewTrafficLight.kt +++ b/core/mogo-core-function-api/src/main/java/com/mogo/eagle/core/function/api/hmi/view/IViewTrafficLight.kt @@ -14,8 +14,9 @@ abstract class IViewTrafficLight(context: Context?, attrs: AttributeSet?, defSty * 展示红绿灯预警 * * @param checkLightId 0-都是默认,1-红,2-黄,3-绿 + * @param lightSource 1:云端下发;2:自车感知 */ - open fun showWarningTrafficLight(checkLightId: Int) {} + open fun showWarningTrafficLight(checkLightId: Int,lightSource: Int) {} /** * 关闭红绿灯预警展示,并重制灯态 diff --git a/core/mogo-core-function-api/src/main/java/com/mogo/eagle/core/function/api/hmi/warning/IMoGoWaringProvider.kt b/core/mogo-core-function-api/src/main/java/com/mogo/eagle/core/function/api/hmi/warning/IMoGoWaringProvider.kt index 84495fb04b..5488945771 100644 --- a/core/mogo-core-function-api/src/main/java/com/mogo/eagle/core/function/api/hmi/warning/IMoGoWaringProvider.kt +++ b/core/mogo-core-function-api/src/main/java/com/mogo/eagle/core/function/api/hmi/warning/IMoGoWaringProvider.kt @@ -86,8 +86,9 @@ interface IMoGoWaringProvider : IMoGoHmiViewProxy { * 展示红绿灯预警 * * @param checkLightId 0-都是默认,1-红,2-黄,3-绿 + * @param lightSource 1:云端下发;2:自车感知 */ - fun showWarningTrafficLight(checkLightId: Int) + fun showWarningTrafficLight(checkLightId: Int,lightSource: Int) /** * 红绿灯是否展示 diff --git a/core/mogo-core-function-call/src/main/java/com/mogo/eagle/core/function/call/hmi/CallerHmiManager.kt b/core/mogo-core-function-call/src/main/java/com/mogo/eagle/core/function/call/hmi/CallerHmiManager.kt index 294d7cee0a..5335ce979e 100644 --- a/core/mogo-core-function-call/src/main/java/com/mogo/eagle/core/function/call/hmi/CallerHmiManager.kt +++ b/core/mogo-core-function-call/src/main/java/com/mogo/eagle/core/function/call/hmi/CallerHmiManager.kt @@ -114,9 +114,10 @@ object CallerHmiManager : CallerBase() { * 展示红绿灯预警 * * @param checkLightId 0-都是默认,1-红,2-黄,3-绿 + * @param lightSource 1:云端下发;2:自车感知 */ - fun showWarningTrafficLight(checkLightId: Int) { - waringProviderApi?.showWarningTrafficLight(checkLightId) + fun showWarningTrafficLight(checkLightId: Int,lightSource: Int) { + waringProviderApi?.showWarningTrafficLight(checkLightId,lightSource) } /** From 7b809e6413d12c7be0e8af463bf2d0debe465e69 Mon Sep 17 00:00:00 2001 From: pangfan Date: Thu, 23 Jun 2022 16:07:55 +0800 Subject: [PATCH 4/8] =?UTF-8?q?[Bus/Taxi=20driver=20v2.8.0]version->2.8.0;?= =?UTF-8?q?=20app=E5=90=AF=E5=8A=A8=E5=9F=8B=E7=82=B9app=5Fversion?= =?UTF-8?q?=E6=94=B9=E7=94=A8versionName?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/mogo/launcher/stageone/HttpDnsStartUp.kt | 2 +- .../eagle/core/function/call/analytics/AnalyticsManager.kt | 2 +- gradle.properties | 4 ++-- 3 files changed, 4 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 e499965217..939e110068 100644 --- a/app/src/main/java/com/mogo/launcher/stageone/HttpDnsStartUp.kt +++ b/app/src/main/java/com/mogo/launcher/stageone/HttpDnsStartUp.kt @@ -212,7 +212,7 @@ class HttpDnsStartUp : AndroidStartup() { // 加入启动统计 val mStartParams: HashMap = HashMap() mStartParams["start_time"] = TimeUtils.getNowMills() - mStartParams["app_version"] = AppUtils.getAppVersionCode() + mStartParams["app_version"] = AppUtils.getAppVersionName() mStartParams["app_identity_mode"] = FunctionBuildConfig.appIdentityMode AnalyticsManager.track("app_start_time", mStartParams) diff --git a/core/mogo-core-function-call/src/main/java/com/mogo/eagle/core/function/call/analytics/AnalyticsManager.kt b/core/mogo-core-function-call/src/main/java/com/mogo/eagle/core/function/call/analytics/AnalyticsManager.kt index aa388bc8ea..7fb33492fb 100644 --- a/core/mogo-core-function-call/src/main/java/com/mogo/eagle/core/function/call/analytics/AnalyticsManager.kt +++ b/core/mogo-core-function-call/src/main/java/com/mogo/eagle/core/function/call/analytics/AnalyticsManager.kt @@ -57,7 +57,7 @@ object AnalyticsManager { val map: MutableMap = ArrayMap() map["debug"] = if (isDebug) 1 else 0 map["sn"] = MoGoAiCloudClientConfig.getInstance().sn - map["app_version"] = AppUtils.getAppVersionCode() + map["app_version"] = AppUtils.getAppVersionName() map["app_identity_mode"] = FunctionBuildConfig.appIdentityMode return map diff --git a/gradle.properties b/gradle.properties index a35160cfa1..4b1625c984 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=2070000 -versionName=2.7.0 +versionCode=2080000 +versionName=2.8.0 ################# 新架构模块Maven版本管理 ################# MOGO_CORE_FUNCTION_AUTOPILOT_VERSION=0.0.58.10 From 545f8ccbc8e89977fff2a77020a2477f0b607b76 Mon Sep 17 00:00:00 2001 From: xuxinchao <13522809046@163.com> Date: Thu, 23 Jun 2022 17:12:08 +0800 Subject: [PATCH 5/8] =?UTF-8?q?=E5=BC=82=E5=B8=B8=E4=B8=8A=E6=8A=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 设置乘客端不显示异常上报悬浮窗开关控制按钮 --- .../eagle/core/function/hmi/ui/setting/DebugSettingView.kt | 4 ++++ 1 file changed, 4 insertions(+) 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 6d5d33f765..eba6becd36 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 @@ -786,6 +786,10 @@ class DebugSettingView @JvmOverloads constructor( tbReportWarning.setOnCheckedChangeListener { _, isChecked -> FunctionBuildConfig.isReportWarning = isChecked } + //异常上报开关只在司机端展示 + if (AppIdentityModeUtils.isPassenger(FunctionBuildConfig.appIdentityMode)){ + tbReportWarning.visibility = GONE + } } From c4aed44ad98bd1ce8c32c07f04295813997b81bc Mon Sep 17 00:00:00 2001 From: lixiaopeng Date: Thu, 23 Jun 2022 17:40:46 +0800 Subject: [PATCH 6/8] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=BB=B6=E8=BF=9F?= =?UTF-8?q?=E6=97=B6=E9=97=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/mogo/eagle/core/function/main/MainMoGoApplication.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/main/MainMoGoApplication.java b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/main/MainMoGoApplication.java index abacc0ee53..cf97e12639 100644 --- a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/main/MainMoGoApplication.java +++ b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/main/MainMoGoApplication.java @@ -70,7 +70,7 @@ public abstract class MainMoGoApplication extends AbsMogoApplication { public void run() { CallerBindingcarManager.getBindingcarProvider().queryAppUpgrade(); } - },3000); + },5000); } /** From 862541f5ea72c7f9d5ca9e5ad23173e00f2555fe Mon Sep 17 00:00:00 2001 From: xuxinchao <13522809046@163.com> Date: Thu, 23 Jun 2022 18:12:32 +0800 Subject: [PATCH 7/8] =?UTF-8?q?=E8=B0=83=E8=AF=95=E7=AA=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 状态中心增加后台运行是否优化状态以及设置入口 --- .../mogo-core-function-hmi/build.gradle | 3 ++- .../hmi/ui/setting/DebugSettingView.kt | 21 +++++++++++++++++-- .../main/res/layout/view_debug_setting.xml | 12 +++++++++++ 3 files changed, 33 insertions(+), 3 deletions(-) diff --git a/core/function-impl/mogo-core-function-hmi/build.gradle b/core/function-impl/mogo-core-function-hmi/build.gradle index 23dd91a810..86b8c9334c 100644 --- a/core/function-impl/mogo-core-function-hmi/build.gradle +++ b/core/function-impl/mogo-core-function-hmi/build.gradle @@ -103,7 +103,7 @@ dependencies { api rootProject.ext.dependencies.mogo_core_function_api implementation project(':libraries:map-usbcamera') - + implementation project(':libraries:mogo-adas-other') } else { api project(':foudations:mogo-aicloud-services-sdk') api project(':foudations:mogo-commons') @@ -137,6 +137,7 @@ dependencies { api project(':core:mogo-core-function-api') api project(':libraries:map-usbcamera') + api project(':libraries:mogo-adas-other') } } 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 eba6becd36..64f092393d 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 @@ -6,7 +6,6 @@ import android.content.ClipData import android.content.ClipboardManager import android.content.Context import android.graphics.Color -import android.media.RingtoneManager import android.os.Build import android.text.Html import android.util.AttributeSet @@ -65,8 +64,8 @@ import com.mogo.map.MogoMap import com.mogo.map.uicontroller.VisualAngleMode import com.mogo.map.uicontroller.VisualAngleMode.* import com.mogo.module.service.routeoverlay.* -import com.tencent.liteav.basic.datareport.a.B import com.zhidao.easysocket.utils.L +import com.zhidao.support.adas.high.other.permission.BackgrounderPermission import kotlinx.android.synthetic.main.view_debug_setting.view.* import mogo.telematics.pad.MessagePad import mogo_msg.MogoReportMsg @@ -74,6 +73,7 @@ import java.text.SimpleDateFormat import java.util.* import kotlin.math.abs + /** * @author xiaoyuzhou * @date 2021/9/30 8:46 下午 @@ -741,6 +741,23 @@ class DebugSettingView @JvmOverloads constructor( ToastUtils.showLong("经纬度复制成功") } + //状态中心-后台优化状态 + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N){ + val backgroundStatus = "后台运行:" + if (BackgrounderPermission.getInstance() + .isPermissionLongBackgroundRunning(context) + ) "已优化" else "未优化" + tvBackgroundOperation.text = Html.fromHtml(backgroundStatus, Html.FROM_HTML_MODE_LEGACY) + tvBackgroundOperation.setOnClickListener { + BackgrounderPermission.getInstance().showPermissionLongBackgroundRunningDialog(context) + } + BackgrounderPermission.getInstance().setListener { + val str = + "后台运行:" + if (it) "已优化" else "未优化" + tvBackgroundOperation.text = Html.fromHtml(str, Html.FROM_HTML_MODE_LEGACY) + } + }else { + tvBackgroundOperation.visibility = GONE + } } /** 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 41e399344a..2e71aef998 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 @@ -561,6 +561,18 @@ android:layout_height="1dp" android:background="#F0F0F0" /> + + + + + Date: Thu, 23 Jun 2022 18:33:34 +0800 Subject: [PATCH 8/8] =?UTF-8?q?=E8=B0=83=E8=AF=95=E7=AA=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 修改工控机连接状态刷新逻辑 --- .../hmi/ui/setting/DebugSettingView.kt | 95 ++++++++++--------- 1 file changed, 52 insertions(+), 43 deletions(-) diff --git a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/setting/DebugSettingView.kt b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/setting/DebugSettingView.kt index 64f092393d..f2c4af18a4 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 @@ -758,6 +758,8 @@ class DebugSettingView @JvmOverloads constructor( }else { tvBackgroundOperation.visibility = GONE } + //设置工控机连接状态 + setAutopilotConnectStatus() } /** @@ -1568,49 +1570,6 @@ class DebugSettingView @JvmOverloads constructor( }" ) - tvAutopilotConnectStatus.text = Html.fromHtml( - "工控机连接状态:${ - if (AppConfigInfo.isConnectAutopilot) { - "正常" - } else { - "异常 原因:${ - if (AppConfigInfo.connectStatusDescribe.isNullOrEmpty()) { - "主动断开连接" - } else { - AppConfigInfo.connectStatusDescribe - } - }" - } - }" - ) - - if (AppConfigInfo.isConnectAutopilot) { - tvIpcConnectStatus.minLines = 1 - } else { - tvIpcConnectStatus.minLines = 4 - } - - tvIpcConnectStatus.text = Html.fromHtml( - "工控机连接状态:${ - if (AppConfigInfo.isConnectAutopilot) { - "正常" - } else { - "异常 原因:${ - if (AppConfigInfo.connectStatusDescribe.isNullOrEmpty()) { - "主动断开连接" - } else { - AppConfigInfo.connectStatusDescribe - } - }" - } - }" - ) - //如果是乘客端,则不显示工控机连接状态 - if (AppIdentityModeUtils.isPassenger(FunctionBuildConfig.appIdentityMode)) { - tvIpcConnectStatus.visibility = View.GONE - tvAutopilotConnectStatus.visibility = View.GONE - } - tvObuConnectStatus.text = Html.fromHtml( "OBU连接状态:${ if (AppConfigInfo.isConnectObu) { @@ -1729,7 +1688,57 @@ class DebugSettingView @JvmOverloads constructor( mAutoPilotStatusInfo = autoPilotStatusInfo AppConfigInfo.isConnectAutopilot = autoPilotStatusInfo.connectStatus AppConfigInfo.connectStatusDescribe = autoPilotStatusInfo.connectStatusDescribe + setAutopilotConnectStatus() + } + /** + * 设置工控机连接状态 + */ + private fun setAutopilotConnectStatus(){ + ThreadUtils.runOnUiThread{ + tvAutopilotConnectStatus.text = Html.fromHtml( + "工控机连接状态:${ + if (AppConfigInfo.isConnectAutopilot) { + "正常" + } else { + "异常 原因:${ + if (AppConfigInfo.connectStatusDescribe.isNullOrEmpty()) { + "主动断开连接" + } else { + AppConfigInfo.connectStatusDescribe + } + }" + } + }" + ) + + if (AppConfigInfo.isConnectAutopilot) { + tvIpcConnectStatus.minLines = 1 + } else { + tvIpcConnectStatus.minLines = 4 + } + + tvIpcConnectStatus.text = Html.fromHtml( + "工控机连接状态:${ + if (AppConfigInfo.isConnectAutopilot) { + "正常" + } else { + "异常 原因:${ + if (AppConfigInfo.connectStatusDescribe.isNullOrEmpty()) { + "主动断开连接" + } else { + AppConfigInfo.connectStatusDescribe + } + }" + } + }" + ) + //如果是乘客端,则不显示工控机连接状态 + if (AppIdentityModeUtils.isPassenger(FunctionBuildConfig.appIdentityMode)) { + tvIpcConnectStatus.visibility = View.GONE + tvAutopilotConnectStatus.visibility = View.GONE + } + } } override fun onAutopilotCarStateData(gnssInfo: MessagePad.GnssInfo?) {