Merge branch 'dev_robotaxi-d-app-module_2130_221116_2.13.0' into 'test_robotaxi-d-app-module_2130_221116_2.13.0.1'
Dev robotaxi d app module 2130 221116 2.13.0 See merge request zhjt/AndroidApp/MoGoEagleEye!401
This commit is contained in:
@@ -94,6 +94,7 @@ public class BusPassengerModel {
|
||||
private int mNextStationIndex = 0;// 要到达站的index
|
||||
private List<MogoLocation> mTwoStationsRouts = new ArrayList<>();
|
||||
private int mPreRouteIndex = 0;
|
||||
private int mWipePreIndex = 0;
|
||||
|
||||
private static final int MSG_QUERY_BUS_P_STATION = 1001;
|
||||
private final Handler handler = new Handler(new Handler.Callback() {
|
||||
@@ -485,22 +486,24 @@ public class BusPassengerModel {
|
||||
if (isStart){
|
||||
BusPassengerModelLoopManager.getInstance().startOrStopRouteAndWipe();
|
||||
}else {
|
||||
mWipePreIndex = 0;
|
||||
BusPassengerModelLoopManager.getInstance().stopOrStopRouteAndWipe();
|
||||
}
|
||||
}
|
||||
|
||||
public void loopRouteAndWipe() {
|
||||
if (mTwoStationsRouts != null && mTwoStationsRouts.size() > 0 && mLocation != null){
|
||||
if (mRoutePoints != null && mRoutePoints.size() > 0 && mLocation != null){
|
||||
int haveArrivedIndex = CoordinateCalculateRouteUtil
|
||||
.getArrivedPointIndexNew(mPreRouteIndex,
|
||||
mTwoStationsRouts,
|
||||
mLocation.getLongitude(),
|
||||
mLocation.getLatitude());
|
||||
.getArrivedPointIndexNew(mWipePreIndex,
|
||||
mRoutePoints,
|
||||
mLocation);
|
||||
|
||||
mWipePreIndex = haveArrivedIndex;
|
||||
|
||||
CallerLogger.INSTANCE.d(M_BUS_P + TAG, "thread = "+ Thread.currentThread().getName()+" haveArrivedIndex== " + haveArrivedIndex);
|
||||
if (mAutopilotPlanningCallback != null){
|
||||
List<LatLng> routePoints = CoordinateCalculateRouteUtil
|
||||
.coordinateConverterLocationToLatLng(mContext,mTwoStationsRouts);
|
||||
.coordinateConverterLocationToLatLng(mContext,mRoutePoints);
|
||||
mAutopilotPlanningCallback.routeResult(routePoints,haveArrivedIndex);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -235,17 +235,17 @@ public class CoordinateCalculateRouteUtil {
|
||||
Map<Integer,List<MogoLocation>> routePonits = new HashMap<>();
|
||||
List<MogoLocation> latePoints = new ArrayList<>(); // 剩余轨迹集合
|
||||
int currentIndex = 0; //记录疑似点
|
||||
if (mRoutePoints.size() > preIndex){
|
||||
if (mRoutePoints.size() > 0){
|
||||
//基础点
|
||||
MogoLocation baseLatLng = mRoutePoints.get(preIndex);
|
||||
MogoLocation baseLatLng = mRoutePoints.get(0);
|
||||
float baseDiffDis = CoordinateUtils.calculateLineDistance(realLocation.getLongitude(),
|
||||
realLocation.getLatitude()
|
||||
,baseLatLng.getLongitude(),baseLatLng.getLongitude());// lon,lat, prelon, prelat
|
||||
|
||||
for (int i= preIndex; i < mRoutePoints.size(); i++){
|
||||
for (int i= 0; i < mRoutePoints.size(); i++){
|
||||
MogoLocation latLng = mRoutePoints.get(i);
|
||||
//todo 先看index对应点的方向和realLocation方向是否一致, 方向角度不能过90度
|
||||
if (latLng.getBearing() == realLocation.getBearing() - latLng.getBearing() ||
|
||||
if (realLocation.getBearing() == realLocation.getBearing() - latLng.getBearing() ||
|
||||
Math.abs(realLocation.getBearing() - latLng.getBearing()) <= 90){
|
||||
float diff = CoordinateUtils.calculateLineDistance(realLocation.getLongitude(),
|
||||
realLocation.getLatitude(),
|
||||
@@ -275,6 +275,32 @@ public class CoordinateCalculateRouteUtil {
|
||||
return routePonits;
|
||||
}
|
||||
|
||||
public static int getArrivedPointIndexNew(int preIndex, List<MogoLocation> mRoutePoints,
|
||||
MogoLocation realLocation) {
|
||||
int currentIndex = 0; //记录疑似点 //基础点
|
||||
MogoLocation baseLatLng = mRoutePoints.get(0);
|
||||
float baseDiffDis = CoordinateUtils.calculateLineDistance(realLocation.getLongitude(),
|
||||
realLocation.getLatitude()
|
||||
, baseLatLng.getLongitude(), baseLatLng.getLongitude());// lon,lat, prelon, prelat
|
||||
|
||||
for (int i = 0; i < mRoutePoints.size(); i++) {
|
||||
MogoLocation latLng = mRoutePoints.get(i);
|
||||
if (realLocation.getBearing() == realLocation.getBearing() - latLng.getBearing() ||
|
||||
Math.abs(realLocation.getBearing() - latLng.getBearing()) <= 90){
|
||||
float diff = CoordinateUtils.calculateLineDistance(realLocation.getLongitude(),
|
||||
realLocation.getLatitude(),
|
||||
latLng.getLongitude(), latLng.getLatitude());
|
||||
if (baseDiffDis > diff && i>currentIndex) {
|
||||
// Logger.d(M_TAXI + "calculateRouteSumLength", "点:"+i+"-------先记录点----- ");
|
||||
baseDiffDis = diff;
|
||||
currentIndex = i;
|
||||
}
|
||||
}
|
||||
}
|
||||
Logger.d("calculateRouteSumLength", "点:" + currentIndex + "-------是最近的点------ ");
|
||||
return currentIndex;
|
||||
}
|
||||
|
||||
public static int getArrivedPointIndexNew(int preIndex, List<MogoLocation> mRoutePoints,
|
||||
double realLon,double realLat) {
|
||||
int currentIndex = preIndex; //记录疑似点 //基础点
|
||||
@@ -283,10 +309,10 @@ public class CoordinateCalculateRouteUtil {
|
||||
realLat
|
||||
, baseLatLng.getLongitude(), baseLatLng.getLongitude());// lon,lat, prelon, prelat
|
||||
|
||||
for (int i = 0; i < mRoutePoints.size(); i++) {
|
||||
for (int i = preIndex; i < mRoutePoints.size(); i++) {
|
||||
MogoLocation latLng = mRoutePoints.get(i);
|
||||
//todo 先看index对应点的方向和realLocation方向是否一致, 方向角度不能过90度
|
||||
// if (Math.abs(realLocation.getBearing() - latLng.getBearing()) <= 90) {
|
||||
// if (realLocation.getBearing() == realLocation.getBearing() - latLng.getBearing() ||
|
||||
// Math.abs(realLocation.getBearing() - latLng.getBearing()) <= 90){
|
||||
float diff = CoordinateUtils.calculateLineDistance(realLon,
|
||||
realLat,
|
||||
latLng.getLongitude(), latLng.getLatitude());
|
||||
|
||||
@@ -121,6 +121,7 @@ public class TaxiPassengerModel implements IOCHTaxiPassengerNaviChangedCallback
|
||||
private int delayTime = 2;
|
||||
|
||||
private double mLongitude, mLatitude;
|
||||
private MogoLocation mLocation = null;
|
||||
|
||||
private List<MogoLocation> mLocationsModels = new ArrayList<>();
|
||||
|
||||
@@ -460,6 +461,8 @@ public class TaxiPassengerModel implements IOCHTaxiPassengerNaviChangedCallback
|
||||
}
|
||||
mLongitude = location.getLongitude();
|
||||
mLatitude = location.getLatitude();
|
||||
|
||||
mLocation = location;
|
||||
// CallerLogger.INSTANCE.e(M_TAXI_P + TAG,"mLongitude = "+mLongitude+", mLatitude = "+mLatitude);
|
||||
for (IOCHTaxiPassengerControllerStatusCallback callback :mControllerStatusCallbackMap.values()){
|
||||
callback.onCarLocationChanged(location);
|
||||
@@ -613,17 +616,17 @@ public class TaxiPassengerModel implements IOCHTaxiPassengerNaviChangedCallback
|
||||
if (isStart){
|
||||
TaxiPassengerModelLoopManager.getInstance().startRouteAndWipe();
|
||||
}else {
|
||||
mPreRouteIndex = 0;
|
||||
TaxiPassengerModelLoopManager.getInstance().stopRouteAndWipe();
|
||||
}
|
||||
}
|
||||
|
||||
public void loopRouteAndWipe() {
|
||||
if (mLocationsModels != null && mLocationsModels.size() > 0){
|
||||
if (mLocationsModels != null && mLocationsModels.size() > 0 && mLocation != null){
|
||||
int haveArrivedIndex = CoordinateCalculateRouteUtil
|
||||
.getArrivedPointIndexNew(mPreRouteIndex,
|
||||
mLocationsModels,
|
||||
mLongitude,
|
||||
mLatitude);
|
||||
mLocation);
|
||||
mPreRouteIndex = haveArrivedIndex;
|
||||
if (mAutopilotPlanningCallback != null){
|
||||
List<LatLng> latLngsModels = CoordinateCalculateRouteUtil
|
||||
|
||||
@@ -215,6 +215,7 @@ public class BaseTaxiPassengerPresenter extends Presenter<TaxiPassengerBaseFragm
|
||||
// 50 到达终点 乘客可以评价
|
||||
if (TaxiPassengerOrderStatusEnum.ArriveAtEnd.getCode() == order.orderStatus){
|
||||
TaxiPassengerModel.getInstance().recoverNaviInfo();
|
||||
TaxiPassengerModel.getInstance().startOrStopRouteAndWipe(false);
|
||||
TaxiPassengerGeocodeSearchModel.getInstance(getContext()).destroyGeocodeSearch();
|
||||
runOnUIThread(() -> {
|
||||
mView.showOrHideServingOrderFragment(false,true);
|
||||
|
||||
@@ -1456,7 +1456,7 @@ class MoGoHmiFragment : MvpFragment<MoGoHmiContract.View?, HmiPresenter?>(),
|
||||
installType: String
|
||||
) {
|
||||
if (upgradeAppDialog == null) {
|
||||
upgradeAppDialog = UpgradeAppDialog(requireContext())
|
||||
upgradeAppDialog = context?.let { UpgradeAppDialog(it) }
|
||||
}
|
||||
upgradeAppDialog!!.setCanceledOnTouchOutside(false)
|
||||
upgradeAppDialog!!.showUpgradeAppDialog(name, url, title, content, installType)
|
||||
|
||||
@@ -70,7 +70,6 @@ class StatusBarView @JvmOverloads constructor(
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
fun updateProgressView(insert: Boolean, tag: String, progress: Int) {
|
||||
if (insert) {
|
||||
viewProgressTv.visibility = VISIBLE
|
||||
@@ -80,6 +79,14 @@ class StatusBarView @JvmOverloads constructor(
|
||||
}
|
||||
}
|
||||
|
||||
fun updateMfStatus(tag: String, status: Boolean) {
|
||||
if (status) {
|
||||
// viewMofangStatus.setImageResource(R.drawable.icon_car_red)
|
||||
} else {
|
||||
// viewMofangStatus.setImageResource(R.drawable.icon_car_red)
|
||||
}
|
||||
}
|
||||
|
||||
private fun setTextColor(color: Int) {
|
||||
viewTextClock.setTextColor(color)
|
||||
viewStatusBarTag.setTextColor(color)
|
||||
|
||||
@@ -4,7 +4,6 @@ import static com.mogo.eagle.core.data.deva.chain.ChainConstant.CHAIN_ALIAS_CODE
|
||||
import static com.mogo.eagle.core.data.deva.chain.ChainConstant.CHAIN_LINK_INIT;
|
||||
import static com.mogo.eagle.core.data.deva.chain.ChainConstant.CHAIN_LINK_LOG_CONNECT_STATUS;
|
||||
import static com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.M_HMI;
|
||||
|
||||
import android.bluetooth.BluetoothAdapter;
|
||||
import android.bluetooth.BluetoothDevice;
|
||||
import android.content.Intent;
|
||||
@@ -15,13 +14,10 @@ import android.os.Process;
|
||||
import android.text.TextUtils;
|
||||
import android.util.Log;
|
||||
import android.view.KeyEvent;
|
||||
import android.view.MotionEvent;
|
||||
import android.widget.FrameLayout;
|
||||
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
import com.alibaba.android.arouter.launcher.ARouter;
|
||||
import com.mogo.commons.debug.DebugConfig;
|
||||
import com.mogo.commons.module.intent.IMogoIntentListener;
|
||||
import com.mogo.commons.module.intent.IntentManager;
|
||||
import com.mogo.eagle.core.data.config.FunctionBuildConfig;
|
||||
@@ -32,7 +28,6 @@ import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListener
|
||||
import com.mogo.eagle.core.function.call.setting.CallerSkinModeListenerManager;
|
||||
import com.mogo.eagle.core.function.hmi.R;
|
||||
import com.mogo.eagle.core.function.main.moujie.BluetoothMonitorReceiver;
|
||||
import com.mogo.eagle.core.function.main.moujie.ConnectBluetoothEvent;
|
||||
import com.mogo.eagle.core.utilcode.mogo.AppIdentityModeUtils;
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger;
|
||||
import com.mogo.eagle.core.utilcode.mogo.storage.SharedPrefsMgr;
|
||||
@@ -44,9 +39,7 @@ import com.zhjt.service.chain.TracingConstants;
|
||||
|
||||
import org.greenrobot.eventbus.EventBus;
|
||||
import org.greenrobot.eventbus.Subscribe;
|
||||
import org.greenrobot.eventbus.ThreadMode;
|
||||
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
import java.lang.reflect.Method;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
@@ -35,6 +35,15 @@
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginStart="@dimen/dp_18" />
|
||||
|
||||
<!--魔方连接状态-->
|
||||
<ImageView
|
||||
android:id="@+id/viewMofangStatus"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginStart="@dimen/dp_27" />
|
||||
|
||||
<!--app下载进度-->
|
||||
<TextView
|
||||
android:id="@+id/viewProgressTv"
|
||||
android:layout_width="@dimen/dp_96"
|
||||
|
||||
@@ -167,6 +167,7 @@ object DataManager {
|
||||
MsgBoxType.V2X,
|
||||
GsonUtils.fromJson(json, V2XMsg::class.java)
|
||||
).apply {
|
||||
this.timestamp = msgInfo.timeStamp
|
||||
withContext(Dispatchers.Main) {
|
||||
cacheNotifyList.add(this@apply)
|
||||
}
|
||||
@@ -177,6 +178,7 @@ object DataManager {
|
||||
MsgBoxType.OBU,
|
||||
GsonUtils.fromJson(json, V2XMsg::class.java)
|
||||
).apply {
|
||||
this.timestamp = msgInfo.timeStamp
|
||||
withContext(Dispatchers.Main) {
|
||||
cacheNotifyList.add(this@apply)
|
||||
}
|
||||
@@ -187,6 +189,7 @@ object DataManager {
|
||||
MsgBoxType.OPERATION,
|
||||
GsonUtils.fromJson(json, OperationMsg::class.java)
|
||||
).apply {
|
||||
this.timestamp = msgInfo.timeStamp
|
||||
withContext(Dispatchers.Main) {
|
||||
cacheNotifyList.add(this@apply)
|
||||
}
|
||||
@@ -197,6 +200,7 @@ object DataManager {
|
||||
MsgBoxType.REPORT,
|
||||
GsonUtils.fromJson(json, ReportEntity::class.java)
|
||||
).apply {
|
||||
this.timestamp = msgInfo.timeStamp
|
||||
withContext(Dispatchers.Main) {
|
||||
cacheSysInfoList.add(this@apply)
|
||||
}
|
||||
@@ -207,6 +211,7 @@ object DataManager {
|
||||
MsgBoxType.RECORD,
|
||||
GsonUtils.fromJson(json, RecordBagMsg::class.java)
|
||||
).apply {
|
||||
this.timestamp = msgInfo.timeStamp
|
||||
withContext(Dispatchers.Main) {
|
||||
cacheRecordList.add(this@apply)
|
||||
}
|
||||
@@ -217,6 +222,7 @@ object DataManager {
|
||||
MsgBoxType.NOTICE,
|
||||
GsonUtils.fromJson(json, NoticeFrCloudMsg::class.java)
|
||||
).apply {
|
||||
this.timestamp = msgInfo.timeStamp
|
||||
withContext(Dispatchers.Main) {
|
||||
cacheNotifyList.add(this@apply)
|
||||
}
|
||||
|
||||
@@ -119,7 +119,8 @@ public class AMapWrapper implements IMogoMap {
|
||||
markerOptionsArrayList.add(markerOptions);
|
||||
}
|
||||
});
|
||||
MarkerHelper.INSTANCE.updateBatchMarkerPositon(markerOptionsArrayList, false, FunctionBuildConfig.isBeautyMode ? 8.0f : 0f, 1, 100, 1);
|
||||
long time = markerOptionsArrayList.get(0).getTime();
|
||||
MarkerHelper.INSTANCE.updateBatchMarkerPositon(markerOptionsArrayList, false, FunctionBuildConfig.isBeautyMode ? 8.0f : 0f, 1, time, 1);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user