[Change]
增加对工控机美化模式的调用 Signed-off-by: donghongyu <donghongyu@zhidaoauto.com>
This commit is contained in:
@@ -114,7 +114,7 @@ ext {
|
||||
obusdk : "com.zhidao.enterprise.smartv2x:smartv2x:1.0.0.3",
|
||||
mogoobu : 'com.zhidao.support.obu:mogoobu:1.0.0.19',
|
||||
mogoami : 'com.zhidao.support.obu.ami:mogoami:1.0.0.10',
|
||||
adasHigh : 'com.zhidao.support.adas:high:1.2.1.2_bate16',
|
||||
adasHigh : 'com.zhidao.support.adas:high:1.2.1.2_bate18',
|
||||
|
||||
// google
|
||||
googlezxing : "com.google.zxing:core:3.3.3",
|
||||
|
||||
@@ -156,4 +156,17 @@ class MoGoAutopilotProvider :
|
||||
override fun setIPCUpgradeCancel() {
|
||||
AdasManager.getInstance().sendBaseInfo(IPCUpgradeInfo.cancel());
|
||||
}
|
||||
|
||||
/**
|
||||
* 演示模式(美化模式)
|
||||
* isEnable = true 开启
|
||||
* isEnable = false 关闭
|
||||
*/
|
||||
override fun setDemoMode(isEnable: Boolean) {
|
||||
if (isEnable) {
|
||||
AdasManager.getInstance().enableDemoMode()
|
||||
} else {
|
||||
AdasManager.getInstance().disableDemoMode()
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -268,9 +268,11 @@ class DebugSettingView @JvmOverloads constructor(
|
||||
// 演示模式,上一次勾选的数据
|
||||
val isDemoMode =
|
||||
SharedPrefsMgr.getInstance(context).getBoolean(MoGoConfig.IS_DEMO_MODE, false)
|
||||
CallerAutoPilotManager.setDemoMode(isDemoMode)
|
||||
rbIsDemoMode.isChecked = isDemoMode
|
||||
// 演示模式
|
||||
rbIsDemoMode.setOnCheckedChangeListener { buttonView, isChecked ->
|
||||
CallerAutoPilotManager.setDemoMode(isChecked)
|
||||
FunctionBuildConfig.isDemoMode = isChecked
|
||||
SharedPrefsMgr.getInstance(context).putBoolean(MoGoConfig.IS_DEMO_MODE, isChecked)
|
||||
}
|
||||
|
||||
@@ -1,27 +1,24 @@
|
||||
package com.mogo.eagle.core.function.api.autopilot;
|
||||
package com.mogo.eagle.core.function.api.autopilot
|
||||
|
||||
import com.mogo.eagle.core.data.autopilot.ADASTrajectoryInfo;
|
||||
import com.mogo.eagle.core.data.autopilot.AutopilotRouteInfo;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import com.mogo.eagle.core.data.autopilot.ADASTrajectoryInfo
|
||||
import com.mogo.eagle.core.data.autopilot.AutopilotRouteInfo
|
||||
import java.util.ArrayList
|
||||
|
||||
/**
|
||||
* 自动驾驶规划路线相关的监听
|
||||
*/
|
||||
public interface IMoGoAutopilotPlanningListener {
|
||||
|
||||
interface IMoGoAutopilotPlanningListener {
|
||||
/**
|
||||
* 工控机引导线数据
|
||||
*
|
||||
* @param trajectoryInfos 引导线数据经纬度
|
||||
*/
|
||||
void onAutopilotTrajectory(ArrayList<ADASTrajectoryInfo> trajectoryInfos);
|
||||
fun onAutopilotTrajectory(trajectoryInfos: ArrayList<ADASTrajectoryInfo?>?)
|
||||
|
||||
/**
|
||||
* 2021/6/23 工控机经纬度 绘制时转成高德经纬度
|
||||
*
|
||||
* @param routeList 工控机全局规划路径
|
||||
*/
|
||||
void onAutopilotRotting(AutopilotRouteInfo routeList);
|
||||
|
||||
}
|
||||
fun onAutopilotRotting(routeList: AutopilotRouteInfo?)
|
||||
}
|
||||
@@ -1,64 +1,60 @@
|
||||
package com.mogo.eagle.core.function.api.autopilot;
|
||||
package com.mogo.eagle.core.function.api.autopilot
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
|
||||
import com.mogo.eagle.core.data.autopilot.AutopilotControlParameters;
|
||||
import com.mogo.eagle.core.function.api.base.IMoGoFunctionServerProvider;
|
||||
import com.mogo.eagle.core.data.autopilot.AutopilotControlParameters
|
||||
import com.mogo.eagle.core.function.api.base.IMoGoFunctionServerProvider
|
||||
|
||||
/**
|
||||
* @author xiaoyuzhou
|
||||
* @date 2021/9/22 8:27 下午
|
||||
* 自动驾驶节点
|
||||
*/
|
||||
public interface IMoGoAutopilotProvider extends IMoGoFunctionServerProvider {
|
||||
|
||||
interface IMoGoAutopilotProvider : IMoGoFunctionServerProvider {
|
||||
/**
|
||||
* 重新连接自动驾驶域控制器,指定IP地址
|
||||
*
|
||||
* @param autoPilotIp 指定与控制器IP
|
||||
*/
|
||||
void resetIpAddress(String autoPilotIp);
|
||||
fun resetIpAddress(autoPilotIp: String)
|
||||
|
||||
/**
|
||||
* 开启自动驾驶
|
||||
*
|
||||
* @param controlParameters 开启自动驾驶的控制参数
|
||||
*/
|
||||
void startAutoPilot(AutopilotControlParameters controlParameters);
|
||||
fun startAutoPilot(controlParameters: AutopilotControlParameters)
|
||||
|
||||
/**
|
||||
* 发送json数据给 Autopilot 自动驾驶控制器
|
||||
* 具体的json格式需要与@宋克难 进行沟通
|
||||
*/
|
||||
void sendMessageToAutopilot(@NonNull String jsonString);
|
||||
fun sendMessageToAutopilot(jsonString: String)
|
||||
|
||||
/**
|
||||
* 结束自动驾驶
|
||||
*/
|
||||
void cancelAutoPilot();
|
||||
fun cancelAutoPilot()
|
||||
|
||||
/**
|
||||
* 开启域控制器录制bag包
|
||||
*
|
||||
* @return true-成功,false-失败
|
||||
*/
|
||||
boolean recordPackage();
|
||||
fun recordPackage(): Boolean
|
||||
|
||||
/**
|
||||
* Log 是否显示
|
||||
*
|
||||
* @param isEnableLog true-打开,false-关闭
|
||||
*/
|
||||
void setEnableLog(boolean isEnableLog);
|
||||
fun setEnableLog(isEnableLog: Boolean)
|
||||
|
||||
/**
|
||||
* Log 是否写入
|
||||
*
|
||||
* @param isWriteLog true-打开,false-关闭
|
||||
*/
|
||||
void setIsWriteLog(boolean isWriteLog);
|
||||
|
||||
Boolean setAutoPilotSpeed(int speed);
|
||||
fun setIsWriteLog(isWriteLog: Boolean)
|
||||
fun setAutoPilotSpeed(speed: Int): Boolean
|
||||
|
||||
/**
|
||||
* 记录各种失败
|
||||
@@ -66,25 +62,32 @@ public interface IMoGoAutopilotProvider extends IMoGoFunctionServerProvider {
|
||||
* @param name 文件名字
|
||||
* @param reason 原因
|
||||
*/
|
||||
void recordCause(String key, String name, String id, String reason);
|
||||
fun recordCause(key: String?, name: String?, id: String?, reason: String?)
|
||||
|
||||
/**
|
||||
* 关机
|
||||
*/
|
||||
void setIPCShutDown();
|
||||
fun setIPCShutDown()
|
||||
|
||||
/**
|
||||
* 重启
|
||||
*/
|
||||
void setIPCReboot();
|
||||
fun setIPCReboot()
|
||||
|
||||
/**
|
||||
* 工控机升级确认
|
||||
*/
|
||||
void setIPCUpgradeAffirm();
|
||||
fun setIPCUpgradeAffirm()
|
||||
|
||||
/**
|
||||
* 工控机升级取消
|
||||
*/
|
||||
void setIPCUpgradeCancel();
|
||||
}
|
||||
fun setIPCUpgradeCancel()
|
||||
|
||||
/**
|
||||
* 演示模式(美化模式)
|
||||
* isEnable = true 开启
|
||||
* isEnable = false 关闭
|
||||
*/
|
||||
fun setDemoMode(isEnable: Boolean)
|
||||
}
|
||||
@@ -15,8 +15,8 @@ object CallerAutoPilotManager {
|
||||
|
||||
private val providerApi: IMoGoAutopilotProvider?
|
||||
get() = CallerBase.getApiInstance(
|
||||
IMoGoAutopilotProvider::class.java,
|
||||
MogoServicePaths.PATH_AUTO_PILOT
|
||||
IMoGoAutopilotProvider::class.java,
|
||||
MogoServicePaths.PATH_AUTO_PILOT
|
||||
)
|
||||
|
||||
/**
|
||||
@@ -90,15 +90,23 @@ object CallerAutoPilotManager {
|
||||
/**
|
||||
* 设置工控机升级确认
|
||||
*/
|
||||
fun setIPCUpgradeAffirm(){
|
||||
fun setIPCUpgradeAffirm() {
|
||||
providerApi?.setIPCUpgradeAffirm()
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置工控机升级取消
|
||||
*/
|
||||
fun setIPCUpgradeCancel(){
|
||||
fun setIPCUpgradeCancel() {
|
||||
providerApi?.setIPCUpgradeCancel()
|
||||
}
|
||||
|
||||
/**
|
||||
* 演示模式(美化模式)
|
||||
* isEnable = true 开启
|
||||
* isEnable = false 关闭
|
||||
*/
|
||||
fun setDemoMode(isEnable: Boolean) {
|
||||
providerApi?.setDemoMode(isEnable)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user