add lat lon in test panel
This commit is contained in:
@@ -1,7 +1,5 @@
|
||||
package com.mogo.commons.debug;
|
||||
|
||||
import android.text.TextUtils;
|
||||
|
||||
/**
|
||||
* @author congtaowang
|
||||
* @since 2019-12-23
|
||||
@@ -28,7 +26,7 @@ public class DebugConfig {
|
||||
*
|
||||
* @param sDebug true - 调试模式 false - 非调试模式
|
||||
*/
|
||||
public static void setDebug( boolean sDebug ) {
|
||||
public static void setDebug(boolean sDebug) {
|
||||
DebugConfig.sDebug = sDebug;
|
||||
}
|
||||
|
||||
@@ -69,7 +67,7 @@ public class DebugConfig {
|
||||
*/
|
||||
public static final int AI_TYPE_SPEECH = 2;
|
||||
|
||||
private static int sAIType = AI_TYPE_TXZ;
|
||||
private static final int sAIType = AI_TYPE_TXZ;
|
||||
|
||||
/**
|
||||
* 自研车机
|
||||
@@ -116,7 +114,7 @@ public class DebugConfig {
|
||||
* {@link #NET_MODE_DEMO}
|
||||
* {@link #NET_MODE_RELEASE}
|
||||
*/
|
||||
public static void setNetMode( int netMode ) {
|
||||
public static void setNetMode(int netMode) {
|
||||
DebugConfig.sNetMode = netMode;
|
||||
}
|
||||
|
||||
@@ -129,7 +127,7 @@ public class DebugConfig {
|
||||
return sLaunchLocationService;
|
||||
}
|
||||
|
||||
public static void setLaunchLocationService( boolean launchLocationService ) {
|
||||
public static void setLaunchLocationService(boolean launchLocationService) {
|
||||
DebugConfig.sLaunchLocationService = launchLocationService;
|
||||
}
|
||||
|
||||
@@ -142,7 +140,7 @@ public class DebugConfig {
|
||||
return sUseCustomNavi;
|
||||
}
|
||||
|
||||
public static void setUseCustomNavi( boolean sUseCustomNavi ) {
|
||||
public static void setUseCustomNavi(boolean sUseCustomNavi) {
|
||||
DebugConfig.sUseCustomNavi = sUseCustomNavi;
|
||||
}
|
||||
|
||||
@@ -151,7 +149,7 @@ public class DebugConfig {
|
||||
*
|
||||
* @param type {@link #CAR_MACHINE_TYPE_SELF_INNOVATE} {@link #CAR_MACHINE_TYPE_BYD}
|
||||
*/
|
||||
public static void setCarMachineType( int type ) {
|
||||
public static void setCarMachineType(int type) {
|
||||
sCarMachineType = type;
|
||||
}
|
||||
|
||||
@@ -173,7 +171,7 @@ public class DebugConfig {
|
||||
return sIsLauncher;
|
||||
}
|
||||
|
||||
public static void setLauncher( boolean isLauncher ) {
|
||||
public static void setLauncher(boolean isLauncher) {
|
||||
DebugConfig.sIsLauncher = isLauncher;
|
||||
}
|
||||
|
||||
@@ -183,7 +181,7 @@ public class DebugConfig {
|
||||
return sRequestOnlineCarData;
|
||||
}
|
||||
|
||||
public static void setRequestOnlineCarData( boolean sRequestOnlineCarData ) {
|
||||
public static void setRequestOnlineCarData(boolean sRequestOnlineCarData) {
|
||||
DebugConfig.sRequestOnlineCarData = sRequestOnlineCarData;
|
||||
}
|
||||
|
||||
@@ -193,7 +191,7 @@ public class DebugConfig {
|
||||
return sUseCustomMap;
|
||||
}
|
||||
|
||||
public static void setUseCustomMap( boolean sUseCustomMap ) {
|
||||
public static void setUseCustomMap(boolean sUseCustomMap) {
|
||||
DebugConfig.sUseCustomMap = sUseCustomMap;
|
||||
}
|
||||
|
||||
@@ -206,13 +204,13 @@ public class DebugConfig {
|
||||
return sActiveAIAssistFlag;
|
||||
}
|
||||
|
||||
public static void setActiveAIAssistFlag( boolean sActiveAIAssistFlag ) {
|
||||
public static void setActiveAIAssistFlag(boolean sActiveAIAssistFlag) {
|
||||
DebugConfig.sActiveAIAssistFlag = sActiveAIAssistFlag;
|
||||
}
|
||||
|
||||
private static boolean useMockObuData;
|
||||
|
||||
public static void setUseMockObuData( boolean use ) {
|
||||
public static void setUseMockObuData(boolean use) {
|
||||
useMockObuData = use;
|
||||
}
|
||||
|
||||
@@ -231,13 +229,13 @@ public class DebugConfig {
|
||||
*
|
||||
* @param sProductFlavor
|
||||
*/
|
||||
public static void setProductFlavor( String sProductFlavor ) {
|
||||
public static void setProductFlavor(String sProductFlavor) {
|
||||
DebugConfig.sProductFlavor = sProductFlavor;
|
||||
}
|
||||
|
||||
private static String sSocketAppId;
|
||||
|
||||
public static void setSocketAppId( String sSocketAppId ) {
|
||||
public static void setSocketAppId(String sSocketAppId) {
|
||||
DebugConfig.sSocketAppId = sSocketAppId;
|
||||
}
|
||||
|
||||
@@ -254,14 +252,14 @@ public class DebugConfig {
|
||||
return sRoadEventAnimated;
|
||||
}
|
||||
|
||||
public static void setRoadEventAnimated( boolean sRoadEventAnimated ) {
|
||||
public static void setRoadEventAnimated(boolean sRoadEventAnimated) {
|
||||
DebugConfig.sRoadEventAnimated = sRoadEventAnimated;
|
||||
}
|
||||
|
||||
|
||||
private static boolean sLoadGuideModule = false;
|
||||
|
||||
public static void setLoadGuideModule( boolean sLoadGuideModule ) {
|
||||
public static void setLoadGuideModule(boolean sLoadGuideModule) {
|
||||
DebugConfig.sLoadGuideModule = sLoadGuideModule;
|
||||
}
|
||||
|
||||
@@ -277,7 +275,7 @@ public class DebugConfig {
|
||||
|
||||
private static boolean isSkinSupported = false;
|
||||
|
||||
public static void setSkinSupported( boolean isSkinSupported ) {
|
||||
public static void setSkinSupported(boolean isSkinSupported) {
|
||||
DebugConfig.isSkinSupported = isSkinSupported;
|
||||
}
|
||||
|
||||
@@ -290,7 +288,7 @@ public class DebugConfig {
|
||||
*/
|
||||
private static boolean isSupportedSearchDestinationOnlineCarList = false;
|
||||
|
||||
public static void setSupportedSearchDestinationOnlineCarList( boolean isSupportedSearchDestinationOnlineCarList ) {
|
||||
public static void setSupportedSearchDestinationOnlineCarList(boolean isSupportedSearchDestinationOnlineCarList) {
|
||||
DebugConfig.isSupportedSearchDestinationOnlineCarList = isSupportedSearchDestinationOnlineCarList;
|
||||
}
|
||||
|
||||
@@ -303,7 +301,7 @@ public class DebugConfig {
|
||||
*/
|
||||
private static boolean isScheduleCalculateNotHomeCompanyDistanceForPush = false;
|
||||
|
||||
public static void setScheduleCalculateNotHomeCompanyDistanceForPush( boolean isScheduleCalculateNotHomeCompanyDistanceForPush ) {
|
||||
public static void setScheduleCalculateNotHomeCompanyDistanceForPush(boolean isScheduleCalculateNotHomeCompanyDistanceForPush) {
|
||||
DebugConfig.isScheduleCalculateNotHomeCompanyDistanceForPush = isScheduleCalculateNotHomeCompanyDistanceForPush;
|
||||
}
|
||||
|
||||
@@ -316,7 +314,7 @@ public class DebugConfig {
|
||||
*/
|
||||
private static boolean isSupportLauncherCardRefreshStrategy = false;
|
||||
|
||||
public static void setSupportLauncherCardRefreshStrategy( boolean isSupportLauncherCardRefreshStrategy ) {
|
||||
public static void setSupportLauncherCardRefreshStrategy(boolean isSupportLauncherCardRefreshStrategy) {
|
||||
DebugConfig.isSupportLauncherCardRefreshStrategy = isSupportLauncherCardRefreshStrategy;
|
||||
}
|
||||
|
||||
@@ -330,7 +328,7 @@ public class DebugConfig {
|
||||
return obuType;
|
||||
}
|
||||
|
||||
public static void setObuType( int type ) {
|
||||
public static void setObuType(int type) {
|
||||
obuType = type;
|
||||
}
|
||||
|
||||
@@ -339,7 +337,7 @@ public class DebugConfig {
|
||||
*/
|
||||
private static boolean needRequestUserInfo = false;
|
||||
|
||||
public static void setNeedRequestUserInfo( boolean needRequestUserInfo ) {
|
||||
public static void setNeedRequestUserInfo(boolean needRequestUserInfo) {
|
||||
DebugConfig.needRequestUserInfo = needRequestUserInfo;
|
||||
}
|
||||
|
||||
@@ -356,13 +354,13 @@ public class DebugConfig {
|
||||
return isMapBased;
|
||||
}
|
||||
|
||||
public static void setMapBased( boolean isMapBased ) {
|
||||
public static void setMapBased(boolean isMapBased) {
|
||||
DebugConfig.isMapBased = isMapBased;
|
||||
}
|
||||
|
||||
private static boolean isNeedLoadGuideModule = true;
|
||||
|
||||
public static void setNeedLoadGuideModule( boolean isNeedLoadGuideModule ) {
|
||||
public static void setNeedLoadGuideModule(boolean isNeedLoadGuideModule) {
|
||||
DebugConfig.isNeedLoadGuideModule = isNeedLoadGuideModule;
|
||||
}
|
||||
|
||||
@@ -376,7 +374,7 @@ public class DebugConfig {
|
||||
return isNeedHideAdasWhenShare;
|
||||
}
|
||||
|
||||
public static void setNeedHideAdasWhenShare( boolean isNeedHideAdas ) {
|
||||
public static void setNeedHideAdasWhenShare(boolean isNeedHideAdas) {
|
||||
DebugConfig.isNeedHideAdasWhenShare = isNeedHideAdas;
|
||||
}
|
||||
|
||||
@@ -389,7 +387,7 @@ public class DebugConfig {
|
||||
return sIsNeedUploadCoordinatesInTime;
|
||||
}
|
||||
|
||||
public static void setNeedUploadCoordinatesInTime( boolean sIsNeedUploadCoordinatesInTime ) {
|
||||
public static void setNeedUploadCoordinatesInTime(boolean sIsNeedUploadCoordinatesInTime) {
|
||||
DebugConfig.sIsNeedUploadCoordinatesInTime = sIsNeedUploadCoordinatesInTime;
|
||||
}
|
||||
|
||||
@@ -402,7 +400,7 @@ public class DebugConfig {
|
||||
return sIsUseAdasRtkLocationInfo;
|
||||
}
|
||||
|
||||
public static void setUseAdasRtkLocationInfo( boolean sIsUseAdasRtkLocationInfo ) {
|
||||
public static void setUseAdasRtkLocationInfo(boolean sIsUseAdasRtkLocationInfo) {
|
||||
DebugConfig.sIsUseAdasRtkLocationInfo = sIsUseAdasRtkLocationInfo;
|
||||
}
|
||||
|
||||
@@ -412,17 +410,17 @@ public class DebugConfig {
|
||||
return sIsNotSmooth;
|
||||
}
|
||||
|
||||
public static void setNotSmooth( boolean sIsNotSmooth ) {
|
||||
public static void setNotSmooth(boolean sIsNotSmooth) {
|
||||
DebugConfig.sIsNotSmooth = sIsNotSmooth;
|
||||
}
|
||||
|
||||
public static boolean isOCHModule() {
|
||||
return sProductFlavor != null && sProductFlavor.startsWith( "foch" );
|
||||
return sProductFlavor != null && sProductFlavor.startsWith("foch");
|
||||
}
|
||||
|
||||
public static int sSelfCarSpeedYOffset = 20;
|
||||
|
||||
public static void setSelfCarSpeedYOffset( int sSelfCarSpeedYOffset ) {
|
||||
public static void setSelfCarSpeedYOffset(int sSelfCarSpeedYOffset) {
|
||||
DebugConfig.sSelfCarSpeedYOffset = sSelfCarSpeedYOffset;
|
||||
}
|
||||
|
||||
@@ -436,20 +434,28 @@ public class DebugConfig {
|
||||
public static final int sDownloadSnapshot = 2;
|
||||
public static final int sAutoPilotStatus = 3;
|
||||
public static final int sDownloadLink = 4;
|
||||
public static final int sLon = 5;
|
||||
public static final int sLat = 6;
|
||||
|
||||
public static String[] sStatus = new String[]{
|
||||
"false",
|
||||
"false",
|
||||
"false",
|
||||
"0",
|
||||
"false"
|
||||
"false",
|
||||
"0",
|
||||
"0"
|
||||
};
|
||||
|
||||
public synchronized static void setStatus( int type, boolean status ) {
|
||||
sStatus[type] = String.valueOf( status );
|
||||
public synchronized static void setStatus(int type, boolean status) {
|
||||
sStatus[type] = String.valueOf(status);
|
||||
}
|
||||
|
||||
public synchronized static void setAutoPilotStatus( String status ) {
|
||||
public synchronized static void setStatusData(int type, double data) {
|
||||
sStatus[type] = String.valueOf(data);
|
||||
}
|
||||
|
||||
public synchronized static void setAutoPilotStatus(String status) {
|
||||
sStatus[sAutoPilotStatus] = status;
|
||||
}
|
||||
|
||||
@@ -457,21 +463,29 @@ public class DebugConfig {
|
||||
return sStatus[sAutoPilotStatus];
|
||||
}
|
||||
|
||||
public synchronized static String getStatus( int type, boolean set2False ) {
|
||||
public synchronized static String getStatus(int type, boolean set2False) {
|
||||
String result = sStatus[type];
|
||||
if ( set2False ) {
|
||||
if (set2False) {
|
||||
sStatus[type] = "false";
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
public synchronized static String getStatusData(int type){
|
||||
if(type > 4){
|
||||
return sStatus[type].toString();
|
||||
}else{
|
||||
return "0";
|
||||
}
|
||||
}
|
||||
|
||||
private static boolean isUseAdasRecognize = true;
|
||||
|
||||
public static void setUseAdasRecognize(boolean status) {
|
||||
isUseAdasRecognize = status;
|
||||
}
|
||||
|
||||
public static boolean isUseAdasRecognize(){
|
||||
public static boolean isUseAdasRecognize() {
|
||||
return isUseAdasRecognize;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user