[change] 更新行程信息接口

This commit is contained in:
xinfengkun
2022-10-26 11:34:02 +08:00
parent c473ed4161
commit 9300baf426
10 changed files with 97 additions and 55 deletions

View File

@@ -571,15 +571,20 @@ class MoGoAutopilotProvider :
}
/**
* 行程信息
* @param type 事件类型, 1:行程开始, 2:行程结束, 3:出站, 4:进站, 5:城市占道施工预警
* @param lineName 路线名, for type 1, 2
* @param stopName 站点名, for type 3, 4
* @param isLastStop
* @return
* 发生行程相关
* type=1或2的时 需要参数 lineName
* type=3或4的时 需要参数 lineName departureStopName arrivalStopName isLastStop
* type=5时 不需要任何参数
*
* @param type 事件类型, 1:行程开始, 2:行程结束, 3:出站, 4:进站, 5:城市占道施工预警
* @param lineName 路线名
* @param departureStopName 出站站点名
* @param arrivalStopName 下一站到达站点名
* @param isLastStop 是否最终站
* @return boolean
*/
override fun sendTripInfo(type: Int, lineName: String, stopName: String, isLastStop: Boolean) {
AdasManager.getInstance().sendTripInfoReq(type, lineName, stopName, isLastStop)
override fun sendTripInfo(type: Int, lineName: String, departureStopName: String,arrivalStopName: String, isLastStop: Boolean) {
AdasManager.getInstance().sendTripInfoReq(type, lineName, departureStopName,arrivalStopName, isLastStop)
}
/**

View File

@@ -751,7 +751,7 @@ class MoGoHmiFragment : MvpFragment<MoGoHmiContract.View?, HmiPresenter?>(),
context?.let { it -> SharedPrefsMgr.getInstance(it).getLong("roadwork", 0) }
if (currentTime - oldTime!! > 60) { //超过一分钟,才会继续播报重复提醒
context?.let { it -> SharedPrefsMgr.getInstance(it).putLong("roadwork", System.currentTimeMillis() / 1000) }
CallerAutoPilotManager.sendTripInfo(5, "", "", false);
CallerAutoPilotManager.sendTripInfo(5, "", "", "", false);
}
}