Merge branch 'dev_robobus-d_230322_3.0.0' into dev_robobus_network_weak_230323

This commit is contained in:
yangyakun
2023-03-27 14:31:42 +08:00
23 changed files with 913 additions and 109 deletions

View File

@@ -161,4 +161,13 @@
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintRight_toLeftOf="@+id/bus_p_route_panel" />
<com.mogo.eagle.core.function.hmi.ui.msgbox.BusPassengerMsgBoxBubbleView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:layout_constraintRight_toLeftOf="@+id/bus_p_route_panel"
app:layout_constraintTop_toTopOf="parent"
android:layout_marginRight="@dimen/dp_40"
android:layout_marginTop="@dimen/dp_100"
/>
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@@ -61,7 +61,7 @@ class BusPassengerFunctionDevicePresenter(view: M1DeviceFragment?) :
}
CallerAutoPilotControlManager.sendRoboBusJinlvM1FrontDoorCmd(1)
disposeSubscribe(subscribeDoorStatus)
subscribeDoorStatus = createSubscribe {
subscribeDoorStatus = createSubscribe(6000) {
if (!OCHM1LightAirconditionDoorStatusManager.doorStatus.isOpen) {
ToastUtils.showShort("车门无法开启,请使用车内物理按钮")
}
@@ -80,7 +80,7 @@ class BusPassengerFunctionDevicePresenter(view: M1DeviceFragment?) :
}
CallerAutoPilotControlManager.sendRoboBusJinlvM1FrontDoorCmd(2)
disposeSubscribe(subscribeDoorStatus)
subscribeDoorStatus = createSubscribe {
subscribeDoorStatus = createSubscribe(6000) {
if (OCHM1LightAirconditionDoorStatusManager.doorStatus.isOpen) {
ToastUtils.showShort("车门无法关闭,请使用车内物理按钮")
}

View File

@@ -10,48 +10,15 @@ import com.mogo.och.common.module.manager.OCHPlanningStopSideStatusManager
import com.mogo.och.common.module.voice.VoiceNotice
class BusPassengerFunctionPresenter(view: M1ContainFragment?) :
BusBasePassengerFunctionDevicePresenter<M1ContainFragment?>(view),
OCHPlanningStopSideStatusManager.OCHPlanningActionsCallback {
BusBasePassengerFunctionDevicePresenter<M1ContainFragment?>(view) {
companion object{
private const val TAG = "BusPassengerFunctionPresenter"
}
override fun onCreate(owner: LifecycleOwner) {
super.onCreate(owner)
OCHPlanningStopSideStatusManager.addListener(TAG,this)
}
override fun onDestroy(owner: LifecycleOwner) {
super.onDestroy(owner)
OCHPlanningStopSideStatusManager.removeListener(TAG)
}
override fun onStartAutopilotFailure(
actionStatus: OCHPlanningStopSideStatusManager.Status,
stopSideStatus: Boolean?,
errorInfo: String?
) {
UiThreadHandler.post {
when (actionStatus) {
OCHPlanningStopSideStatusManager.Status.NOSTART -> {
ToastUtils.showShort(errorInfo)
}
OCHPlanningStopSideStatusManager.Status.START -> {
VoiceNotice.showNotice(context.getString(R.string.m1_stop_site_zh), AIAssist.LEVEL1)
}
OCHPlanningStopSideStatusManager.Status.DOING -> {
}
OCHPlanningStopSideStatusManager.Status.Ending -> {
stopSideStatus?.let {
if(it){
ToastUtils.showShort("靠边停车成功")
}else{
ToastUtils.showShort("靠边停车失败")
}
}
}
}
}
}
}

View File

@@ -2,6 +2,7 @@ package com.mogo.och.bus.passenger.presenter
import androidx.lifecycle.LifecycleOwner
import com.amap.api.maps.model.LatLng
import com.mogo.commons.voice.AIAssist
import com.mogo.eagle.core.data.map.MogoLocation
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotStatusListener
import com.mogo.eagle.core.function.api.telematic.IReceivedMsgListener
@@ -27,16 +28,18 @@ import com.mogo.och.common.module.bean.dpmsg.DPMsgType
import com.mogo.och.common.module.biz.common.socketmessage.OCHSocketMessageManager
import com.mogo.och.common.module.biz.constant.OchCommonConst
import com.mogo.och.common.module.manager.OCHM1LightAirconditionDoorStatusManager
import com.mogo.och.common.module.manager.OCHPlanningStopSideStatusManager
import com.mogo.och.common.module.utils.DateTimeUtil
import com.mogo.och.common.module.utils.NumberFormatUtil
import com.mogo.och.common.module.utils.SoundPoolHelper
import com.mogo.och.common.module.voice.VoiceNotice
import io.reactivex.disposables.Disposable
import java.util.*
class BusPassengerPresenter(view: MainFragment?) :
BusBasePassengerFunctionDevicePresenter<MainFragment?>(view),
IBusPassengerControllerStatusCallback, IDistanceTimeCallback, IOrderChangeCallback,
IOrderStatusChangeListener {
IOrderStatusChangeListener, OCHPlanningStopSideStatusManager.OCHPlanningActionsCallback {
private var subscribe: Disposable? = null
private var gnssSpeed = 0.0f
@@ -49,6 +52,7 @@ class BusPassengerPresenter(view: MainFragment?) :
CharterPassengerModel.setCarTypeChangeListener(this)
CharterPassengerModel.setStatusChangeListener(TAG,this)
CallerTelematicListenerManager.addListener(TAG, msgReceived)
OCHPlanningStopSideStatusManager.addListener(TAG,this)
setCarChangeListener(R.raw.aiqinghao)
//BusPassengerModel.setMoGoAutopilotPlanningListener(this)
@@ -60,6 +64,7 @@ class BusPassengerPresenter(view: MainFragment?) :
CharterPassengerModel.setiDistanceTimeCallback(null)
CharterPassengerModel.setCarTypeChangeListener(null)
CallerTelematicListenerManager.removeListener(TAG)
OCHPlanningStopSideStatusManager.removeListener(TAG)
}
private fun setSpeed(speed:Float){
UiThreadHandler.post {
@@ -260,4 +265,30 @@ class BusPassengerPresenter(view: MainFragment?) :
mView?.drawEndStation(latLng)
}
override fun onStartAutopilotFailure(
actionStatus: OCHPlanningStopSideStatusManager.Status,
stopSideStatus: Boolean?,
errorInfo: String?
) {
UiThreadHandler.post {
when (actionStatus) {
OCHPlanningStopSideStatusManager.Status.NOSTART -> {
ToastUtils.showShort(errorInfo)
}
OCHPlanningStopSideStatusManager.Status.START -> {
VoiceNotice.showNotice(context.getString(R.string.m1_stop_site_zh), AIAssist.LEVEL1)
}
OCHPlanningStopSideStatusManager.Status.DOING -> {
// 正在靠边停车
}
OCHPlanningStopSideStatusManager.Status.EndingSuccess -> {
ToastUtils.showShort("靠边停车成功")
}
OCHPlanningStopSideStatusManager.Status.EndingFaile -> {
ToastUtils.showShort("靠边停车失败")
}
}
}
}
}

View File

@@ -368,7 +368,7 @@ class LineSiteView @JvmOverloads constructor(
IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_RUNNING -> {
// 自动驾驶中
when (OCHPlanningStopSideStatusManager.stopSiteStatus) {
OCHPlanningStopSideStatusManager.StopSite.NOTHING -> {
OCHPlanningStopSideStatusManager.Status.EndingSuccess -> {
isChangeIngLineAndSite = false
onlyChangeSite(false)
// 可以切换路径
@@ -376,15 +376,7 @@ class LineSiteView @JvmOverloads constructor(
setSiteAdapterEnable(false)
queryLineList()
}
OCHPlanningStopSideStatusManager.StopSite.STOPSITED -> {
isChangeIngLineAndSite = false
onlyChangeSite(false)
// 可以切换路径
setEnableLineStatus(true)
setSiteAdapterEnable(false)
queryLineList()
}
OCHPlanningStopSideStatusManager.StopSite.LANKE_KEEP ->{
else ->{
ToastUtils.showShort("自动驾驶中无法切换线路")
}
}

View File

@@ -15,7 +15,7 @@ object OCHPlanningStopSideStatusManager : IMoGoAutopilotPlanningActionsListener
CallerPlanningActionsListenerManager.setListenerHz(TAG,5)
}
var stopSiteStatus = StopSite.NOTHING
var stopSiteStatus = Status.NOTHING
val M_LISTENERS: ConcurrentHashMap<String, OCHPlanningActionsCallback> = ConcurrentHashMap()
@@ -60,31 +60,49 @@ object OCHPlanningStopSideStatusManager : IMoGoAutopilotPlanningActionsListener
when (drivingAction) {
MessagePad.DrivingAction.DRIVING_ACTION_STATE_ONE -> {
// 表示开始靠边停车
CallerLogger.d(SceneConstant.M_BUS+ TAG,"开始靠边停车")
M_LISTENERS.forEach {
val tag = it.key
val listener = it.value
listener.onStartAutopilotFailure(Status.START,null,null)
listener.onStartAutopilotFailure(Status.DOING,null,null)
if(stopSiteStatus == Status.START){
// 靠边停车中
CallerLogger.d(SceneConstant.M_BUS+ TAG,"靠边停车中")
listener.onStartAutopilotFailure(Status.DOING,null,null)
}else{
// 开始靠边停车
stopSiteStatus = Status.START
CallerLogger.d(SceneConstant.M_BUS+ TAG,"开始靠边停车")
listener.onStartAutopilotFailure(Status.START,null,null)
}
}
}
MessagePad.DrivingAction.DRIVING_ACTION_STATE_TWO -> {
//表示靠边停车成功
CallerLogger.d(SceneConstant.M_BUS+ TAG,"靠边停车成功")
stopSiteStatus = StopSite.STOPSITED
M_LISTENERS.forEach {
val tag = it.key
val listener = it.value
listener.onStartAutopilotFailure(Status.Ending,true,null)
if(stopSiteStatus == Status.EndingSuccess){
// 只响应第一次
}else{
stopSiteStatus = Status.EndingSuccess
CallerLogger.d(SceneConstant.M_BUS+ TAG,"靠边停车成功")
listener.onStartAutopilotFailure(Status.EndingSuccess,true,null)
}
}
}
MessagePad.DrivingAction.DRIVING_ACTION_STATE_THREE -> {
//靠边停车失败
CallerLogger.d(SceneConstant.M_BUS+ TAG,"靠边停车失败")
M_LISTENERS.forEach {
val tag = it.key
val listener = it.value
listener.onStartAutopilotFailure(Status.Ending,false,null)
if(stopSiteStatus==Status.EndingFaile){
// 只响应第一次
}else{
stopSiteStatus = Status.EndingFaile
CallerLogger.d(SceneConstant.M_BUS+ TAG,"靠边停车失败")
listener.onStartAutopilotFailure(Status.EndingFaile,false,null)
}
}
}
else -> {}
@@ -94,11 +112,16 @@ object OCHPlanningStopSideStatusManager : IMoGoAutopilotPlanningActionsListener
when (drivingAction) {
MessagePad.DrivingAction.DRIVING_ACTION_STATE_ONE -> {
// 表示距离前方站点100m
CallerLogger.d(SceneConstant.M_BUS+ TAG,"靠边停车失败_原因距离前方站点100m")
M_LISTENERS.forEach {
val tag = it.key
val listener = it.value
listener.onStartAutopilotFailure(Status.NOSTART,false,"距离前方站点100m,请稍后再试")
if(stopSiteStatus==Status.NOSTART){
// 只响应第一次
}else{
stopSiteStatus = Status.NOSTART
CallerLogger.d(SceneConstant.M_BUS+ TAG,"靠边停车失败_原因距离前方站点100m")
listener.onStartAutopilotFailure(Status.NOSTART,false,"距离前方站点100m,请稍后再试")
}
}
}
MessagePad.DrivingAction.DRIVING_ACTION_STATE_TWO -> {
@@ -107,47 +130,65 @@ object OCHPlanningStopSideStatusManager : IMoGoAutopilotPlanningActionsListener
M_LISTENERS.forEach {
val tag = it.key
val listener = it.value
listener.onStartAutopilotFailure(Status.NOSTART,false,"距离路口100m,请稍后再试")
if(stopSiteStatus==Status.NOSTART){
// 只响应第一次
}else{
stopSiteStatus = Status.NOSTART
CallerLogger.d(SceneConstant.M_BUS+ TAG,"靠边停车失败_原因距离路口100m,请稍后再试")
listener.onStartAutopilotFailure(Status.NOSTART,false,"距离路口100m,请稍后再试")
}
}
}
MessagePad.DrivingAction.DRIVING_ACTION_STATE_THREE -> {
//正在变道
CallerLogger.d(SceneConstant.M_BUS+ TAG,"靠边停车失败_原因正在变道")
M_LISTENERS.forEach {
val tag = it.key
val listener = it.value
listener.onStartAutopilotFailure(Status.NOSTART,false,"因车辆正在变道无法靠边停车,请稍后再试")
if(stopSiteStatus==Status.NOSTART){
// 只响应第一次
}else{
stopSiteStatus = Status.NOSTART
CallerLogger.d(SceneConstant.M_BUS+ TAG,"靠边停车失败_原因正在变道")
listener.onStartAutopilotFailure(Status.NOSTART,false,"因车辆正在变道无法靠边停车,请稍后再试")
}
}
}
else -> {
//未知问题
CallerLogger.d(SceneConstant.M_BUS+ TAG,"靠边停车失败_原因未知问题")
M_LISTENERS.forEach {
val tag = it.key
val listener = it.value
listener.onStartAutopilotFailure(Status.NOSTART,false,"靠边停车失败,请稍后再试")
if(stopSiteStatus==Status.NOSTART){
// 只响应第一次
}else{
stopSiteStatus = Status.NOSTART
CallerLogger.d(SceneConstant.M_BUS+ TAG,"靠边停车失败_原因未知问题")
listener.onStartAutopilotFailure(Status.NOSTART,false,"靠边停车失败,请稍后再试")
}
}
}
}
}
MessagePad.ParkScenarioDrivingState.PARK_SENARIO_LANKE_KEEP ->{
stopSiteStatus = StopSite.LANKE_KEEP
if(stopSiteStatus==Status.NOTHING){
// 只响应第一次
}else{
stopSiteStatus = Status.NOTHING
CallerLogger.d(SceneConstant.M_BUS+ TAG,"进入正常驾驶")
}
}
else -> {}
}
}
enum class Status(val code: Int){
NOSTART(-1),
START(0),
DOING(1),
Ending(2)
}
enum class StopSite{
NOTHING,// 初始状态
STOPSITED,// 靠边停车状态
LANKE_KEEP;// 形式状态
enum class Status(){
START(),// 开始靠边停车
DOING(),// 正在靠边停车
EndingSuccess(),// 靠边停车成功
EndingFaile(),// 靠边停车失败
NOSTART(),// 没有响应靠边停车
NOTHING()// 默认状态
}
interface OCHPlanningActionsCallback {

View File

@@ -62,10 +62,18 @@ class FuncBizProvider : IMoGoFuncBizProvider {
dispatchAutoPilotManager.affirm()
}
override fun stopDispatchAffirm() {
dispatchAutoPilotManager.stopAffirm()
}
override fun dispatchCancel(manualTrigger: Boolean) {
dispatchAutoPilotManager.cancel(manualTrigger)
}
override fun stopDispatchCancel(manualTrigger: Boolean) {
dispatchAutoPilotManager.stopCancel(manualTrigger)
}
override fun testDispatch(sceneType: Int) {
dispatchAutoPilotManager.testDispatch(sceneType)
}

View File

@@ -3,6 +3,7 @@ package com.mogo.eagle.function.biz.dispatch
import android.content.Context
import android.os.Handler
import android.os.Message
import android.util.Log
import com.mogo.aicloud.services.socket.IMogoOnMessageListener
import com.mogo.aicloud.services.socket.MogoAiCloudSocketManager
import com.mogo.eagle.core.data.autopilot.AutopilotControlParameters
@@ -21,19 +22,25 @@ import com.mogo.eagle.core.function.call.hmi.CallerHmiManager
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant
import com.mogo.eagle.core.utilcode.util.CoordinateUtils
import com.mogo.eagle.core.utilcode.util.ToastUtils
import com.mogo.eagle.function.biz.dispatch.network.DispatchServiceModel.Companion.DISPATCH_COMPLETED
import com.mogo.eagle.function.biz.dispatch.network.DispatchServiceModel.Companion.DISPATCH_RESULT_AFFIRM
import com.mogo.eagle.function.biz.dispatch.network.DispatchServiceModel.Companion.DISPATCH_RESULT_MANUAL_CANCEL
import com.mogo.eagle.function.biz.dispatch.network.DispatchServiceModel.Companion.DISPATCH_RESULT_TIMER_CANCEL
import com.mogo.eagle.function.biz.dispatch.network.DispatchServiceModel.Companion.DISPATCH_STOP_AFFIRM
import com.mogo.eagle.function.biz.dispatch.network.DispatchServiceModel.Companion.DISPATCH_STOP_MANUAL_CANCEL
import com.mogo.eagle.function.biz.dispatch.network.DispatchServiceModel.Companion.DISPATCH_STOP_TIMER_CANCEL
import com.mogo.eagle.function.biz.dispatch.network.DispatchServiceModel.Companion.dispatchServiceModel
import mogo.telematics.pad.MessagePad
import mogo_msg.MogoReportMsg
//负责监听自动驾驶状态并进行状态上报,自动驾驶路线上报,接收调度指令展示指令弹窗
class DispatchAutoPilotManager private constructor() :
IMogoOnMessageListener<DispatchAdasAutoPilotLocReceiverBean>,
IMoGoCheckAutoPilotBtnListener,
IMoGoPlanningRottingListener,
IMoGoAutopilotStatusListener {
IMogoOnMessageListener<DispatchAdasAutoPilotLocReceiverBean>,
IMoGoCheckAutoPilotBtnListener,
IMoGoPlanningRottingListener,
IMoGoAutopilotStatusListener {
companion object {
private const val TAG = "DispatchAutoPilotManager"
@@ -110,6 +117,7 @@ class DispatchAutoPilotManager private constructor() :
}
override fun onMsgReceived(adasAutoPilotLocReceiverBean: DispatchAdasAutoPilotLocReceiverBean?) {
Log.i(TAG,"onMsgReceived 收到云调度长链接")
if (adasAutoPilotLocReceiverBean != null && adasAutoPilotLocReceiverBean.startLat != 0.0 && adasAutoPilotLocReceiverBean.startLon != 0.0) {
receiverBean = adasAutoPilotLocReceiverBean
val message = Message()
@@ -117,11 +125,52 @@ class DispatchAutoPilotManager private constructor() :
message.obj = adasAutoPilotLocReceiverBean
handler.sendMessage(message)
}
//同步调用路线下载逻辑
adasAutoPilotLocReceiverBean?.let {
if(it.type == 1){
val mAutoPilotLine = AutopilotControlParameters.AutoPilotLine(it.lineId.toLong(),it.trajUrl,it.trajMd5,it.stopUrl,it.stopMd5,it.timestamp,
it.vehicleModel,it.trajUrl_dpqp,it.trajMd5_dpqp,it.stopUrl_dpqp,it.stopMd5_dpqp,it.timestamp_dpqp)
CallerAutoPilotControlManager.sendTrajectoryDownloadReq(mAutoPilotLine)
Log.i(TAG,"调用路线下载逻辑")
}
}
adasAutoPilotLocReceiverBean?.let {
Log.i(TAG,"taskId="+it.taskId)
Log.i(TAG,"type="+it.type)
Log.i(TAG,"source="+it.source)
Log.i(TAG,"lineName="+it.lineName)
Log.i(TAG,"stopMd5_dpqp="+it.stopMd5_dpqp)
Log.i(TAG,"stopUrl_dpqp="+it.stopUrl_dpqp)
Log.i(TAG,"trajMd5_dpqp="+it.trajMd5_dpqp)
Log.i(TAG,"trajUrl_dpqp="+it.trajUrl_dpqp)
Log.i(TAG,"stopMd5_dpqp="+it.stopMd5_dpqp)
Log.i(TAG,"stopMd5="+it.stopMd5)
Log.i(TAG,"stopUrl="+it.stopUrl)
Log.i(TAG,"trajUrl="+it.trajUrl)
Log.i(TAG,"trajMd5="+it.trajMd5)
Log.i(TAG,"endLocAddress="+it.endLocAddress)
Log.i(TAG,"flightInfo="+it.flightInfo)
Log.i(TAG,"poiId="+it.poiId)
Log.i(TAG,"startLocAddress="+it.startLocAddress)
Log.i(TAG,"taskInfo="+it.taskInfo)
Log.i(TAG,"taskTime="+it.taskTime)
Log.i(TAG,"vehicleModel="+it.vehicleModel)
Log.i(TAG,"endLat="+it.endLat)
Log.i(TAG,"endLon="+it.endLon)
Log.i(TAG,"lineId="+it.lineId)
Log.i(TAG,"startLat="+it.startLat)
Log.i(TAG,"startLon="+it.startLon)
Log.i(TAG,"stopsList="+it.stopsList)
Log.i(TAG,"timestamp="+it.timestamp)
Log.i(TAG,"systemTime="+it.systemTime)
Log.i(TAG,"timestamp_dpqp="+it.timestamp_dpqp)
}
}
private fun startAutoPilot() {
val currentAutopilot = AutopilotControlParameters()
currentAutopilot.isSpeakVoice = false
// currentAutopilot.isSpeakVoice = false
val wayLatLon: MutableList<AutopilotControlParameters.AutoPilotLonLat> = ArrayList()
receiverBean?.let {
if (it.stopsList != null) {
@@ -134,6 +183,10 @@ class DispatchAutoPilotManager private constructor() :
)
}
}
currentAutopilot.routeID = it.lineId
currentAutopilot.routeName = it.lineName
currentAutopilot.startName = it.startLocAddress
currentAutopilot.endName = it.endLocAddress
currentAutopilot.wayLatLons = wayLatLon
currentAutopilot.startLatLon =
AutopilotControlParameters.AutoPilotLonLat(it.startLat, it.startLon)
@@ -141,20 +194,56 @@ class DispatchAutoPilotManager private constructor() :
AutopilotControlParameters.AutoPilotLonLat(it.endLat, it.endLon)
currentAutopilot.vehicleType = 10
CallerLogger.d(SceneConstant.Companion.M_DISPATCH + TAG, "开启自动驾驶====$currentAutopilot")
Log.i(TAG,"开启自动驾驶====$currentAutopilot")
CallerAutoPilotControlManager.startAutoPilot(currentAutopilot)
}
}
fun affirm() {
CallerHmiManager.dismissDispatchDialog()
dispatchServiceModel.dispatchResultUpload(DISPATCH_RESULT_AFFIRM)
receiverBean?.taskId?.let {
dispatchServiceModel.dispatchResultUpload(DISPATCH_RESULT_AFFIRM, it,
onSuccess = {
//调用工控机开启自动驾驶
startAutoPilot()
},onError = {
})
}
}
/**
* 停止调度确认
*/
fun stopAffirm(){
CallerHmiManager.dismissDispatchDialog()
receiverBean?.taskId?.let{
dispatchServiceModel.dispatchResultUpload(DISPATCH_STOP_AFFIRM, it,
onSuccess = {
//取消自动驾驶
CallerAutoPilotControlManager.cancelAutoPilot()
Log.i(TAG,"stopAffirm 取消自动驾驶")
}, onError = {})
}
}
fun cancel(manualTrigger: Boolean) {
CallerHmiManager.dismissDispatchDialog()
dispatchServiceModel.dispatchResultUpload(
if (manualTrigger) DISPATCH_RESULT_MANUAL_CANCEL else DISPATCH_RESULT_TIMER_CANCEL
)
receiverBean?.taskId?.let {
dispatchServiceModel.dispatchResultUpload(
if (manualTrigger) DISPATCH_RESULT_MANUAL_CANCEL else DISPATCH_RESULT_TIMER_CANCEL, it)
}
}
/**
* 停止调度取消
*/
fun stopCancel(manualTrigger: Boolean){
CallerHmiManager.dismissDispatchDialog()
receiverBean?.taskId?.let{
dispatchServiceModel.dispatchResultUpload(
if (manualTrigger) DISPATCH_STOP_MANUAL_CANCEL else DISPATCH_STOP_TIMER_CANCEL, it)
}
}
override fun onCheck(isChecked: Boolean) {
@@ -197,7 +286,7 @@ class DispatchAutoPilotManager private constructor() :
SceneConstant.Companion.M_DISPATCH + TAG,
"onArriveAt data : $arrivalNotification"
)
Log.i(TAG,"onArriveAt data : $arrivalNotification")
if (arrivalNotification.endLocation == null) {
return
}
@@ -211,13 +300,40 @@ class DispatchAutoPilotManager private constructor() :
SceneConstant.Companion.M_DISPATCH + TAG,
"onArriveAt cal distance : $distanceFromSelf"
)
Log.i(TAG,"onArriveAt cal distance : $distanceFromSelf")
if (distanceFromSelf < 10) {
CallerLogger.d(SceneConstant.Companion.M_DISPATCH + TAG, "onArriveAt end location")
isDispatch = false
isArriveEnd = true
//到站,调度完成
receiverBean?.let {
//调度完成,同步云端,并且吐司提示
dispatchServiceModel.dispatchResultUpload(DISPATCH_COMPLETED, it.taskId)
ToastUtils.showLong("云调度完成,车辆即将到达${it.endLocAddress}")
}
}
}
/**
* 接口MEC反馈的常规信息MAP v2.5.0新增轨迹相关信息)
* @param guardianInfo
*/
override fun onAutopilotGuardian(guardianInfo: MogoReportMsg.MogoReportMessage?) {
if (guardianInfo == null || !guardianInfo.hasCode()) return
if ("ISYS_INIT_TRAJECTORY_START".equals(guardianInfo.getCode())){
Log.i(TAG,"onAutopilotGuardian ISYS_INIT_TRAJECTORY_START 轨迹管理_轨迹开始下载本地已有对应轨迹也触发")
}else if ("ISYS_INIT_TRAJECTORY_SUCCESS".equals(guardianInfo.getCode())){
Log.i(TAG,"onAutopilotGuardian ISYS_INIT_TRAJECTORY_SUCCESS 轨迹管理_轨迹下载成功本地已有对应轨迹也触发")
}else if ("ISYS_INIT_TRAJECTORY_FAILURE".equals(guardianInfo.getCode())){
Log.i(TAG,"onAutopilotGuardian ISYS_INIT_TRAJECTORY_FAILURE 轨迹管理_轨迹下载失败本地无对应轨迹")
}else if ("ISYS_INIT_TRAJECTORY_WARNING".equals(guardianInfo.getCode())){
Log.i(TAG,"onAutopilotGuardian ISYS_INIT_TRAJECTORY_WARNING 轨迹管理_轨迹下载失败本地有对应轨迹认为成功")
}else if ("ISYS_INIT_TRAJECTORY_TIMEOUT".equals(guardianInfo.getCode())){
Log.i(TAG,"onAutopilotGuardian ISYS_INIT_TRAJECTORY_TIMEOUT 轨迹管理_轨迹下载超时")
}
}
fun testDispatch(sceneType: Int) {
when (sceneType) {
0 -> testEZhouStart()
@@ -243,7 +359,10 @@ class DispatchAutoPilotManager private constructor() :
"AR453航班",
"你车需执行编号ca1098次航班的引导任务从A区A1到B区B1",
System.currentTimeMillis(),
ArrayList<MogoLatLng>()
ArrayList<MogoLatLng>(),
10,
1,
""
)
receiverBean = adasAutoPilotLocReceiverBean
CallerHmiManager.showDispatchDialog(adasAutoPilotLocReceiverBean)
@@ -265,7 +384,10 @@ class DispatchAutoPilotManager private constructor() :
"",
"",
System.currentTimeMillis(),
ArrayList<MogoLatLng>()
ArrayList<MogoLatLng>(),
10,
1,
""
)
receiverBean = adasAutoPilotLocReceiverBean
CallerHmiManager.showDispatchDialog(adasAutoPilotLocReceiverBean)
@@ -287,14 +409,19 @@ class DispatchAutoPilotManager private constructor() :
"",
"",
System.currentTimeMillis(),
ArrayList<MogoLatLng>()
ArrayList<MogoLatLng>(),
10,
1,
""
)
receiverBean = adasAutoPilotLocReceiverBean
CallerHmiManager.showDispatchDialog(adasAutoPilotLocReceiverBean)
}
private fun testDispatchResultUpload() {
dispatchServiceModel.dispatchResultUpload(DISPATCH_RESULT_AFFIRM)
receiverBean?.taskId?.let {
dispatchServiceModel.dispatchResultUpload(DISPATCH_RESULT_AFFIRM, it)
}
}
}

View File

@@ -23,6 +23,10 @@ class DispatchServiceModel private constructor() {
const val DISPATCH_RESULT_AFFIRM = 0
const val DISPATCH_RESULT_MANUAL_CANCEL = 1
const val DISPATCH_RESULT_TIMER_CANCEL = 2
const val DISPATCH_STOP_AFFIRM = 3 //云端终止指令-确认
const val DISPATCH_STOP_TIMER_CANCEL = 4 //云端终止指令-超时拒绝
const val DISPATCH_STOP_MANUAL_CANCEL = 5 //云端终止指令-手动拒绝
const val DISPATCH_COMPLETED = 6 //调度完成
val dispatchServiceModel by lazy(LazyThreadSafetyMode.SYNCHRONIZED) {
DispatchServiceModel()
@@ -111,6 +115,7 @@ class DispatchServiceModel private constructor() {
*/
fun dispatchResultUpload(
dispatchResultType: Int,
taskId: Long,
onSuccess: ((BaseData) -> Unit)? = null,
onError: ((String) -> Unit)? = null
) {
@@ -118,7 +123,8 @@ class DispatchServiceModel private constructor() {
val reportDispatchResult =
ReportDispatchResult(
sn,
dispatchResultType
dispatchResultType,
taskId
)
val map: MutableMap<String, Any> = HashMap()
map["sn"] = sn

View File

@@ -0,0 +1,81 @@
package com.mogo.eagle.core.function.hmi.ui.msgbox
import android.app.Activity
import android.content.Context
import android.util.AttributeSet
import android.view.LayoutInflater
import androidx.constraintlayout.widget.ConstraintLayout
import androidx.recyclerview.widget.LinearLayoutManager
import com.mogo.eagle.core.data.msgbox.MsgBoxBean
import com.mogo.eagle.core.data.msgbox.MsgBoxCountDownBean
import com.mogo.eagle.core.data.msgbox.MsgBoxType
import com.mogo.eagle.core.data.msgbox.MsgCategory
import com.mogo.eagle.core.function.api.datacenter.msgbox.IMsgBoxListener
import com.mogo.eagle.core.function.call.msgbox.CallerMsgBoxEventListenerManager
import com.mogo.eagle.core.function.call.msgbox.CallerMsgBoxListenerManager
import com.mogo.eagle.core.function.hmi.R
import com.mogo.eagle.core.function.hmi.ui.msgbox.adapter.BusPassengerMsgBoxBubbleAdapter
import com.mogo.eagle.core.function.msgbox.MsgBoxConfig
import com.mogo.eagle.core.utilcode.util.UiThreadHandler
import kotlinx.android.synthetic.main.layout_bus_passenegr_msg_box_bubble.view.*
class BusPassengerMsgBoxBubbleView @JvmOverloads constructor(
context: Context,
attrs: AttributeSet? = null,
defStyleAttr: Int = 0
) : ConstraintLayout(context, attrs, defStyleAttr), IMsgBoxListener {
private val TAG = "BusPassengerMsgBoxBubbleView"
private val dataList :ArrayList<MsgBoxCountDownBean> = ArrayList()
private var busPassengerMsgBoxBubbleAdapter: BusPassengerMsgBoxBubbleAdapter?= null
private var isShowData = true
init {
LayoutInflater.from(context).inflate(R.layout.layout_bus_passenegr_msg_box_bubble, this, true)
initView()
}
private fun initView(){
val linearLayoutManager = LinearLayoutManager(context)
linearLayoutManager.orientation = LinearLayoutManager.VERTICAL
busPassengerMsgBoxBubbleAdapter = BusPassengerMsgBoxBubbleAdapter(context as Activity)
rvBusBoxBubbleList.adapter =busPassengerMsgBoxBubbleAdapter
rvBusBoxBubbleList.layoutManager = linearLayoutManager
}
/**
* 是否展示接收消息,消息盒子打开状态下不再展示气泡消息
* @param show true 展示false 不展示
*/
fun isShowData(show: Boolean){
isShowData = show
}
override fun onDataChanged(category: MsgCategory, msgBoxList: MsgBoxBean){
UiThreadHandler.post{
if(category == MsgCategory.NOTICE){
if(msgBoxList.type == MsgBoxType.NOTICE || msgBoxList.type == MsgBoxType.V2X
|| msgBoxList.type == MsgBoxType.OBU || msgBoxList.type == MsgBoxType.OPERATION){
MsgBoxConfig.noticeList.add(msgBoxList)
if(isShowData){
CallerMsgBoxEventListenerManager.invokeUpdateTipListener(true)
val msgBoxCountDownBean = MsgBoxCountDownBean(msgBoxList)
dataList.add(msgBoxCountDownBean)
busPassengerMsgBoxBubbleAdapter?.setData(dataList)
}
}
}
}
}
override fun onAttachedToWindow() {
super.onAttachedToWindow()
CallerMsgBoxListenerManager.addListener(TAG,this)
}
override fun onDetachedFromWindow() {
super.onDetachedFromWindow()
CallerMsgBoxListenerManager.removeListener(TAG)
}
}

View File

@@ -0,0 +1,136 @@
package com.mogo.eagle.core.function.hmi.ui.msgbox.adapter
import android.app.Activity
import android.os.CountDownTimer
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import android.widget.ImageView
import android.widget.TextView
import androidx.recyclerview.widget.RecyclerView
import com.mogo.eagle.core.data.enums.EventTypeEnumNew
import com.mogo.eagle.core.data.msgbox.*
import com.mogo.eagle.core.function.call.msgbox.CallerMsgBoxManager
import com.mogo.eagle.core.function.hmi.R
import com.mogo.eagle.core.utilcode.util.TimeUtils
import com.mogo.eagle.core.utilcode.util.TimeUtils.getHourMinFormat
class BusPassengerMsgBoxBubbleAdapter(private val activity: Activity): RecyclerView.Adapter<RecyclerView.ViewHolder>() {
private var data: ArrayList<MsgBoxCountDownBean> ?= null
private val notice: Int = 1
private val v2x: Int = 2
private val operation: Int = 3
fun setData(data: ArrayList<MsgBoxCountDownBean>){
this.data = data
if(data.size>3){
data.removeAt(0)
}
notifyDataSetChanged()
}
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): RecyclerView.ViewHolder{
return when (viewType){
notice ->{
val view = LayoutInflater.from(parent.context).inflate(R.layout.item_bus_box_notice,parent,false)
BusBubbleNoticeHolder(view)
}
operation ->{
val view = LayoutInflater.from(parent.context).inflate(R.layout.item_bus_box_operation,parent,false)
BusBubbleOperationHolder(view)
}
else ->{
val view = LayoutInflater.from(parent.context).inflate(R.layout.item_bus_box_v2x,parent,false)
BusBubbleV2XHolder(view)
}
}
}
override fun onBindViewHolder(holder: RecyclerView.ViewHolder, position: Int){
when (holder){
is BusBubbleNoticeHolder -> {
data?.let{
val noticeFrCloudMsg = it[position].msgBoxBean.bean as NoticeFrCloudMsg
if(noticeFrCloudMsg.type == 0){
val noticeNormalData = noticeFrCloudMsg.noticeNormalData
holder.tvBusPNoticeTime.text = TimeUtils.millis2String(it[position].msgBoxBean.timestamp,getHourMinFormat())
holder.tvBusPNoticeContent.text = noticeNormalData?.content
}else{
val noticeTrafficStylePushData = noticeFrCloudMsg.trafficPushData
holder.tvBusPNoticeTime.text = TimeUtils.millis2String(it[position].msgBoxBean.timestamp,getHourMinFormat())
holder.tvBusPNoticeContent.text = noticeTrafficStylePushData?.content
}
}
}
is BusBubbleOperationHolder -> {
//运营消息
data?.let{
val operationMsg = it[position].msgBoxBean.bean as OperationMsg
holder.tvBusPOperationTime.text = TimeUtils.millis2String(it[position].msgBoxBean.timestamp,getHourMinFormat())
holder.tvBusPOperationContent.text = operationMsg.content
}
}
is BusBubbleV2XHolder -> {
data?.let{
val msgBoxBean = it[position]
val v2XMsg = msgBoxBean.msgBoxBean.bean as V2XMsg
holder.tvBusPV2XTime.text = TimeUtils.millis2String(it[position].msgBoxBean.timestamp,getHourMinFormat())
holder.tvBusPV2XContent.text = v2XMsg.content
holder.ivBusPV2XImage.setImageDrawable(activity.resources.getDrawable(
EventTypeEnumNew.getUpdateIconRes(v2XMsg.type)))
}
}
}
val msgBoxBean: MsgBoxCountDownBean = data!![position]
msgBoxBean.countDownTimer =object: CountDownTimer(CallerMsgBoxManager.getDismissTime(),CallerMsgBoxManager.getDismissTime()){
override fun onTick(p0: Long) {
}
override fun onFinish() {
data?.remove(msgBoxBean)
notifyDataSetChanged()
// notifyItemRemoved(index)
// notifyItemRangeChanged(index,recordTypeEntity.size-index)
}
}
msgBoxBean.countDownTimer?.start()
}
override fun getItemCount() = data?.size ?: 0
override fun getItemViewType(position: Int): Int{
return if(data!![position].msgBoxBean.type == MsgBoxType.NOTICE){
notice
}else if(data!![position].msgBoxBean.type == MsgBoxType.OPERATION){
operation
} else{
v2x
}
}
//Notice
class BusBubbleNoticeHolder(itemView: View): RecyclerView.ViewHolder(itemView){
var tvBusPNoticeTime: TextView = itemView.findViewById(R.id.tvBusPNoticeTime)
var tvBusPNoticeContent: TextView = itemView.findViewById(R.id.tvBusPNoticeContent)
}
//OBU、V2X
class BusBubbleV2XHolder(itemView: View): RecyclerView.ViewHolder(itemView){
var ivBusPV2XImage: ImageView = itemView.findViewById(R.id.ivBusPV2XImage)
var tvBusPV2XTime: TextView = itemView.findViewById(R.id.tvBusPV2XTime)
var tvBusPV2XContent: TextView = itemView.findViewById(R.id.tvBusPV2XContent)
}
//运营消息
class BusBubbleOperationHolder(itemView: View): RecyclerView.ViewHolder(itemView){
var tvBusPOperationTime: TextView = itemView.findViewById(R.id.tvBusPOperationTime)
var tvBusPOperationContent: TextView = itemView.findViewById(R.id.tvBusPOperationContent)
}
}

View File

@@ -21,6 +21,10 @@ public class DispatchCarsDialog extends DispatchBaseDialog {
private final TextView tvTimer;
private final TextView tvLoc;
private final TextView tvAdasDispatchTitle;
private final TextView tvAdasDispatchRemindContent;
private int dispatchType = 1;//调度类型1启动 2停止
private final Handler handler = new Handler() {
@Override
@@ -44,21 +48,40 @@ public class DispatchCarsDialog extends DispatchBaseDialog {
setCanceledOnTouchOutside(false);
tvTimer = findViewById(R.id.module_adas_dispatch_remind_timer);
tvLoc = findViewById(R.id.module_adas_dispatch_remind_loc);
Button btnAffirm = (Button) findViewById(R.id.module_adas_dispatch_remind_affirm);
Button btnCancel = (Button) findViewById(R.id.module_adas_dispatch_remind_cancel);
tvAdasDispatchTitle = findViewById(R.id.tv_adas_dispatch_title);
tvAdasDispatchRemindContent = findViewById(R.id.tv_adas_dispatch_remind_content);
Button btnAffirm = findViewById(R.id.module_adas_dispatch_remind_affirm);
Button btnCancel = findViewById(R.id.module_adas_dispatch_remind_cancel);
tvTimer.setText(String.valueOf(TIMER));
btnAffirm.setOnClickListener(v -> {
CallerFuncBizManager.getBizProvider().dispatchAffirm();
if(dispatchType == 1){
//开始调度确认
CallerFuncBizManager.getBizProvider().dispatchAffirm();
}else if(dispatchType == 2){
//停止调度确认
CallerFuncBizManager.getBizProvider().stopDispatchAffirm();
}
dismissDialog();
});
btnCancel.setOnClickListener(v -> {
CallerFuncBizManager.getBizProvider().dispatchCancel(true);
if(dispatchType == 1){
//开始调度手动取消
CallerFuncBizManager.getBizProvider().dispatchCancel(true);
}else if(dispatchType == 2){
//停止调度手动取消
CallerFuncBizManager.getBizProvider().stopDispatchCancel(true);
}
dismissDialog();
});
}
private void hideDialog() {
CallerFuncBizManager.getBizProvider().dispatchCancel(false);
if(dispatchType == 1){
//开始调度自动取消
CallerFuncBizManager.getBizProvider().dispatchCancel(false);
}else if(dispatchType == 2){
CallerFuncBizManager.getBizProvider().stopDispatchCancel(false);
}
dismissDialog();
}
@@ -74,6 +97,12 @@ public class DispatchCarsDialog extends DispatchBaseDialog {
return;
}
show();
if(dispatchContent.getType() == 2){
//取消调度
tvAdasDispatchTitle.setText("调度取消确认");
tvAdasDispatchRemindContent.setText("车辆将取消到以下位置的自动驾驶");
}
dispatchType = dispatchContent.getType();
handler.sendEmptyMessage(MSG_TYPE_TIMER);
tvLoc.setText(dispatchContent.getEndLocAddress());
}

View File

@@ -54,15 +54,17 @@ public class DispatchDialogManager {
}
private void dispatchHengYang(DispatchAdasAutoPilotLocReceiverBean msgData) {
if (msgData.getType() == DISPATCH_TYPE_START) { //衡阳只有开始调度
if (dialog != null && dialog.isShowing()) { //避免下发两次
return;
}
if (dialog == null) {
dialog = new DispatchCarsDialog(mContext);
}
dialog.showDialog(msgData);
// if (msgData.getType() == DISPATCH_TYPE_START) { //衡阳只有开始调度
// }
//开始、取消调度
if (dialog != null && dialog.isShowing()) { //避免下发两次
return;
}
if (dialog == null) {
dialog = new DispatchCarsDialog(mContext);
}
dialog.showDialog(msgData);
}
private void dispatchEZhou(DispatchAdasAutoPilotLocReceiverBean msgData) {

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.3 KiB

View File

@@ -19,6 +19,7 @@
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/tv_adas_dispatch_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/module_services_dispatch_cars_dialog_title_margin_top"
@@ -30,6 +31,7 @@
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/tv_adas_dispatch_remind_content"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/module_services_dispatch_cars_dialog_content_margin_top"

View File

@@ -0,0 +1,52 @@
<?xml version="1.0" encoding="utf-8"?>
<com.mogo.eagle.core.widget.RoundConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="@dimen/dp_637"
android:layout_height="@dimen/dp_160"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:background="#E3ECFE"
app:roundLayoutRadius="@dimen/dp_30"
android:layout_marginTop="@dimen/dp_12"
android:layout_marginBottom="@dimen/dp_12"
>
<ImageView
android:id="@+id/ivBusPNoticeImage"
android:layout_width="@dimen/dp_107"
android:layout_height="@dimen/dp_107"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
android:src="@drawable/icon_bus_passenger_logo"
android:layout_marginStart="@dimen/dp_26"
/>
<TextView
android:id="@+id/tvBusPNoticeTime"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="#991A273F"
android:textSize="@dimen/dp_36"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintRight_toRightOf="parent"
android:layout_marginEnd="@dimen/dp_26"
/>
<TextView
android:id="@+id/tvBusPNoticeContent"
android:layout_width="0dp"
android:layout_height="wrap_content"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toRightOf="@id/ivBusPNoticeImage"
app:layout_constraintRight_toLeftOf="@id/tvBusPNoticeTime"
android:layout_marginStart="@dimen/dp_26"
android:layout_marginEnd="@dimen/dp_16"
android:textColor="#FF203555"
android:textSize="@dimen/dp_36"
android:gravity="start"
android:maxLines="3"
android:ellipsize="end"
/>
</com.mogo.eagle.core.widget.RoundConstraintLayout>

View File

@@ -0,0 +1,52 @@
<?xml version="1.0" encoding="utf-8"?>
<com.mogo.eagle.core.widget.RoundConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="@dimen/dp_637"
android:layout_height="@dimen/dp_160"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:background="#E3ECFE"
app:roundLayoutRadius="@dimen/dp_30"
android:layout_marginTop="@dimen/dp_12"
android:layout_marginBottom="@dimen/dp_12"
>
<ImageView
android:id="@+id/ivBusPOperationImage"
android:layout_width="@dimen/dp_107"
android:layout_height="@dimen/dp_107"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
android:src="@drawable/icon_bus_passenger_logo"
android:layout_marginStart="@dimen/dp_26"
/>
<TextView
android:id="@+id/tvBusPOperationTime"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="#991A273F"
android:textSize="@dimen/dp_36"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintRight_toRightOf="parent"
android:layout_marginEnd="@dimen/dp_26"
/>
<TextView
android:id="@+id/tvBusPOperationContent"
android:layout_width="0dp"
android:layout_height="wrap_content"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toRightOf="@id/ivBusPOperationImage"
app:layout_constraintRight_toLeftOf="@id/tvBusPOperationTime"
android:layout_marginStart="@dimen/dp_26"
android:layout_marginEnd="@dimen/dp_16"
android:textColor="#FF203555"
android:textSize="@dimen/dp_36"
android:gravity="start"
android:maxLines="3"
android:ellipsize="end"
/>
</com.mogo.eagle.core.widget.RoundConstraintLayout>

View File

@@ -0,0 +1,52 @@
<?xml version="1.0" encoding="utf-8"?>
<com.mogo.eagle.core.widget.RoundConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="@dimen/dp_637"
android:layout_height="@dimen/dp_160"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:background="#E3ECFE"
app:roundLayoutRadius="@dimen/dp_30"
android:layout_marginTop="@dimen/dp_12"
android:layout_marginBottom="@dimen/dp_12"
>
<ImageView
android:id="@+id/ivBusPV2XImage"
android:layout_width="@dimen/dp_107"
android:layout_height="@dimen/dp_107"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
android:layout_marginStart="@dimen/dp_26"
/>
<TextView
android:id="@+id/tvBusPV2XTime"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="#991A273F"
android:textSize="@dimen/dp_36"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintRight_toRightOf="parent"
android:layout_marginEnd="@dimen/dp_26"
/>
<TextView
android:id="@+id/tvBusPV2XContent"
android:layout_width="0dp"
android:layout_height="wrap_content"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toRightOf="@id/ivBusPV2XImage"
app:layout_constraintRight_toLeftOf="@id/tvBusPV2XTime"
android:layout_marginStart="@dimen/dp_26"
android:layout_marginEnd="@dimen/dp_16"
android:textColor="#FF203555"
android:textSize="@dimen/dp_36"
android:gravity="start"
android:maxLines="1"
android:ellipsize="end"
/>
</com.mogo.eagle.core.widget.RoundConstraintLayout>

View File

@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.recyclerview.widget.RecyclerView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/rvBusBoxBubbleList"
android:layout_width="@dimen/dp_637"
android:layout_height="wrap_content"
>
</androidx.recyclerview.widget.RecyclerView>

View File

@@ -29,7 +29,31 @@ public class DispatchAdasAutoPilotLocReceiverBean {
private long systemTime;
private List<MogoLatLng> stopsList;
public DispatchAdasAutoPilotLocReceiverBean(int source, int type, String poiId, double startLat, double startLon, String startLocAddress, double endLat, double endLon, String endLocAddress, String taskTime, String flightInfo, String taskInfo, long systemTime, List<MogoLatLng> stopsList) {
private long taskId; //任务调度记录的ID
private int lineId; //路线Id
private String lineName; //路线名称
private String trajUrl;
private String trajMd5;
private String stopUrl;
private String stopMd5;
private long timestamp;
private String vehicleModel;
private String trajUrl_dpqp;//轨迹文件下载的cos url默认“”
private String trajMd5_dpqp;//轨迹文件md5默认“”
private String stopUrl_dpqp;//打点文件下载的cos url默认“”
private String stopMd5_dpqp;//轨迹文件md5默认“”
private long timestamp_dpqp;//上传轨迹完成时间戳(ms)用于MEC本地手动导入轨迹验证时不会被云端轨迹覆盖
public DispatchAdasAutoPilotLocReceiverBean(int source, int type, String poiId, double startLat,
double startLon, String startLocAddress, double endLat,
double endLon, String endLocAddress, String taskTime,
String flightInfo, String taskInfo, long systemTime,
List<MogoLatLng> stopsList, long taskId, int lineId,
String lineName, String trajUrl, String trajMd5,
String stopUrl, String stopMd5, long timestamp,
String vehicleModel, String trajUrl_dpqp, String trajMd5_dpqp,
String stopUrl_dpqp, String stopMd5_dpqp, long timestamp_dpqp) {
this.source = source;
this.type = type;
this.poiId = poiId;
@@ -44,6 +68,43 @@ public class DispatchAdasAutoPilotLocReceiverBean {
this.taskInfo = taskInfo;
this.systemTime = systemTime;
this.stopsList = stopsList;
this.taskId = taskId;
this.lineId = lineId;
this.lineName = lineName;
this.trajUrl = trajUrl;
this.trajMd5 = trajMd5;
this.stopUrl = stopUrl;
this.stopMd5 = stopMd5;
this.timestamp = timestamp;
this.vehicleModel = vehicleModel;
this.trajUrl_dpqp = trajUrl_dpqp;
this.trajMd5_dpqp = trajMd5_dpqp;
this.stopUrl_dpqp = stopUrl_dpqp;
this.stopMd5_dpqp = stopMd5_dpqp;
this.timestamp_dpqp = timestamp_dpqp;
}
public DispatchAdasAutoPilotLocReceiverBean(int source, int type, String poiId, double startLat, double startLon, String startLocAddress,
double endLat, double endLon, String endLocAddress, String taskTime, String flightInfo,
String taskInfo, long systemTime, List<MogoLatLng> stopsList,
long taskId, int lineId, String lineName) {
this.source = source;
this.type = type;
this.poiId = poiId;
this.startLat = startLat;
this.startLon = startLon;
this.startLocAddress = startLocAddress;
this.endLat = endLat;
this.endLon = endLon;
this.endLocAddress = endLocAddress;
this.taskTime = taskTime;
this.flightInfo = flightInfo;
this.taskInfo = taskInfo;
this.systemTime = systemTime;
this.stopsList = stopsList;
this.taskId = taskId;
this.lineId = lineId;
this.lineName = lineName;
}
public int getSource() {
@@ -158,6 +219,118 @@ public class DispatchAdasAutoPilotLocReceiverBean {
this.stopsList = stopsList;
}
public long getTaskId(){
return taskId;
}
public void setTaskId(long taskId){
this.taskId = taskId;
}
public int getLineId(){
return lineId;
}
public void setLineId(int lineId){
this.lineId =lineId;
}
public String getLineName(){
return lineName;
}
public void setLineName(String lineName){
this.lineName = lineName;
}
public String getTrajUrl() {
return trajUrl;
}
public void setTrajUrl(String trajUrl) {
this.trajUrl = trajUrl;
}
public String getTrajMd5() {
return trajMd5;
}
public void setTrajMd5(String trajMd5) {
this.trajMd5 = trajMd5;
}
public String getStopUrl() {
return stopUrl;
}
public void setStopUrl(String stopUrl) {
this.stopUrl = stopUrl;
}
public String getStopMd5() {
return stopMd5;
}
public void setStopMd5(String stopMd5) {
this.stopMd5 = stopMd5;
}
public long getTimestamp() {
return timestamp;
}
public void setTimestamp(long timestamp) {
this.timestamp = timestamp;
}
public String getVehicleModel() {
return vehicleModel;
}
public void setVehicleModel(String vehicleModel) {
this.vehicleModel = vehicleModel;
}
public String getTrajUrl_dpqp() {
return trajUrl_dpqp;
}
public void setTrajUrl_dpqp(String trajUrl_dpqp) {
this.trajUrl_dpqp = trajUrl_dpqp;
}
public String getTrajMd5_dpqp() {
return trajMd5_dpqp;
}
public void setTrajMd5_dpqp(String trajMd5_dpqp) {
this.trajMd5_dpqp = trajMd5_dpqp;
}
public String getStopUrl_dpqp() {
return stopUrl_dpqp;
}
public void setStopUrl_dpqp(String stopUrl_dpqp) {
this.stopUrl_dpqp = stopUrl_dpqp;
}
public String getStopMd5_dpqp() {
return stopMd5_dpqp;
}
public void setStopMd5_dpqp(String stopMd5_dpqp) {
this.stopMd5_dpqp = stopMd5_dpqp;
}
public long getTimestamp_dpqp() {
return timestamp_dpqp;
}
public void setTimestamp_dpqp(long timestamp_dpqp) {
this.timestamp_dpqp = timestamp_dpqp;
}
@Override
public String toString() {
return "DispatchAdasAutoPilotLocReceiverBean{" +
@@ -175,6 +348,20 @@ public class DispatchAdasAutoPilotLocReceiverBean {
", taskInfo='" + taskInfo + '\'' +
", systemTime=" + systemTime +
", stopsList=" + stopsList +
", taskId=" + taskId +
", lineId=" + lineId +
", lineName='" + lineName + '\'' +
", trajUrl='" + trajUrl + '\'' +
", trajMd5='" + trajMd5 + '\'' +
", stopUrl='" + stopUrl + '\'' +
", stopMd5='" + stopMd5 + '\'' +
", timestamp=" + timestamp +
", vehicleModel='" + vehicleModel + '\'' +
", trajUrl_dpqp='" + trajUrl_dpqp + '\'' +
", trajMd5_dpqp='" + trajMd5_dpqp + '\'' +
", stopUrl_dpqp='" + stopUrl_dpqp + '\'' +
", stopMd5_dpqp='" + stopMd5_dpqp + '\'' +
", timestamp_dpqp=" + timestamp_dpqp +
'}';
}
}

View File

@@ -4,10 +4,12 @@ public class ReportDispatchResult {
private String sn;
private int dispatchResult;
private long taskId;
public ReportDispatchResult(String sn, int dispatchResult) {
public ReportDispatchResult(String sn, int dispatchResult,long taskId) {
this.sn = sn;
this.dispatchResult = dispatchResult;
this.taskId = taskId;
}
public String getSn() {
@@ -26,11 +28,20 @@ public class ReportDispatchResult {
this.dispatchResult = dispatchResult;
}
public long getTaskId() {
return taskId;
}
public void setTaskId(long taskId) {
this.taskId = taskId;
}
@Override
public String toString() {
return "ReportDispatchResult{" +
"sn='" + sn + '\'' +
", dispatchResult=" + dispatchResult +
", dispatchResult=" + dispatchResult + '\''+
", taskId=" + taskId +
'}';
}
}

View File

@@ -29,12 +29,23 @@ interface IMoGoFuncBizProvider : IMoGoFunctionServerProvider {
*/
fun dispatchAffirm()
/**
* 停止调度确认
*/
fun stopDispatchAffirm()
/**
* 调度取消
* @param manualTrigger 是否手动
*/
fun dispatchCancel(manualTrigger: Boolean)
/**
* 停止调度取消
* @param manualTrigger 是否手动
*/
fun stopDispatchCancel(manualTrigger: Boolean)
/**
* 调度测试
*/

View File

@@ -63,7 +63,7 @@ BIZCONFIG_VERSION=1.3.2
SERVICE_BIZ_VERSION=1.2.4
################ 外部依赖引用 ################
# loglib
LOGLIB_VERSION=1.5.11
LOGLIB_VERSION=1.5.22
######## MogoAiCloudSDK Version ########
# 网络请求LOGLIB_VERSION
MOGO_NETWORK_VERSION=1.4.6.4
@@ -93,8 +93,8 @@ WEBSOCKET_VERSION=1.1.7
applicationId=com.mogo.launcer
applicationName=IntelligentPilot
# RoboBus司机端2.5.1RoboTaxi司机端2.5.1RoboTaxi乘客端1.0.0
versionCode=1002000
versionName=1.0.2
versionCode=3000000
versionName=3.0.0
################# 新架构模块Maven版本管理 #################
MOGO_CORE_FUNCTION_HMI_VERSION=0.0.58.10