[8.5.0]
[地盘给的滑动出发不启动自驾]
This commit is contained in:
@@ -44,7 +44,6 @@ import com.mogo.och.data.bean.BusStationBean
|
||||
import com.mogo.och.shuttle.unmanned.R
|
||||
import com.mogo.och.unmanned.constant.BusConst
|
||||
import com.mogo.och.unmanned.repository.RepositoryManager
|
||||
import com.mogo.och.unmanned.repository.db.bean.TaskSiteDataBean
|
||||
import com.mogo.och.unmanned.repository.exception.DataException
|
||||
import com.mogo.och.unmanned.util.ShuttleVoiceManager
|
||||
import com.zhjt.mogo.adas.unmanned.task.dto.cmd.TaskStartNotification
|
||||
@@ -129,7 +128,7 @@ object OrderModel {
|
||||
private val ochAutopilotStatusListener = object : IOchAutopilotStatusListener {
|
||||
override fun onAutopilotArriveAtStation(arrivedStation: ArrivedStation?) {
|
||||
e(TAG, "行程日志-onAutopilotArriveAtStation arrive")
|
||||
onArriveAt(arrivedStation, "底盘触发进站",false)
|
||||
onArriveAt(arrivedStation, "底盘触发进站")
|
||||
}
|
||||
|
||||
override fun onAutopilotLeaveStation(
|
||||
@@ -145,7 +144,7 @@ object OrderModel {
|
||||
LineManager.getStations { start, end ->
|
||||
if(start.siteId.toLong()==curStation.stationId&&end.siteId.toLong()==nextStation.stationId){
|
||||
OchChainLogManager.writeChainLog("触发滑动出发,","触发成功")
|
||||
driveToNextStation()
|
||||
driveToNextStation(false)
|
||||
}else{
|
||||
OchChainLogManager.writeChainLog("触发滑动出发,","起始终点id不同触发失败")
|
||||
}
|
||||
@@ -172,7 +171,7 @@ object OrderModel {
|
||||
//是否到站的围栏判断 离站状态并且自动驾驶还未触发到站
|
||||
if (isGoingToNextStation && !isArrivedStation) {
|
||||
OCHThreadPoolManager.getsInstance().locationExecute {
|
||||
onArriveAt(null, "兜底:距离站点15m内 每秒钟向底盘查询是否到站 底盘返回",false)
|
||||
onArriveAt(null, "兜底:距离站点15m内 每秒钟向底盘查询是否到站 底盘返回")
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -313,7 +312,7 @@ object OrderModel {
|
||||
* 滑动出发
|
||||
*/
|
||||
@JvmStatic
|
||||
fun driveToNextStation() {
|
||||
fun driveToNextStation(startAutopilot:Boolean) {
|
||||
if (LineModel.isLastStation() == true) {
|
||||
// 当前站是最后一站,结束当前行程
|
||||
completeTask(true)
|
||||
@@ -347,7 +346,9 @@ object OrderModel {
|
||||
}
|
||||
LineModel.leaveStationSuccess()
|
||||
isArrivedStation = false
|
||||
onStartAutopilot()
|
||||
if(startAutopilot) {
|
||||
onStartAutopilot()
|
||||
}
|
||||
|
||||
ThirdDeviceData.leaveStation()
|
||||
|
||||
@@ -365,8 +366,9 @@ object OrderModel {
|
||||
if (data) {
|
||||
LineModel.leaveStationSuccess()
|
||||
isArrivedStation = false
|
||||
onStartAutopilot()
|
||||
|
||||
if(startAutopilot) {
|
||||
onStartAutopilot()
|
||||
}
|
||||
ThirdDeviceData.leaveStation()
|
||||
|
||||
updateBusStatus()
|
||||
@@ -487,7 +489,7 @@ object OrderModel {
|
||||
* @param data
|
||||
*/
|
||||
@JvmStatic
|
||||
fun onArriveAt(data: ArrivedStation?, type: String,skipStation:Boolean) {
|
||||
fun onArriveAt(data: ArrivedStation?, type: String) {
|
||||
if (LineManager.getStations().second == null) {
|
||||
e(TAG, "行程日志-到站异常,取消后续操作结束")
|
||||
OchChainLogManager.writeChainLog("shuttle弱网", "$type 行程日志-到站异常,取消后续操作结束")
|
||||
@@ -544,9 +546,6 @@ object OrderModel {
|
||||
}
|
||||
LineModel.arrivedStationSuccess()
|
||||
updateBusStatus()
|
||||
if(skipStation) {
|
||||
driveToNextStation()
|
||||
}
|
||||
}
|
||||
|
||||
override fun onComplete() {
|
||||
@@ -570,9 +569,6 @@ object OrderModel {
|
||||
}
|
||||
LineModel.arrivedStationSuccess()
|
||||
updateBusStatus()
|
||||
if(skipStation) {
|
||||
driveToNextStation()
|
||||
}
|
||||
}
|
||||
|
||||
override fun onNext(data: Boolean) {
|
||||
|
||||
@@ -28,7 +28,7 @@ class TaskRunningModel : ViewModel(), IBusLinesCallback {
|
||||
}
|
||||
|
||||
fun leaveStation() {
|
||||
OrderModel.driveToNextStation()
|
||||
OrderModel.driveToNextStation(true)
|
||||
}
|
||||
|
||||
interface SwtichLineViewCallback {
|
||||
@@ -55,7 +55,7 @@ class TaskRunningModel : ViewModel(), IBusLinesCallback {
|
||||
}
|
||||
|
||||
fun arriveStation() {
|
||||
OrderModel.onArriveAt(null, "页面触发到站",false)
|
||||
OrderModel.onArriveAt(null, "页面触发到站")
|
||||
}
|
||||
|
||||
override fun onArriveStationSuccess() {
|
||||
|
||||
Reference in New Issue
Block a user