[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() {
//非美化模式下启动动画

View File

@@ -488,7 +488,7 @@ class DriverM1Model {
return;
}
triggerStartServiceEvent(false, false)
triggerStartServiceEvent(false, false,0)
val parameters = initAutopilotControlParameters()
if (null == parameters) {
@@ -526,7 +526,7 @@ class DriverM1Model {
LoginStatusManager.loginOut()
}
fun triggerStartServiceEvent(isRestart: Boolean, send: Boolean) {
fun triggerStartServiceEvent(isRestart: Boolean, send: Boolean,source:Int) {
if (mCurrentOrder == null) {
return
}
@@ -538,7 +538,8 @@ class DriverM1Model {
OchAutopilotAnalytics.triggerStartAutopilotEvent(
isRestart, send,
startSiteName, endSiteName, it, orderNo?:"", System.currentTimeMillis()
startSiteName, endSiteName, it, orderNo?:"", System.currentTimeMillis(),
source
)
}
}

View File

@@ -139,7 +139,7 @@ class DriverM1Presenter(view: DriverM1Fragment?) :
//
// }
IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_RUNNING ->{
DriverM1Model.get().triggerStartServiceEvent(false,true)
DriverM1Model.get().triggerStartServiceEvent(false,true,0)
}
// IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_DISABLE ->{
//
@@ -150,6 +150,15 @@ class DriverM1Presenter(view: DriverM1Fragment?) :
}
}
override fun onAutopilotStatusResponseFromCan(state: Int) {
super.onAutopilotStatusResponseFromCan(state)
when(state) {
IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_RUNNING -> {
DriverM1Model.get().triggerStartServiceEvent(false, true,1)
}
}
}
override fun onStartAutopilotFailure(
actionStatus: StopSideStatus,
stopSideStatus: Boolean?,

View File

@@ -89,4 +89,11 @@ public interface IOchAutopilotStatusListener {
default void canStartAutopilot(boolean canStart) {
}
/**
* 自动驾驶状态信息 数据源来自底盘 不管是否存在FSM 都将进行底盘自驾状态的转发
*
* @param state 状态信息
*/
default void onAutopilotStatusResponseFromCan(int state) {}
}

View File

@@ -54,11 +54,17 @@ object OchAutoPilotManager : IMoGoReceiveReceivedAckListener, IMoGoFsm2024Listen
fun canStartAutopilotBySessionId():Boolean{
return (globalSessionId.get()==-1L).apply {
if(!this) {
OchAutopilotAnalytics.triggerDistance2LineorStation(globalSessionId.get())
ToastUtils.showLong("自驾启动中,请勿重复点击")
OchAutopilotAnalytics.triggerCanStartAutopilotBySessionId(globalSessionId.get())
}
}
}
@JvmStatic
fun canStartAutopilotBySessionIdInner():Boolean{
return (globalSessionId.get()==-1L)
}
@JvmStatic
fun canStartAutoPilotSSM(): Boolean {
if (!FunctionBuildConfig.isDemoMode && !OCHAdasAbilityManager.getInstance().autopilotAbilityStatus) {

View File

@@ -180,6 +180,9 @@ object OchAutoPilotStatusListenerManager : CallerBase<IOchAutopilotStatusListene
override fun onAutopilotStatusResponseFromCan(state: Int) {
super.onAutopilotStatusResponseFromCan(state)
M_LISTENERS.forEach {
val listener = it.value
listener.onAutopilotStatusResponseFromCan(state)
}
}
}

View File

@@ -29,6 +29,7 @@ object OchAutopilotAnalytics {
private const val EVENT_PARAM_MAP_ORIGINAL_DATA = "map_original_data" // 域控原始状态信息
private const val EVENT_PARAM_AUTOPILOT_STATE = "autopilot_state" //原始的自动驾驶状态
private const val EVENT_PARAM_START_RESULT = "start_autopilot" // true/false
private const val EVENT_PARAM_START_RESULT_SOURCE = "start_autopilot_source" // true/false
private const val EVENT_PARAM_START_FAILURE_CODE = "start_autopilot_failure_code" // 启动自驾失败code
private const val EVENT_PARAM_START_FAILURE_MSG = "start_autopilot_failure_msg" // 启动自驾失败原因
private const val EVENT_PARAM_START_AUTOPILOT_SESSION_ID = "start_autopilot_cmd_session_id" //启动自驾命令请求的sessionId
@@ -41,7 +42,11 @@ object OchAutopilotAnalytics {
private const val EVENT_PARAM_START_AUTOPILOT_ACK_SUCCESS= "start_autopilot_parameters_ack_isSuccess" // 启动自驾参数
private const val EVENT_KEY_INFO_AUTOPILOT_DISTANCE = "event_key_vehicle_start_autopilot_state_distance_15"
private const val EVENT_KEY_INFO_AUTOPILOT_SESSION_WAITSTATE = "event_key_vehicle_start_autopilot_state_sessiong_waiting"
private const val EVENT_KEY_INFO_AUTOPILOT_SESSION = "event_key_vehicle_start_autopilot_state_sessiong"
private const val EVENT_KEY_INFO_AUTOPILOT_SESSION_Inner = "event_key_vehicle_start_autopilot_cmd_session"
private const val EVENT_KEY_INFO_AUTOPILOT_SESSION_FSMBACK = "event_key_vehicle_start_autopilot_cmd_session"
private val LOOP_PERIOD_15S = 15 * 1000L
@@ -89,23 +94,25 @@ object OchAutopilotAnalytics {
/**
* 等待底盘返回的间隙 重复启动自驾
*/
fun triggerDistance2LineorStation(globalSessionId : Long){
fun triggerCanStartAutopilotBySessionId(globalSessionId : Long){
val map = hashMapOf<String, Any>()
map[EVENT_PARAM_AUTOPILOTANALYTICS_GROUP] = EVENT_PARAM_AUTOPILOTANALYTICS_GROUP
OchChainLogManager.writeChainLog("启动自驾Sessiong判断","已有globalSessionId:${globalSessionId}", eventID = EVENT_KEY_INFO_AUTOPILOT_SESSION, patch = map)
OchChainLogManager.writeChainLog("启动自驾Sessiong判断","已有globalSessionId:${globalSessionId}", eventID = EVENT_KEY_INFO_AUTOPILOT_SESSION_WAITSTATE, patch = map)
}
/**
* 等待底盘返回的间隙 重复启动自驾
* 启动失败后 对比两个session是否相同
*/
fun triggerStartAutopilotFailCheckSeesiongDiff(globalSessionId: Long, fsmBackSessionId: Long){
val map = hashMapOf<String, Any>()
map[EVENT_PARAM_AUTOPILOTANALYTICS_GROUP] = EVENT_PARAM_AUTOPILOTANALYTICS_GROUP
map[EVENT_KEY_INFO_AUTOPILOT_SESSION_Inner] = globalSessionId
map[EVENT_KEY_INFO_AUTOPILOT_SESSION_FSMBACK] = fsmBackSessionId
OchChainLogManager.writeChainLog("启动自驾失败且SessionId不同","globalSessionId:${globalSessionId}——————fsmBackSessionId:${fsmBackSessionId}", eventID = EVENT_KEY_INFO_AUTOPILOT_SESSION, patch = map)
}
private val timeOutRunnable = Runnable {
private val timeOutRunnable = Runnable {
// 15s内未开启上报失败埋点
triggerStartAutopilotFailureEvent("", "15s后app等待超时", System.currentTimeMillis())
}
@@ -122,10 +129,13 @@ object OchAutopilotAnalytics {
private fun clearStartAutopilotParams() {
mStartAutopilotParams.clear()
OchAutoPilotManager.clearGlobalSessionId()
}
private fun triggerStartAutopilotFailureEvent(failCode: String, failMsg: String, startFailDate: Long) {
if(OchAutoPilotManager.canStartAutopilotBySessionIdInner()){
return
}
OchAutoPilotManager.clearGlobalSessionId()
if (mStartAutopilotParams.isEmpty()) return
CallerLogger.e(SceneConstant.M_OCHCOMMON + "triggerStartAutopilotFailureEvent", failMsg)
if (CallerAutoPilotStatusListenerManager.getState() != IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_RUNNING) {
@@ -156,16 +166,22 @@ object OchAutopilotAnalytics {
endName: String,
lineId: Int,
orderId:String?,
triggerDate: Long
triggerDate: Long,
source:Int = 0
) {
mStartAutopilotKey = if (restart) getEventKeyRestartService() else getEventKeyStartService()
if (send) {
if(OchAutoPilotManager.canStartAutopilotBySessionIdInner()){
return
}
OchAutoPilotManager.clearGlobalSessionId()
if (mStartAutopilotParams.isEmpty()) return
BizLoopManager.removeCallback(timeOutRunnable)
// 开启成功,上报埋点
mStartAutopilotParams[EVENT_PARAM_START_FAILURE_CODE] = ""
mStartAutopilotParams[EVENT_PARAM_START_FAILURE_MSG] = ""
mStartAutopilotParams[EVENT_PARAM_START_RESULT] = true
mStartAutopilotParams[EVENT_PARAM_START_RESULT_SOURCE] = source
// 自动驾驶状态变更时间
mStartAutopilotParams[EVENT_PARAM_START_SUCCESS_TIME] = DateTimeUtils.getTimeText(triggerDate,DateTimeUtils.yyyy_MM_dd_HH_mm_ss_SSS)
mStartAutopilotParams[EVENT_PARAM_AUTOPILOTANALYTICS_GROUP] = EVENT_PARAM_AUTOPILOTANALYTICS_GROUP

View File

@@ -561,7 +561,7 @@ public class OrderModel {
firstStartAutopilot++;
triggerStartServiceEvent(isRestart, false);
triggerStartServiceEvent(isRestart, false,0);
AutopilotControlParameters parameters = initAutopilotControlParameters(leaveIndex);
if (null == parameters) {
@@ -994,14 +994,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

@@ -208,7 +208,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
@@ -232,6 +232,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) {

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) {

View File

@@ -423,7 +423,7 @@ object OrderModel {
firstStartAutopilot++
triggerStartServiceEvent(isRestart, false)
triggerStartServiceEvent(isRestart, false,0)
val parameters = initAutopilotControlParameters()
if (null == parameters) {
@@ -703,7 +703,7 @@ object OrderModel {
}
@JvmStatic
fun triggerStartServiceEvent(isRestart: Boolean, send: Boolean) {
fun triggerStartServiceEvent(isRestart: Boolean, send: Boolean,source:Int) {
LineManager.startStation?.let {startStation->
LineManager.endStation?.let {endStation->
OchAutopilotAnalytics.triggerStartAutopilotEvent(
@@ -713,7 +713,8 @@ object OrderModel {
endStation.name,
LineManager.lineInfos!!.lineId.toInt(),
"",
System.currentTimeMillis()
System.currentTimeMillis(),
source
)
}
}

View File

@@ -155,7 +155,7 @@ class BusPresenter(view: ShuttleFragment?) : Presenter<ShuttleFragment?>(view),
}
IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_RUNNING -> {
OrderModel.triggerStartServiceEvent(OrderModel.isRestartAutopilot, true)
OrderModel.triggerStartServiceEvent(OrderModel.isRestartAutopilot, true,0)
// 改变UI自动驾驶状态
UiThreadHandler.post({
if (mView != null) {
@@ -172,6 +172,14 @@ class BusPresenter(view: ShuttleFragment?) : Presenter<ShuttleFragment?>(view),
}
}
override fun onAutopilotStatusResponseFromCan(state: Int) {
when (state) {
IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_RUNNING -> {
OrderModel.triggerStartServiceEvent(OrderModel.isRestartAutopilot, true,1)
}
}
}
override fun startOpenAutopilot() {
//非美化模式下启动动画
UiThreadHandler.post({

View File

@@ -983,7 +983,7 @@ public class TaxiModel {
OchAutopilotAnalytics.INSTANCE.triggerStartAutopilotEvent(isRestartAutopilot, false,
mCurrentOCHOrder.startSiteAddr, mCurrentOCHOrder.endSiteAddr,
(int) mCurrentOCHOrder.lineId,
mCurrentOCHOrder.orderNo,System.currentTimeMillis());
mCurrentOCHOrder.orderNo,System.currentTimeMillis(),0);
OchAutopilotAnalytics.INSTANCE.triggerUpdateStartAutoPilotSessionId(sessionId);
if (mControllerStatusCallback != null) {
@@ -1208,6 +1208,15 @@ public class TaxiModel {
TaxiTrajectoryManager.getInstance().onAutopilotGuardian(guardianInfo,lineId);
}
@Override
public void onAutopilotStatusResponseFromCan(int state) {
if (state == IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_RUNNING) {
OchAutopilotAnalytics.INSTANCE.triggerStartAutopilotEvent(isRestartAutopilot, true,
mCurrentOCHOrder.startSiteAddr, mCurrentOCHOrder.endSiteAddr,
(int) mCurrentOCHOrder.lineId, mCurrentOCHOrder.orderNo,System.currentTimeMillis(),1);
}
}
@Override
public void onAutopilotStatusResponse(int state) {
if (state == IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_RUNNING) {
@@ -1218,7 +1227,7 @@ public class TaxiModel {
&& TaxiOrderStatusEnum.OnTheWayToEnd.getCode() == mCurrentOCHOrder.orderStatus) {
OchAutopilotAnalytics.INSTANCE.triggerStartAutopilotEvent(isRestartAutopilot, true,
mCurrentOCHOrder.startSiteAddr, mCurrentOCHOrder.endSiteAddr,
(int) mCurrentOCHOrder.lineId, mCurrentOCHOrder.orderNo,System.currentTimeMillis());
(int) mCurrentOCHOrder.lineId, mCurrentOCHOrder.orderNo,System.currentTimeMillis(),0);
if (FunctionBuildConfig.isDemoMode) {
// 当美化模式(演示模式)开启时: 订单对应自动驾驶开启后置true
FunctionBuildConfig.isIgnoreConditionsDrawAutopilotTrajectoryData = true;

View File

@@ -133,7 +133,7 @@ object AutopilotManager : IOchAutopilotStatusListener {
TaxiPassengerModel.currentOCHOrder!!.endSiteAddr,
TaxiPassengerModel.currentOCHOrder!!.lineId.toInt(),
TaxiPassengerModel.currentOCHOrder!!.orderNo,
System.currentTimeMillis()
System.currentTimeMillis(),0
)
OchAutopilotAnalytics.triggerUpdateStartAutoPilotSessionId(sessionId)
return ""
@@ -220,7 +220,7 @@ object AutopilotManager : IOchAutopilotStatusListener {
TaxiPassengerModel.currentOCHOrder!!.endSiteAddr,
TaxiPassengerModel.currentOCHOrder!!.lineId.toInt(),
TaxiPassengerModel.currentOCHOrder!!.orderNo,
System.currentTimeMillis()
System.currentTimeMillis(),0
)
//startServicePilotDone()
}
@@ -229,6 +229,26 @@ object AutopilotManager : IOchAutopilotStatusListener {
}
}
override fun onAutopilotStatusResponseFromCan(state: Int) {
super.onAutopilotStatusResponseFromCan(state)
when (state) {
IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_RUNNING -> {
if (TaxiPassengerModel.currentOCHOrder != null && TaxiPassengerModel.curOrderStatus === TaxiOrderStatusEnum.UserArriveAtStart) {
OchAutopilotAnalytics.triggerStartAutopilotEvent(
false,
true,
TaxiPassengerModel.currentOCHOrder!!.startSiteAddr,
TaxiPassengerModel.currentOCHOrder!!.endSiteAddr,
TaxiPassengerModel.currentOCHOrder!!.lineId.toInt(),
TaxiPassengerModel.currentOCHOrder!!.orderNo,
System.currentTimeMillis(),1
)
//startServicePilotDone()
}
}
}
}
/**
* 乘客屏启动自动驾驶成功
*/

View File

@@ -300,6 +300,23 @@ object TaxiTaskModel {
TaxiTrajectoryManager.getInstance().onAutopilotGuardian(guardianInfo,lineId)
}
override fun onAutopilotStatusResponseFromCan(state: Int) {
super.onAutopilotStatusResponseFromCan(state)
if (state == IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_RUNNING) {
if ((QueryCurrentTaskRespBean.isTaskStartTaskType(mCurrentTaskWithOrder))) {
OchAutopilotAnalytics.triggerStartAutopilotEvent(
isRestartAutopilot,
true,
mCurrentTaskWithOrder!!.order!!.orderStartSite!!.siteName,
mCurrentTaskWithOrder!!.order!!.orderEndSite!!.siteName,
mCurrentTaskWithOrder!!.lineId.toInt(),
mCurrentTaskWithOrder!!.order!!.orderNo,
System.currentTimeMillis(),1
)
}
}
}
override fun onAutopilotStatusResponse(state: Int) {
i(TAG, "onAutopilotStatusResponse autopilotsState= $state")
if (state == IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_RUNNING) {
@@ -313,7 +330,7 @@ object TaxiTaskModel {
mCurrentTaskWithOrder!!.order!!.orderEndSite!!.siteName,
mCurrentTaskWithOrder!!.lineId.toInt(),
mCurrentTaskWithOrder!!.order!!.orderNo,
System.currentTimeMillis()
System.currentTimeMillis(),0
)
setBeautificationMode(true)
}
@@ -1342,7 +1359,7 @@ object TaxiTaskModel {
mCurrentTaskWithOrder!!.endSite!!.siteName,
mCurrentTaskWithOrder!!.lineId.toInt(),
if (mCurrentTaskWithOrder!!.order != null) mCurrentTaskWithOrder!!.order!!.orderNo else "",
System.currentTimeMillis()
System.currentTimeMillis(),0
)
OchAutopilotAnalytics.triggerUpdateStartAutoPilotSessionId(sessionId)
mControllerStatusCallback?.startOpenAutopilot()

View File

@@ -123,7 +123,8 @@ object AutopilotManager : IOchAutopilotStatusListener {
TaxiPassengerModel.currentOCHOrder!!.orderEndSite.siteName,
lineId.toInt(),
TaxiPassengerModel.currentOCHOrder!!.orderNo,
System.currentTimeMillis()
System.currentTimeMillis(),
0
)
OchAutopilotAnalytics.triggerUpdateStartAutoPilotSessionId(sessionId)
needSpeakByStartAutopilot = true
@@ -203,6 +204,26 @@ object AutopilotManager : IOchAutopilotStatusListener {
CallerAutoPilotStatusListenerManager.updateAutopilotControlParameters(null)
}
override fun onAutopilotStatusResponseFromCan(state: Int) {
super.onAutopilotStatusResponseFromCan(state)
when (state) {
IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_RUNNING -> {
if (TaxiPassengerModel.currentOCHOrder != null && TaxiPassengerModel.curOrderStatus === TaxiOrderStatusEnum.UserArriveAtStart) {
OchAutopilotAnalytics.triggerStartAutopilotEvent(
false,
true,
TaxiPassengerModel.currentOCHOrder!!.orderStartSite.siteName,
TaxiPassengerModel.currentOCHOrder!!.orderEndSite.siteName,
TaxiPassengerModel.currentOCHOrder!!.orderNo.toInt(),
TaxiPassengerModel.currentLineId.toString(),
System.currentTimeMillis(),
1
)
}
}
}
}
override fun onAutopilotStatusResponse(state: Int) {
// 启动自驾成功
when (state) {
@@ -215,7 +236,8 @@ object AutopilotManager : IOchAutopilotStatusListener {
TaxiPassengerModel.currentOCHOrder!!.orderEndSite.siteName,
TaxiPassengerModel.currentOCHOrder!!.orderNo.toInt(),
TaxiPassengerModel.currentLineId.toString(),
System.currentTimeMillis()
System.currentTimeMillis(),
0
)
if(needSpeakByStartAutopilot) {
VoiceNotice.showNotice("坐稳扶好,我们出发咯!", AIAssist.LEVEL2)