调试窗修改
添加鹰眼参数配置—设置刹车加速度阈值
This commit is contained in:
@@ -57,7 +57,7 @@ class MoGoAutopilotProvider :
|
||||
get() = TAG
|
||||
|
||||
override fun init(context: Context) {
|
||||
MoGoHandAdasMsgManager.getInstance()
|
||||
MoGoHandAdasMsgManager.getInstance(context)
|
||||
CallerLogger.i("$M_ADAS_IMPL$TAG", "初始化工控机连接……")
|
||||
mContext = context
|
||||
// 初始化ADAS 域控制器
|
||||
|
||||
@@ -1,9 +1,11 @@
|
||||
package com.mogo.eagle.core.function.autopilot.adapter;
|
||||
|
||||
import android.content.Context;
|
||||
import android.text.TextUtils;
|
||||
import android.util.Log;
|
||||
|
||||
import com.mogo.eagle.core.data.config.FunctionBuildConfig;
|
||||
import com.mogo.eagle.core.data.constants.MoGoConfig;
|
||||
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;
|
||||
@@ -13,6 +15,7 @@ import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotVehicleStateLi
|
||||
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.mogo.storage.SharedPrefsMgr;
|
||||
import com.mogo.eagle.core.utilcode.util.ThreadUtils;
|
||||
import com.mogo.module.common.drawer.IdentifyDataDrawer;
|
||||
|
||||
@@ -34,18 +37,20 @@ public class MoGoHandAdasMsgManager implements
|
||||
private final String TAG = "AdasEventManager";
|
||||
|
||||
private static volatile MoGoHandAdasMsgManager moGoHandAdasMsgManager;
|
||||
private Context mContext;
|
||||
|
||||
private MoGoHandAdasMsgManager() {
|
||||
private MoGoHandAdasMsgManager(Context context) {
|
||||
CallerAutopilotIdentifyListenerManager.INSTANCE.addListener(TAG, this);
|
||||
CallerAutopilotVehicleStateListenerManager.INSTANCE.addListener(TAG, this);
|
||||
CallerAutopilotCarConfigListenerManager.INSTANCE.addListener(TAG, this);
|
||||
mContext = context;
|
||||
}
|
||||
|
||||
public static MoGoHandAdasMsgManager getInstance() {
|
||||
public static MoGoHandAdasMsgManager getInstance(Context context) {
|
||||
if (moGoHandAdasMsgManager == null) {
|
||||
synchronized (MoGoHandAdasMsgManager.class) {
|
||||
if (moGoHandAdasMsgManager == null) {
|
||||
moGoHandAdasMsgManager = new MoGoHandAdasMsgManager();
|
||||
moGoHandAdasMsgManager = new MoGoHandAdasMsgManager(context);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -144,7 +149,7 @@ public class MoGoHandAdasMsgManager implements
|
||||
@Override
|
||||
public void onAutopilotBrakeLightByAcceleration(double acceleration) {
|
||||
//设置刹车信息
|
||||
if (acceleration < -2.5) {
|
||||
if (acceleration < SharedPrefsMgr.getInstance(mContext).getFloat(MoGoConfig.BRAKE_ACCELERATION_THRESHOLD,-2.5F)) {
|
||||
brakeLight = 1;
|
||||
} else {
|
||||
brakeLight = 0;
|
||||
|
||||
Reference in New Issue
Block a user