Merge branch 'dev_arch_opt_3.0' into dev_robobus-m1-p-app-module_1.0.0_230112_1.0.0

This commit is contained in:
yangyakun
2023-02-17 14:07:55 +08:00
3 changed files with 20 additions and 14 deletions

View File

@@ -15,6 +15,7 @@ import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotStatusListener;
import com.mogo.eagle.core.function.call.map.CallerSmpManager;
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger;
import com.mogo.eagle.core.utilcode.util.UiThreadHandler;
import com.mogo.och.common.module.manager.OCHAdasAbilityManager;
import com.mogo.och.taxi.passenger.bean.TaxiPassengerOrderQueryRespBean;
import com.mogo.och.taxi.passenger.bean.TaxiPassengerScoreUpdateOrderReqBean;
import com.mogo.och.taxi.passenger.callback.IOCHTaxiPassengerADASStatusCallback;
@@ -27,8 +28,6 @@ import com.mogo.och.taxi.passenger.model.TaxiPassengerModel;
import com.mogo.och.taxi.passenger.ui.TaxiPassengerBaseFragment;
import com.mogo.och.taxi.passenger.ui.leftmenu.LeftMenuOpen;
import mogo.telematics.pad.MessagePad;
/**
* @author: wangmingjun
* @date: 2022/3/4
@@ -44,6 +43,7 @@ public class BaseTaxiPassengerPresenter extends Presenter<TaxiPassengerBaseFragm
public BaseTaxiPassengerPresenter(TaxiPassengerBaseFragment view) {
super(view);
TaxiPassengerModel.getInstance().init(AbsMogoApplication.getApp());
OCHAdasAbilityManager.getInstance().init(AbsMogoApplication.getApp());
initListeners();
}
@@ -59,6 +59,7 @@ public class BaseTaxiPassengerPresenter extends Presenter<TaxiPassengerBaseFragm
releaseListeners();
TaxiPassengerModel.getInstance().release();
OCHAdasAbilityManager.getInstance().release();
}
private void initListeners() {
@@ -162,11 +163,11 @@ public class BaseTaxiPassengerPresenter extends Presenter<TaxiPassengerBaseFragm
// 70 取消订单
if (TaxiPassengerOrderStatusEnum.Cancel.getCode() == order.orderStatus){
runOnUIThread(() -> {
mView.showOrHideServingOrderFragment(false,true);
mView.showOrHideStartAutopilotView(false,false);
mView.showOrHidePressengerCheckPager(false, "",
"", "", "", "");
mView.showOrHideArrivedEndLayout(false,"","");
mView.showOrHideServingOrderFragment(false,true);
mView.showOrHideStartAutopilotView(false,false);
mView.showOrHidePressengerCheckPager(false, "",
"", "", "", "");
mView.showOrHideArrivedEndLayout(false,"","");
});
TaxiPassengerModel.getInstance().recoverNaviInfo();
TaxiPassengerGeocodeSearchModel.getInstance(getContext()).destroyGeocodeSearch();
@@ -200,7 +201,6 @@ public class BaseTaxiPassengerPresenter extends Presenter<TaxiPassengerBaseFragm
mView.showOrHideServingOrderFragment(true,true);
});
TaxiPassengerModel.getInstance().startOrStopReadyToAutopilotLoop(false);
CallerSmpManager.startQueryV2XEvents();//全览模式的V2X事件轮询开始
}
// 30 用户到达上车点 并通过了手机号后四位验证
// 40 服务中

View File

@@ -11,10 +11,12 @@ public abstract class BaseInfo {
public final long nowTime;
public final MessagePad.Header header;
public final int len;
public final int payloadLen;
private SimpleDateFormat sdf;
public BaseInfo(String action, int len, MessagePad.Header header, SimpleDateFormat sdf) {
this.action = action;
this.payloadLen = len;
nowTime = System.currentTimeMillis();
this.len = 8 + header.getSerializedSize() + len;
this.header = header;
@@ -25,12 +27,13 @@ public abstract class BaseInfo {
this.action = action;
nowTime = System.currentTimeMillis();
this.len = len;
this.payloadLen = len;
this.header = null;
}
@Override
public String toString() {
return "原始数据长度:" + len + "\nHeader:[" + "MessageID:" + header.getMsgID() +
return "原始数据长度:" + len + "\tPayload数据长度" + payloadLen + "\nHeader:[" + "MessageID:" + header.getMsgID() +
" MessageType:" + header.getMsgType() + " 发送时间:" + sdf.format(new Date((long) (header.getTimestamp() * 1000)))
+ " 数据源时间:" + sdf.format(new Date((long) (header.getSourceTimestamp() * 1000))) + "]\n";
}

View File

@@ -137,7 +137,8 @@ public class AutopilotAbilityManager {
}
}
}
if (version > 1) {
//如果 maser version 大于1还需要判断AutoPilotReady字段是否存在以确保MAP版本和SSM Maser版本不陪配情况逻辑能正常执行
if (version > 1 && statusInfo.hasAutoPilotReady()) {
isAutopilotAbility = statusInfo.getAutoPilotReady();
if (!isAutopilotAbility) {
SystemStatusInfo.NodeFaultList nodeFaultList = statusInfo.getAutoPilotUnreadyList();
@@ -150,12 +151,12 @@ public class AutopilotAbilityManager {
if (state < NODE_INFO_STATE.length) {
builder.append(NODE_INFO_STATE[state]);
} else {
builder.append("未知 ");
builder.append("未知异常 ");
}
}
unableAutopilotReason = builder.toString();
} else {
unableAutopilotReason = "未知";
unableAutopilotReason = "未知异常节点";
}
}
} else {
@@ -169,7 +170,9 @@ public class AutopilotAbilityManager {
} else if (systemState == SystemStatusInfo.SystemState.SYS_FAULT) {
unableAutopilotReason = "系统异常";
} else if (systemState == SystemStatusInfo.SystemState.AUTO_PILOT_STARTING) {
unableAutopilotReason = "正在开始自动驾驶";
//如果第一次下发了启动自动驾驶,没起来或者存在干预 此时systemState是AUTO_PILOT_STARTING 需要二次下发启动自驾命令 所以需要排除此状态
isAutopilotAbility = true;
//unableAutopilotReason = "正在开始自动驾驶";
} else if (systemState == SystemStatusInfo.SystemState.AUTO_PILOT_RUNNING) {
unableAutopilotReason = "自动驾驶运行中";
} else if (systemState == SystemStatusInfo.SystemState.REMOTE_PILOT_STARTING) {
@@ -177,7 +180,7 @@ public class AutopilotAbilityManager {
} else if (systemState == SystemStatusInfo.SystemState.REMOTE_PILOT_RUNNING) {
unableAutopilotReason = "平行驾驶运行中";
} else {
unableAutopilotReason = "未知";
unableAutopilotReason = "未知系统状态";
}
}
}