From 4d4a200e380010fd376eb8b58e7fd553634ed13d Mon Sep 17 00:00:00 2001 From: renwj Date: Thu, 20 Jan 2022 19:24:11 +0800 Subject: [PATCH] =?UTF-8?q?[BadCase]=E6=9B=B4=E6=96=B0Adas=E7=89=88?= =?UTF-8?q?=E6=9C=AC=E5=8F=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config.gradle | 2 +- .../autopilot/MoGoAutopilotProvider.kt | 4 +- .../core/function/hmi/ui/MoGoHmiFragment.kt | 13 ++-- .../api/autopilot/IMoGoAutopilotProvider.java | 2 +- .../call/autopilot/CallerAutoPilotManager.kt | 4 +- .../module/adas/OnAdasListenerAdapter.java | 61 ++++++++++--------- 6 files changed, 42 insertions(+), 44 deletions(-) diff --git a/config.gradle b/config.gradle index 983be9703a..3019aeb491 100644 --- a/config.gradle +++ b/config.gradle @@ -114,7 +114,7 @@ ext { obusdk : "com.zhidao.enterprise.smartv2x:smartv2x:1.0.0.3", mogoobu : 'com.zhidao.support.obu:mogoobu:1.0.0.19', mogoami : 'com.zhidao.support.obu.ami:mogoami:1.0.0.10', - adasHigh : 'com.zhidao.support.adas:high:1.2.1.2_bate4', + adasHigh : 'com.zhidao.support.adas:high:1.2.1.2_bate6', // google googlezxing : "com.google.zxing:core:3.3.3", diff --git a/core/function-impl/mogo-core-function-autopilot/src/main/java/com/mogo/eagle/core/function/autopilot/MoGoAutopilotProvider.kt b/core/function-impl/mogo-core-function-autopilot/src/main/java/com/mogo/eagle/core/function/autopilot/MoGoAutopilotProvider.kt index 5f722bd33e..9607b973e4 100644 --- a/core/function-impl/mogo-core-function-autopilot/src/main/java/com/mogo/eagle/core/function/autopilot/MoGoAutopilotProvider.kt +++ b/core/function-impl/mogo-core-function-autopilot/src/main/java/com/mogo/eagle/core/function/autopilot/MoGoAutopilotProvider.kt @@ -110,7 +110,7 @@ class MoGoAutopilotProvider : AdasManager.getInstance().rebootIPC() } - override fun recordCause(key: String?, name: String?, reason: String?) { - AdasManager.getInstance().recordCause(key, name, reason) + override fun recordCause(key: String?, name: String?, id: String?, reason: String?) { + AdasManager.getInstance().recordCause(key, name, id, reason) } } \ 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/MoGoHmiFragment.kt b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/MoGoHmiFragment.kt index 677ec0d61d..c9b7010781 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 @@ -305,7 +305,6 @@ class MoGoHmiFragment : MvpFragment itx.onDismiss { val record = autoPilotBadCaseEntrance?.getTag(R.id.autopilot_badcase_record) as? AutoPilotRecordResult - CallerAutoPilotManager.recordCause(record?.key, record?.fileName, null) dismissBadCaseFloatView() } itx.onSelect { @@ -334,7 +333,12 @@ class MoGoHmiFragment : MvpFragment Logger.i(TAG, "ok:${body}") dismissBadCaseFloatView() dismiss?.invoke() + CallerAutoPilotManager.recordCause( + record?.key, + record?.fileName, + it.id, it.reason) ToastUtils.showShort("接管反馈成功~") + record?.consumed = true return@launch } Logger.e(TAG, "fail:${body}") @@ -343,13 +347,6 @@ class MoGoHmiFragment : MvpFragment t.printStackTrace() ToastUtils.showShort("网络请求失败,请尝试联网~") Logger.e(TAG, "exception:${t.message}") - } finally { - record?.consumed = true - CallerAutoPilotManager.recordCause( - record?.key, - record?.fileName, - it.id - ) } } } diff --git a/core/mogo-core-function-api/src/main/java/com/mogo/eagle/core/function/api/autopilot/IMoGoAutopilotProvider.java b/core/mogo-core-function-api/src/main/java/com/mogo/eagle/core/function/api/autopilot/IMoGoAutopilotProvider.java index 959f35bc3a..e71094f241 100644 --- a/core/mogo-core-function-api/src/main/java/com/mogo/eagle/core/function/api/autopilot/IMoGoAutopilotProvider.java +++ b/core/mogo-core-function-api/src/main/java/com/mogo/eagle/core/function/api/autopilot/IMoGoAutopilotProvider.java @@ -66,7 +66,7 @@ public interface IMoGoAutopilotProvider extends IMoGoFunctionServerProvider { * @param name 文件名字 * @param reason 原因 */ - void recordCause(String key, String name, String reason); + void recordCause(String key, String name, String id, String reason); /** * 关机 diff --git a/core/mogo-core-function-call/src/main/java/com/mogo/eagle/core/function/call/autopilot/CallerAutoPilotManager.kt b/core/mogo-core-function-call/src/main/java/com/mogo/eagle/core/function/call/autopilot/CallerAutoPilotManager.kt index d5287ebc56..4a3e046bb1 100644 --- a/core/mogo-core-function-call/src/main/java/com/mogo/eagle/core/function/call/autopilot/CallerAutoPilotManager.kt +++ b/core/mogo-core-function-call/src/main/java/com/mogo/eagle/core/function/call/autopilot/CallerAutoPilotManager.kt @@ -75,8 +75,8 @@ object CallerAutoPilotManager { return providerApi?.setAutoPilotSpeed(speed) ?: false } - fun recordCause(key: String?, name: String?, reason: String?) { - providerApi?.recordCause(key, name, reason) + fun recordCause(key: String?, name: String?, id: String?, reason: String?) { + providerApi?.recordCause(key, name, id, reason) } fun setIPCShutDown() { diff --git a/modules/mogo-module-adas/src/main/java/com/mogo/module/adas/OnAdasListenerAdapter.java b/modules/mogo-module-adas/src/main/java/com/mogo/module/adas/OnAdasListenerAdapter.java index ff7bbfe851..f3cc8039b2 100644 --- a/modules/mogo-module-adas/src/main/java/com/mogo/module/adas/OnAdasListenerAdapter.java +++ b/modules/mogo-module-adas/src/main/java/com/mogo/module/adas/OnAdasListenerAdapter.java @@ -26,7 +26,6 @@ import com.zhidao.support.adas.high.bean.AutopilotWayArrive; import com.zhidao.support.adas.high.bean.CarLaneInfo; import com.zhidao.support.adas.high.bean.CarStateInfo; import com.zhidao.support.adas.high.bean.IPCUpgradeInfo; -import com.zhidao.support.adas.high.bean.IPCUpgradePatchDownloadStatusInfo; import com.zhidao.support.adas.high.bean.IPCUpgradeStateInfo; import com.zhidao.support.adas.high.bean.LightStatueInfo; import com.zhidao.support.adas.high.bean.ObstaclesInfo; @@ -231,38 +230,40 @@ public class OnAdasListenerAdapter implements OnAdasListener { */ @Override public void onUpgradeStateInfo(IPCUpgradeStateInfo info) { - if(info!=null){ - Logger.d(TAG,"onUpgradeStateInfo : "+info.getUpgradeStatus()); - boolean upgradeStatus=false;//工控机升级状态,true代表升级成功 false代表升级失败,默认为false - if(info.getUpgradeStatus() == IPCUpgradeStateInfo.Status.SUCCESSFUL.code){ - upgradeStatus=true;//升级成功 - //升级结束确认 - AdasManager.getInstance().sendBaseInfo(IPCUpgradeInfo.upgradeFinishAffirm()); - }else if(info.getUpgradeStatus() == IPCUpgradeStateInfo.Status.FAILED.code){ - upgradeStatus=false;//升级失败 - } - Logger.d(TAG,"onUpgradeStateInfo : "+(upgradeStatus ? "升级成功" :"升级失败")); - CallerHmiManager.INSTANCE.showAdUpgradeStatus(upgradeStatus); - }else{ - Logger.d(TAG,"onUpgradeStateInfo : upgrade status info is null"); - } +// if(info!=null){ +// Logger.d(TAG,"onUpgradeStateInfo : "+info.getUpgradeStatus()); +// boolean upgradeStatus=false;//工控机升级状态,true代表升级成功 false代表升级失败,默认为false +// if(info.getUpgradeStatus() == IPCUpgradeStateInfo.Status.SUCCESSFUL.code){ +// upgradeStatus=true;//升级成功 +// //升级结束确认 +// AdasManager.getInstance().sendBaseInfo(IPCUpgradeInfo.upgradeFinishAffirm()); +// }else if(info.getUpgradeStatus() == IPCUpgradeStateInfo.Status.FAILED.code){ +// upgradeStatus=false;//升级失败 +// } +// Logger.d(TAG,"onUpgradeStateInfo : "+(upgradeStatus ? "升级成功" :"升级失败")); +// CallerHmiManager.INSTANCE.showAdUpgradeStatus(upgradeStatus); +// }else{ +// Logger.d(TAG,"onUpgradeStateInfo : upgrade status info is null"); +// } } - /** - * 工控机下载状态 - * @param info 工控机升级包下载进度 - */ - @Override - public void onUpgradePatchDownloadStatus(IPCUpgradePatchDownloadStatusInfo info) { - if(info!=null){ - Logger.d(TAG,"onUpgradePatchDownloadStatus : status="+info.getDownloadStatus() + - " version="+info.getDownloadVersion()+ " progress="+info.getDownloadProgress()); - CallerHmiManager.INSTANCE.showAdDownloadStatus(info.getDownloadVersion(),info.getDownloadStatus(),info.getDownloadProgress()); - }else{ - Logger.d(TAG,"onUpgradePatchDownloadStatus : download status info is null"); - } +// /** +// * 工控机下载状态 +// * @param info 工控机升级包下载进度 +// */ +// @Override +// public void onUpgradePatchDownloadStatus(IPCUpgradePatchDownloadStatusInfo info) { +// if(info!=null){ +// Logger.d(TAG,"onUpgradePatchDownloadStatus : status="+info.getDownloadStatus() + +// " version="+info.getDownloadVersion()+ " progress="+info.getDownloadProgress()); +// CallerHmiManager.INSTANCE.showAdDownloadStatus(info.getDownloadVersion(),info.getDownloadStatus(),info.getDownloadProgress()); +// }else{ +// Logger.d(TAG,"onUpgradePatchDownloadStatus : download status info is null"); +// } +// +// } + - } @Override public void onSSHResult(SSHResult info) {