Merge branch 'dev_robotaxi-d-app-module_290_220715_2.9.0' into 'test_robotaxi-d-app-module_290_220715_2.9.0.1'
Dev robotaxi d app module 290 220715 2.9.0 See merge request zhjt/AndroidApp/MoGoEagleEye!111
This commit is contained in:
@@ -385,20 +385,26 @@ public class BusPassengerModel {
|
||||
//找出前往站对应的轨迹点,拿出两站点的集合
|
||||
CallerLogger.INSTANCE.d(M_BUS_P + TAG, "mRoutePoints.size() = " + mRoutePoints.size());
|
||||
if (mRoutePoints.size() > 0) {
|
||||
if (mNextStationIndex <= mStations.size()-1 && mNextStationIndex - 1 >=0){
|
||||
if (mStations.size() > 2){ //两个站点以上要计算两个站点间的估计路线
|
||||
if (mNextStationIndex <= mStations.size()-1 && mNextStationIndex - 1 >=0){
|
||||
mTwoStationsRouts.clear();
|
||||
BusPassengerStation stationNext = mStations.get(mNextStationIndex);
|
||||
BusPassengerStation stationCur = mStations.get(mNextStationIndex - 1);
|
||||
//当前站在轨迹中对应的点
|
||||
int currentRouteIndex = CoordinateCalculateRouteUtil.getArrivedPointIndex(mRoutePoints
|
||||
,stationCur.getGcjLon(),stationCur.getGcjLat());
|
||||
//要前往的站在轨迹中对应的点
|
||||
int nextRouteIndex = CoordinateCalculateRouteUtil.getArrivedPointIndex(mRoutePoints
|
||||
,stationNext.getGcjLon(),stationNext.getGcjLat());
|
||||
mTwoStationsRouts.addAll(mRoutePoints.subList(currentRouteIndex,nextRouteIndex));
|
||||
}
|
||||
}else { //只有两个站点的时候整个路线就是两个站点之间的轨迹
|
||||
mTwoStationsRouts.clear();
|
||||
BusPassengerStation stationNext = mStations.get(mNextStationIndex);
|
||||
BusPassengerStation stationCur = mStations.get(mNextStationIndex - 1);
|
||||
//当前站在轨迹中对应的点
|
||||
int currentRouteIndex = CoordinateCalculateRouteUtil.getArrivedPointIndex(mRoutePoints
|
||||
,stationCur.getGcjLon(),stationCur.getGcjLat());
|
||||
//要前往的站在轨迹中对应的点
|
||||
int nextRouteIndex = CoordinateCalculateRouteUtil.getArrivedPointIndex(mRoutePoints
|
||||
,stationNext.getGcjLon(),stationNext.getGcjLat());
|
||||
mTwoStationsRouts.addAll(mRoutePoints.subList(currentRouteIndex,nextRouteIndex));
|
||||
mTwoStationsRouts.addAll(mRoutePoints);
|
||||
}
|
||||
if (mTwoStationsRouts.size() > 0){
|
||||
float sumLength = CoordinateCalculateRouteUtil.calculateRouteSumLength(mTwoStationsRouts);
|
||||
SharedPrefsMgr.getInstance(mContext).putInt(BusPassengerConst.BUS_SP_KEY_ORDER_SUM_DIS,(int) sumLength);
|
||||
|
||||
if (mAutopilotPlanningCallback != null){
|
||||
mAutopilotPlanningCallback.updateTotalDistance();
|
||||
}
|
||||
|
||||
@@ -74,7 +74,6 @@ import com.mogo.eagle.core.utilcode.kotlin.*
|
||||
import com.mogo.eagle.core.utilcode.mogo.AppIdentityModeUtils
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.*
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_HMI
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_V2X
|
||||
import com.mogo.eagle.core.utilcode.mogo.toast.TipToast
|
||||
import com.mogo.eagle.core.utilcode.reminder.*
|
||||
import com.mogo.eagle.core.utilcode.reminder.api.*
|
||||
@@ -144,9 +143,9 @@ import java.util.*
|
||||
|
||||
private var adUpgradeDialog: AdUpgradeDialog?=null
|
||||
|
||||
private var speakJob: Job? = null
|
||||
private var lastSpeakJob: Job? = null
|
||||
|
||||
private var showV2XJob: Job? = null
|
||||
private var lastShowV2XJob: Job? = null
|
||||
|
||||
private var showingV2XTip: IReminder? = null
|
||||
private var roadVideoDialog: RoadVideoDialog? = null
|
||||
@@ -633,8 +632,6 @@ import java.util.*
|
||||
}
|
||||
}) {
|
||||
override fun show() {
|
||||
showV2XJob?.safeCancel()
|
||||
speakJob?.safeCancel()
|
||||
val parent = it.window.decorView
|
||||
parent.doOnAttach {
|
||||
Log.d("$M_HMI$TAG", "--- show v2x dialog 2 ---: info -> v2x-type: $v2xType : expireTime: $expireTime")
|
||||
@@ -644,15 +641,21 @@ import java.util.*
|
||||
override fun isOverride(): Boolean {
|
||||
return true
|
||||
}
|
||||
|
||||
override fun key(): String {
|
||||
return v2xType
|
||||
}
|
||||
}, object : IStateChangeListener {
|
||||
|
||||
override fun onShow(reminder: IReminder) {
|
||||
listener?.onShow()
|
||||
lastShowV2XJob?.safeCancel()
|
||||
lastSpeakJob?.safeCancel()
|
||||
showingV2XTip = reminder
|
||||
lifecycleScope.launch {
|
||||
delay(expireTime)
|
||||
}.also { itx ->
|
||||
showV2XJob = itx
|
||||
lastShowV2XJob = itx
|
||||
}.invokeOnCompletion { _ ->
|
||||
reminder.hide()
|
||||
}
|
||||
@@ -660,7 +663,7 @@ import java.util.*
|
||||
lifecycleScope.launch {
|
||||
speak(it, ttsContent)
|
||||
}.also { itx ->
|
||||
speakJob = itx
|
||||
lastSpeakJob = itx
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user