[3.4.0] security passport add online env
This commit is contained in:
@@ -85,19 +85,19 @@ class TraceManager : IMoGoCloudListener, IMoGoAutopilotCarConfigListener {
|
||||
|
||||
|
||||
traceInfoCache[ChainConstant.CHAIN_TYPE_INIT_STATUS] =
|
||||
ChainLogParam(true, "ADAS连接状态")
|
||||
ChainLogParam(true, "INIT状态")
|
||||
traceInfoCache[ChainConstant.CHAIN_TYPE_GNSS] =
|
||||
ChainLogParam(true, "ADAS自车定位")
|
||||
traceInfoCache[ChainConstant.CHAIN_TYPE_SOCKET_AUTOPILOT] =
|
||||
ChainLogParam(true, "ADAS自动驾驶链路(包含: 自动驾驶状态交互,全局路径,到站提醒,节点状态,异常上报,PNC)")
|
||||
traceInfoCache[ChainConstant.CHAIN_TYPE_SOCKET_DATA_TRACKED] =
|
||||
ChainLogParam(true, "ADAS感知物体")
|
||||
ChainLogParam(true, "云感知物体")
|
||||
traceInfoCache[ChainConstant.CHAIN_TYPE_SOCKET_TRAJECTORY] =
|
||||
ChainLogParam(false, "ADAS车前引导线")
|
||||
traceInfoCache[ChainConstant.CHAIN_TYPE_SOCKET_VEHICLE] =
|
||||
ChainLogParam(false, "ADAS车辆底盘数据")
|
||||
traceInfoCache[ChainConstant.CHAIN_TYPE_SOCKET_TRAFFIC_LIGHT] =
|
||||
ChainLogParam(true, "ADAS红绿灯数据")
|
||||
ChainLogParam(true, "红绿灯Union数据")
|
||||
traceInfoCache[ChainConstant.CHAIN_TYPE_HMI] =
|
||||
ChainLogParam(true, "人机交互行为")
|
||||
traceInfoCache[ChainConstant.CHAIN_TYPE_ANR_LEAK] =
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
package com.mogo.eagle.core.function.hmi.ui.widget;
|
||||
|
||||
import static com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_RUNNING;
|
||||
import static com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.M_HMI;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.content.Context;
|
||||
@@ -28,7 +27,6 @@ import com.mogo.eagle.core.function.call.autopilot.CallerChassisGearStateListene
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerChassisSteeringStateListenerManager;
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerChassisThrottleStateListenerManager;
|
||||
import com.mogo.eagle.core.function.hmi.R;
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger;
|
||||
import com.mogo.eagle.core.utilcode.util.ThreadUtils;
|
||||
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
@@ -153,11 +151,9 @@ public class TrafficDataView extends ConstraintLayout implements
|
||||
*/
|
||||
@Override
|
||||
public void onAutopilotSteeringData(float steering) {
|
||||
CallerLogger.INSTANCE.d(M_HMI +TAG, "steering原始值====" + steering);
|
||||
if (Math.abs(steering) < 1) {
|
||||
steering = 0;
|
||||
}
|
||||
CallerLogger.INSTANCE.d(M_HMI +TAG, "steering忽略小数点后====" + (int) steering);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -166,7 +162,6 @@ public class TrafficDataView extends ConstraintLayout implements
|
||||
*/
|
||||
@Override
|
||||
public void onAutopilotGearData(@NotNull Chassis.GearPosition gear) {
|
||||
CallerLogger.INSTANCE.d(M_HMI +TAG, "司机屏档位" + gear);
|
||||
ThreadUtils.runOnUiThread(() -> {
|
||||
if (tapPositionView != null) {
|
||||
tapPositionView.updateWithGear(gear);
|
||||
@@ -176,13 +171,11 @@ public class TrafficDataView extends ConstraintLayout implements
|
||||
|
||||
@Override
|
||||
public void onAutopilotBrake(float brake) {
|
||||
CallerLogger.INSTANCE.d(M_HMI +TAG, "刹车:" + brake);
|
||||
mBrake = brake;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAutopilotThrottle(float throttle) {
|
||||
CallerLogger.INSTANCE.d(M_HMI +TAG, "油门:" + throttle);
|
||||
mThrottle = throttle;
|
||||
}
|
||||
/**
|
||||
|
||||
@@ -124,7 +124,7 @@ class HttpDnsStartUp : AndroidStartup<Boolean>() {
|
||||
// 使用中台长链接
|
||||
clientConfig.isUseOriginSocket = true
|
||||
// 设置是否输出网络日志
|
||||
clientConfig.isShowNetDebugLog = true //todo test
|
||||
clientConfig.isShowNetDebugLog = false //todo test
|
||||
|
||||
clientConfig.passportUrl = FunctionBuildConfig.urlJson.passportUrl
|
||||
clientConfig.socketBaseUrl = FunctionBuildConfig.urlJson.socketBaseUrl
|
||||
|
||||
@@ -3,11 +3,7 @@ package com.mogo.eagle.core.function.startup.stageone.secret;
|
||||
import android.util.Base64;
|
||||
|
||||
import com.mogo.commons.debug.DebugConfig;
|
||||
import com.mogo.eagle.core.data.app.UrlConfig;
|
||||
import com.mogo.eagle.core.data.config.FunctionBuildConfig;
|
||||
import com.mogo.eagle.core.utilcode.util.GsonUtils;
|
||||
import com.mogo.eagle.core.utilcode.util.Utils;
|
||||
import com.zhidao.utils.digest.Base64Utils;
|
||||
|
||||
import java.io.UnsupportedEncodingException;
|
||||
|
||||
@@ -49,13 +45,13 @@ public class PassPortSecret {
|
||||
domain.R<String> res = passportService.deviceActive(passport);
|
||||
if (res.getCode() != ErrorCode.OK.getCode()) {
|
||||
secretCB.onFailed(res.getCode(), res.getMsg());
|
||||
}else{
|
||||
} else {
|
||||
String secretKey = res.getData();
|
||||
try {
|
||||
String result = new String(Base64.encode(secretKey.getBytes("utf-8"), Base64.NO_WRAP),"utf-8");
|
||||
String result = new String(Base64.encode(secretKey.getBytes("utf-8"), Base64.NO_WRAP), "utf-8");
|
||||
secretCB.onSuccess(result);
|
||||
} catch (UnsupportedEncodingException e) {
|
||||
secretCB.onFailed(5000,"url encode error :" + secretKey);
|
||||
secretCB.onFailed(5000, "url encode error :" + secretKey);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -66,9 +62,25 @@ public class PassPortSecret {
|
||||
.deviceActive(FunctionBuildConfig.urlJson.getSecureActive())
|
||||
.deviceRefresh(FunctionBuildConfig.urlJson.getSecureRefresh())
|
||||
.deviceAuth(FunctionBuildConfig.urlJson.getSecureAuth())
|
||||
.productId("10019")
|
||||
.productSecret("5cbcdc2240fa4104a70f28cdbe5ca69b")
|
||||
.productId(getProductId())
|
||||
.productSecret(getProductSecret())
|
||||
.sn(deviceId)
|
||||
.certPath(path).build());
|
||||
}
|
||||
|
||||
private static String getProductId() {
|
||||
if (DebugConfig.getNetMode() == DebugConfig.NET_MODE_RELEASE
|
||||
|| DebugConfig.getNetMode() == DebugConfig.NET_MODE_DEMO) {
|
||||
return "10028";
|
||||
}
|
||||
return "10019";
|
||||
}
|
||||
|
||||
private static String getProductSecret() {
|
||||
if (DebugConfig.getNetMode() == DebugConfig.NET_MODE_RELEASE
|
||||
|| DebugConfig.getNetMode() == DebugConfig.NET_MODE_DEMO) {
|
||||
return "6b4c4db8286547b78b1def2d76f70fb3";
|
||||
}
|
||||
return "5cbcdc2240fa4104a70f28cdbe5ca69b";
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user