[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

@@ -653,7 +653,7 @@ public class OrderModel {
firstStartAutopilot++;
triggerStartServiceEvent(isRestart, false);
triggerStartServiceEvent(isRestart, false,0);
AutopilotControlParameters parameters = initAutopilotControlParameters(leaveIndex);
if (null == parameters) {
@@ -1147,14 +1147,14 @@ public class OrderModel {
LoginStatusManager.loginOut();
}
public void triggerStartServiceEvent(boolean isRestart, boolean send) {
public void triggerStartServiceEvent(boolean isRestart, boolean send,int source) {
if (stationList == null || 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(), busRoutesResult.getLineId(),"",System.currentTimeMillis());
currentStation.getName(), nextStation.getName(), busRoutesResult.getLineId(),"",System.currentTimeMillis(),source);
}
public void triggerUpdateStartAutoPilotSessionId(long sessionId) {

View File

@@ -207,7 +207,7 @@ public class BusPresenter extends Presenter<ShuttleFragment>
break;
case IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_RUNNING:
OrderModel.getInstance().triggerStartServiceEvent(
OrderModel.getInstance().isRestartAutopilot(), true);
OrderModel.getInstance().isRestartAutopilot(), true,0);
// 改变UI自动驾驶状态
UiThreadHandler.post(new Runnable() {
@Override
@@ -231,6 +231,14 @@ public class BusPresenter extends Presenter<ShuttleFragment>
}
}
@Override
public void onAutopilotStatusResponseFromCan(int state) {
if (state == IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_RUNNING) {
OrderModel.getInstance().triggerStartServiceEvent(
OrderModel.getInstance().isRestartAutopilot(), true,1);
}
}
@Override
public void onCarLocationChanged(MogoLocation location) {
// if (null != location) {