[fea]
[自驾事件上报]
This commit is contained in:
yangyakun
2024-09-03 20:14:21 +08:00
parent ad459b6353
commit 00a8ab315a
18 changed files with 179 additions and 36 deletions

View File

@@ -743,7 +743,7 @@ public class OrderModel {
if(CallerAutoPilotStatusListenerManager.INSTANCE.getState() != IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_RUNNING){
// 预写日志
triggerStartServiceEvent(isRestart, false);
triggerStartServiceEvent(isRestart, false,0);
}
AutopilotControlParameters parameters = initAutopilotControlParameters(leaveIndex);
@@ -1266,14 +1266,14 @@ public class OrderModel {
LoginStatusManager.loginOut();
}
public void triggerStartServiceEvent(boolean isRestart, boolean send) {
public void triggerStartServiceEvent(boolean isRestart, boolean send,int source) {
if (backgroundCurrentStationIndex >= stationList.size() - 1) {
return;
}
BusStationBean currentStation = stationList.get(backgroundCurrentStationIndex);
BusStationBean nextStation = stationList.get(backgroundCurrentStationIndex + 1);
OchAutopilotAnalytics.INSTANCE.triggerStartAutopilotEvent(isRestart, send,
currentStation.getName(), nextStation.getName(), currentLineId,"",System.currentTimeMillis());
currentStation.getName(), nextStation.getName(), currentLineId,"",System.currentTimeMillis(),source);
}
public void triggerUpdateStartAutoPilotSessionId(long sessionId) {

View File

@@ -212,7 +212,7 @@ public class BusPresenter extends Presenter<BusFragment>
break;
case IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_RUNNING:
OrderModel.getInstance().triggerStartServiceEvent(
OrderModel.getInstance().isRestartAutopilot(), true);
OrderModel.getInstance().isRestartAutopilot(), true,0);
// 改变UI自动驾驶状态
UiThreadHandler.post(new Runnable() {
@Override
@@ -236,6 +236,14 @@ public class BusPresenter extends Presenter<BusFragment>
}
}
@Override
public void onAutopilotStatusResponseFromCan(int state) {
if (state == IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_RUNNING) {
OrderModel.getInstance().triggerStartServiceEvent(
OrderModel.getInstance().isRestartAutopilot(), true,1);
}
}
@Override
public void startOpenAutopilot() {
//非美化模式下启动动画