Merge branch 'dev_robobus-m1-p-app-module_1.0.0_230112_1.0.0' of gitlab.zhidaoauto.com:zhjt/AndroidApp/MoGoEagleEye into dev_robobus-m1-p-app-module_1.0.0_230112_1.0.0
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
package com.zhidao.support.adas.high.common;
|
||||
package com.zhjt.mogo.adas.data.bean;
|
||||
|
||||
/**
|
||||
* 监控事件报告中定义的事件以及解释
|
||||
@@ -71,18 +71,7 @@ dependencies {
|
||||
implementation rootProject.ext.dependencies.mogoservicebiz
|
||||
//okhttp3的依赖
|
||||
implementation 'com.squareup.okhttp3:okhttp:3.12.3'
|
||||
// parser
|
||||
// implementation rootProject.ext.dependencies.gson
|
||||
implementation project(':libraries:mogo-adas-data')
|
||||
// logger
|
||||
//implementation 'com.orhanobut:logger:2.2.0'
|
||||
//ProtoBuf
|
||||
// implementation 'com.google.protobuf:protobuf-java:3.6.1'
|
||||
// implementation 'com.google.protobuf:protoc:3.6.1'
|
||||
// implementation 'com.google.protobuf:protobuf-java-util:3.6.1'
|
||||
|
||||
// api project(path: ':lib_recorder')
|
||||
// api "com.zhidao.support.recorder:recorder:1.0.0.3"
|
||||
}
|
||||
|
||||
task androidSourcesJar(type: Jar) {
|
||||
|
||||
@@ -5,7 +5,7 @@ public class AdasChain {
|
||||
public static final int CHAIN_LINK_ADAS = 1;
|
||||
|
||||
public static final int CHAIN_LINK_LOG_CONNECT_STATUS = 0;
|
||||
public static final int CHAIN_LINK_LOG_WEB_SOCKET_AUTOPILOT = 1;
|
||||
public static final int CHAIN_LINK_LOG_WEB_SOCKET_AUTOPILOT = 2;
|
||||
|
||||
public static final String CHAIN_ALIAS_CODE_INIT = "PAD_ADAS_INIT";
|
||||
public static final String CHAIN_ALIAS_CODE_STATUS_CHANGE_REASON = "CHAIN_ALIAS_CODE_STATUS_CHANGE_REASON";
|
||||
|
||||
@@ -7,7 +7,7 @@ import com.zhidao.support.adas.high.AdasChannel;
|
||||
import com.zhidao.support.adas.high.OnAdasListener;
|
||||
import com.zhidao.support.adas.high.common.AutopilotReview;
|
||||
import com.zhidao.support.adas.high.common.CupidLogUtils;
|
||||
import com.zhidao.support.adas.high.common.MogoReport;
|
||||
import com.zhjt.mogo.adas.data.bean.MogoReport;
|
||||
import com.zhidao.support.adas.high.protocol.RawData;
|
||||
|
||||
import java.util.HashSet;
|
||||
|
||||
@@ -107,11 +107,23 @@ class GDLocationClient private constructor(context: Context) : AMapLocationListe
|
||||
CallerGaoDeMapLocationListenerManager.invokeMoGoLocationChanged(lastGaoDeLocation)
|
||||
|
||||
mapLocation = aMapLocation
|
||||
// 本地SP缓存城市Code
|
||||
val cityCode = aMapLocation.cityCode
|
||||
if (cityCode != null && !cityCode.isEmpty()) {
|
||||
if (cityCode != null && cityCode.isNotEmpty()) {
|
||||
mCityCode = aMapLocation.cityCode
|
||||
SharedPrefsMgr.getInstance(AbsMogoApplication.getApp())
|
||||
.putString(SharedPrefsConstants.LOCATION_CITY_CODE, cityCode)
|
||||
|
||||
SharedPrefsMgr.getInstance(AbsMogoApplication.getApp())
|
||||
.putString(
|
||||
SharedPrefsConstants.LOCATION_LATITUDE,
|
||||
aMapLocation.latitude.toString()
|
||||
)
|
||||
SharedPrefsMgr.getInstance(AbsMogoApplication.getApp())
|
||||
.putString(
|
||||
SharedPrefsConstants.LOCATION_LONGITUDE,
|
||||
aMapLocation.longitude.toString()
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -17,6 +17,7 @@ import com.mogo.support.obu.model.MogoObuRsiWarningData;
|
||||
import com.mogo.support.obu.model.MogoObuRsmWarningData;
|
||||
import com.mogo.support.obu.model.MogoObuRvWarningData;
|
||||
import com.mogo.support.obu.model.MogoObuSpatWarningData;
|
||||
import com.mogo.support.obu.model.MogoObuSystemBConfigData;
|
||||
import com.mogo.support.obu.model.advance.AccFourAxes;
|
||||
import com.mogo.support.obu.model.advance.DateTime;
|
||||
import com.mogo.support.obu.model.advance.NodeId;
|
||||
@@ -107,14 +108,13 @@ public class ObuManager {
|
||||
|
||||
/**
|
||||
* 获取当前OBU软件版本
|
||||
* 需主动调用获取{@link MogoObuManager#getObuVersion(Context, String, OnUpgradeListener)}
|
||||
*
|
||||
* @return 版本 null表示 无法连接OBU;无法获取版本;
|
||||
* @since 1.1.0
|
||||
*/
|
||||
@Nullable
|
||||
public String getObuVersion() {
|
||||
return MogoObuManager.getInstance().getObuVersion();
|
||||
public MogoObuSystemBConfigData getObuSystemBConfig() {
|
||||
return MogoObuManager.getInstance().getObuSystemBConfig();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -271,64 +271,43 @@ public class ObuManager {
|
||||
|
||||
|
||||
/**
|
||||
* 检查更新
|
||||
* 获取OBu配置信息
|
||||
*
|
||||
* @param obuIp OBU IP
|
||||
* @param listener 升级回调
|
||||
* @since 1.1.0
|
||||
*/
|
||||
public boolean checkObuUpgrade(@NonNull Context context, @NonNull String obuIp, OnUpgradeListener listener) {
|
||||
return MogoObuManager.getInstance().checkObuUpgrade(context, obuIp, listener);
|
||||
}
|
||||
|
||||
/**
|
||||
* 检查更新
|
||||
*
|
||||
* @param context 上下文
|
||||
* @param obuIp OBU IP
|
||||
* @param isUpgradeNow 是否立即升级
|
||||
* false:OBU设备下次上电时执行升级程序
|
||||
* ture: OBU设备立即执行升级程序 TODO 警告:执行立即升级时请确保车辆是静止状态。车辆在运行过程中升级设备可能会影响驾驶,严重时可能造成安全隐患!!!
|
||||
* @param listener 升级回调
|
||||
* @return 是否调用成功
|
||||
* @since 1.1.0
|
||||
*/
|
||||
public boolean checkObuUpgrade(@NonNull Context context, @NonNull String obuIp, boolean isUpgradeNow, OnUpgradeListener listener) {
|
||||
return MogoObuManager.getInstance().checkObuUpgrade(context, obuIp, isUpgradeNow, listener);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取当前连接OBU的版本号
|
||||
* 如果调用 {@link MogoObuManager#checkObuUpgrade(Context, String, OnUpgradeListener)}方法可以不用调用此方法,检查更新会获取版本号
|
||||
*
|
||||
* @param context 上下文
|
||||
* @param obuIp OBU IP
|
||||
* @param listener 升级回调
|
||||
* @return 是否调用成功
|
||||
* @since 1.1.0
|
||||
*/
|
||||
public boolean getObuVersion(@NonNull Context context, @NonNull String obuIp, OnUpgradeListener listener) {
|
||||
return MogoObuManager.getInstance().getObuVersion(context, obuIp, listener);
|
||||
public boolean readSystemBConfig(Context context, @NonNull String obuIp, OnUpgradeListener listener) {
|
||||
return MogoObuManager.getInstance().readSystemBConfig(context, obuIp, listener);
|
||||
}
|
||||
|
||||
/**
|
||||
* 传入升级包版本
|
||||
* 上传升级包到OBU 非立即执行升级程序
|
||||
*
|
||||
* @param newVersion 升级包版本
|
||||
* @param obuIp OBU IP
|
||||
* @param upgradePackage 升级包文件绝对路径 只能包含 升级包MD5文件和升级包文件
|
||||
* @param listener 升级回调
|
||||
* @since 1.1.0
|
||||
*/
|
||||
public void setObuUpgradePackageVersion(@NonNull String newVersion) {
|
||||
MogoObuManager.getInstance().setObuUpgradePackageVersion(newVersion);
|
||||
public boolean uploadUpgradePackage(@NonNull String obuIp, @NonNull String[] upgradePackage, OnUpgradeListener listener) {
|
||||
return MogoObuManager.getInstance().uploadUpgradePackage(obuIp, upgradePackage, false, listener);
|
||||
}
|
||||
|
||||
/**
|
||||
* 传入升级包
|
||||
* 上传升级包到OBU
|
||||
*
|
||||
* @param newUpgradePackage 升级包文件绝对路径 只能包含 升级包MD5文件和升级包文件
|
||||
* @param obuIp OBU IP
|
||||
* @param upgradePackage 升级包文件绝对路径 只能包含 升级包MD5文件和升级包文件
|
||||
* @param isUpgradeNow 是否立即升级
|
||||
* false:OBU设备下次上电时执行升级程序
|
||||
* ture: OBU设备立即执行升级程序 TODO 警告:执行立即升级时请确保车辆是静止状态。车辆在运行过程中升级设备可能会影响驾驶,严重时可能造成安全隐患!!!
|
||||
* @param listener 升级回调
|
||||
* @return 是否调用成功
|
||||
* @since 1.1.0
|
||||
*/
|
||||
public void setObuUpgradePackage(@NonNull String[] newUpgradePackage) {
|
||||
MogoObuManager.getInstance().setObuUpgradePackage(newUpgradePackage);
|
||||
public boolean uploadUpgradePackage(@NonNull String obuIp, @NonNull String[] upgradePackage, boolean isUpgradeNow, OnUpgradeListener listener) {
|
||||
return MogoObuManager.getInstance().uploadUpgradePackage(obuIp, upgradePackage, isUpgradeNow, listener);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -336,10 +315,11 @@ public class ObuManager {
|
||||
*
|
||||
* @since 1.1.0
|
||||
*/
|
||||
public void stopObuUpgrade() {
|
||||
MogoObuManager.getInstance().stopObuUpgrade();
|
||||
public void stopProcess() {
|
||||
MogoObuManager.getInstance().stopProcess();
|
||||
}
|
||||
|
||||
|
||||
private final OnMogoObuListener mogoObuListener = new OnMogoObuListener() {
|
||||
@Override
|
||||
public void onConnectStatus(int connectStatus) {
|
||||
|
||||
@@ -1,3 +0,0 @@
|
||||
<resources>
|
||||
<string name="app_name">mogo-obu</string>
|
||||
</resources>
|
||||
Reference in New Issue
Block a user