[fea]
[bus routing 信息传递]
This commit is contained in:
yangyakun
2025-05-29 09:51:00 +08:00
parent cb0b6aba3b
commit ec187cd2ac
2 changed files with 27 additions and 10 deletions

View File

@@ -4,10 +4,11 @@ import androidx.lifecycle.ViewModel
import com.mogo.commons.AbsMogoApplication
import com.mogo.commons.module.status.MogoStatusManager
import com.mogo.eagle.core.data.BaseData
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.och.CallerEagleBaseFunctionCall4OchManager
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_BUS
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_OCHCOMMON
import com.mogo.eagle.core.utilcode.util.GsonUtils
import com.mogo.eagle.core.utilcode.util.NetworkUtils
@@ -126,6 +127,10 @@ class TaskRunningModel : ViewModel() {
LineManager.setStartAndEndStation(startStation, endStation)
this.viewCallback?.notifyItemChange(currentIndex)
this.viewCallback?.showArriverStationAndCompleteTask()
if (CallerAutoPilotStatusListenerManager.getState() == IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_RUNNING
) {
LineManager.startAutopilot()
}
}
}

View File

@@ -403,8 +403,8 @@ object LineManager : CallerBase<ILineCallback>() {
parameters?.routeName = lineInfo.lineName
parameters?.startName = start.name ?: ""
parameters?.endName = end.name ?: ""
parameters?.startLatLon = AutoPilotLonLat(start.lat, start.lon)
parameters?.endLatLon = AutoPilotLonLat(end.lat, end.lon)
parameters?.startLatLon = AutoPilotLonLat(start.lat, start.lon,true)
parameters?.endLatLon = AutoPilotLonLat(end.lat, end.lon,true)
if (AppIdentityModeUtils.isTaxi(FunctionBuildConfig.appIdentityMode)) {
parameters?.vehicleType = 9
} else {
@@ -465,10 +465,10 @@ object LineManager : CallerBase<ILineCallback>() {
parameters.routeName = lineInfos?.lineName?:""
lineInfos?.siteInfos?.let {
if(it.size>=0){
parameters.startLatLon = AutoPilotLonLat(it.first().lat, it.first().lon)
parameters.endLatLon = AutoPilotLonLat(it[1].lat, it[1].lon)
parameters.startLatLon = AutoPilotLonLat(it.first().lat, it.first().lon,true)
parameters.endLatLon = AutoPilotLonLat(it.last().lat, it.last().lon,true)
parameters.startName = it.first().name ?: ""
parameters.endName = it[1].name ?: ""
parameters.endName = it.last().name ?: ""
}
}
if (AppIdentityModeUtils.isTaxi(FunctionBuildConfig.appIdentityMode)) {
@@ -497,12 +497,24 @@ object LineManager : CallerBase<ILineCallback>() {
0L
)
}
if(contraiInfo!=null) {
val (wayLatLons, blackLatLons) = contraiInfo!!.getWayBlackLatLons()
parameters.wayLatLons = wayLatLons
parameters.blackLatLons = blackLatLons
val wayLatLons = mutableListOf<AutoPilotLonLat>()
val blackLatLons = mutableListOf<AutoPilotLonLat>()
lineInfos?.siteInfos?.forEachIndexed { index, site ->
if(index>0){
val (wayLatLonsSite, blackLatLonsSite) = site.getWayBlackLatLons()
wayLatLons.addAll(wayLatLonsSite)
blackLatLons.addAll(blackLatLonsSite)
if(index!=lineInfos!!.siteInfos.size-1) {
wayLatLons.add(AutoPilotLonLat(site.lat, site.lon, true))
}
}
}
parameters.wayLatLons = wayLatLons
parameters.blackLatLons = blackLatLons
CallerLogger.d(TAG, "从轨迹获取经停点和禁行点")
return parameters