Merge branch 'dev_robotaxi-d_230912_6.1.0' into dev_minibus-d_230926_6.1.0
This commit is contained in:
@@ -14,12 +14,14 @@ inspect java and kotlin codes:
|
||||
- source change_java_version
|
||||
artifacts:
|
||||
name: "${CI_JOB_STAGE}_reports_${CI_PROJECT_NAME}_$CI_COMMIT_REF_SLUG"
|
||||
when: on_failure
|
||||
when: always
|
||||
expire_in: 1 days
|
||||
paths:
|
||||
- "build/reports/*"
|
||||
only:
|
||||
- "dev_robotaxi-d_230912_6.1.0"
|
||||
- $CI_COMMIT_BRANCH
|
||||
- pushes
|
||||
- schedules
|
||||
except:
|
||||
- master
|
||||
allow_failure: true
|
||||
|
||||
@@ -22,6 +22,7 @@ import com.amap.api.navi.model.AimLessModeCongestionInfo;
|
||||
import com.amap.api.navi.model.AimLessModeStat;
|
||||
import com.amap.api.navi.model.NaviInfo;
|
||||
import com.amap.api.navi.model.NaviLatLng;
|
||||
import com.mogo.commons.AbsMogoApplication;
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger;
|
||||
import com.mogo.eagle.core.utilcode.util.NetworkUtils;
|
||||
import com.mogo.och.common.module.utils.PermissionUtil;
|
||||
@@ -39,7 +40,6 @@ public class AmapNaviToDestinationModel implements AMapNaviListener {
|
||||
|
||||
public static final String TAG = "NaviToDestinationModel";
|
||||
|
||||
private static Context mContext;
|
||||
private AMapNavi mAMapNavi = null;
|
||||
protected final List<NaviLatLng> sList = new ArrayList<NaviLatLng>();
|
||||
protected final List<NaviLatLng> eList = new ArrayList<NaviLatLng>();
|
||||
@@ -49,7 +49,6 @@ public class AmapNaviToDestinationModel implements AMapNaviListener {
|
||||
private boolean isPlay;
|
||||
|
||||
public static AmapNaviToDestinationModel getInstance(Context context) {
|
||||
mContext = context;
|
||||
return SingletonHolder.INSTANCE;
|
||||
}
|
||||
|
||||
@@ -62,7 +61,8 @@ public class AmapNaviToDestinationModel implements AMapNaviListener {
|
||||
|
||||
public void initAMapNavi(NaviLatLng startLatLng, NaviLatLng endLatLng) {
|
||||
try {
|
||||
mAMapNavi = AMapNavi.getInstance(mContext);
|
||||
CallerLogger.i( TAG, "initAMapNavi()");
|
||||
mAMapNavi = AMapNavi.getInstance(AbsMogoApplication.getApp());
|
||||
mAMapNavi.addAMapNaviListener(this);
|
||||
mAMapNavi.setUseInnerVoice(true, true);
|
||||
sList.add(startLatLng);
|
||||
@@ -88,6 +88,7 @@ public class AmapNaviToDestinationModel implements AMapNaviListener {
|
||||
|
||||
public void destroyAmaNavi() {
|
||||
if (mAMapNavi != null) {
|
||||
CallerLogger.i( TAG, "destroyAmaNavi()");
|
||||
isPlay = false;
|
||||
sList.clear();
|
||||
eList.clear();
|
||||
@@ -104,7 +105,7 @@ public class AmapNaviToDestinationModel implements AMapNaviListener {
|
||||
|
||||
@Override
|
||||
public void onInitNaviFailure() {
|
||||
Toast.makeText(mContext, "init navi Failed", Toast.LENGTH_SHORT).show();
|
||||
Toast.makeText(AbsMogoApplication.getApp(), "init navi Failed", Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -141,8 +142,8 @@ public class AmapNaviToDestinationModel implements AMapNaviListener {
|
||||
@Override
|
||||
public void onNaviInfoUpdate(NaviInfo naviinfo) {
|
||||
//导航过程中的信息更新,请看NaviInfo的具体说明
|
||||
CallerLogger.i( TAG, "距离=" + naviinfo.getPathRetainDistance() + ", 剩余时间 " + naviinfo.getPathRetainTime());
|
||||
if (null != mNaviChangedCallback) {
|
||||
CallerLogger.i(M_TAXI + TAG, "距离=" + naviinfo.getPathRetainDistance() + ", 剩余时间 " + naviinfo.getPathRetainTime());
|
||||
mNaviChangedCallback.onCurrentNaviDistAndTimeChanged(naviinfo.getPathRetainDistance(), naviinfo.getPathRetainTime());// 米、秒
|
||||
}
|
||||
}
|
||||
@@ -162,14 +163,14 @@ public class AmapNaviToDestinationModel implements AMapNaviListener {
|
||||
mNaviChangedCallback.reInitNaviAmap(isPlay, true);
|
||||
}
|
||||
}
|
||||
if (!NetworkUtils.isConnected(mContext) || result.getErrorCode() == 2) {
|
||||
if (!NetworkUtils.isConnected(AbsMogoApplication.getApp()) || result.getErrorCode() == 2) {
|
||||
ToastCharterUtils.showToastShort("网络异常,请重试");
|
||||
if (mNaviChangedCallback != null) {
|
||||
mNaviChangedCallback.reInitNaviAmap(isPlay, false);
|
||||
}
|
||||
return;
|
||||
}
|
||||
if (!PermissionUtil.isLocServiceEnable(mContext) || !PermissionUtil.checkPermission(mContext, new String[]{Manifest.permission.ACCESS_FINE_LOCATION})) {
|
||||
if (!PermissionUtil.isLocServiceEnable(AbsMogoApplication.getApp()) || !PermissionUtil.checkPermission(AbsMogoApplication.getApp(), new String[]{Manifest.permission.ACCESS_FINE_LOCATION})) {
|
||||
ToastCharterUtils.showToastShort("请开启车机定位后重试");
|
||||
if (mNaviChangedCallback != null) {
|
||||
mNaviChangedCallback.reInitNaviAmap(isPlay, false);
|
||||
|
||||
@@ -343,15 +343,20 @@ public class TaxiBeingServerdOrdersFragment extends BaseTaxiUIFragment
|
||||
}
|
||||
|
||||
private void startNaviToStation(boolean isVoicePlay, double stationLat, double stationLng) {
|
||||
AmapNaviToDestinationModel.getInstance(getContext()).destroyAmaNavi();
|
||||
UiThreadHandler.post(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
AmapNaviToDestinationModel.getInstance(getContext()).destroyAmaNavi();
|
||||
|
||||
double mCurLatitude = CallerChassisLocationGCJ02ListenerManager.INSTANCE.getChassisLocationGCJ02().getLatitude();
|
||||
double mCurLongitude =CallerChassisLocationGCJ02ListenerManager.INSTANCE.getChassisLocationGCJ02().getLongitude();
|
||||
double mCurLatitude = CallerChassisLocationGCJ02ListenerManager.INSTANCE.getChassisLocationGCJ02().getLatitude();
|
||||
double mCurLongitude =CallerChassisLocationGCJ02ListenerManager.INSTANCE.getChassisLocationGCJ02().getLongitude();
|
||||
|
||||
CallerLogger.d(M_TAXI + TAG, "currentLatLng=" + mCurLatitude + " " +mCurLongitude);
|
||||
NaviLatLng startNaviLatLng = new NaviLatLng(mCurLatitude, mCurLongitude);
|
||||
NaviLatLng endNaviLatLng = new NaviLatLng(stationLat, stationLng);
|
||||
AmapNaviToDestinationModel.getInstance(getContext()).initAMapNavi(startNaviLatLng, endNaviLatLng);
|
||||
CallerLogger.d(M_TAXI + TAG, "currentLatLng=" + mCurLatitude + " " +mCurLongitude);
|
||||
NaviLatLng startNaviLatLng = new NaviLatLng(mCurLatitude, mCurLongitude);
|
||||
NaviLatLng endNaviLatLng = new NaviLatLng(stationLat, stationLng);
|
||||
AmapNaviToDestinationModel.getInstance(getContext()).initAMapNavi(startNaviLatLng, endNaviLatLng);
|
||||
}
|
||||
});
|
||||
AmapNaviToDestinationModel.getInstance(getContext()).setVoiceIsMute(isVoicePlay);
|
||||
AmapNaviToDestinationModel.getInstance(getContext()).setTaxiNaviChangedCallback(this);
|
||||
}
|
||||
|
||||
@@ -76,9 +76,9 @@ class StartAutopilotViewModel : ViewModel(), IOCHTaxiPassengerOrderStatusCallbac
|
||||
}
|
||||
|
||||
private fun runMain(posttion:DoorPosition,state: DoorState){
|
||||
UiThreadHandler.post {
|
||||
UiThreadHandler.post({
|
||||
viewCallback?.setDoorStatus(posttion,state)
|
||||
}
|
||||
},UiThreadHandler.MODE.QUEUE)
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -594,18 +594,20 @@ class TaxiCurrentTaskFragment : BaseFragment(),
|
||||
}
|
||||
|
||||
private fun startNaviToStation(isVoicePlay: Boolean, stationLat: Double, stationLng: Double) {
|
||||
AmapNaviToDestinationModel.getInstance(context).destroyAmaNavi()
|
||||
val mCurLatitude = getChassisLocationGCJ02().latitude
|
||||
val mCurLongitude = getChassisLocationGCJ02().longitude
|
||||
d(
|
||||
TAG,
|
||||
"currentLatLng=$mCurLatitude $mCurLongitude"
|
||||
)
|
||||
val startNaviLatLng = NaviLatLng(mCurLatitude, mCurLongitude)
|
||||
val endNaviLatLng = NaviLatLng(stationLat, stationLng)
|
||||
AmapNaviToDestinationModel.getInstance(context).initAMapNavi(startNaviLatLng, endNaviLatLng)
|
||||
AmapNaviToDestinationModel.getInstance(context).setVoiceIsMute(isVoicePlay)
|
||||
AmapNaviToDestinationModel.getInstance(context).setTaxiNaviChangedCallback(this)
|
||||
UiThreadHandler.post{
|
||||
AmapNaviToDestinationModel.getInstance(context).destroyAmaNavi()
|
||||
val mCurLatitude = getChassisLocationGCJ02().latitude
|
||||
val mCurLongitude = getChassisLocationGCJ02().longitude
|
||||
d(
|
||||
TAG,
|
||||
"currentLatLng=$mCurLatitude $mCurLongitude"
|
||||
)
|
||||
val startNaviLatLng = NaviLatLng(mCurLatitude, mCurLongitude)
|
||||
val endNaviLatLng = NaviLatLng(stationLat, stationLng)
|
||||
AmapNaviToDestinationModel.getInstance(context).initAMapNavi(startNaviLatLng, endNaviLatLng)
|
||||
AmapNaviToDestinationModel.getInstance(context).setVoiceIsMute(isVoicePlay)
|
||||
AmapNaviToDestinationModel.getInstance(context).setTaxiNaviChangedCallback(this)
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -816,7 +816,9 @@ object TaxiTaskModel {
|
||||
}
|
||||
} else {
|
||||
d(TAG, "updateLocalCalculateStation stop")
|
||||
AmapNaviToDestinationModel.getInstance(mContext).destroyAmaNavi()
|
||||
if (mDriveToNearestStationTask == null){
|
||||
AmapNaviToDestinationModel.getInstance(mContext).destroyAmaNavi()
|
||||
}
|
||||
setStationPoint(null, null, -1L)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -58,7 +58,7 @@ bytex.ASM_API=ASM7
|
||||
|
||||
################ 外部依赖引用 ################
|
||||
# loglib
|
||||
LOGLIB_VERSION=1.9.16
|
||||
LOGLIB_VERSION=1.9.17
|
||||
######## MogoAiCloudSDK Version ########
|
||||
# 网络请求LOGLIB_VERSION
|
||||
MOGO_NETWORK_VERSION=1.4.7.17
|
||||
|
||||
Reference in New Issue
Block a user