[8.4.0]
[b4] [和@yuelei 联调]
This commit is contained in:
@@ -27,7 +27,6 @@ import com.mogo.och.bridge.R
|
||||
import com.mogo.och.bridge.autopilot.OCHAdasAbilityManager
|
||||
import com.mogo.och.bridge.autopilot.autopilot.OchAutoPilotManager
|
||||
import com.mogo.och.bridge.autopilot.autopilot.OchAutoPilotManager.startAutoPilot
|
||||
import com.mogo.och.bridge.autopilot.autopilot.OchAutoPilotManager.unmannedStartAutoPilot
|
||||
import com.mogo.och.bridge.autopilot.autopilot.OchAutopilotAnalytics
|
||||
import com.mogo.och.bridge.autopilot.location.OchLocationManager
|
||||
import com.mogo.och.bridge.distance.TrajectoryAndDistanceManager
|
||||
@@ -626,7 +625,7 @@ object LineManager : CallerBase<ILineCallback>() {
|
||||
}
|
||||
}
|
||||
|
||||
fun unmannedStartAutopilot(taskId: Long, isSlideAutoStart: Boolean = false) {
|
||||
fun unmannedStartAutopilot(isSlideAutoStart: Boolean = false) {
|
||||
if (startStation == null || endStation == null) {
|
||||
// ToastUtils.showShort("未设置起始或终点站点")
|
||||
ToastUtils.showShort(R.string.module_och_not_stat_and_end_point)
|
||||
@@ -731,7 +730,7 @@ object LineManager : CallerBase<ILineCallback>() {
|
||||
.wayPoints(wayPoints)
|
||||
.blackPoints(blackPoints)
|
||||
.build()
|
||||
val sessionId = OchAutoPilotManager.unmannedStartAutoPilot(taskId, traj, parameters)
|
||||
val sessionId = OchAutoPilotManager.unmannedStartAutoPilot(i.taskId, traj, parameters)
|
||||
OchAutopilotAnalytics.triggerUpdateStartAutoPilotSessionId(sessionId, true)
|
||||
d(
|
||||
TAG,
|
||||
@@ -747,7 +746,7 @@ object LineManager : CallerBase<ILineCallback>() {
|
||||
|
||||
|
||||
//TODO 任务管理继续
|
||||
fun unmanneAutopilotContinue(taskId: Long, isSlideAutoStart: Boolean = false) {
|
||||
fun unmanneAutopilotContinue(isSlideAutoStart: Boolean = false) {
|
||||
if (startStation == null || endStation == null) {
|
||||
// ToastUtils.showShort("未设置起始或终点站点")
|
||||
ToastUtils.showShort(R.string.module_och_not_stat_and_end_point)
|
||||
@@ -793,7 +792,7 @@ object LineManager : CallerBase<ILineCallback>() {
|
||||
e(TAG, "无人化 行程日志-AutopilotControlParameters is empty.")
|
||||
return
|
||||
}
|
||||
_lineInfos?.let { i ->
|
||||
_lineInfos?.let { lineInfo ->
|
||||
startStation?.let { start->
|
||||
val wayPoints = ArrayList<VehicleSite>()
|
||||
val blackPoints = ArrayList<VehicleSite>()
|
||||
@@ -808,8 +807,8 @@ object LineManager : CallerBase<ILineCallback>() {
|
||||
.build()
|
||||
wayPoints.add(vehicleSite)
|
||||
val traj = Trajectory.builder()
|
||||
.id(i.lineId)
|
||||
.name(i.lineName)
|
||||
.id(lineInfo.lineId)
|
||||
.name(lineInfo.lineName)
|
||||
.trajUrl(_contraiInfo!!.csvFileUrl)
|
||||
.trajMd5(_contraiInfo!!.csvFileMd5)
|
||||
.stopUrl(_contraiInfo!!.txtFileUrl)
|
||||
@@ -818,7 +817,7 @@ object LineManager : CallerBase<ILineCallback>() {
|
||||
.wayPoints(wayPoints)
|
||||
.blackPoints(blackPoints)
|
||||
.build()
|
||||
val sessionId = OchAutoPilotManager.unmannedAutoPilotContinue(taskId, traj,vehicleSite, parameters)
|
||||
val sessionId = OchAutoPilotManager.unmannedAutoPilotContinue(lineInfo.taskId, traj,vehicleSite, parameters)
|
||||
OchAutopilotAnalytics.triggerUpdateStartAutoPilotSessionId(sessionId, true)
|
||||
d(
|
||||
TAG,
|
||||
|
||||
@@ -119,7 +119,7 @@ class AutopilotState @JvmOverloads constructor(
|
||||
actv_autopilot_state.setTextColor(ResourcesUtils.getColor(R.color.common_B3FFFFFF))
|
||||
actv_autopilot_state.text = ResourcesUtils.getString(R.string.common_autopilot_starting)
|
||||
actv_pxjs_state.setTextColor(ResourcesUtils.getColor(R.color.common_19FFCB))
|
||||
AutopilotState@this.isEnabled = false
|
||||
//AutopilotState@this.isEnabled = false
|
||||
|
||||
autopilotLoadingAnimator.start()
|
||||
|
||||
@@ -140,7 +140,7 @@ class AutopilotState @JvmOverloads constructor(
|
||||
actv_autopilot_state.setTextColor(ResourcesUtils.getColor(R.color.common_B3FFFFFF))
|
||||
actv_autopilot_state.text = ResourcesUtils.getString(R.string.common_autopilot_starting)
|
||||
actv_pxjs_state.setTextColor(ResourcesUtils.getColor(R.color.common_19FFCB))
|
||||
AutopilotState@this.isEnabled = false
|
||||
//AutopilotState@this.isEnabled = false
|
||||
|
||||
autopilotLoadingAnimator.cancel()
|
||||
autopilotChangeStateAnimator.start()
|
||||
@@ -158,7 +158,7 @@ class AutopilotState @JvmOverloads constructor(
|
||||
actv_autopilot_state.setTextColor(ResourcesUtils.getColor(R.color.common_19FFCB))
|
||||
actv_autopilot_state.text = ResourcesUtils.getString(R.string.common_autopilot_running)
|
||||
actv_pxjs_state.setTextColor(ResourcesUtils.getColor(R.color.common_19FFCB))
|
||||
AutopilotState@this.isEnabled = false
|
||||
//AutopilotState@this.isEnabled = false
|
||||
|
||||
aciv_autopilot_running_ani.visibility = VISIBLE
|
||||
autopilotStateAnimator?.start()
|
||||
@@ -179,7 +179,7 @@ class AutopilotState @JvmOverloads constructor(
|
||||
actv_autopilot_state.text = ResourcesUtils.getString(R.string.common_autopilot_start)
|
||||
actv_pxjs_state.setTextColor(ResourcesUtils.getColor(R.color.common_19FFCB))
|
||||
|
||||
AutopilotState@this.isEnabled = false
|
||||
//AutopilotState@this.isEnabled = false
|
||||
|
||||
aciv_autopilot_running_ani.visibility = GONE
|
||||
autopilotStateAnimator?.stop()
|
||||
@@ -220,7 +220,7 @@ class AutopilotState @JvmOverloads constructor(
|
||||
actv_autopilot_state.setTextColor(ResourcesUtils.getColor(R.color.common_19FFCB))
|
||||
actv_autopilot_state.text = ResourcesUtils.getString(R.string.common_autopilot_start)
|
||||
actv_pxjs_state.setTextColor(ResourcesUtils.getColor(R.color.common_19FFCB))
|
||||
AutopilotState@this.isEnabled = false
|
||||
//AutopilotState@this.isEnabled = false
|
||||
|
||||
aciv_autopilot_running_ani.visibility = VISIBLE
|
||||
autopilotStateAnimator?.start()
|
||||
@@ -244,7 +244,7 @@ class AutopilotState @JvmOverloads constructor(
|
||||
actv_autopilot_state.setTextColor(ResourcesUtils.getColor(R.color.common_FF4E41))
|
||||
actv_autopilot_state.text = ResourcesUtils.getString(R.string.common_autopilot_fail)
|
||||
actv_pxjs_state.setTextColor(ResourcesUtils.getColor(R.color.common_19FFCB))
|
||||
AutopilotState@this.isEnabled = false
|
||||
//AutopilotState@this.isEnabled = false
|
||||
|
||||
aciv_autopilot_running_ani.visibility = GONE
|
||||
autopilotStateAnimator?.stop()
|
||||
|
||||
@@ -4,6 +4,9 @@ import androidx.lifecycle.ViewModel
|
||||
import com.mogo.eagle.core.data.config.FunctionBuildConfig
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotStatusListener
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotControlManager
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerTaskListenerManager
|
||||
import com.mogo.eagle.core.utilcode.mogo.AppIdentityModeUtils
|
||||
import com.mogo.eagle.core.utilcode.mogo.CockpitType
|
||||
import com.mogo.eagle.core.utilcode.util.UiThreadHandler
|
||||
import com.mogo.och.common.module.debug.autopilot.AutopilotStateDebug
|
||||
import com.mogo.och.common.module.debug.autopilot.IOchDebugAutopilotStatusListener
|
||||
@@ -229,7 +232,15 @@ class AutopilotStateModel : ViewModel(), IOchAutopilotStatusListener, ILineCallb
|
||||
startAutopilotFail()
|
||||
}
|
||||
} else {
|
||||
LineManager.startAutopilot()
|
||||
if (AppIdentityModeUtils.getCockpitType() == CockpitType.UNMANNED) {
|
||||
if (CallerTaskListenerManager.isCarRunningTask()) {
|
||||
LineManager.unmanneAutopilotContinue(false)
|
||||
}else{
|
||||
LineManager.unmannedStartAutopilot(true)
|
||||
}
|
||||
}else{
|
||||
LineManager.startAutopilot()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -23,6 +23,7 @@ data class LineInfo(
|
||||
*/
|
||||
var siteInfos:MutableList<BusStationBean> = mutableListOf(),
|
||||
|
||||
var taskId:Long=-1L
|
||||
) {
|
||||
fun genAutopilotId(): String {
|
||||
val tempAutopilotId = StringBuilder()
|
||||
|
||||
@@ -111,6 +111,7 @@ class BusRoutesResponse : BaseData() {
|
||||
// 线路信息
|
||||
if (lineInfo == null && taskAndsite.lineId != null && taskAndsite.lineName != null) {
|
||||
lineInfo = LineInfo(taskAndsite.lineId!!, taskAndsite.lineName!!, orderId = taskAndsite.taskId.toString())
|
||||
lineInfo?.taskId = taskAndsite.taskId?.toLong()?:0L
|
||||
}
|
||||
}
|
||||
if (currentStationIndex == -1) {
|
||||
|
||||
@@ -9,6 +9,7 @@ import com.mogo.eagle.core.data.config.FunctionBuildConfig
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotStatusListener
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotControlManager
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerTaskListenerManager
|
||||
import com.mogo.eagle.core.function.call.setting.CallerSopSettingManager
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger.d
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger.e
|
||||
@@ -16,6 +17,7 @@ import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_
|
||||
import com.mogo.eagle.core.utilcode.util.CoordinateUtils
|
||||
import com.mogo.eagle.core.utilcode.util.StringUtils
|
||||
import com.mogo.eagle.core.utilcode.util.ThreadUtils
|
||||
import com.mogo.eagle.core.utilcode.util.ToastUtils
|
||||
import com.mogo.eagle.core.utilcode.util.UiThreadHandler
|
||||
import com.mogo.och.bridge.autopilot.autopilot.IOchAutopilotStatusListener
|
||||
import com.mogo.och.bridge.autopilot.autopilot.OchAutoPilotStatusListenerManager
|
||||
@@ -244,11 +246,16 @@ object OrderModel {
|
||||
private fun onStartAutopilot(taskId: Long?) {
|
||||
//开启自动驾驶 2.10.0: 如果自动驾驶状态下开启, 非自动驾驶状态下不开启,需手动点击自动驾驶按钮开启
|
||||
isGoingToNextStation = true
|
||||
if (CallerTaskListenerManager.isCarRunningTask()) {
|
||||
LineManager.unmanneAutopilotContinue(false)
|
||||
}else{
|
||||
LineManager.unmannedStartAutopilot(true)
|
||||
}
|
||||
if (CallerAutoPilotStatusListenerManager.getState() != IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_RUNNING
|
||||
) {
|
||||
LineManager.unmannedStartAutopilot(taskId ?: 0L, true)
|
||||
}else{
|
||||
LineManager.unmanneAutopilotContinue(taskId ?: 0L, false)
|
||||
|
||||
} else {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -111,6 +111,7 @@ class NormalRepository : ILineRepository {
|
||||
// 线路信息
|
||||
if (lineInfo == null && busRoutesResult.name != null) {
|
||||
lineInfo = LineInfo(busRoutesResult.lineId.toLong(), busRoutesResult.name, orderId = busRoutesResult.taskId.toString())
|
||||
lineInfo?.taskId = busRoutesResult.taskId.toLong()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -6,6 +6,7 @@ import android.view.LayoutInflater
|
||||
import androidx.constraintlayout.widget.ConstraintLayout
|
||||
import androidx.lifecycle.ViewModelProvider
|
||||
import androidx.lifecycle.findViewTreeViewModelStoreOwner
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotControlManager
|
||||
import com.mogo.eagle.core.utilcode.kotlin.onClick
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_BUS
|
||||
@@ -82,15 +83,15 @@ class TaskRunningView : ConstraintLayout, TaskRunningModel.SwtichLineViewCallbac
|
||||
})
|
||||
unmanned_actv_arriver_station.onClick {
|
||||
unmanned_loading_arrive_station.visibility = VISIBLE
|
||||
if(LineModel.isPreLastStation()==true){
|
||||
viewModel?.arriveStation()
|
||||
}else{
|
||||
viewModel?.skipStation()
|
||||
}
|
||||
|
||||
// if(LineModel.isPreLastStation()==true){
|
||||
// viewModel?.arriveStation()
|
||||
// }else{
|
||||
// viewModel?.skipStation()
|
||||
// }
|
||||
viewModel?.arriveStation()
|
||||
}
|
||||
unmanned_actv_arriver_station_new.setOnLongClickListener {
|
||||
viewModel?.arriveStation()
|
||||
CallerAutoPilotControlManager.sendTaskManagerRunningInfo()
|
||||
true
|
||||
}
|
||||
unmanned_actv_complete_task.onClick {
|
||||
|
||||
Reference in New Issue
Block a user