Merge branch 'dev_robotaxi-d-app-module_260_220304_2.6.0' of gitlab.zhidaoauto.com:zhjt/AndroidApp/MoGoEagleEye into dev_robotaxi-d-app-module_260_220304_2.6.0
This commit is contained in:
@@ -15,13 +15,13 @@ if (!isAndroidTestBuild()) {
|
||||
logLevel "DEBUG"
|
||||
}
|
||||
}
|
||||
//if (!isAndroidTestBuild()) {
|
||||
// apply plugin: 'chain.log.hook'
|
||||
// hooklog{
|
||||
// enableLoggerToServer false
|
||||
// enableLoggerToLocal false
|
||||
// }
|
||||
//}
|
||||
if (!isAndroidTestBuild()) {
|
||||
apply plugin: 'chain.log.hook'
|
||||
hooklog{
|
||||
enableTraceToServer false
|
||||
enableLoggerToLocal true
|
||||
}
|
||||
}
|
||||
|
||||
//if (!isAndroidTestBuild()) {
|
||||
// apply plugin: 'apm-plugin'
|
||||
@@ -233,8 +233,6 @@ dependencies {
|
||||
implementation rootProject.ext.dependencies.arouter
|
||||
implementation rootProject.ext.dependencies.boostmultidex
|
||||
|
||||
compileOnly rootProject.ext.dependencies.adasapi
|
||||
compileOnly rootProject.ext.dependencies.adasconfigapi
|
||||
debugImplementation rootProject.ext.dependencies.debugleakcanary
|
||||
releaseImplementation rootProject.ext.dependencies.releaseleakcanary
|
||||
|
||||
|
||||
@@ -58,5 +58,5 @@ dependencies {
|
||||
// api "com.zhidao.support.adas:high:1.2.1.2_bate21"
|
||||
implementation 'org.greenrobot:eventbus:3.2.0'
|
||||
implementation 'com.android.support:multidex:1.0.3'
|
||||
implementation 'com.mogo.cloud:telematic:1.3.31'
|
||||
implementation 'com.mogo.cloud:telematic:1.3.50'
|
||||
}
|
||||
|
||||
@@ -27,6 +27,7 @@ import com.mogo.eagle.core.utilcode.util.ThreadUtils
|
||||
import com.mogo.eagle.core.utilcode.util.ToastUtils
|
||||
import com.mogo.telematic.MogoProtocolMsg
|
||||
import com.mogo.telematic.MogoProtocolMsg.NORMAL_DATA
|
||||
import com.mogo.telematic.MogoProtocolMsg.SYNC_MODE_STATUS
|
||||
import com.mogo.telematic.NSDNettyManager
|
||||
import com.mogo.telematic.client.listener.NettyClientListener
|
||||
import com.mogo.telematic.client.status.ConnectState
|
||||
@@ -90,13 +91,9 @@ class MoGoAutopilotProvider :
|
||||
override fun onChannelConnect(channel: Channel?) {
|
||||
val socketAddress = channel?.remoteAddress().toString()
|
||||
CallerLogger.d("$M_ADAS_IMPL$TAG", "Client ip is:${socketAddress}")
|
||||
synchronized(this@MoGoAutopilotProvider) {
|
||||
NSDNettyManager.getInstance().selectChannel(channel)
|
||||
var byteArray = if(FunctionBuildConfig.isDemoMode) byteArrayOf(1) else byteArrayOf(0)
|
||||
NSDNettyManager.getInstance().sendMogoProtocolMsgToClient(MogoProtocolMsg(3, byteArray.size, byteArray)
|
||||
) {
|
||||
CallerLogger.d("$M_ADAS_IMPL$TAG", "同步美化模式状态是否成功:${it.isSuccess}")
|
||||
}
|
||||
val byteArray = if(FunctionBuildConfig.isDemoMode) byteArrayOf(1) else byteArrayOf(0)
|
||||
NSDNettyManager.getInstance().sendMsgToSpecifiedClient(MogoProtocolMsg(SYNC_MODE_STATUS, byteArray.size, byteArray), channel) {
|
||||
CallerLogger.d("$M_ADAS_IMPL$TAG", "同步美化模式状态是否成功:${it.isSuccess}")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -210,6 +207,13 @@ class MoGoAutopilotProvider :
|
||||
}, 1000, TimeUnit.MILLISECONDS)
|
||||
}
|
||||
|
||||
/**
|
||||
* 断开与工控机的连接
|
||||
*/
|
||||
override fun disconnectIpc() {
|
||||
AdasManager.getInstance().disconnect()
|
||||
}
|
||||
|
||||
override fun onMapCollectStart(cmdId: Int, cmdTime: Long) {
|
||||
val result = recordPackage(2, cmdId)
|
||||
CallerLogger.d("$M_ADAS_IMPL$TAG", "开始记录包: [$cmdId, $result]")
|
||||
@@ -328,7 +332,7 @@ class MoGoAutopilotProvider :
|
||||
var byteArray = if (isEnable) byteArrayOf(1) else byteArrayOf(0)
|
||||
if (NSDNettyManager.getInstance().isServerStart) {
|
||||
NSDNettyManager.getInstance()
|
||||
.sendMsgToAllClients(MogoProtocolMsg(3, byteArray.size, byteArray))
|
||||
.sendMsgToAllClients(MogoProtocolMsg(SYNC_MODE_STATUS, byteArray.size, byteArray))
|
||||
} else {
|
||||
CallerLogger.d("$M_ADAS_IMPL$TAG", "同步美化模式状态时司机端Server未启动!")
|
||||
}
|
||||
|
||||
@@ -2,18 +2,24 @@ package com.mogo.eagle.core.function.autopilot.adapter;
|
||||
|
||||
import static com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.M_DEVA;
|
||||
|
||||
import android.text.TextUtils;
|
||||
import android.util.Log;
|
||||
|
||||
import com.mogo.eagle.core.data.config.FunctionBuildConfig;
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotCarConfigListener;
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotIdentifyListener;
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotVehicleStateListener;
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotCarConfigListenerManager;
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotIdentifyListenerManager;
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotVehicleStateListenerManager;
|
||||
import com.mogo.eagle.core.function.call.bindingcar.CallerBindingcarManager;
|
||||
import com.mogo.eagle.core.function.call.hmi.CallerHmiManager;
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger;
|
||||
import com.mogo.eagle.core.utilcode.util.ThreadUtils;
|
||||
import com.mogo.module.common.drawer.IdentifyDataDrawer;
|
||||
import com.zhidao.support.adas.high.OnAdasConnectStatusListener;
|
||||
import com.zhidao.support.adas.high.common.Constants;
|
||||
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import java.util.List;
|
||||
@@ -34,6 +40,7 @@ public class MoGoHandAdasMsgManager implements
|
||||
private MoGoHandAdasMsgManager() {
|
||||
CallerAutopilotIdentifyListenerManager.INSTANCE.addListener(TAG, this);
|
||||
CallerAutopilotVehicleStateListenerManager.INSTANCE.addListener(TAG, this);
|
||||
CallerAutopilotCarConfigListenerManager.INSTANCE.addListener(TAG, this);
|
||||
}
|
||||
|
||||
public static MoGoHandAdasMsgManager getInstance() {
|
||||
@@ -123,12 +130,15 @@ public class MoGoHandAdasMsgManager implements
|
||||
|
||||
}
|
||||
|
||||
private volatile boolean isIPCConnect = false;
|
||||
|
||||
@Override
|
||||
public void onAutopilotCarConfig(@NotNull MessagePad.CarConfigResp carConfigResp) {
|
||||
// if (carConfigResp != null && !TextUtils.isEmpty(carConfigResp.getMacAddress())) {
|
||||
if (carConfigResp != null && !TextUtils.isEmpty(carConfigResp.getMacAddress())) {
|
||||
// Log.d("liyz", " carConfigResp.getMacAddress() = " + carConfigResp.getMacAddress());
|
||||
// CallerBindingcarManager.getBindingcarProvider().getBindingcarInfo(carConfigResp.getMacAddress());
|
||||
// }
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -1,26 +1,30 @@
|
||||
package com.mogo.eagle.core.function.bindingcar;
|
||||
|
||||
import android.content.Context;
|
||||
import android.text.TextUtils;
|
||||
import android.util.Log;
|
||||
|
||||
import com.alibaba.android.arouter.facade.annotation.Route;
|
||||
import com.mogo.commons.constants.SharedPrefsConstants;
|
||||
import com.mogo.eagle.core.data.constants.MogoServicePaths;
|
||||
import com.mogo.eagle.core.function.api.bindingcar.BindingcarCallBack;
|
||||
import com.mogo.eagle.core.function.api.bindingcar.IMoGoBindingcarProvider;
|
||||
import com.mogo.eagle.core.function.bindingcar.network.BindingcarNetWorkManager;
|
||||
import com.mogo.eagle.core.utilcode.mogo.storage.SharedPrefsMgr;
|
||||
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
|
||||
/**
|
||||
* @author Jing
|
||||
* @description 云公告公告
|
||||
* @since: 10/27/21
|
||||
* @author lixiaopeng
|
||||
* @description 绑定sn
|
||||
* @since: 3/26/22
|
||||
*/
|
||||
@Route(path = MogoServicePaths.PATH_BINDING_CAR)
|
||||
public class BindingcarProvider implements IMoGoBindingcarProvider {
|
||||
|
||||
private Context mContext;
|
||||
private volatile String mAddress;
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
@@ -30,6 +34,7 @@ public class BindingcarProvider implements IMoGoBindingcarProvider {
|
||||
|
||||
@Override
|
||||
public void onDestroy() {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -38,21 +43,21 @@ public class BindingcarProvider implements IMoGoBindingcarProvider {
|
||||
}
|
||||
|
||||
/**
|
||||
* TODO 获取,每次连接请求一次
|
||||
* 获取macaddress,每次连接请求一次
|
||||
*
|
||||
* @param macAddress
|
||||
*/
|
||||
@Override
|
||||
public void getBindingcarInfo(String macAddress) {
|
||||
// Log.d("liyz", "macAddress = " + macAddress);
|
||||
// BindingcarNetWorkManager.getInstance().getBindingcarInfo(macAddress);
|
||||
mAddress = macAddress;
|
||||
BindingcarNetWorkManager.getInstance().getBindingcarInfo(mContext, macAddress);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void modifyCarInfo(BindingcarCallBack callBack) {
|
||||
BindingcarNetWorkManager.getInstance().modifyBindingcar("",callBack);
|
||||
Log.d("liyz", "BindingcarProvider modifyCarInfo mAddress = " + mAddress);
|
||||
BindingcarNetWorkManager.getInstance().modifyBindingcar(mAddress, callBack);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -2,11 +2,11 @@ package com.mogo.eagle.core.function.bindingcar.network;
|
||||
|
||||
import com.mogo.eagle.core.data.bindingcar.BindingcarInfo;
|
||||
import com.mogo.eagle.core.data.bindingcar.ModifyBindingcarInfo;
|
||||
import com.mogo.eagle.core.data.notice.NoticeTrafficStyleInfo;
|
||||
|
||||
import io.reactivex.Observable;
|
||||
import okhttp3.RequestBody;
|
||||
import retrofit2.http.Body;
|
||||
import retrofit2.http.Header;
|
||||
import retrofit2.http.Headers;
|
||||
import retrofit2.http.POST;
|
||||
|
||||
@@ -22,8 +22,8 @@ public interface BindingcarApiService {
|
||||
* @return {@link BindingcarInfo}
|
||||
*/
|
||||
@Headers("Content-Type:application/json;charset=UTF-8")
|
||||
@POST("/pad/selectPadByMac")
|
||||
Observable<BindingcarInfo> getBindingcarInfo(@Body RequestBody requestBody);
|
||||
@POST("pad/selectPadByMac")
|
||||
Observable<BindingcarInfo> getBindingcarInfo(@Header("access_token") String access_token, @Body RequestBody requestBody);
|
||||
|
||||
/**
|
||||
* 绑定和修改绑定车机
|
||||
@@ -31,7 +31,7 @@ public interface BindingcarApiService {
|
||||
* @return {@link ModifyBindingcarInfo}
|
||||
*/
|
||||
@Headers("Content-Type:application/json;charset=UTF-8")
|
||||
@POST("/pad/updatePadByMac")
|
||||
Observable<ModifyBindingcarInfo> modifyBindingcarInfo(@Body RequestBody requestBody);
|
||||
@POST("pad/updatePadByMac")
|
||||
Observable<ModifyBindingcarInfo> modifyBindingcarInfo(@Header("access_token") String access_token, @Body RequestBody requestBody);
|
||||
|
||||
}
|
||||
|
||||
@@ -1,14 +1,18 @@
|
||||
package com.mogo.eagle.core.function.bindingcar.network;
|
||||
|
||||
import android.util.Log;
|
||||
import android.content.Context;
|
||||
|
||||
import com.mogo.cloud.network.RetrofitFactory;
|
||||
import com.mogo.cloud.passport.MoGoAiCloudClientConfig;
|
||||
import com.mogo.commons.constants.SharedPrefsConstants;
|
||||
import com.mogo.eagle.core.data.bindingcar.BindingcarInfo;
|
||||
import com.mogo.eagle.core.data.bindingcar.ModifyBindingcarInfo;
|
||||
import com.mogo.eagle.core.function.api.bindingcar.BindingcarCallBack;
|
||||
import com.mogo.eagle.core.function.call.hmi.CallerHmiManager;
|
||||
import com.mogo.eagle.core.network.MoGoRetrofitFactory;
|
||||
import com.mogo.eagle.core.network.utils.GsonUtil;
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger;
|
||||
import com.mogo.eagle.core.utilcode.mogo.storage.SharedPrefsMgr;
|
||||
import com.mogo.module.common.constants.HostConst;
|
||||
|
||||
import io.reactivex.Observer;
|
||||
import io.reactivex.android.schedulers.AndroidSchedulers;
|
||||
@@ -19,19 +23,18 @@ import okhttp3.MediaType;
|
||||
import okhttp3.RequestBody;
|
||||
|
||||
/**
|
||||
* @author Jing
|
||||
* @description 云公告网络请求类
|
||||
* @since: 10/28/21
|
||||
* @author lixiaopeng
|
||||
* @description 绑定车机网络请求
|
||||
* @since: 3/25/22
|
||||
*/
|
||||
public class BindingcarNetWorkManager {
|
||||
private static volatile BindingcarNetWorkManager requestNoticeManager;
|
||||
private final BindingcarApiService mBindingcarApiService;
|
||||
private String token = "c4a2f30cebf64972bcd11577e1c07f86"; //中台做了接口适配,需要这个token
|
||||
private static final String TAG = "BindingcarNetWorkManager";
|
||||
|
||||
private BindingcarNetWorkManager() { //TODO
|
||||
// mBindingcarApiService = RetrofitFactory.INSTANCE.getInstance(NetConstants.DEVA_HOST)
|
||||
// .create(BindingcarApiService.class);
|
||||
|
||||
mBindingcarApiService = RetrofitFactory.INSTANCE.getInstance("http://cmdb.ee-private-dev.myghost.zhidaoauto.com/")
|
||||
private BindingcarNetWorkManager() {
|
||||
mBindingcarApiService = MoGoRetrofitFactory.getInstance(HostConst.BINDING_SN_HOST)
|
||||
.create(BindingcarApiService.class);
|
||||
}
|
||||
|
||||
@@ -46,85 +49,84 @@ public class BindingcarNetWorkManager {
|
||||
return requestNoticeManager;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 获取绑定的车辆信息
|
||||
*
|
||||
* @param macAddress mac地址 TODO
|
||||
*
|
||||
* @param macAddress mac地址
|
||||
*/
|
||||
public void getBindingcarInfo(String macAddress) {
|
||||
public void getBindingcarInfo(Context context, String macAddress) {
|
||||
String sn = MoGoAiCloudClientConfig.getInstance().getSn();
|
||||
BindingcarRequest request = new BindingcarRequest("48:b0:2d:3a:9c:19", sn);
|
||||
BindingcarRequest request = new BindingcarRequest(macAddress, sn);
|
||||
RequestBody requestBody = RequestBody.create(MediaType.get("application/json;charset=UTF-8"), GsonUtil.jsonFromObject(request));
|
||||
mBindingcarApiService.getBindingcarInfo(requestBody)
|
||||
mBindingcarApiService.getBindingcarInfo(token, requestBody)
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new Observer<BindingcarInfo>() {
|
||||
@Override
|
||||
public void onSubscribe(@NonNull Disposable d) {
|
||||
Log.d("liyz", "getBindingcarInfo onSubscribe -----> ");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNext(@NonNull BindingcarInfo info) {
|
||||
if (info != null && info.getData() != null) {
|
||||
Log.d("liyz", "getBindingcarInfo onNext info.getData() =" + info.getData().toString());
|
||||
CallerLogger.INSTANCE.d(TAG, "getBindingcarInfo onNext info.getData() =" + info.getData().toString());
|
||||
if (info.getData().getCompare() == 0) {
|
||||
CallerHmiManager.INSTANCE.showBindingcarDialog();
|
||||
} else if (info.getData().getCompare() == 3) {
|
||||
CallerHmiManager.INSTANCE.showModifyBindingcarDialog();
|
||||
}
|
||||
|
||||
SharedPrefsMgr.getInstance(context).putString(SharedPrefsConstants.CAR_MODE_TYPE, info.data.getSeries());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(@NonNull Throwable e) {
|
||||
Log.d("liyz", "getBindingcarInfo onError e = " + e.toString() + "---e.getMessage = " + e.getMessage());
|
||||
CallerLogger.INSTANCE.e(TAG, "getBindingcarInfo onError e = " + e.toString() + "---e.getMessage = " + e.getMessage());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onComplete() {
|
||||
Log.d("liyz", "getBindingcarInfo onComplete");
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 绑定和修改绑定车辆 TODO
|
||||
* 绑定和修改绑定车辆
|
||||
* mac: 48:b0:2d:3a:9c:19
|
||||
*/
|
||||
public void modifyBindingcar(String macAddress, BindingcarCallBack callBack) {
|
||||
String sn = MoGoAiCloudClientConfig.getInstance().getSn();
|
||||
BindingcarRequest request = new BindingcarRequest("48:b0:2d:3a:9c:19", sn);
|
||||
BindingcarRequest request = new BindingcarRequest(macAddress, sn);
|
||||
RequestBody requestBody = RequestBody.create(MediaType.get("application/json;charset=UTF-8"), GsonUtil.jsonFromObject(request));
|
||||
mBindingcarApiService.modifyBindingcarInfo(requestBody)
|
||||
mBindingcarApiService.modifyBindingcarInfo(token, requestBody)
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new Observer<ModifyBindingcarInfo>() {
|
||||
@Override
|
||||
public void onSubscribe(@NonNull Disposable d) {
|
||||
Log.d("liyz", "modifyBindingcar onSubscribe -----> ");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNext(@NonNull ModifyBindingcarInfo info) {
|
||||
if (info.getData() != null) {
|
||||
if (info != null) {
|
||||
callBack.callBackResult(info);
|
||||
CallerLogger.INSTANCE.d(TAG, "modifyBindingcar onNext code = " + info.code + "---msg = " + info.msg + "--info.toString() = " + info.toString());
|
||||
}
|
||||
Log.d("liyz", "modifyBindingcar onNext info " + info.toString());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(@NonNull Throwable e) {
|
||||
Log.d("liyz", "modifyBindingcar onError e = " + e.toString() + "---e.getMessage = " + e.getMessage());
|
||||
CallerLogger.INSTANCE.e(TAG, "modifyBindingcar onError e = " + e.toString() + "---e.getMessage = " + e.getMessage());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onComplete() {
|
||||
Log.d("liyz", "modifyBindingcar onComplete ");
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -104,7 +104,11 @@ internal fun Context.pop(content: View, width: Int, height: Int, key: String, fi
|
||||
}
|
||||
}
|
||||
}
|
||||
return@setTouchInterceptor true
|
||||
try {
|
||||
return@setTouchInterceptor true
|
||||
} finally {
|
||||
activity.window.decorView.dispatchTouchEvent(event)
|
||||
}
|
||||
}
|
||||
it.setBackgroundDrawable(ColorDrawable(Color.TRANSPARENT))
|
||||
}
|
||||
|
||||
@@ -33,9 +33,9 @@ class TraceManager {
|
||||
|
||||
// Trace过程中进行日志抓取,对日志进行配置
|
||||
fwBuildMap[ChainConstant.CHAIN_LINK_LOG_CONNECT_STATUS] =
|
||||
FwBuild(true, pkgName + ChainConstant.CHAIN_LINK_LOG_ADAS_INIT, 5_000)
|
||||
FwBuild(true, pkgName + ChainConstant.CHAIN_LINK_LOG_ADAS_INIT)
|
||||
fwBuildMap[ChainConstant.CHAIN_LINK_LOG_WEB_SOCKET_DATA] =
|
||||
FwBuild(false, pkgName + ChainConstant.CHAIN_LINK_LOG_ADAS_MSG, 500)
|
||||
FwBuild(false, pkgName + ChainConstant.CHAIN_LINK_LOG_ADAS_MSG)
|
||||
|
||||
traceInfoCache[ChainConstant.CHAIN_LINK_LOG_CONNECT_STATUS] =
|
||||
ChainLogParam(true, "ADAS连接状态")
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package com.mogo.eagle.core.function.hmi.ui.bindingcar
|
||||
|
||||
import android.content.Context
|
||||
import android.util.Log
|
||||
import android.widget.TextView
|
||||
import androidx.lifecycle.LifecycleObserver
|
||||
import com.mogo.eagle.core.function.call.bindingcar.CallerBindingcarManager
|
||||
|
||||
@@ -46,7 +46,7 @@ class ToBindingCarDialog(context: Context) : BaseFloatDialog(context), Lifecycle
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改绑定车机 TODO
|
||||
* 修改绑定车机
|
||||
*/
|
||||
fun toBindingcar() {
|
||||
CallerBindingcarManager.getBindingcarProvider().modifyCarInfo {
|
||||
|
||||
@@ -396,9 +396,6 @@ class DebugSettingView @JvmOverloads constructor(
|
||||
//日志中心事件点击监听
|
||||
setLogCheckedChangeListener()
|
||||
|
||||
|
||||
|
||||
|
||||
//OBU配置信息
|
||||
tvObuInfo.text = CallerObuListenerManager.getObuStatusInfoJsonString()
|
||||
|
||||
@@ -527,6 +524,10 @@ class DebugSettingView @JvmOverloads constructor(
|
||||
}
|
||||
}
|
||||
|
||||
//断开与工控机的连接
|
||||
btnDisconnectIpc.setOnClickListener {
|
||||
CallerAutoPilotManager.disconnectIpc()
|
||||
}
|
||||
|
||||
updateSpeedSettingViews()
|
||||
|
||||
@@ -966,7 +967,7 @@ class DebugSettingView @JvmOverloads constructor(
|
||||
}
|
||||
|
||||
override fun upgradeVersionUrls(urls: Map<String, String>?) {
|
||||
//todo 版本信息更新
|
||||
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
@@ -120,6 +120,7 @@ class AutoPilotAndCheckView @JvmOverloads constructor(
|
||||
}
|
||||
}
|
||||
updateSpeedSettingViews()
|
||||
CallerAutoPilotManager.getCarConfig()
|
||||
// // 比如需要设置默认速度
|
||||
// val speed = "30"
|
||||
// etInputSpeed.setText(speed)
|
||||
|
||||
@@ -39,6 +39,7 @@ class BrakeViewStatus @JvmOverloads constructor(
|
||||
fun setBrakeLight(brakeLight: Int) {
|
||||
if (brakeLight == 1) { //刹车灯亮
|
||||
if (!isBrake) {
|
||||
isBrake = true
|
||||
GlobalScope.launch(Dispatchers.Main) {
|
||||
var appearAnimation = AlphaAnimation(0f, 1f)
|
||||
appearAnimation.duration = 300
|
||||
@@ -48,7 +49,6 @@ class BrakeViewStatus @JvmOverloads constructor(
|
||||
layout_brake.visibility = View.VISIBLE
|
||||
image_brake.visibility = View.VISIBLE
|
||||
tv_brake.visibility = View.VISIBLE
|
||||
isBrake = true
|
||||
}
|
||||
}
|
||||
} else { //不踩刹车,就消失
|
||||
@@ -56,7 +56,6 @@ class BrakeViewStatus @JvmOverloads constructor(
|
||||
isBrake = false
|
||||
GlobalScope.launch(Dispatchers.Main) {
|
||||
scaleImageAndTv()
|
||||
|
||||
var disappearAnimation = AlphaAnimation(1f, 0f)
|
||||
disappearAnimation.duration = 1200
|
||||
layout_brake.startAnimation(disappearAnimation)
|
||||
|
||||
@@ -47,10 +47,10 @@ class TurnLightViewStatus @JvmOverloads constructor(
|
||||
*/
|
||||
fun setTurnLight(directionLight: Int) {
|
||||
if (!isShowNormalBg && (directionLight == 1 || directionLight == 2)) {
|
||||
isShowNormalBg = true
|
||||
GlobalScope.launch(Dispatchers.Main) {
|
||||
showNormalAnimation()
|
||||
}
|
||||
isShowNormalBg = true
|
||||
}
|
||||
|
||||
if (directionLight == 1 || directionLight == 2) {
|
||||
@@ -63,27 +63,28 @@ class TurnLightViewStatus @JvmOverloads constructor(
|
||||
//根据左右进行显示和隐藏,实际要判断每个来的时间和频度
|
||||
if (directionLight == 1) { //左转向
|
||||
if (!isLeftLight) {
|
||||
isLeftLight = true
|
||||
isRightLight = false
|
||||
isDisappare = false
|
||||
GlobalScope.launch(Dispatchers.Main) {
|
||||
left_select_image.visibility = View.VISIBLE
|
||||
right_select_image.visibility = View.GONE
|
||||
right_select_image.clearAnimation()
|
||||
setAnimation(left_select_image)
|
||||
}
|
||||
isLeftLight = true
|
||||
isRightLight = false
|
||||
isDisappare = false
|
||||
|
||||
}
|
||||
} else if (directionLight == 2) { //右转向
|
||||
if (!isRightLight) {
|
||||
isRightLight = true
|
||||
isLeftLight = false
|
||||
isDisappare = false
|
||||
GlobalScope.launch(Dispatchers.Main) {
|
||||
left_select_image.visibility = View.GONE
|
||||
right_select_image.visibility = View.VISIBLE
|
||||
left_select_image.clearAnimation()
|
||||
setAnimation(right_select_image)
|
||||
}
|
||||
isRightLight = true
|
||||
isLeftLight = false
|
||||
isDisappare = false
|
||||
}
|
||||
|
||||
} else { //消失
|
||||
@@ -92,13 +93,13 @@ class TurnLightViewStatus @JvmOverloads constructor(
|
||||
CallerVisualAngleManager.changeVisualAngle(Default())
|
||||
}
|
||||
if (!isDisappare) {
|
||||
GlobalScope.launch(Dispatchers.Main) {
|
||||
animationDisappear()
|
||||
}
|
||||
isDisappare = true
|
||||
isShowNormalBg = false
|
||||
isLeftLight = false
|
||||
isRightLight = false
|
||||
GlobalScope.launch(Dispatchers.Main) {
|
||||
animationDisappear()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -604,13 +604,28 @@
|
||||
app:layout_constraintTop_toTopOf="@id/btnSetAutopilotIP"
|
||||
app:layout_constraintBottom_toBottomOf="@id/btnSetAutopilotIP"
|
||||
app:layout_constraintLeft_toRightOf="@id/btnSetAutopilotIP"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintRight_toLeftOf="@id/btnDisconnectIpc"
|
||||
android:layout_marginStart="@dimen/dp_30"
|
||||
android:layout_marginEnd="@dimen/dp_30"
|
||||
android:layout_marginEnd="@dimen/dp_20"
|
||||
android:layout_marginTop="@dimen/dp_10"
|
||||
android:layout_marginBottom="@dimen/dp_10"
|
||||
/>
|
||||
|
||||
<Button
|
||||
android:id="@+id/btnDisconnectIpc"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:text="断开工控机连接"
|
||||
android:textSize="@dimen/dp_24"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@id/btnSetAutopilotIP"
|
||||
app:layout_constraintBottom_toBottomOf="@id/btnSetAutopilotIP"
|
||||
android:layout_marginEnd="@dimen/dp_30"
|
||||
android:paddingStart="@dimen/dp_15"
|
||||
android:paddingEnd="@dimen/dp_15"
|
||||
/>
|
||||
|
||||
<View
|
||||
android:id="@+id/autopilotIPDivider"
|
||||
android:layout_width="match_parent"
|
||||
@@ -1557,7 +1572,6 @@
|
||||
android:textSize="@dimen/dp_24" />
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</ScrollView>
|
||||
|
||||
@@ -48,9 +48,6 @@ dependencies {
|
||||
implementation rootProject.ext.dependencies.androidxappcompat
|
||||
implementation rootProject.ext.dependencies.boostmultidex
|
||||
|
||||
compileOnly rootProject.ext.dependencies.adasapi
|
||||
compileOnly rootProject.ext.dependencies.adasconfigapi
|
||||
|
||||
debugImplementation rootProject.ext.dependencies.debugleakcanary
|
||||
releaseImplementation rootProject.ext.dependencies.releaseleakcanary
|
||||
|
||||
|
||||
@@ -20,10 +20,6 @@ import com.mogo.map.navi.IMogoNaviListener;
|
||||
import com.mogo.map.navi.MogoNaviInfo;
|
||||
import com.mogo.map.uicontroller.EnumMapUI;
|
||||
import com.mogo.map.uicontroller.VisualAngleMode;
|
||||
import com.mogo.service.adas.IMogoADASControlStatusChangedListener;
|
||||
import com.zhidao.adasconfig.common.config.EnumCarChatIncognitoMode;
|
||||
import com.zhidao.adasconfig.listener.IAdasSettingUIListener;
|
||||
import com.zhidao.adasconfig.listener.IAdasSkinStyleListener;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Iterator;
|
||||
@@ -39,9 +35,7 @@ public class EventDispatchCenter implements
|
||||
IMogoMarkerClickListener,
|
||||
IMogoCarLocationChangedListener2,
|
||||
IMogoMapListener,
|
||||
IMogoLocationListener,
|
||||
IAdasSettingUIListener,
|
||||
IAdasSkinStyleListener {
|
||||
IMogoLocationListener {
|
||||
|
||||
|
||||
private static volatile EventDispatchCenter sInstance;
|
||||
@@ -70,7 +64,7 @@ public class EventDispatchCenter implements
|
||||
try {
|
||||
return listener.onMarkerClicked(marker);
|
||||
} catch (Exception e) {
|
||||
CallerLogger.INSTANCE.e(M_MAIN +TAG, "onMarkerClicked error : " + e);
|
||||
CallerLogger.INSTANCE.e(M_MAIN + TAG, "onMarkerClicked error : " + e);
|
||||
}
|
||||
}
|
||||
return false;
|
||||
@@ -87,7 +81,7 @@ public class EventDispatchCenter implements
|
||||
return listener.onStaticMarkerClicked(marker);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
CallerLogger.INSTANCE.e(M_MAIN +TAG, "onStaticMarkerClicked error : " + e);
|
||||
CallerLogger.INSTANCE.e(M_MAIN + TAG, "onStaticMarkerClicked error : " + e);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
@@ -138,7 +132,7 @@ public class EventDispatchCenter implements
|
||||
try {
|
||||
listener.onMapLoaded();
|
||||
} catch (Exception e) {
|
||||
CallerLogger.INSTANCE.e(M_MAIN +TAG, "onMapLoaded error : " + e);
|
||||
CallerLogger.INSTANCE.e(M_MAIN + TAG, "onMapLoaded error : " + e);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -156,7 +150,7 @@ public class EventDispatchCenter implements
|
||||
try {
|
||||
listener.onTouch(motionEvent);
|
||||
} catch (Exception e) {
|
||||
CallerLogger.INSTANCE.e(M_MAIN +TAG, "onTouch error : " + e);
|
||||
CallerLogger.INSTANCE.e(M_MAIN + TAG, "onTouch error : " + e);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -174,7 +168,7 @@ public class EventDispatchCenter implements
|
||||
try {
|
||||
listener.onPOIClick(poi);
|
||||
} catch (Exception e) {
|
||||
CallerLogger.INSTANCE.e(M_MAIN +TAG, "onPOIClick error : " + e);
|
||||
CallerLogger.INSTANCE.e(M_MAIN + TAG, "onPOIClick error : " + e);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -192,7 +186,7 @@ public class EventDispatchCenter implements
|
||||
try {
|
||||
listener.onMapClick(latLng);
|
||||
} catch (Exception e) {
|
||||
CallerLogger.INSTANCE.e(M_MAIN +TAG, "onMapClick error : " + e);
|
||||
CallerLogger.INSTANCE.e(M_MAIN + TAG, "onMapClick error : " + e);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -210,7 +204,7 @@ public class EventDispatchCenter implements
|
||||
try {
|
||||
listener.onLockMap(isLock);
|
||||
} catch (Exception e) {
|
||||
CallerLogger.INSTANCE.e(M_MAIN +TAG, "onLockMap error : " + e);
|
||||
CallerLogger.INSTANCE.e(M_MAIN + TAG, "onLockMap error : " + e);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -228,7 +222,7 @@ public class EventDispatchCenter implements
|
||||
try {
|
||||
listener.onMapModeChanged(ui);
|
||||
} catch (Exception e) {
|
||||
CallerLogger.INSTANCE.e(M_MAIN +TAG, "onMapModeChanged error :" + e);
|
||||
CallerLogger.INSTANCE.e(M_MAIN + TAG, "onMapModeChanged error :" + e);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -246,7 +240,7 @@ public class EventDispatchCenter implements
|
||||
try {
|
||||
listener.onMapVisualAngleChanged(visualAngleMode);
|
||||
} catch (Exception e) {
|
||||
CallerLogger.INSTANCE.e(M_MAIN +TAG, "onMapVisualAngleChanged error : " + e);
|
||||
CallerLogger.INSTANCE.e(M_MAIN + TAG, "onMapVisualAngleChanged error : " + e);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -266,7 +260,7 @@ public class EventDispatchCenter implements
|
||||
try {
|
||||
listener.onMapChanged(location, zoom, tilt, bearing);
|
||||
} catch (Exception e) {
|
||||
CallerLogger.INSTANCE.e(M_MAIN +TAG, "onMapChanged error :" + e);
|
||||
CallerLogger.INSTANCE.e(M_MAIN + TAG, "onMapChanged error :" + e);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -284,7 +278,7 @@ public class EventDispatchCenter implements
|
||||
try {
|
||||
listener.onInitNaviFailure();
|
||||
} catch (Exception e) {
|
||||
CallerLogger.INSTANCE.e(M_MAIN +TAG, "onInitNaviFailure error : " + e);
|
||||
CallerLogger.INSTANCE.e(M_MAIN + TAG, "onInitNaviFailure error : " + e);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -302,7 +296,7 @@ public class EventDispatchCenter implements
|
||||
try {
|
||||
listener.onInitNaviSuccess();
|
||||
} catch (Exception e) {
|
||||
CallerLogger.INSTANCE.e(M_MAIN +TAG, "onInitNaviSuccess error : " + e);
|
||||
CallerLogger.INSTANCE.e(M_MAIN + TAG, "onInitNaviSuccess error : " + e);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -321,7 +315,7 @@ public class EventDispatchCenter implements
|
||||
try {
|
||||
listener.onNaviInfoUpdate(naviinfo);
|
||||
} catch (Exception e) {
|
||||
CallerLogger.INSTANCE.e(M_MAIN +TAG, "onNaviInfoUpdate error : " + e);
|
||||
CallerLogger.INSTANCE.e(M_MAIN + TAG, "onNaviInfoUpdate error : " + e);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -340,7 +334,7 @@ public class EventDispatchCenter implements
|
||||
try {
|
||||
listener.onStartNavi();
|
||||
} catch (Exception e) {
|
||||
CallerLogger.INSTANCE.e(M_MAIN +TAG, "onStartNavi error : " + e);
|
||||
CallerLogger.INSTANCE.e(M_MAIN + TAG, "onStartNavi error : " + e);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -358,7 +352,7 @@ public class EventDispatchCenter implements
|
||||
try {
|
||||
listener.onStopNavi();
|
||||
} catch (Exception e) {
|
||||
CallerLogger.INSTANCE.e(M_MAIN +TAG, "onStopNavi error : " + e);
|
||||
CallerLogger.INSTANCE.e(M_MAIN + TAG, "onStopNavi error : " + e);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -376,7 +370,7 @@ public class EventDispatchCenter implements
|
||||
try {
|
||||
listener.onCalculateSuccess();
|
||||
} catch (Exception e) {
|
||||
CallerLogger.INSTANCE.e(M_MAIN +TAG, "onCalculateSuccess error : " + e);
|
||||
CallerLogger.INSTANCE.e(M_MAIN + TAG, "onCalculateSuccess error : " + e);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -394,7 +388,7 @@ public class EventDispatchCenter implements
|
||||
try {
|
||||
listener.onoCalculateFailed();
|
||||
} catch (Exception e) {
|
||||
CallerLogger.INSTANCE.e(M_MAIN +TAG, "onoCalculateFailed error : " + e);
|
||||
CallerLogger.INSTANCE.e(M_MAIN + TAG, "onoCalculateFailed error : " + e);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -414,104 +408,10 @@ public class EventDispatchCenter implements
|
||||
try {
|
||||
listener.onLocationChanged(location);
|
||||
} catch (Exception e) {
|
||||
CallerLogger.INSTANCE.e(M_MAIN +TAG, "onLocationChanged error : " + e);
|
||||
CallerLogger.INSTANCE.e(M_MAIN + TAG, "onLocationChanged error : " + e);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void northModel() {
|
||||
Iterator<IMogoADASControlStatusChangedListener> iterator = MogoRegisterCenterHandler.getInstance().getAdasControlStatusChangedListeners();
|
||||
if (iterator == null) {
|
||||
return;
|
||||
}
|
||||
while (iterator.hasNext()) {
|
||||
IMogoADASControlStatusChangedListener listener = iterator.next();
|
||||
if (listener == null) {
|
||||
continue;
|
||||
}
|
||||
try {
|
||||
listener.onMapUiModeChanged(EnumMapUI.NorthUP_2D);
|
||||
} catch (Exception e) {
|
||||
CallerLogger.INSTANCE.e(M_MAIN +TAG, "northModel error : " + e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void carHeadUp() {
|
||||
Iterator<IMogoADASControlStatusChangedListener> iterator = MogoRegisterCenterHandler.getInstance().getAdasControlStatusChangedListeners();
|
||||
if (iterator == null) {
|
||||
return;
|
||||
}
|
||||
while (iterator.hasNext()) {
|
||||
IMogoADASControlStatusChangedListener listener = iterator.next();
|
||||
if (listener == null) {
|
||||
continue;
|
||||
}
|
||||
try {
|
||||
listener.onMapUiModeChanged(EnumMapUI.CarUp_2D);
|
||||
} catch (Exception e) {
|
||||
CallerLogger.INSTANCE.e(M_MAIN +TAG, "carHeadUp error : " + e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void switchCarChat(EnumCarChatIncognitoMode enumCarChatIncognitoMode) {
|
||||
Iterator<IMogoADASControlStatusChangedListener> iterator = MogoRegisterCenterHandler.getInstance().getAdasControlStatusChangedListeners();
|
||||
if (iterator == null) {
|
||||
return;
|
||||
}
|
||||
while (iterator.hasNext()) {
|
||||
IMogoADASControlStatusChangedListener listener = iterator.next();
|
||||
if (listener == null) {
|
||||
continue;
|
||||
}
|
||||
try {
|
||||
listener.onCarStatusChanged(enumCarChatIncognitoMode == EnumCarChatIncognitoMode.OPEN);
|
||||
} catch (Exception e) {
|
||||
CallerLogger.INSTANCE.e(M_MAIN +TAG, "switchCarChat error : " + e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void whiteModel() {
|
||||
Iterator<IMogoADASControlStatusChangedListener> iterator = MogoRegisterCenterHandler.getInstance().getAdasControlStatusChangedListeners();
|
||||
if (iterator == null) {
|
||||
return;
|
||||
}
|
||||
while (iterator.hasNext()) {
|
||||
IMogoADASControlStatusChangedListener listener = iterator.next();
|
||||
if (listener == null) {
|
||||
continue;
|
||||
}
|
||||
try {
|
||||
listener.onMapUiModeChanged(EnumMapUI.Type_Light);
|
||||
} catch (Exception e) {
|
||||
CallerLogger.INSTANCE.e(M_MAIN +TAG, "whiteModel error : " + e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void blackModel() {
|
||||
Iterator<IMogoADASControlStatusChangedListener> iterator = MogoRegisterCenterHandler.getInstance().getAdasControlStatusChangedListeners();
|
||||
if (iterator == null) {
|
||||
return;
|
||||
}
|
||||
while (iterator.hasNext()) {
|
||||
IMogoADASControlStatusChangedListener listener = iterator.next();
|
||||
if (listener == null) {
|
||||
continue;
|
||||
}
|
||||
try {
|
||||
listener.onMapUiModeChanged(EnumMapUI.Type_Night);
|
||||
} catch (Exception e) {
|
||||
CallerLogger.INSTANCE.e(M_MAIN +TAG, "blackModel error : " + e);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package com.mogo.eagle.core.function.main;
|
||||
|
||||
import static com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.M_MAIN;
|
||||
import static com.mogo.eagle.core.function.main.MainPresenter.MOGO_PERMISSION_REQUEST_CODE;
|
||||
import static com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.M_MAIN;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.content.pm.PackageManager;
|
||||
@@ -24,13 +24,13 @@ import com.mogo.commons.mvp.MvpActivity;
|
||||
import com.mogo.commons.mvp.MvpFragment;
|
||||
import com.mogo.eagle.core.data.constants.MoGoFragmentPaths;
|
||||
import com.mogo.eagle.core.data.map.MogoLocation;
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger;
|
||||
import com.mogo.eagle.core.function.call.map.CallerMapUIServiceManager;
|
||||
import com.mogo.eagle.core.function.main.cards.MogoModulesManager;
|
||||
import com.mogo.eagle.core.function.main.service.MogoMainService;
|
||||
import com.mogo.eagle.core.function.main.utils.DisplayEffectsHelper;
|
||||
import com.mogo.eagle.core.function.main.windowview.FloatingViewHandler;
|
||||
import com.mogo.eagle.core.utilcode.mogo.AppLaunchTimeUtils;
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger;
|
||||
import com.mogo.eagle.core.utilcode.mogo.permissions.PermissionsDialogUtils;
|
||||
import com.mogo.eagle.core.utilcode.mogo.toast.ResourcesHelper;
|
||||
import com.mogo.eagle.core.utilcode.util.NetworkUtils;
|
||||
@@ -48,9 +48,6 @@ import com.mogo.service.fragmentmanager.IMogoFragmentManager;
|
||||
import com.mogo.service.statusmanager.IMogoStatusChangedListener;
|
||||
import com.mogo.service.statusmanager.IMogoStatusManager;
|
||||
import com.mogo.service.statusmanager.StatusDescriptor;
|
||||
import com.zhidao.adasconfig.api.AdasConfigApiController;
|
||||
import com.zhidao.adasconfig.common.log.LoggerController;
|
||||
import com.zhidao.autopilot.support.api.AutopilotServiceManage;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
@@ -183,7 +180,6 @@ public class MainActivity extends MvpActivity<MainView, MainPresenter> implement
|
||||
}
|
||||
mMogoStatusManager = mServiceApis.getStatusManagerApi();
|
||||
mMogoStatusManager.setMainPageLaunchedStatus(TAG, true);
|
||||
AutopilotServiceManage.getInstance().init(getContext());
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -253,10 +249,6 @@ public class MainActivity extends MvpActivity<MainView, MainPresenter> implement
|
||||
|
||||
private void initAdasControlStatusListener() {
|
||||
mServiceApis.getRegisterCenterApi().registerADASControlStatusChangedListener(TAG, this);
|
||||
AdasConfigApiController.getInstance().registerAdasSettingUiListener(EventDispatchCenter.getInstance());
|
||||
AdasConfigApiController.getInstance().registerAdasSettingSkinModelListener(EventDispatchCenter.getInstance());
|
||||
AdasConfigApiController.getInstance().init(getApplicationContext());
|
||||
LoggerController.setPrinterLog(DebugConfig.isDebug());
|
||||
}
|
||||
|
||||
private void startBaseService() {
|
||||
@@ -394,9 +386,9 @@ public class MainActivity extends MvpActivity<MainView, MainPresenter> implement
|
||||
mMogoFragmentManager = null;
|
||||
}
|
||||
IMogoMapUIController mapUIController = CallerMapUIServiceManager.INSTANCE.getMapUIController();
|
||||
if (mapUIController != null) mapUIController.destroy();
|
||||
AdasConfigApiController.getInstance().release();
|
||||
mServiceApis.getAdasControllerApi().release();
|
||||
if (mapUIController != null) {
|
||||
mapUIController.destroy();
|
||||
}
|
||||
CallerLogger.INSTANCE.d(M_MAIN + TAG, "destroy.");
|
||||
ContextHolderUtil.releaseContext();
|
||||
MogoModulesManager.getInstance().onDestroy();
|
||||
|
||||
@@ -534,7 +534,7 @@ class MogoPrivateObuManager private constructor() {
|
||||
//预警信息,预警类型 threat_level 2、3
|
||||
info.threat_info?.let {
|
||||
//预警方位
|
||||
val direction = getMessageDirection(info.ext_info.target_classification)
|
||||
val direction = getMessageDirection(if (info.ext_info != null) info.ext_info.target_classification else -1)
|
||||
//处理预警类型
|
||||
val appId = info.threat_info.app_id
|
||||
val level = info.threat_info.threat_level
|
||||
|
||||
@@ -17,6 +17,11 @@ interface IMoGoAutopilotProvider : IMoGoFunctionServerProvider {
|
||||
*/
|
||||
fun resetIpAddress(autoPilotIp: String)
|
||||
|
||||
/**
|
||||
* 断开与工控机的连接
|
||||
*/
|
||||
fun disconnectIpc()
|
||||
|
||||
/**
|
||||
* 开启自动驾驶
|
||||
*
|
||||
|
||||
@@ -31,6 +31,13 @@ object CallerAutoPilotManager {
|
||||
providerApi?.resetIpAddress(autoPilotIp)
|
||||
}
|
||||
|
||||
/**
|
||||
* 断开与工控机的连接
|
||||
*/
|
||||
fun disconnectIpc(){
|
||||
providerApi?.disconnectIpc()
|
||||
}
|
||||
|
||||
/**
|
||||
* 开启自动驾驶
|
||||
*
|
||||
|
||||
@@ -12,4 +12,7 @@ public class SharedPrefsConstants {
|
||||
public static final String LOCATION_LATITUDE = "location_latitude";
|
||||
public static final String LOCATION_LONGITUDE = "location_longitude";
|
||||
|
||||
public static final String CAR_MODE_TYPE = "car_mode_type";
|
||||
|
||||
public static final String MAC_ADDRESS = "mac_address";
|
||||
}
|
||||
|
||||
@@ -56,13 +56,13 @@ bytex.forbidUseLenientMutationDuringGetArtifact=true
|
||||
bytex.verifyProguardConfigurationChanged=false
|
||||
bytex.ASM_API=ASM7
|
||||
|
||||
HOOK_LOG_VERSION=1.5.22
|
||||
SERVICE_CHAIN_VERSION=1.0.53
|
||||
HOOK_LOG_VERSION=1.6.1
|
||||
SERVICE_CHAIN_VERSION=1.1.0
|
||||
################ 外部依赖引用 ################
|
||||
# loglib
|
||||
LOGLIB_VERSION=1.2.20
|
||||
LOGLIB_VERSION=1.2.23
|
||||
######## MogoAiCloudSDK Version ########
|
||||
# 网络请求
|
||||
# 网络请求LOGLIB_VERSION
|
||||
MOGO_NETWORK_VERSION=1.3.50
|
||||
# 鉴权
|
||||
MOGO_PASSPORT_VERSION=1.3.50
|
||||
|
||||
@@ -19,4 +19,6 @@ public class HostConst {
|
||||
public static final String CITY_HOST = "http://dzt-city.zhidaozhixing.com";
|
||||
public static final String SOCKET_CENTER_DOMAIN = "socketRegion";
|
||||
|
||||
public static final String BINDING_SN_HOST = "https://mygateway.zhidaozhixing.com/cmdbapi/"; //中台提供的接口服务
|
||||
|
||||
}
|
||||
|
||||
@@ -10,8 +10,6 @@ import com.alibaba.android.arouter.facade.template.IProvider;
|
||||
*/
|
||||
public interface IMogoADASController extends IProvider {
|
||||
|
||||
void release();
|
||||
|
||||
/**
|
||||
* 获取车身的定位纬度
|
||||
*
|
||||
|
||||
@@ -48,8 +48,6 @@ dependencies {
|
||||
implementation rootProject.ext.dependencies.arouter
|
||||
kapt rootProject.ext.dependencies.aroutercompiler
|
||||
|
||||
implementation rootProject.ext.dependencies.adasapi
|
||||
implementation rootProject.ext.dependencies.adasconfigapi
|
||||
if (Boolean.valueOf(USE_MAVEN_PACKAGE)) {
|
||||
api rootProject.ext.dependencies.mogomap
|
||||
implementation rootProject.ext.dependencies.mogomapapi
|
||||
|
||||
@@ -5,7 +5,6 @@ import android.content.Context;
|
||||
import com.alibaba.android.arouter.facade.annotation.Route;
|
||||
import com.mogo.eagle.core.data.constants.MogoServicePaths;
|
||||
import com.mogo.service.adas.IMogoADASController;
|
||||
import com.zhidao.autopilot.support.api.AutopilotServiceManage;
|
||||
|
||||
@Route(path = MogoServicePaths.PATH_ADAS_CONTROLLER)
|
||||
public class MogoADASController implements IMogoADASController {
|
||||
@@ -51,11 +50,6 @@ public class MogoADASController implements IMogoADASController {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void release() {
|
||||
AutopilotServiceManage.getInstance().release();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user