Merge branch 'dev_robotaxi-d_230912_6.1.0' into dev_minibus-d_230919_6.1.0
This commit is contained in:
@@ -27,18 +27,20 @@ object OchChainLogManager {
|
||||
nodeAliasCode = ChainConstant.CHAIN_CODE_OCH_COMMON_DISTANCE,
|
||||
paramIndexes = [0,1]
|
||||
)
|
||||
fun writeChainLog(Info: String, changeInfo: String) {
|
||||
fun writeChainLog(Info: String, changeInfo: String,upload:Boolean = true) {
|
||||
d(SceneConstant.M_OCHCOMMON + TAG, Info)
|
||||
d(SceneConstant.M_OCHCOMMON + TAG, changeInfo)
|
||||
val plateNum = AppConfigInfo.plateNumber
|
||||
val params = HashMap<String, Any>()
|
||||
params["sn"] = MoGoAiCloudClientConfig.getInstance().sn
|
||||
params["env"] = DebugConfig.getNetMode()
|
||||
params["plate_number"] = if (TextUtils.isEmpty(plateNum)) "" else plateNum
|
||||
params["time"] = DateTimeUtils.getTimeText(DateTimeUtils.yyyy_MM_dd_HH_mm_ss)
|
||||
params["info"] = Info
|
||||
params["changeInfo"] = changeInfo
|
||||
MogoAnalyticUtils.track(EVENT_KEY_INFE_WITH_CHANGE, params)
|
||||
if(upload) {
|
||||
val plateNum = AppConfigInfo.plateNumber
|
||||
val params = HashMap<String, Any>()
|
||||
params["sn"] = MoGoAiCloudClientConfig.getInstance().sn
|
||||
params["env"] = DebugConfig.getNetMode()
|
||||
params["plate_number"] = if (TextUtils.isEmpty(plateNum)) "" else plateNum
|
||||
params["time"] = DateTimeUtils.getTimeText(DateTimeUtils.yyyy_MM_dd_HH_mm_ss)
|
||||
params["info"] = Info
|
||||
params["changeInfo"] = changeInfo
|
||||
MogoAnalyticUtils.track(EVENT_KEY_INFE_WITH_CHANGE, params)
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -48,8 +48,6 @@ public class TaxiPresenter extends Presenter<TaxiFragment> implements ITaxiADASS
|
||||
|
||||
private static final String TAG = TaxiPresenter.class.getSimpleName();
|
||||
|
||||
private int preAutopilotStatus = 0;
|
||||
|
||||
public TaxiPresenter(TaxiFragment view) {
|
||||
super(view);
|
||||
TaxiModel.getInstance().init(AbsMogoApplication.getApp());
|
||||
@@ -192,30 +190,24 @@ public class TaxiPresenter extends Presenter<TaxiFragment> implements ITaxiADASS
|
||||
public void onAutopilotEnable() {
|
||||
runOnUIThread(() -> mView.updateAutopilotStatus(
|
||||
IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_ENABLE));
|
||||
preAutopilotStatus = IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_ENABLE;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAutopilotDisable() {
|
||||
runOnUIThread(() -> mView.updateAutopilotStatus(
|
||||
IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_DISABLE));
|
||||
preAutopilotStatus = IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_DISABLE;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAutopilotRunning() {
|
||||
if (preAutopilotStatus != IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_RUNNING){
|
||||
runOnUIThread(() -> mView.updateAutopilotStatus(
|
||||
runOnUIThread(() -> mView.updateAutopilotStatus(
|
||||
IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_RUNNING));
|
||||
}
|
||||
preAutopilotStatus = IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_RUNNING;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void onManMachineCoDriving() {
|
||||
runOnUIThread(() -> mView.onManMachineCoDriving(IMoGoAutopilotStatusListener.STATUS_PARALLEL_DRIVING));
|
||||
preAutopilotStatus = IMoGoAutopilotStatusListener.STATUS_PARALLEL_DRIVING;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -224,8 +224,11 @@ public abstract class BaseTaxiTabFragment<V extends IView, P extends Presenter<V
|
||||
findViewById(R.id.btnAutopilotmanco).setOnClickListener(view ->
|
||||
onAutopilotStatusChanged(IMoGoAutopilotStatusListener.STATUS_PARALLEL_DRIVING));
|
||||
|
||||
tvOperationStatus.setOnClickListener(view -> {
|
||||
onChangeOperationStatus();
|
||||
tvOperationStatus.setOnClickListener(new OnPreventFastClickListener() {
|
||||
@Override
|
||||
public void onClickImpl(View v) {
|
||||
onChangeOperationStatus();
|
||||
}
|
||||
});
|
||||
mCloseNaviIcon.setOnClickListener(v -> {
|
||||
showAmapNaviToStationFragment(false);
|
||||
@@ -331,21 +334,13 @@ public abstract class BaseTaxiTabFragment<V extends IView, P extends Presenter<V
|
||||
public void onBagManagerResult(@NonNull BagManagerOuterClass.BagManager bagManager) {
|
||||
}
|
||||
|
||||
/**
|
||||
* 改变自动驾驶状态
|
||||
*
|
||||
* @param status 2 - running 1 - enable 2 - disable
|
||||
*/
|
||||
private int mPrevAPStatus = -1;
|
||||
|
||||
public void onAutopilotStatusChanged(int status) {
|
||||
getActivity().runOnUiThread(() -> {
|
||||
if (isStarting && IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_RUNNING != status) {
|
||||
// 1. 主动开启自动驾驶中,不为2(为0、1)则继续loading
|
||||
return;
|
||||
}
|
||||
if (isStarting && IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_RUNNING == status
|
||||
&& mPrevAPStatus != status) {
|
||||
if (isStarting && IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_RUNNING == status) {
|
||||
// 2. 主动开启自动驾驶中,为2则停止loading,并isStarting = false
|
||||
startAutopilotDone(true);
|
||||
return;
|
||||
@@ -353,7 +348,6 @@ public abstract class BaseTaxiTabFragment<V extends IView, P extends Presenter<V
|
||||
// 3. 其他过程直接更新
|
||||
startOrStopLoadingAnim(false);
|
||||
autopilotStatusAnimchanged(status);
|
||||
mPrevAPStatus = status;
|
||||
});
|
||||
}
|
||||
|
||||
@@ -363,10 +357,7 @@ public abstract class BaseTaxiTabFragment<V extends IView, P extends Presenter<V
|
||||
}
|
||||
|
||||
public void onManMachineCoDriving(int manMachineCoDriving) {
|
||||
if (mPrevAPStatus != manMachineCoDriving) {
|
||||
autopilotStatusAnimchanged(manMachineCoDriving);
|
||||
}
|
||||
mPrevAPStatus = manMachineCoDriving;
|
||||
autopilotStatusAnimchanged(manMachineCoDriving);
|
||||
}
|
||||
|
||||
public void updateCtvAutopilotStatusTag(boolean tag) {
|
||||
|
||||
@@ -195,7 +195,12 @@ abstract class BaseTaxiTabFragment<V : IView, P : Presenter<V>> : MvpFragment<V,
|
||||
LocalBroadcastManager.getInstance(requireContext()).sendBroadcast(intent)
|
||||
}
|
||||
|
||||
module_mogo_och_operation_status.setOnClickListener { onChangeOperationStatus() }
|
||||
module_mogo_och_operation_status.setOnClickListener(object : OnPreventFastClickListener() {
|
||||
override fun onClickImpl(v: View?) {
|
||||
onChangeOperationStatus()
|
||||
}
|
||||
})
|
||||
|
||||
taxi_close_navi_icon.setOnClickListener {
|
||||
showAmapNaviToStationFragment(false)
|
||||
showRoutingToStationFragment(false)
|
||||
@@ -288,8 +293,6 @@ abstract class BaseTaxiTabFragment<V : IView, P : Presenter<V>> : MvpFragment<V,
|
||||
super.onDestroy()
|
||||
}
|
||||
|
||||
private var mPreAutoPilotStatus = -1
|
||||
|
||||
/**
|
||||
* 改变自动驾驶状态
|
||||
*
|
||||
@@ -301,7 +304,7 @@ abstract class BaseTaxiTabFragment<V : IView, P : Presenter<V>> : MvpFragment<V,
|
||||
// 1. 主动开启自动驾驶中,不为2(为0、1)则继续loading
|
||||
return@runOnUiThread
|
||||
}
|
||||
if (isStarting && IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_RUNNING == status && mPreAutoPilotStatus != status
|
||||
if (isStarting && IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_RUNNING == status
|
||||
) {
|
||||
// 2. 主动开启自动驾驶中,为2则停止loading,并isStarting = false
|
||||
startAutopilotDone(true)
|
||||
@@ -310,7 +313,6 @@ abstract class BaseTaxiTabFragment<V : IView, P : Presenter<V>> : MvpFragment<V,
|
||||
// 3. 其他过程直接更新
|
||||
startOrStopLoadingAnim(false)
|
||||
updateAutopilotBtnByStatus(status)
|
||||
mPreAutoPilotStatus = status
|
||||
})
|
||||
}
|
||||
|
||||
@@ -326,10 +328,7 @@ abstract class BaseTaxiTabFragment<V : IView, P : Presenter<V>> : MvpFragment<V,
|
||||
* 平行驾驶 【开启自动驾驶按钮】 更新
|
||||
*/
|
||||
fun onParallelDrivingStatus(parallelDrivingValue: Int) {
|
||||
if (mPreAutoPilotStatus != parallelDrivingValue) {
|
||||
updateAutopilotBtnByStatus(parallelDrivingValue)
|
||||
}
|
||||
mPreAutoPilotStatus = parallelDrivingValue
|
||||
updateAutopilotBtnByStatus(parallelDrivingValue)
|
||||
}
|
||||
|
||||
private fun updateCtvAutopilotStatusTag(tag: Boolean) {
|
||||
|
||||
@@ -33,8 +33,6 @@ public class TaxiPresenter extends Presenter<TaxiFragment> implements ITaxiADASS
|
||||
|
||||
private static final String TAG = TaxiPresenter.class.getSimpleName();
|
||||
|
||||
private int preAutopilotStatus = 0;
|
||||
|
||||
public TaxiPresenter(TaxiFragment view) {
|
||||
super(view);
|
||||
TaxiTaskModel.INSTANCE.init();
|
||||
@@ -103,29 +101,23 @@ public class TaxiPresenter extends Presenter<TaxiFragment> implements ITaxiADASS
|
||||
public void onAutopilotEnable() {
|
||||
runOnUIThread(() -> mView.updateAutopilotStatus(
|
||||
IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_ENABLE));
|
||||
preAutopilotStatus = IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_ENABLE;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAutopilotDisable() {
|
||||
runOnUIThread(() -> mView.updateAutopilotStatus(
|
||||
IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_DISABLE));
|
||||
preAutopilotStatus = IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_DISABLE;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAutopilotRunning() {
|
||||
if (preAutopilotStatus != IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_RUNNING) {
|
||||
runOnUIThread(() -> mView.updateAutopilotStatus(
|
||||
IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_RUNNING));
|
||||
}
|
||||
preAutopilotStatus = IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_RUNNING;
|
||||
runOnUIThread(() -> mView.updateAutopilotStatus(
|
||||
IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_RUNNING));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onParallelDrivingStatus() {
|
||||
runOnUIThread(() -> mView.onParallelDrivingStatus(IMoGoAutopilotStatusListener.STATUS_PARALLEL_DRIVING));
|
||||
preAutopilotStatus = IMoGoAutopilotStatusListener.STATUS_PARALLEL_DRIVING;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -371,7 +371,8 @@ class TaxiCurrentTaskFragment : BaseFragment(),
|
||||
|
||||
when (taskType) {
|
||||
TaskTypeEnum.None.code -> {
|
||||
if (order != null && currentStatus == TaskStatusEnum.CompleteTask.code) {
|
||||
if (order != null && (currentStatus == TaskStatusEnum.CompleteTask.code
|
||||
|| currentStatus == TaskStatusEnum.None.code )) { //暂停接单会清空任务
|
||||
updateOrderUI(order)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1051,6 +1051,10 @@ object TaxiTaskModel {
|
||||
currentStatus < TaskStatusEnum.CompleteTask.code -> return
|
||||
}
|
||||
}
|
||||
if (currentStatus == TaskStatusEnum.None.code && order != null){
|
||||
//订单送驾到站, 但是还没点服务完成的情况, 此时endSite == null currentStatus == 0
|
||||
return
|
||||
}
|
||||
}
|
||||
mDriveToNearestStationTask = data.data
|
||||
mTaxiCarServiceCallback?.onCarStartServiceSuccess(
|
||||
|
||||
@@ -69,6 +69,20 @@ public class TaxiPassengerOrdersInServiceQueryRespBean extends BaseData {
|
||||
public int hashCode() {
|
||||
return Objects.hash(orderNo, orderStatus, bookingUserPhone, passengerSize, orderStartSite, orderEndSite, planningLines);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "OrderBean{" +
|
||||
"orderNo='" + orderNo + '\'' +
|
||||
", 订单状态=" + orderStatus +
|
||||
", 用户手机号='" + bookingUserPhone + '\'' +
|
||||
", 乘客人数=" + passengerSize +
|
||||
", 站点-起点=" + orderStartSite +
|
||||
", 站点-终点=" + orderEndSite +
|
||||
", 预加载的line=" + planningLines +
|
||||
", 送驾的lineId=" + orderLine +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -12,6 +12,7 @@ import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant
|
||||
import com.mogo.eagle.core.utilcode.util.ToastUtils
|
||||
import com.mogo.och.common.module.biz.network.OchCommonServiceCallback
|
||||
import com.mogo.och.common.module.manager.autopilotmanager.OCHAdasAbilityManager
|
||||
import com.mogo.och.common.module.manager.orderlogmanager.OchChainLogManager
|
||||
import com.mogo.och.common.module.voice.VoiceNotice
|
||||
import com.mogo.och.taxi.passenger.bean.TaxiPassengerBaseRespBean
|
||||
import com.mogo.och.taxi.passenger.constant.TaxiPassengerConst
|
||||
@@ -199,6 +200,7 @@ object AutopilotManager : IMoGoAutopilotStatusListener {
|
||||
private fun startAutoPilotServiceByPassenger() {
|
||||
if (TaxiPassengerModel.currentOCHOrder == null) return
|
||||
//val currentLocation = CallerChassisLocationGCJ02ListenerManager.getChassisLocationGCJ02()
|
||||
OchChainLogManager.writeChainLog(TaxiPassengerModel.currentOCHOrder.toString(),"action:启动自驾状态流转")
|
||||
TaxiPassengerServiceManager.startAutoPilotServiceByPassenger(
|
||||
TaxiPassengerModel.currentOCHOrder!!.orderNo,
|
||||
TaxiPassengerModel.currentLineId,
|
||||
|
||||
@@ -26,6 +26,7 @@ import com.mogo.och.common.module.manager.distancemamager.IDistanceListener
|
||||
import com.mogo.och.common.module.manager.distancemamager.TrajectoryAndDistanceManager
|
||||
import com.mogo.och.common.module.manager.loopmanager.BizLoopManager
|
||||
import com.mogo.och.common.module.manager.loopmanager.LoopInfo
|
||||
import com.mogo.och.common.module.manager.orderlogmanager.OchChainLogManager
|
||||
import com.mogo.och.common.module.utils.RxUtils
|
||||
import com.mogo.och.common.module.voice.VoiceNotice
|
||||
import com.mogo.och.taxi.passenger.bean.TaxiPassengerBaseRespBean
|
||||
@@ -365,6 +366,7 @@ object TaxiPassengerModel {
|
||||
|
||||
fun checkPhoneAndUpdateStatus(phoneTail: String) {
|
||||
if (currentOCHOrder == null) return
|
||||
OchChainLogManager.writeChainLog(currentOCHOrder.toString(),"action:手机号开始验证")
|
||||
TaxiPassengerServiceManager.checkPhoneAndUpdateOrderStatus(
|
||||
currentOCHOrder!!.orderNo,
|
||||
phoneTail,
|
||||
@@ -396,6 +398,7 @@ object TaxiPassengerModel {
|
||||
orderStatusChangeInner()
|
||||
if (mOrderStatusCallbackMap.isNotEmpty()) {
|
||||
d(M_TAXI_P + TAG, "最新的状态-->${curOrderStatus}")
|
||||
OchChainLogManager.writeChainLog(currentOCHOrder.toString(),"最新的状态-->${curOrderStatus}")
|
||||
for (callback in mOrderStatusCallbackMap.values) {
|
||||
callback.onCurrentOrderStatusChanged(currentOCHOrder)
|
||||
}
|
||||
|
||||
@@ -214,7 +214,7 @@ ext {
|
||||
weak_network : "com.mogo.weak:network:1.0.1",
|
||||
btrace : "com.bytedance.btrace:rhea-core:2.0.0",
|
||||
|
||||
mofang_runtime : "com.mogo.eagle.core.mofang:runtime:2.0.6",
|
||||
mofang_runtime : "com.mogo.eagle.core.mofang:runtime:2.0.7",
|
||||
log_runtime : "com.mogo.eagle.core.log.record:runtime:1.0.15",
|
||||
|
||||
// 安全证书
|
||||
|
||||
@@ -51,6 +51,7 @@ import com.mogo.eagle.core.function.api.devatools.IMoGoDevaToolsFuncConfigListen
|
||||
import com.mogo.eagle.core.function.api.devatools.IMoGoDevaToolsListener
|
||||
import com.mogo.eagle.core.function.api.datacenter.obu.IMoGoObuConnectListener
|
||||
import com.mogo.eagle.core.function.api.datacenter.obu.IMoGoObuInfoListener
|
||||
import com.mogo.eagle.core.function.api.setting.ISopSettingListener
|
||||
import com.mogo.eagle.core.function.call.autopilot.*
|
||||
import com.mogo.eagle.core.function.call.devatools.CallerDevaToolsFuncConfigListenerManager
|
||||
import com.mogo.eagle.core.function.call.devatools.CallerDevaToolsListenerManager
|
||||
@@ -60,6 +61,7 @@ import com.mogo.eagle.core.function.call.obu.CallerObuApiManager
|
||||
import com.mogo.eagle.core.function.call.obu.CallerObuConnectListenerManager
|
||||
import com.mogo.eagle.core.function.call.obu.CallerObuInfoListenerManager
|
||||
import com.mogo.eagle.core.function.call.setting.CallerMoGoUiSettingManager
|
||||
import com.mogo.eagle.core.function.call.setting.CallerSopSettingManager
|
||||
import com.mogo.eagle.core.function.call.telematic.CallerTelematicManager
|
||||
import com.mogo.eagle.core.function.hmi.R
|
||||
import com.mogo.eagle.core.function.hmi.ui.logcatch.ILogViewListener
|
||||
@@ -118,7 +120,8 @@ internal class DebugSettingView @JvmOverloads constructor(
|
||||
IMoGoChassisBrakeStateListener,
|
||||
IMoGoChassisThrottleStateListener,
|
||||
IMoGoSweeperFutianCleanSystemListener,
|
||||
IMoGoObuInfoListener {
|
||||
IMoGoObuInfoListener,
|
||||
ISopSettingListener {
|
||||
|
||||
private val TAG = "DebugSettingView"
|
||||
|
||||
@@ -227,6 +230,8 @@ internal class DebugSettingView @JvmOverloads constructor(
|
||||
CallerDevaToolsListenerManager.addListener(TAG, this)
|
||||
//添加 底盘灯光数据 监听
|
||||
CallerChassisLamplightListenerManager.addListener(TAG, this)
|
||||
//雨天、美化、点云设置同步
|
||||
CallerSopSettingManager.addListener(TAG,this)
|
||||
|
||||
//添加 业务配置监听
|
||||
CallerDevaToolsFuncConfigListenerManager.registerDevaToolsFuncConfigListener(
|
||||
@@ -274,6 +279,8 @@ internal class DebugSettingView @JvmOverloads constructor(
|
||||
CallerChassisLamplightListenerManager.removeListener(TAG)
|
||||
// 移除 obu获取信息 监听
|
||||
CallerObuInfoListenerManager.removeListener(TAG)
|
||||
//雨天、美化、点云设置同步
|
||||
CallerSopSettingManager.removeListener(TAG)
|
||||
|
||||
// 移除 业务配置监听
|
||||
CallerDevaToolsFuncConfigListenerManager.unRegisterDevaToolsFuncConfigListener(
|
||||
@@ -685,11 +692,14 @@ internal class DebugSettingView @JvmOverloads constructor(
|
||||
|
||||
// 演示模式,上一次勾选的数据
|
||||
tbIsDemoMode.isChecked = FunctionBuildConfig.isDemoMode
|
||||
|
||||
// 演示模式
|
||||
tbIsDemoMode.setOnCheckedChangeListener { _, _ ->
|
||||
tbIsDemoMode.setOnCheckedChangeListener { compoundButton, isChecked ->
|
||||
if(!compoundButton.isPressed){
|
||||
return@setOnCheckedChangeListener
|
||||
}
|
||||
FunctionBuildConfig.isDemoMode = !FunctionBuildConfig.isDemoMode
|
||||
CallerAutoPilotControlManager.setDemoMode(FunctionBuildConfig.isDemoMode)
|
||||
CallerSopSettingManager.invokeDemoModeListener(isChecked)
|
||||
if (!FunctionBuildConfig.isDemoMode) {
|
||||
//关闭美化模式时,通知工控机
|
||||
CallerAutoPilotControlManager.setIPCDemoMode(FunctionBuildConfig.isDemoMode)
|
||||
@@ -720,9 +730,13 @@ internal class DebugSettingView @JvmOverloads constructor(
|
||||
// 雨天模式,上一次勾选的数据
|
||||
tbIsRainMode.isChecked = FunctionBuildConfig.isRainMode
|
||||
//雨天模式
|
||||
tbIsRainMode.setOnCheckedChangeListener { _, isChecked ->
|
||||
tbIsRainMode.setOnCheckedChangeListener { compoundButton, isChecked ->
|
||||
if(!compoundButton.isPressed){
|
||||
return@setOnCheckedChangeListener
|
||||
}
|
||||
CallerAutoPilotControlManager.setRainMode(isChecked)
|
||||
FunctionBuildConfig.isRainMode = isChecked
|
||||
CallerSopSettingManager.invokeRainModeListener(isChecked)
|
||||
}
|
||||
//雨天模式按钮只在司机屏生效,乘客屏不显示
|
||||
if (AppIdentityModeUtils.isPassenger(FunctionBuildConfig.appIdentityMode)) {
|
||||
@@ -840,10 +854,14 @@ internal class DebugSettingView @JvmOverloads constructor(
|
||||
//初始化点云数据渲染情况
|
||||
tbDrawPointCloudData.isChecked = FunctionBuildConfig.isDrawPointCloudData
|
||||
//是否渲染点云数据
|
||||
tbDrawPointCloudData.setOnCheckedChangeListener { _, isChecked ->
|
||||
tbDrawPointCloudData.setOnCheckedChangeListener { compoundButton, isChecked ->
|
||||
if(!compoundButton.isPressed){
|
||||
return@setOnCheckedChangeListener
|
||||
}
|
||||
CallerAutoPilotControlManager.setIsDrawPointCloud(isChecked)
|
||||
FunctionBuildConfig.isDrawPointCloudData = isChecked
|
||||
CallerMapUIServiceManager.getMapUIController()?.setIsDrawPointCloud(isChecked)
|
||||
CallerSopSettingManager.invokePointCloudListener(isChecked)
|
||||
}
|
||||
|
||||
//设置点云大小
|
||||
@@ -1721,18 +1739,6 @@ internal class DebugSettingView @JvmOverloads constructor(
|
||||
mTrajectoryInfoSize = 0
|
||||
mRouteInfoSize = 0
|
||||
|
||||
if (FunctionBuildConfig.isDemoMode) {
|
||||
tbIsDemoMode?.text = "关闭美化模式"
|
||||
} else {
|
||||
tbIsDemoMode?.text = "开启美化模式"
|
||||
}
|
||||
|
||||
if(FunctionBuildConfig.isRainMode){
|
||||
tbIsRainMode?.text = "关闭雨天模式"
|
||||
} else {
|
||||
tbIsRainMode?.text = "开启雨天模式"
|
||||
}
|
||||
|
||||
obuConnectStatusTv.text = Html.fromHtml(
|
||||
"OBU连接状态:${
|
||||
if (AppConfigInfo.isConnectObu) {
|
||||
@@ -2181,4 +2187,26 @@ internal class DebugSettingView @JvmOverloads constructor(
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 美化模式
|
||||
*/
|
||||
override fun onDemoModeClickEvent(status: Boolean) {
|
||||
tbIsDemoMode.isChecked = status
|
||||
}
|
||||
|
||||
/**
|
||||
* 雨天模式
|
||||
*/
|
||||
override fun onRainModeClickEvent(status: Boolean) {
|
||||
tbIsRainMode.isChecked = status
|
||||
}
|
||||
|
||||
/**
|
||||
* 点云模式
|
||||
*/
|
||||
override fun onPointCloudClickEvent(status: Boolean) {
|
||||
tbDrawPointCloudData.isChecked = status
|
||||
}
|
||||
|
||||
}
|
||||
@@ -18,6 +18,7 @@ import com.mogo.eagle.core.function.api.devatools.mofang.*
|
||||
import com.mogo.eagle.core.function.api.hmi.view.IViewControlListener
|
||||
import com.mogo.eagle.core.function.api.hmi.view.IViewControlListener.Companion.FUNC_MODE_DEMO
|
||||
import com.mogo.eagle.core.function.api.hmi.view.IViewControlListener.Companion.FUNC_MODE_RAIN
|
||||
import com.mogo.eagle.core.function.api.setting.ISopSettingListener
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotControlManager
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotGetParamResponseDispatcher
|
||||
import com.mogo.eagle.core.function.call.devatools.*
|
||||
@@ -26,6 +27,7 @@ import com.mogo.eagle.core.function.hmi.R
|
||||
import com.mogo.eagle.core.function.call.hmi.CallerHmiViewControlListenerManager
|
||||
import com.mogo.eagle.core.function.call.map.CallerMapUIServiceManager
|
||||
import com.mogo.eagle.core.function.call.obu.CallerObuApiManager
|
||||
import com.mogo.eagle.core.function.call.setting.CallerSopSettingManager
|
||||
import com.mogo.eagle.core.function.call.telematic.CallerTelematicManager
|
||||
import com.mogo.eagle.core.function.hmi.ui.utils.HmiActionLog.Companion.hmiAction
|
||||
import com.mogo.eagle.core.utilcode.mogo.AppIdentityModeUtils
|
||||
@@ -45,7 +47,7 @@ internal class SOPSettingView @JvmOverloads constructor(
|
||||
defStyleAttr: Int = 0
|
||||
) : ConstraintLayout(context, attrs, defStyleAttr), IMoGoDevaToolsFuncConfigListener,
|
||||
IViewControlListener, IMoGoMoFangProvider.OnMoFangStatusListener,
|
||||
IMoGoGetParamResponseListener {
|
||||
IMoGoGetParamResponseListener, ISopSettingListener {
|
||||
|
||||
companion object {
|
||||
const val TAG = "SOPSettingView"
|
||||
@@ -361,7 +363,10 @@ internal class SOPSettingView @JvmOverloads constructor(
|
||||
//初始化点云数据渲染情况
|
||||
scDrawPointCloudData.isChecked = FunctionBuildConfig.isDrawPointCloudData
|
||||
//是否渲染点云数据
|
||||
scDrawPointCloudData.setOnCheckedChangeListener { _, isChecked ->
|
||||
scDrawPointCloudData.setOnCheckedChangeListener { compoundButton, isChecked ->
|
||||
if(!compoundButton.isPressed){
|
||||
return@setOnCheckedChangeListener
|
||||
}
|
||||
//打开点云效果时,如果自车光圈是关闭状态,则自动打开自车光圈(点云是跟随光圈的 默认没有光圈就不显示点云的)
|
||||
if(isChecked && !FunctionBuildConfig.isDisplayAnimEnable){
|
||||
scCarAperture.isChecked = true
|
||||
@@ -371,6 +376,7 @@ internal class SOPSettingView @JvmOverloads constructor(
|
||||
CallerAutoPilotControlManager.setIsDrawPointCloud(isChecked)
|
||||
FunctionBuildConfig.isDrawPointCloudData = isChecked
|
||||
CallerMapUIServiceManager.getMapUIController()?.setIsDrawPointCloud(isChecked)
|
||||
CallerSopSettingManager.invokePointCloudListener(isChecked)
|
||||
hmiAction("SOP 是否渲染点云数据, ",isChecked)
|
||||
Log.i(TAG,"SOP 是否渲染点云数据, $isChecked")
|
||||
}
|
||||
@@ -403,7 +409,7 @@ internal class SOPSettingView @JvmOverloads constructor(
|
||||
|
||||
// 演示模式,上一次勾选的数据
|
||||
scDemoMode.isChecked = FunctionBuildConfig.isDemoMode
|
||||
scDemoMode.setOnCheckedChangeListener { compoundButton, _ ->
|
||||
scDemoMode.setOnCheckedChangeListener { compoundButton, isChecked ->
|
||||
if(!compoundButton.isPressed){
|
||||
return@setOnCheckedChangeListener
|
||||
}
|
||||
@@ -412,6 +418,7 @@ internal class SOPSettingView @JvmOverloads constructor(
|
||||
FunctionBuildConfig.isDemoMode = !FunctionBuildConfig.isDemoMode
|
||||
CallerAutoPilotControlManager.setDemoMode(FunctionBuildConfig.isDemoMode)
|
||||
CallerHmiViewControlListenerManager.invokeFuncMode(FUNC_MODE_DEMO, FunctionBuildConfig.isDemoMode)
|
||||
CallerSopSettingManager.invokeDemoModeListener(isChecked)
|
||||
if (!FunctionBuildConfig.isDemoMode) {
|
||||
//关闭美化模式时,通知工控机
|
||||
CallerAutoPilotControlManager.setIPCDemoMode(FunctionBuildConfig.isDemoMode)
|
||||
@@ -433,6 +440,7 @@ internal class SOPSettingView @JvmOverloads constructor(
|
||||
FunctionBuildConfig.isRainMode = isChecked
|
||||
CallerAutoPilotControlManager.setRainMode(isChecked)
|
||||
CallerHmiViewControlListenerManager.invokeFuncMode(FUNC_MODE_RAIN, isChecked)
|
||||
CallerSopSettingManager.invokeRainModeListener(isChecked)
|
||||
}
|
||||
//雨天模式按钮只在司机屏生效,乘客屏不显示
|
||||
if (AppIdentityModeUtils.isPassenger(FunctionBuildConfig.appIdentityMode)) {
|
||||
@@ -647,6 +655,8 @@ internal class SOPSettingView @JvmOverloads constructor(
|
||||
CallerAutopilotGetParamResponseDispatcher.addListener(TAG, this)
|
||||
//查询融合模式
|
||||
CallerAutoPilotControlManager.sendGetParamReq(AdasConstants.MapSystemParamType.FUSION_MODE)
|
||||
//雨天、美化、点云设置同步
|
||||
CallerSopSettingManager.addListener(TAG,this)
|
||||
}
|
||||
|
||||
override fun updateFuncMode(tag: String, boolean: Boolean) {
|
||||
@@ -666,6 +676,8 @@ internal class SOPSettingView @JvmOverloads constructor(
|
||||
CallerHmiViewControlListenerManager.removeListener(TAG)
|
||||
CallerAutopilotGetParamResponseDispatcher.removeListener(TAG)
|
||||
CallerDevaToolsManager.mofang()?.unRegisterMoFangStatusListener(this)
|
||||
//雨天、美化、点云设置同步
|
||||
CallerSopSettingManager.removeListener(TAG)
|
||||
}
|
||||
|
||||
|
||||
@@ -730,6 +742,27 @@ internal class SOPSettingView @JvmOverloads constructor(
|
||||
|
||||
override fun onMoFangStatusError(msg: String) {}
|
||||
|
||||
/**
|
||||
* 美化模式
|
||||
*/
|
||||
override fun onDemoModeClickEvent(status: Boolean) {
|
||||
scDemoMode.isChecked = status
|
||||
}
|
||||
|
||||
/**
|
||||
* 雨天模式
|
||||
*/
|
||||
override fun onRainModeClickEvent(status: Boolean) {
|
||||
scRainMode.isChecked = status
|
||||
}
|
||||
|
||||
/**
|
||||
* 点云模式
|
||||
*/
|
||||
override fun onPointCloudClickEvent(status: Boolean) {
|
||||
scDrawPointCloudData.isChecked = status
|
||||
}
|
||||
|
||||
/**
|
||||
* 工控机配置参数获取
|
||||
*/
|
||||
|
||||
@@ -6,6 +6,7 @@ import android.annotation.SuppressLint
|
||||
import android.content.Context
|
||||
import android.graphics.Color
|
||||
import android.util.AttributeSet
|
||||
import android.util.Log
|
||||
import android.view.LayoutInflater
|
||||
import android.view.animation.LinearInterpolator
|
||||
import android.widget.ImageView
|
||||
@@ -60,9 +61,11 @@ class ParallelDriveView @JvmOverloads constructor(
|
||||
|
||||
private lateinit var rootLayout: ConstraintLayout
|
||||
private lateinit var statusIcon: ImageView
|
||||
private lateinit var statusIconOuter: ImageView
|
||||
private lateinit var statusTitle: TextView
|
||||
private var listener: ClickEventListener? = null
|
||||
private var animator: ObjectAnimator? = null
|
||||
private var syncAnimator: ObjectAnimator? = null
|
||||
|
||||
init {
|
||||
LayoutInflater.from(context).inflate(R.layout.view_parallel_drive, this, true)
|
||||
@@ -79,21 +82,25 @@ class ParallelDriveView @JvmOverloads constructor(
|
||||
private fun initView() {
|
||||
rootLayout = findViewById(R.id.parDriveLayout)
|
||||
statusIcon = findViewById(R.id.ivStatusIcon)
|
||||
statusIconOuter = findViewById(R.id.ivStatusProgress)
|
||||
statusTitle = findViewById(R.id.tvAutopilotContent)
|
||||
rootLayout.setOnClickListener {
|
||||
when (state) {
|
||||
0 -> {
|
||||
state = APP_REQUESTING
|
||||
Log.d(TAG, "Click-开始请求平行驾驶")
|
||||
updateUI(APP_REQUESTING)
|
||||
reqParaDrive()
|
||||
listener?.onReqClick()
|
||||
}
|
||||
APP_REQUESTING -> {
|
||||
cancelParaDrive()
|
||||
Log.d(TAG, "Click-请求已取消")
|
||||
ToastUtils.showShort("请求已取消!")
|
||||
checkAvailableAndUpdateUI()
|
||||
}
|
||||
UNAVAILABLE -> {
|
||||
Log.d(TAG, "Click-请P档驻车并松开油门刹车后请求")
|
||||
ToastUtils.showShort("请P档驻车并松开油门刹车后请求")
|
||||
}
|
||||
}
|
||||
@@ -113,6 +120,7 @@ class ParallelDriveView @JvmOverloads constructor(
|
||||
7 -> {
|
||||
if (this.autopilotState != 7) {
|
||||
isAutoDriving = false
|
||||
Log.d(TAG, "onAutopilotStatusResponse-7")
|
||||
ThreadUtils.runOnUiThread({
|
||||
updateUI(PARALLEL_DRIVING)
|
||||
}, ThreadUtils.MODE.QUEUE)
|
||||
@@ -122,12 +130,14 @@ class ParallelDriveView @JvmOverloads constructor(
|
||||
2 -> {
|
||||
if (this.autopilotState != state) {
|
||||
isAutoDriving = true
|
||||
Log.d(TAG, "onAutopilotStatusResponse-2")
|
||||
}
|
||||
}
|
||||
|
||||
else -> {
|
||||
if (this.autopilotState != state) {
|
||||
isAutoDriving = false
|
||||
Log.d(TAG, "onAutopilotStatusResponse-else")
|
||||
if (this.autopilotState == 7) {
|
||||
ThreadUtils.runOnUiThread({
|
||||
checkAvailableAndUpdateUI()
|
||||
@@ -146,11 +156,13 @@ class ParallelDriveView @JvmOverloads constructor(
|
||||
unableParallelDrivingReasons: ArrayList<UnableLaunchReason>?
|
||||
) {
|
||||
if (!isParallelDrivingAbility) {
|
||||
Log.d(TAG, "onParallelDrivingAbility-UNAVAILABLE")
|
||||
ThreadUtils.runOnUiThread({
|
||||
state = UNAVAILABLE
|
||||
updateUI(UNAVAILABLE)
|
||||
}, ThreadUtils.MODE.QUEUE)
|
||||
} else {
|
||||
Log.d(TAG, "onParallelDrivingAbility-AVAILABLE")
|
||||
ThreadUtils.runOnUiThread({
|
||||
state = 0
|
||||
updateUI(0)
|
||||
@@ -161,6 +173,7 @@ class ParallelDriveView @JvmOverloads constructor(
|
||||
override fun onParallelDrivingResp(parallelTaskProcessNotice: ParallelTaskProcessNoticeOuterClass.ParallelTaskProcessNotice?) {
|
||||
parallelTaskProcessNotice?.let {
|
||||
ThreadUtils.runOnUiThread({
|
||||
Log.d(TAG, "onParallelDrivingResp-code:${it.code}")
|
||||
when (it.code) {
|
||||
"START_SYNC" -> {// 同步中
|
||||
state = SYNCHRONIZING
|
||||
@@ -211,6 +224,8 @@ class ParallelDriveView @JvmOverloads constructor(
|
||||
when (state) {
|
||||
0 -> {
|
||||
stopRotateAnimation()
|
||||
stopSyncAnimation()
|
||||
statusIconOuter.visibility = GONE
|
||||
rootLayout.isEnabled = true
|
||||
rootLayout.alpha = 1f
|
||||
statusIcon.background =
|
||||
@@ -222,7 +237,9 @@ class ParallelDriveView @JvmOverloads constructor(
|
||||
}
|
||||
|
||||
APP_REQUESTING -> {
|
||||
stopSyncAnimation()
|
||||
rootLayout.isEnabled = true
|
||||
statusIconOuter.visibility = GONE
|
||||
rootLayout.alpha = 1f
|
||||
statusIcon.background =
|
||||
resources.getDrawable(R.drawable.icon_para_requesting, null)
|
||||
@@ -234,7 +251,9 @@ class ParallelDriveView @JvmOverloads constructor(
|
||||
}
|
||||
|
||||
AD_REQUESTING -> {
|
||||
stopSyncAnimation()
|
||||
rootLayout.isEnabled = false
|
||||
statusIconOuter.visibility = GONE
|
||||
rootLayout.alpha = 1f
|
||||
statusIcon.background =
|
||||
resources.getDrawable(R.drawable.icon_para_requesting, null)
|
||||
@@ -250,15 +269,19 @@ class ParallelDriveView @JvmOverloads constructor(
|
||||
rootLayout.isEnabled = false
|
||||
rootLayout.alpha = 1f
|
||||
statusIcon.background =
|
||||
resources.getDrawable(R.drawable.icon_para_syn, null)
|
||||
resources.getDrawable(R.drawable.icon_para_syn_inner, null)
|
||||
statusTitle.setTextColor(Color.parseColor("#FFFFFF"))
|
||||
statusIcon.alpha = 1f
|
||||
statusIconOuter.visibility = VISIBLE
|
||||
startSyncAnimation()
|
||||
statusTitle.text = context.getString(R.string.parallel_drive_synchronizing)
|
||||
rootLayout.background = resources.getDrawable(R.drawable.bg_auto_pilot, null)
|
||||
}
|
||||
|
||||
PARALLEL_DRIVING -> {
|
||||
stopRotateAnimation()
|
||||
stopSyncAnimation()
|
||||
statusIconOuter.visibility = GONE
|
||||
rootLayout.isEnabled = false
|
||||
rootLayout.alpha = 1f
|
||||
statusIcon.background =
|
||||
@@ -272,6 +295,8 @@ class ParallelDriveView @JvmOverloads constructor(
|
||||
|
||||
FAILURE -> {
|
||||
stopRotateAnimation()
|
||||
stopSyncAnimation()
|
||||
statusIconOuter.visibility = GONE
|
||||
rootLayout.isEnabled = false
|
||||
rootLayout.alpha = 1f
|
||||
rootLayout.postDelayed({
|
||||
@@ -287,6 +312,8 @@ class ParallelDriveView @JvmOverloads constructor(
|
||||
|
||||
ONE_EXCEPTION -> {
|
||||
stopRotateAnimation()
|
||||
stopSyncAnimation()
|
||||
statusIconOuter.visibility = GONE
|
||||
rootLayout.isEnabled = false
|
||||
rootLayout.alpha = 1f
|
||||
rootLayout.postDelayed({
|
||||
@@ -302,6 +329,8 @@ class ParallelDriveView @JvmOverloads constructor(
|
||||
|
||||
TWO_EXCEPTION -> {
|
||||
stopRotateAnimation()
|
||||
stopSyncAnimation()
|
||||
statusIconOuter.visibility = GONE
|
||||
rootLayout.isEnabled = false
|
||||
rootLayout.alpha = 1f
|
||||
rootLayout.postDelayed({
|
||||
@@ -317,7 +346,9 @@ class ParallelDriveView @JvmOverloads constructor(
|
||||
|
||||
UNAVAILABLE -> {
|
||||
stopRotateAnimation()
|
||||
rootLayout.isEnabled = false
|
||||
stopSyncAnimation()
|
||||
statusIconOuter.visibility = GONE
|
||||
rootLayout.isEnabled = true
|
||||
rootLayout.alpha = 0.4f
|
||||
statusIcon.background =
|
||||
resources.getDrawable(R.drawable.icon_autopilot_status, null)
|
||||
@@ -391,6 +422,28 @@ class ParallelDriveView @JvmOverloads constructor(
|
||||
it.cancel()
|
||||
}
|
||||
}
|
||||
statusIcon.rotation = 0f
|
||||
}
|
||||
|
||||
@SuppressLint("Recycle")
|
||||
private fun startSyncAnimation() {
|
||||
if (syncAnimator == null) {
|
||||
syncAnimator = ObjectAnimator.ofFloat(statusIconOuter, "rotation", 0f, 360f).apply {
|
||||
duration = 1500
|
||||
repeatMode = ValueAnimator.RESTART
|
||||
repeatCount = ValueAnimator.INFINITE
|
||||
interpolator = LinearInterpolator()
|
||||
}
|
||||
}
|
||||
syncAnimator?.start()
|
||||
}
|
||||
|
||||
private fun stopSyncAnimation() {
|
||||
syncAnimator?.let {
|
||||
if (it.isRunning) {
|
||||
it.cancel()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
override fun onDetachedFromWindow() {
|
||||
|
||||
@@ -2,6 +2,7 @@ package com.mogo.eagle.core.function.hmi.ui.widget
|
||||
|
||||
import android.content.Context
|
||||
import android.util.AttributeSet
|
||||
import android.util.Log
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import androidx.constraintlayout.widget.ConstraintLayout
|
||||
@@ -375,9 +376,13 @@ class SystemVersionView @JvmOverloads constructor(
|
||||
* HQ、M1 MAP350开始弃用,其他车型MAP360开始弃用
|
||||
*/
|
||||
override fun onAutopilotStatusRespByQuery(status: SystemStatusInfo.StatusInfo) {
|
||||
Log.i(TAG,"hdMapVer="+status.hdMapVer)
|
||||
//hdMapVer返回示例:/home/mogo/autopilot/share/hadmap_engine/data/hadmap_data/db.sqlite|bj|2.2.7|对bus路线上的junction进行修改,对原609场景修改为6091、6092、6201、 6202四种细分场景,并对通往园区路口改为619
|
||||
if(status.hdMapVer!= null && status.hdMapVer.isNotEmpty()){
|
||||
//对地图版本进行截取
|
||||
AppConfigInfo.adHdMapVersion = status.hdMapVer.substringAfter("/hadmap_data/").substringBefore(".sqlite")
|
||||
val city = status.hdMapVer.substringAfter(".sqlite|").substringBefore("|")
|
||||
val version =status.hdMapVer.substringAfter("$city|").substringBefore("|")
|
||||
AppConfigInfo.adHdMapVersion = "${city}_${version}"
|
||||
updateAdHdMapVersion()
|
||||
}
|
||||
|
||||
@@ -390,9 +395,13 @@ class SystemVersionView @JvmOverloads constructor(
|
||||
* @param statusInf 数据
|
||||
*/
|
||||
override fun onSystemStatus(statusInf: SsmInfo.SsmStatusInf) {
|
||||
Log.i(TAG,"hdMapVer="+statusInf.hdMapVer)
|
||||
//hdMapVer返回示例:/home/mogo/autopilot/share/hadmap_engine/data/hadmap_data/db.sqlite|bj|2.2.7|对bus路线上的junction进行修改,对原609场景修改为6091、6092、6201、 6202四种细分场景,并对通往园区路口改为619
|
||||
if(statusInf.hdMapVer!= null && statusInf.hdMapVer.isNotEmpty()){
|
||||
//对地图版本进行截取
|
||||
AppConfigInfo.adHdMapVersion = statusInf.hdMapVer.substringAfter("/hadmap_data/").substringBefore(".sqlite")
|
||||
val city = statusInf.hdMapVer.substringAfter(".sqlite|").substringBefore("|")
|
||||
val version =statusInf.hdMapVer.substringAfter("$city|").substringBefore("|")
|
||||
AppConfigInfo.adHdMapVersion = "${city}_${version}"
|
||||
updateAdHdMapVersion()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16,6 +16,18 @@
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
android:layout_marginStart="72dp"
|
||||
android:layout_marginTop="56dp"
|
||||
tools:background="@drawable/icon_para_syn_inner"
|
||||
/>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/ivStatusProgress"
|
||||
android:layout_width="58dp"
|
||||
android:layout_height="58dp"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
android:layout_marginStart="72dp"
|
||||
android:layout_marginTop="56dp"
|
||||
android:background="@drawable/icon_para_syn_outer"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
package com.mogo.eagle.core.function.business.routeoverlay;
|
||||
|
||||
import android.util.Log;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
@@ -61,6 +63,7 @@ public class MogoRouteOverlayManager implements
|
||||
|
||||
@Override
|
||||
public void onAutopilotTrajectory(@NonNull List<MessagePad.TrajectoryPoint> items) {
|
||||
Log.d(TAG, "-- onAutopilotTrajectory --: " + (items != null ? items.size() : "0"));
|
||||
synchronized (queue) {
|
||||
queue.clear();
|
||||
queue.offer(items);
|
||||
@@ -72,15 +75,18 @@ public class MogoRouteOverlayManager implements
|
||||
if (gnssInfo == null) {
|
||||
return;
|
||||
}
|
||||
Log.d(TAG, "-- onChassisLocationGCJ02 -- 1 ---" + ":auto-mode:" + autopilotMode.get() + ", isArriveAtStation: " + isArriveAtStation.get());
|
||||
if (isArriveAtStation.get() && autopilotMode.get() != 2) {
|
||||
RouteOverlayDrawer.getInstance().clearMogoRouteOverlay();
|
||||
return;
|
||||
}
|
||||
Log.d(TAG, "-- onChassisLocationGCJ02 -- 2 ---" + "auto-mode:" + autopilotMode.get() + ", isDemoMode:" + FunctionBuildConfig.isDemoMode + ", force:" + FunctionBuildConfig.isForceDrawAutopilotTrajectoryByDebugSettingView);
|
||||
boolean force = FunctionBuildConfig.isForceDrawAutopilotTrajectoryByDebugSettingView || FunctionBuildConfig.isDemoMode && FunctionBuildConfig.isIgnoreConditionsDrawAutopilotTrajectoryData;
|
||||
if (!force && autopilotMode.get() != 2) {
|
||||
RouteOverlayDrawer.getInstance().clearMogoRouteOverlay();
|
||||
return;
|
||||
}
|
||||
Log.d(TAG, "-- onChassisLocationGCJ02 -- 3 ---");
|
||||
synchronized (queue) {
|
||||
if (!queue.isEmpty()) {
|
||||
List<MessagePad.TrajectoryPoint> items = queue.pollLast();
|
||||
@@ -96,6 +102,7 @@ public class MogoRouteOverlayManager implements
|
||||
if (state == 2) {
|
||||
isArriveAtStation.set(false);
|
||||
}
|
||||
Log.d(TAG, "-- onAutopilotStatusResponse ---: state:" + state);
|
||||
this.autopilotMode.set(state);
|
||||
}
|
||||
|
||||
@@ -105,12 +112,15 @@ public class MogoRouteOverlayManager implements
|
||||
|
||||
@Override
|
||||
public void onAutopilotArriveAtStation(MessagePad.ArrivalNotification arrivalNotification) {
|
||||
Log.d(TAG, "-- onAutopilotArriveAtStation --- 1 ---");
|
||||
if (arrivalNotification == null) {
|
||||
return;
|
||||
}
|
||||
Log.d(TAG, "-- onAutopilotArriveAtStation --- 2 ---");
|
||||
if(!HdMapBuildConfig.isMapLoaded){
|
||||
return;
|
||||
}
|
||||
Log.d(TAG, "-- onAutopilotArriveAtStation --- 3 ---");
|
||||
if (!isArriveAtStation.get()) {
|
||||
isArriveAtStation.set(true);
|
||||
}
|
||||
|
||||
@@ -35,6 +35,7 @@ class ChainConstant {
|
||||
const val CHAIN_TYPE_WEAK_NETWORK = 400
|
||||
const val CHAIN_TYPE_OCH = 500
|
||||
|
||||
//注意,如果新增/改动文件名称,需要与服务端同步信息,预警需要
|
||||
const val CHAIN_LINK_LOG_INIT = "-eagleInitStatus"
|
||||
const val CHAIN_LINK_LOG_ADAS_GNSS = "-adasGnssInfo"
|
||||
const val CHAIN_LINK_LOG_ADAS_AUTO = "-adasAutoPilot"
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
package com.mogo.eagle.core.function.api.setting
|
||||
|
||||
/**
|
||||
* 运营面板、调试面板设置事件监听回调
|
||||
*/
|
||||
interface ISopSettingListener {
|
||||
|
||||
/**
|
||||
* 美化模式
|
||||
*/
|
||||
fun onDemoModeClickEvent(status: Boolean){}
|
||||
|
||||
/**
|
||||
* 雨天模式
|
||||
*/
|
||||
fun onRainModeClickEvent(status: Boolean){}
|
||||
|
||||
/**
|
||||
* 点云
|
||||
*/
|
||||
fun onPointCloudClickEvent(status: Boolean){}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,41 @@
|
||||
package com.mogo.eagle.core.function.call.setting
|
||||
|
||||
import com.mogo.eagle.core.function.api.setting.ISopSettingListener
|
||||
import com.mogo.eagle.core.function.call.base.CallerBase
|
||||
|
||||
/**
|
||||
* 运营面板、调试面板设置事件监听管理
|
||||
*/
|
||||
object CallerSopSettingManager: CallerBase<ISopSettingListener>() {
|
||||
|
||||
/**
|
||||
* 触发演示模式事件监听
|
||||
*/
|
||||
fun invokeDemoModeListener(status: Boolean){
|
||||
M_LISTENERS.forEach {
|
||||
val listener = it.value
|
||||
listener.onDemoModeClickEvent(status)
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 触发雨天模式事件监听
|
||||
*/
|
||||
fun invokeRainModeListener(status: Boolean){
|
||||
M_LISTENERS.forEach {
|
||||
val listener = it.value
|
||||
listener.onRainModeClickEvent(status)
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 触发点云事件监听
|
||||
*/
|
||||
fun invokePointCloudListener(status: Boolean){
|
||||
M_LISTENERS.forEach{
|
||||
val listener = it.value
|
||||
listener.onPointCloudClickEvent(status)
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 2.1 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 574 B |
Binary file not shown.
|
After Width: | Height: | Size: 1.8 KiB |
Reference in New Issue
Block a user