[6.2.4]merge
This commit is contained in:
@@ -79,7 +79,7 @@ public class BusProvider implements IMogoOCH {
|
||||
@NotNull
|
||||
@Override
|
||||
public String getFunctionName() {
|
||||
return null;
|
||||
return TAG;
|
||||
}
|
||||
|
||||
@Nullable
|
||||
|
||||
@@ -293,10 +293,6 @@ public class BusPresenter extends Presenter<BusFragment>
|
||||
runOnUIThread(() -> mView.stopAnimAndUpdateBtnStatus());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAutopilotStatusResponse(@NonNull AutopilotStatusInfo autoPilotStatusInfo) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAutopilotDockerInfo(@NonNull String dockerVersion) {
|
||||
}
|
||||
|
||||
@@ -66,8 +66,8 @@ public class SlidePanelView extends View {
|
||||
private static int BLOCK_START_Y = AutoSizeUtils.dp2px(AbsMogoApplication.getApp(),15);
|
||||
private static int NORMAL_TEXT_MARGIN_LEFT = AutoSizeUtils.dp2px(AbsMogoApplication.getApp(),40);
|
||||
private static int NORMAL_TEXT_MARGIN_RIGHT = AutoSizeUtils.dp2px(AbsMogoApplication.getApp(),60);
|
||||
private static int SHORT_TEXT_MARGIN_LEFT = AutoSizeUtils.dp2px(AbsMogoApplication.getApp(),60);;
|
||||
private static int SHORT_TEXT_MARGIN_RIGHT = AutoSizeUtils.dp2px(AbsMogoApplication.getApp(),70);;
|
||||
private static int SHORT_TEXT_MARGIN_LEFT = AutoSizeUtils.dp2px(AbsMogoApplication.getApp(),60);
|
||||
private static int SHORT_TEXT_MARGIN_RIGHT = AutoSizeUtils.dp2px(AbsMogoApplication.getApp(),70);
|
||||
|
||||
private int textMarginLeft = NORMAL_TEXT_MARGIN_LEFT;
|
||||
private int textMarginRight = NORMAL_TEXT_MARGIN_RIGHT;
|
||||
@@ -247,10 +247,10 @@ public class SlidePanelView extends View {
|
||||
}
|
||||
|
||||
private void startBlockBackAnim() {
|
||||
ObjectAnimator blockBackanimator = ObjectAnimator.ofInt(this, "blockOffset", blockOffset, 0);
|
||||
blockBackanimator.setInterpolator(new DecelerateInterpolator());
|
||||
blockBackanimator.setDuration(1000L * blockOffset / getWidth());
|
||||
blockBackanimator.start();
|
||||
ObjectAnimator blockBackAnimator = ObjectAnimator.ofInt(this, "blockOffset", blockOffset, 0);
|
||||
blockBackAnimator.setInterpolator(new DecelerateInterpolator());
|
||||
blockBackAnimator.setDuration(1000L * blockOffset / getWidth());
|
||||
blockBackAnimator.start();
|
||||
lastX = 0;
|
||||
}
|
||||
|
||||
@@ -263,7 +263,7 @@ public class SlidePanelView extends View {
|
||||
gradientMatrix.setTranslate(matrixTranslate, 0);
|
||||
textGradient.setLocalMatrix(gradientMatrix);
|
||||
canvas.save();
|
||||
canvas.drawText(blockText, (float) (blockWidth + BLOCK_START_X + textMarginLeft), textOffset, textPaint);
|
||||
canvas.drawText(blockText, (float) (blockWidth + BLOCK_START_X + textMarginLeft), (float) textOffset, textPaint);
|
||||
canvas.restore();
|
||||
// 画滑块
|
||||
canvas.drawBitmap(bmBlock, (float) (BLOCK_START_X + blockOffset), (float) BLOCK_START_Y, blockPaint);
|
||||
|
||||
@@ -57,7 +57,7 @@ public class MogoOCHBusPassenger implements IMogoOCH {
|
||||
@NotNull
|
||||
@Override
|
||||
public String getFunctionName() {
|
||||
return null;
|
||||
return TAG;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -46,7 +46,7 @@ public class AmapNaviToDestinationModel implements AMapNaviListener {
|
||||
protected final List<NaviLatLng> eList = new ArrayList<NaviLatLng>();
|
||||
protected List<NaviLatLng> mWayPointList = new ArrayList<NaviLatLng>();
|
||||
private volatile ICommonNaviChangedCallback mNaviChangedCallback;
|
||||
private AtomicInteger errorCount = new AtomicInteger(0);
|
||||
private final AtomicInteger errorCount = new AtomicInteger(0);
|
||||
private boolean isPlay;
|
||||
|
||||
public static AmapNaviToDestinationModel getInstance(Context context) {
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
package com.mogo.och.common.module.wigets.sfv;
|
||||
|
||||
import static com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.M_HMI;
|
||||
|
||||
import android.content.Context;
|
||||
import android.graphics.Bitmap;
|
||||
import android.graphics.BitmapFactory;
|
||||
@@ -12,6 +14,8 @@ import android.os.Handler;
|
||||
import android.os.HandlerThread;
|
||||
import android.util.AttributeSet;
|
||||
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger;
|
||||
|
||||
import java.io.InputStream;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
@@ -21,6 +25,7 @@ import java.util.concurrent.atomic.AtomicInteger;
|
||||
* a SurfaceView which draws bitmaps one after another like frame animation
|
||||
*/
|
||||
public class FrameSurfaceView extends BaseSurfaceView {
|
||||
private static final String TAG = "FrameSurfaceView";
|
||||
public static final int INVALID_INDEX = Integer.MAX_VALUE;
|
||||
private final int bufferSize = 3;
|
||||
public static final String DECODE_THREAD_NAME = "DecodingThread";
|
||||
@@ -320,6 +325,7 @@ public class FrameSurfaceView extends BaseSurfaceView {
|
||||
decodedBitmaps.put(linkedBitmap);
|
||||
} catch (InterruptedException e) {
|
||||
e.printStackTrace();
|
||||
CallerLogger.e(M_HMI + TAG, "decodeAndPutBitmap error");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -338,6 +344,7 @@ public class FrameSurfaceView extends BaseSurfaceView {
|
||||
bitmap = drawnBitmaps.take();
|
||||
} catch (InterruptedException e) {
|
||||
e.printStackTrace();
|
||||
CallerLogger.e(M_HMI + TAG, "getDrawnBitmap error");
|
||||
}
|
||||
return bitmap;
|
||||
}
|
||||
@@ -354,6 +361,7 @@ public class FrameSurfaceView extends BaseSurfaceView {
|
||||
bitmap = decodedBitmaps.take();
|
||||
} catch (InterruptedException e) {
|
||||
e.printStackTrace();
|
||||
CallerLogger.e(M_HMI + TAG, "getDecodedBitmap error");
|
||||
}
|
||||
return bitmap;
|
||||
}
|
||||
|
||||
@@ -79,7 +79,7 @@ public class BusProvider implements IMogoOCH {
|
||||
@NotNull
|
||||
@Override
|
||||
public String getFunctionName() {
|
||||
return null;
|
||||
return TAG;
|
||||
}
|
||||
|
||||
@Nullable
|
||||
|
||||
@@ -11,7 +11,6 @@ import androidx.lifecycle.LifecycleOwner;
|
||||
import com.mogo.commons.AbsMogoApplication;
|
||||
import com.mogo.commons.mvp.Presenter;
|
||||
import com.mogo.commons.voice.AIAssist;
|
||||
import com.mogo.eagle.core.data.autopilot.AutopilotStatusInfo;
|
||||
import com.mogo.eagle.core.data.config.FunctionBuildConfig;
|
||||
import com.mogo.eagle.core.data.map.MogoLocation;
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotStatusListener;
|
||||
@@ -34,7 +33,6 @@ import com.mogo.och.common.module.biz.constant.LoginStatusManager;
|
||||
import com.mogo.och.common.module.manager.autopilotmanager.OCHAdasAbilityManager;
|
||||
import com.mogo.och.common.module.voice.VoiceNotice;
|
||||
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
@@ -55,7 +53,7 @@ public class BusPresenter extends Presenter<BusFragment>
|
||||
|
||||
private static final String TAG = "BusPresenter";
|
||||
|
||||
private List<BusStationBean> mStationList = new ArrayList<>();
|
||||
private final List<BusStationBean> mStationList = new ArrayList<>();
|
||||
private int mCurrentStation = 0;
|
||||
|
||||
public BusPresenter(BusFragment view) {
|
||||
@@ -164,10 +162,6 @@ public class BusPresenter extends Presenter<BusFragment>
|
||||
public void onAutopilotSNRequest() {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAutopilotStatusResponse(@NotNull AutopilotStatusInfo autopilotStatusInfo) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAutopilotStatusResponse(int state) {
|
||||
switch (state) {
|
||||
@@ -206,7 +200,7 @@ public class BusPresenter extends Presenter<BusFragment>
|
||||
@Override
|
||||
public void onCarLocationChanged(MogoLocation location) {
|
||||
if (null != location) {
|
||||
runOnUIThread(() -> mView.updateSpeedView((float) location.getGnssSpeed()));
|
||||
runOnUIThread(() -> mView.updateSpeedView(location.getGnssSpeed()));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -237,9 +231,7 @@ public class BusPresenter extends Presenter<BusFragment>
|
||||
* 测试使用
|
||||
*/
|
||||
public void debugAutoPilotStatus(int status) {
|
||||
AutopilotStatusInfo info = new AutopilotStatusInfo();
|
||||
info.setState(status);
|
||||
onAutopilotStatusResponse(info);
|
||||
onAutopilotStatusResponse(status);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -532,11 +532,6 @@ public class BusPassengerModel {
|
||||
|
||||
private boolean arriveAtEnd = false; //乘客app专用字段
|
||||
|
||||
@Override
|
||||
public void onAutopilotStatusResponse(@NotNull AutopilotStatusInfo autopilotStatusInfo) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAutopilotSNRequest() {
|
||||
|
||||
@@ -570,6 +565,9 @@ public class BusPassengerModel {
|
||||
public synchronized void onAutopilotRotting(@Nullable MessagePad.GlobalPathResp routeList) {
|
||||
// CallerLogger.d(M_BUS_P + TAG, "onAutopilotRotting = "
|
||||
// + GsonUtil.jsonFromObject(routeList));
|
||||
if(routeList == null){
|
||||
return;
|
||||
}
|
||||
List<MessagePad.Location> routePoints = routeList.getWayPointsList();
|
||||
|
||||
if(globalPathTruncation!=null&&!globalPathTruncation.isDisposed()){
|
||||
|
||||
@@ -13,7 +13,6 @@ import com.mogo.commons.AbsMogoApplication;
|
||||
import com.mogo.commons.module.status.IMogoStatusChangedListener;
|
||||
import com.mogo.commons.module.status.MogoStatusManager;
|
||||
import com.mogo.commons.module.status.StatusDescriptor;
|
||||
import com.mogo.eagle.core.data.autopilot.AutopilotStatusInfo;
|
||||
import com.mogo.eagle.core.data.map.MogoLocation;
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotStatusListener;
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoChassisLocationGCJ02Listener;
|
||||
@@ -694,11 +693,6 @@ public class SweeperCloudTaskModel implements IMoGoSweeperFutianCloudTaskListene
|
||||
return MoGoAiCloudClientConfig.getInstance().getSn();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAutopilotStatusResponse(@NonNull AutopilotStatusInfo autoPilotStatusInfo) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAutopilotArriveAtStation(@Nullable MessagePad.ArrivalNotification arrivalNotification) {
|
||||
DebugView.Companion.printInfoMsg("[MAP到站通知] 上报到站,endLocation=("
|
||||
|
||||
@@ -518,7 +518,7 @@ public abstract class BaseSweeperOperateTabFragment<V extends IView, P extends P
|
||||
}
|
||||
|
||||
public static String format(double value) {
|
||||
BigDecimal bd = new BigDecimal(value);
|
||||
BigDecimal bd = BigDecimal.valueOf(value);
|
||||
bd = bd.setScale(2, RoundingMode.HALF_UP);
|
||||
return bd.toString();
|
||||
}
|
||||
|
||||
@@ -10,7 +10,6 @@ import androidx.lifecycle.LifecycleOwner;
|
||||
import com.amap.api.maps.model.LatLng;
|
||||
import com.mogo.commons.AbsMogoApplication;
|
||||
import com.mogo.commons.mvp.Presenter;
|
||||
import com.mogo.eagle.core.data.autopilot.AutopilotStatusInfo;
|
||||
import com.mogo.eagle.core.data.config.FunctionBuildConfig;
|
||||
import com.mogo.eagle.core.data.map.MogoLocation;
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotStatusListener;
|
||||
@@ -121,10 +120,6 @@ public class SweeperOperatePresenter extends Presenter<SweeperOperateFragment>
|
||||
public void onAutopilotRouteLineId(long lineId) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAutopilotStatusResponse(@NotNull AutopilotStatusInfo autopilotStatusInfo) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAutopilotStatusResponse(int state) {
|
||||
SweeperOperateTaskModel.getInstance().setAutopilotState(state);
|
||||
@@ -183,7 +178,7 @@ public class SweeperOperatePresenter extends Presenter<SweeperOperateFragment>
|
||||
@Override
|
||||
public void onCarLocationChanged(MogoLocation location) {
|
||||
if (null != location) {
|
||||
ThreadUtils.runOnUiThread(() -> mView.updateSpeedView((float) location.getGnssSpeed()));
|
||||
ThreadUtils.runOnUiThread(() -> mView.updateSpeedView(location.getGnssSpeed()));
|
||||
ThreadUtils.runOnUiThread(() -> mView.setCurrentLocation(location));
|
||||
}
|
||||
}
|
||||
@@ -216,9 +211,7 @@ public class SweeperOperatePresenter extends Presenter<SweeperOperateFragment>
|
||||
* 测试使用
|
||||
*/
|
||||
public void debugAutoPilotStatus(int status) {
|
||||
AutopilotStatusInfo info = new AutopilotStatusInfo();
|
||||
info.setState(status);
|
||||
onAutopilotStatusResponse(info);
|
||||
onAutopilotStatusResponse(status);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -372,7 +365,7 @@ public class SweeperOperatePresenter extends Presenter<SweeperOperateFragment>
|
||||
}
|
||||
|
||||
public static String format(double value) {
|
||||
BigDecimal bd = new BigDecimal(value);
|
||||
BigDecimal bd = BigDecimal.valueOf(value);
|
||||
bd = bd.setScale(2, RoundingMode.HALF_UP);
|
||||
return bd.toString();
|
||||
}
|
||||
|
||||
@@ -49,6 +49,7 @@ public class SlidePanelView extends View {
|
||||
NORMAL_TEXT_MARGIN_RIGHT = (int) mTypedArray.getDimension(R.styleable.SlidePanelView_NORMAL_TEXT_MARGIN_RIGHT, NORMAL_TEXT_MARGIN_RIGHT);
|
||||
SHORT_TEXT_MARGIN_LEFT = (int) mTypedArray.getDimension(R.styleable.SlidePanelView_SHORT_TEXT_MARGIN_LEFT, SHORT_TEXT_MARGIN_LEFT);
|
||||
SHORT_TEXT_MARGIN_RIGHT = (int) mTypedArray.getDimension(R.styleable.SlidePanelView_SHORT_TEXT_MARGIN_RIGHT, SHORT_TEXT_MARGIN_RIGHT);
|
||||
mTypedArray.recycle();
|
||||
init();
|
||||
}
|
||||
|
||||
@@ -87,7 +88,7 @@ public class SlidePanelView extends View {
|
||||
private ObjectAnimator matrixAnim;
|
||||
|
||||
private String blockText = STRING_SLIDE_TO_RIGHT;
|
||||
private Paint.FontMetrics blockTextMetrics = new Paint.FontMetrics();
|
||||
private final Paint.FontMetrics blockTextMetrics = new Paint.FontMetrics();
|
||||
|
||||
private static final int GRADIENT_OFFSET = 200;
|
||||
|
||||
@@ -239,10 +240,10 @@ public class SlidePanelView extends View {
|
||||
}
|
||||
|
||||
private void startBlockBackAnim() {
|
||||
ObjectAnimator blockBackanimator = ObjectAnimator.ofInt(this, "blockOffset", blockOffset, 0);
|
||||
blockBackanimator.setInterpolator(new DecelerateInterpolator());
|
||||
blockBackanimator.setDuration(1000 * blockOffset / getWidth());
|
||||
blockBackanimator.start();
|
||||
ObjectAnimator blockBackAnimator = ObjectAnimator.ofInt(this, "blockOffset", blockOffset, 0);
|
||||
blockBackAnimator.setInterpolator(new DecelerateInterpolator());
|
||||
blockBackAnimator.setDuration(1000L * blockOffset / getWidth());
|
||||
blockBackAnimator.start();
|
||||
lastX = 0;
|
||||
}
|
||||
|
||||
@@ -255,10 +256,10 @@ public class SlidePanelView extends View {
|
||||
gradientMatrix.setTranslate(matrixTranslate, 0);
|
||||
textGradient.setLocalMatrix(gradientMatrix);
|
||||
canvas.save();
|
||||
canvas.drawText(blockText, blockWidth + BLOCK_START_X + textMarginLeft, textOffset, textPaint);
|
||||
canvas.drawText(blockText, (float) (blockWidth + BLOCK_START_X + textMarginLeft), (float) textOffset, textPaint);
|
||||
canvas.restore();
|
||||
// 画滑块
|
||||
canvas.drawBitmap(bmBlock, BLOCK_START_X + blockOffset, BLOCK_START_Y, blockPaint);
|
||||
canvas.drawBitmap(bmBlock, (float) (BLOCK_START_X + blockOffset), (float) BLOCK_START_Y, blockPaint);
|
||||
}
|
||||
|
||||
public interface OnSlidePanelMoveToEndListener {
|
||||
|
||||
@@ -79,7 +79,7 @@ class TaxiProvider implements IMogoOCH {
|
||||
@NotNull
|
||||
@Override
|
||||
public String getFunctionName() {
|
||||
return null;
|
||||
return TAG;
|
||||
}
|
||||
|
||||
@Nullable
|
||||
|
||||
@@ -1210,10 +1210,6 @@ public class TaxiModel {
|
||||
TaxiTrajectoryManager.getInstance().onAutopilotGuardian(guardianInfo);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAutopilotStatusResponse(@NotNull AutopilotStatusInfo autopilotStatusInfo) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAutopilotStatusResponse(int state) {
|
||||
if (state == IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_RUNNING) {
|
||||
|
||||
@@ -83,7 +83,6 @@ public class TaxiGrabOrderFragment extends BaseTaxiUIFragment implements View.On
|
||||
}else if (v.getId() == R.id.grab_order_tv){
|
||||
if (!mOrderGrabBt.getText().toString().equals("抢单中...")){
|
||||
getOchTaxiFragment().grabOrder();
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -151,7 +150,7 @@ public class TaxiGrabOrderFragment extends BaseTaxiUIFragment implements View.On
|
||||
}
|
||||
mGrabSuccessAnim.start();
|
||||
//开启动画结束的监听
|
||||
long delayMillis = mGrabSuccessAnim.getDuration(0) * mGrabSuccessAnim.getNumberOfFrames();
|
||||
long delayMillis = (long) mGrabSuccessAnim.getDuration(0) * mGrabSuccessAnim.getNumberOfFrames();
|
||||
UiThreadHandler.postDelayed(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
@@ -174,7 +173,7 @@ public class TaxiGrabOrderFragment extends BaseTaxiUIFragment implements View.On
|
||||
mGrabFailureAnim = (AnimationDrawable)mGrabResultAnimView.getDrawable();
|
||||
mGrabFailureAnim.start();
|
||||
//开启动画结束的监听
|
||||
long delayMillis = mGrabFailureAnim.getDuration(0) * mGrabFailureAnim.getNumberOfFrames();
|
||||
long delayMillis = (long) mGrabFailureAnim.getDuration(0) * mGrabFailureAnim.getNumberOfFrames();
|
||||
UiThreadHandler.postDelayed(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
|
||||
@@ -68,12 +68,11 @@ public class TaxiPersonalDialogFragment extends
|
||||
private ViewPager mOperationViewPager;
|
||||
private OrderAdapter mAdapter;
|
||||
private ConstraintLayout mNoDatas;
|
||||
private List<OrderQueryRespBean.Result> orders = new ArrayList<>();
|
||||
private String[] mTabTitles = {"在线时长","订单完成数"};
|
||||
private List<TaxiOperationDatasFragment> fragments = new ArrayList<>();
|
||||
private final List<OrderQueryRespBean.Result> orders = new ArrayList<>();
|
||||
private final String[] mTabTitles = {"在线时长","订单完成数"};
|
||||
private final List<TaxiOperationDatasFragment> fragments = new ArrayList<>();
|
||||
private int mNextPage = 1;//订单列表分页从1开始
|
||||
private int mPerPageSize = 10;
|
||||
private static TaxiFragment mTaxiFragment;
|
||||
private final int mPerPageSize = 10;
|
||||
private static boolean serverHadNoData = false;
|
||||
|
||||
@NonNull
|
||||
@@ -177,7 +176,6 @@ public class TaxiPersonalDialogFragment extends
|
||||
}
|
||||
}
|
||||
mOperationTab.addOnTabSelectedListener(new TabLayout.OnTabSelectedListener() {
|
||||
@RequiresApi(api = Build.VERSION_CODES.LOLLIPOP)
|
||||
@Override
|
||||
public void onTabSelected(TabLayout.Tab tab) {
|
||||
mOperationViewPager.setCurrentItem(tab.getPosition());
|
||||
@@ -185,7 +183,6 @@ public class TaxiPersonalDialogFragment extends
|
||||
fragments.get(tab.getPosition()).setmType(tab.getPosition());
|
||||
}
|
||||
|
||||
@RequiresApi(api = Build.VERSION_CODES.LOLLIPOP)
|
||||
@Override
|
||||
public void onTabUnselected(TabLayout.Tab tab) {
|
||||
changeOperationTabLayoutTabUI(tab,false);
|
||||
@@ -311,17 +308,14 @@ public class TaxiPersonalDialogFragment extends
|
||||
public RecyclerView.ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
|
||||
if (viewType == ORDER_DETAIL_ITEM){
|
||||
View view = LayoutInflater.from(context).inflate(R.layout.taxi_orders_list_item,parent,false);
|
||||
OrderDetailViewHolder viewHolder = new OrderDetailViewHolder(view);
|
||||
return viewHolder;
|
||||
return new OrderDetailViewHolder(view);
|
||||
}else if (viewType == DAY_GROUP_ITEM){
|
||||
View view = LayoutInflater.from(context).inflate(R.layout.taxi_orders_list_day_item,parent,false);
|
||||
DayGroupViewHolder viewHolder = new DayGroupViewHolder(view);
|
||||
return viewHolder;
|
||||
return new DayGroupViewHolder(view);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@RequiresApi(api = Build.VERSION_CODES.LOLLIPOP)
|
||||
@Override
|
||||
public void onBindViewHolder(@NonNull RecyclerView.ViewHolder holder, int position) {
|
||||
OrderQueryRespBean.Result queryRespBean = orders.get(position);
|
||||
@@ -383,8 +377,7 @@ public class TaxiPersonalDialogFragment extends
|
||||
String currentDate = DateTimeUtil.getYMDTime(orders.get(position).createTime);//获取当前订单时间
|
||||
int nextIndex = position + 1;
|
||||
String preDate = DateTimeUtil.getYMDTime(orders.get(nextIndex).createTime);
|
||||
boolean isDifferent = preDate.equals(currentDate);//订单跟后一个订单是否是同一天
|
||||
return isDifferent;//一样有划分线, 不一样没有划分线
|
||||
return preDate.equals(currentDate);//一样有划分线, 不一样没有划分线
|
||||
}
|
||||
}
|
||||
|
||||
@@ -393,7 +386,6 @@ public class TaxiPersonalDialogFragment extends
|
||||
return orders.size();
|
||||
}
|
||||
|
||||
@RequiresApi(api = Build.VERSION_CODES.LOLLIPOP)
|
||||
private void bindOrderDetailData(OrderQueryRespBean.Result queryRespBean, TextView orderTimeTv, TextView startStationTv, TextView endStationTv,
|
||||
Button orderStatusBt, Button orderTypeBt, TextView orderNumTv){
|
||||
Calendar calendar= Calendar.getInstance();
|
||||
@@ -406,7 +398,6 @@ public class TaxiPersonalDialogFragment extends
|
||||
orderNumTv.setText("订单编号:"+String.valueOf(queryRespBean.orderNo));
|
||||
}
|
||||
|
||||
@RequiresApi(api = Build.VERSION_CODES.LOLLIPOP)
|
||||
private String getOrderStatus(int status, Button button){
|
||||
TaxiOrderStatusEnum orderStatus = TaxiOrderStatusEnum.valueOf(status);
|
||||
switch (orderStatus){
|
||||
@@ -422,7 +413,6 @@ public class TaxiPersonalDialogFragment extends
|
||||
}
|
||||
}
|
||||
|
||||
@RequiresApi(api = Build.VERSION_CODES.LOLLIPOP)
|
||||
private String getOrderType(int type, Button button){
|
||||
if (type == TaxiOrderTypeEnum.Reserved.getType()){
|
||||
button.setBackground(context.getDrawable(R.drawable.taxi_order_button_type_reserver_bg));
|
||||
|
||||
@@ -82,7 +82,7 @@ class MogoOCHTaxiPassenger implements IMogoOCH {
|
||||
@NotNull
|
||||
@Override
|
||||
public String getFunctionName() {
|
||||
return null;
|
||||
return TAG;
|
||||
}
|
||||
|
||||
@Nullable
|
||||
|
||||
@@ -78,7 +78,7 @@ public class MogoOCHTaxiPassenger implements IMogoOCH {
|
||||
@NotNull
|
||||
@Override
|
||||
public String getFunctionName() {
|
||||
return null;
|
||||
return TAG;
|
||||
}
|
||||
|
||||
@Nullable
|
||||
|
||||
@@ -113,7 +113,7 @@ class DispatchAutoPilotManager private constructor() :
|
||||
}
|
||||
|
||||
@ChainLog(
|
||||
linkChainLog = ChainConstant.CHAIN_TYPE_V2X,
|
||||
linkChainLog = ChainConstant.CHAIN_TYPE_STATUS,
|
||||
linkCode = ChainConstant.CHAIN_SOURCE_CLOUD,
|
||||
nodeAliasCode = ChainConstant.CHAIN_CODE_DISPATCH_RECEIVE,
|
||||
paramIndexes = [0]
|
||||
@@ -140,7 +140,7 @@ class DispatchAutoPilotManager private constructor() :
|
||||
}
|
||||
|
||||
@ChainLog(
|
||||
linkChainLog = ChainConstant.CHAIN_TYPE_V2X,
|
||||
linkChainLog = ChainConstant.CHAIN_TYPE_STATUS,
|
||||
linkCode = ChainConstant.CHAIN_SOURCE_CLOUD,
|
||||
nodeAliasCode = ChainConstant.CHAIN_CODE_DISPATCH_START,
|
||||
paramIndexes = [-1]
|
||||
@@ -348,7 +348,7 @@ class DispatchAutoPilotManager private constructor() :
|
||||
AIAssist.getInstance(mContext).speakTTSVoice("云调度完成,车辆已到达${it.endLocAddress}")
|
||||
}
|
||||
}else{
|
||||
V2XBizTrace.onAck(M_BIZ + TAG, mapOf("arriveErrorMsg" to "不在到站距离范围内", "ArriveAtStation" to arrivalNotification, "distanceFromSelf" to distanceFromSelf))
|
||||
V2XBizTrace.onAck(M_BIZ + TAG, mapOf("arriveErrorMsg" to "不在到站距离范围内", "ArriveAtStation" to arrivalNotification, "distanceFromSelf" to distanceFromSelf), true)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,24 +1,45 @@
|
||||
package com.mogo.eagle.function.biz.v2x
|
||||
|
||||
import android.util.*
|
||||
import com.mogo.eagle.core.data.deva.chain.ChainCommon
|
||||
import com.mogo.eagle.core.data.deva.chain.ChainConstant
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_V2X
|
||||
import com.mogo.eagle.core.utilcode.util.*
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationGCJ02ListenerManager
|
||||
import com.zhjt.service.chain.ChainLog
|
||||
|
||||
class V2XBizTrace {
|
||||
|
||||
companion object {
|
||||
|
||||
fun onAck(data: Any, data1: Any, param: Boolean = false) {
|
||||
Log.d("V2X", "tag:$data, msg: $data1")
|
||||
if (param) {
|
||||
val cal = CallerChassisLocationGCJ02ListenerManager.getChassisLocationGCJ02()
|
||||
val lineId = CallerAutoPilotStatusListenerManager.getLineId()
|
||||
realParamAction(data, data1, ChainCommon(cal.latitude, cal.longitude, lineId))
|
||||
} else {
|
||||
realAction(data, data1)
|
||||
}
|
||||
}
|
||||
|
||||
@ChainLog(
|
||||
linkChainLog = ChainConstant.CHAIN_TYPE_V2X,
|
||||
linkChainLog = ChainConstant.CHAIN_TYPE_STATUS,
|
||||
linkCode = ChainConstant.CHAIN_SOURCE_CLOUD,
|
||||
nodeAliasCode = ChainConstant.CHAIN_CODE_V2X_MSG,
|
||||
paramIndexes = [0, 1]
|
||||
)
|
||||
fun onAck(data: Any, data1: Any) {
|
||||
Log.d("V2X", "tag:$data, msg: $data1")
|
||||
private fun realAction(data: Any, data1: Any) {
|
||||
|
||||
}
|
||||
|
||||
@ChainLog(
|
||||
linkChainLog = ChainConstant.CHAIN_TYPE_STATUS,
|
||||
linkCode = ChainConstant.CHAIN_SOURCE_CLOUD,
|
||||
nodeAliasCode = ChainConstant.CHAIN_CODE_V2X_MSG,
|
||||
paramIndexes = [0, 1, 2]
|
||||
)
|
||||
private fun realParamAction(data: Any, data1: Any, chainCommon: ChainCommon) {
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -9,7 +9,7 @@ import com.mogo.eagle.core.data.config.*
|
||||
import com.mogo.eagle.core.data.deva.chain.ChainConstant.Companion.CHAIN_CODE_V2X_MSG
|
||||
import com.mogo.eagle.core.data.deva.chain.ChainConstant.Companion.CHAIN_SOURCE_ADAS
|
||||
import com.mogo.eagle.core.data.deva.chain.ChainConstant.Companion.CHAIN_SOURCE_CLOUD
|
||||
import com.mogo.eagle.core.data.deva.chain.ChainConstant.Companion.CHAIN_TYPE_V2X
|
||||
import com.mogo.eagle.core.data.deva.chain.ChainConstant.Companion.CHAIN_TYPE_STATUS
|
||||
import com.mogo.eagle.core.data.enums.*
|
||||
import com.mogo.eagle.core.data.enums.DataSourceType
|
||||
import com.mogo.eagle.core.data.enums.EventTypeEnumNew.Companion.isRoadEvent
|
||||
@@ -115,7 +115,7 @@ object V2XEventManager : IMoGoChassisLocationGCJ02Listener, IV2XCallback,
|
||||
V2XScenarioManager.getInstance().handlerMessage(v2XMessageEntity)
|
||||
V2XBizTrace.onAck("巡航处理 handlerMessage v2XMessageEntity", " $v2XMessageEntity")
|
||||
}else{
|
||||
V2XBizTrace.onAck("事件未触发,巡航处理", mapOf("roadEvent" to v2XRoadEventEntity, "distance" to distance))
|
||||
V2XBizTrace.onAck("事件未触发,巡航处理", mapOf("roadEvent" to v2XRoadEventEntity, "distance" to distance), true)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -147,7 +147,7 @@ object V2XEventManager : IMoGoChassisLocationGCJ02Listener, IV2XCallback,
|
||||
* V2XEvent事件回调
|
||||
*/
|
||||
@ChainLog(
|
||||
linkChainLog = CHAIN_TYPE_V2X,
|
||||
linkChainLog = CHAIN_TYPE_STATUS,
|
||||
linkCode = CHAIN_SOURCE_CLOUD,
|
||||
nodeAliasCode = CHAIN_CODE_V2X_MSG,
|
||||
paramIndexes = [0]
|
||||
@@ -173,18 +173,18 @@ object V2XEventManager : IMoGoChassisLocationGCJ02Listener, IV2XCallback,
|
||||
if (!AppIdentityModeUtils.isTaxi(FunctionBuildConfig.appIdentityMode) || !FunctionBuildConfig.v2nMainSwitch || !FunctionBuildConfig.isNewV2NData) {
|
||||
handleRoadMarkerEvent(event.data.toRoadMarker())
|
||||
}else{
|
||||
V2XBizTrace.onAck("事件未触发,被开关拦截",mapOf("roadEvent" to event, "v2nMainSwitch" to FunctionBuildConfig.v2nMainSwitch,"isNewV2NData" to FunctionBuildConfig.isNewV2NData))
|
||||
V2XBizTrace.onAck("事件未触发,被开关拦截",mapOf("roadEvent" to event, "v2nMainSwitch" to FunctionBuildConfig.v2nMainSwitch,"isNewV2NData" to FunctionBuildConfig.isNewV2NData), true)
|
||||
}
|
||||
}
|
||||
else -> {
|
||||
V2XBizTrace.onAck("事件未触发,不识别的新事件",mapOf("roadEvent" to event))
|
||||
V2XBizTrace.onAck("事件未触发,不识别的新事件",mapOf("roadEvent" to event), true)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@RequiresApi(Build.VERSION_CODES.N)
|
||||
@ChainLog(
|
||||
linkChainLog = CHAIN_TYPE_V2X,
|
||||
linkChainLog = CHAIN_TYPE_STATUS,
|
||||
linkCode = CHAIN_SOURCE_ADAS,
|
||||
nodeAliasCode = CHAIN_CODE_V2X_MSG,
|
||||
paramIndexes = [0]
|
||||
|
||||
@@ -1,10 +1,12 @@
|
||||
package com.mogo.eagle.function.biz.v2x.v2n.alarm;
|
||||
|
||||
import static com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.M_BIZ;
|
||||
|
||||
import com.mogo.eagle.core.data.enums.EventTypeEnumNew;
|
||||
import com.mogo.eagle.core.data.map.MogoLocation;
|
||||
import com.mogo.eagle.core.data.map.entity.MarkerLocation;
|
||||
import com.mogo.eagle.core.data.map.entity.V2XRoadEventEntity;
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.Logger;
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger;
|
||||
import com.mogo.eagle.core.utilcode.util.DrivingDirectionUtils;
|
||||
import com.mogo.eagle.function.biz.v2x.V2XBizTrace;
|
||||
|
||||
@@ -39,7 +41,7 @@ public class V2XAlarmServer {
|
||||
CopyOnWriteArrayList<V2XRoadEventEntity> v2XRoadEventEntityList,
|
||||
MogoLocation currentLocation) {
|
||||
try {
|
||||
Logger.d(TAG, "getDriveFrontAlarmEvent --- 1 ---" + currentLocation );
|
||||
CallerLogger.d(M_BIZ + TAG, "getDriveFrontAlarmEvent --- 1 ---" + currentLocation );
|
||||
if (!showedEvents.isEmpty()) {
|
||||
Iterator<V2XRoadEventEntity> iterator = showedEvents.iterator();
|
||||
while (iterator.hasNext()) {
|
||||
@@ -56,18 +58,18 @@ public class V2XAlarmServer {
|
||||
}
|
||||
}
|
||||
}
|
||||
Logger.d(TAG, "getDriveFrontAlarmEvent --- 2 ---" + currentLocation);
|
||||
CallerLogger.d(M_BIZ + TAG, "getDriveFrontAlarmEvent --- 2 ---" + currentLocation);
|
||||
if (currentLocation != null && v2XRoadEventEntityList != null) {
|
||||
// 因为集合是按照距离排序后的所以这里检索出来第一个就发出警告
|
||||
for (V2XRoadEventEntity v2XRoadEventEntity : v2XRoadEventEntityList) {
|
||||
// 0、道路事件必须有朝向,角度>=0;
|
||||
//Logger.d(TAG, "entity:" + v2XRoadEventEntity.getLocation());
|
||||
//CallerLogger.d(M_BIZ + TAG, "entity:" + v2XRoadEventEntity.getLocation());
|
||||
if (v2XRoadEventEntity.getLocation().getAngle() >= 0) {
|
||||
// 计算车辆距离指定气泡的距离
|
||||
MarkerLocation eventLocation = v2XRoadEventEntity.getLocation();
|
||||
// 1、判断是否到达了触发距离,20 ~ 500,
|
||||
double distance = v2XRoadEventEntity.getDistance();
|
||||
Logger.d(TAG, "distance:" + distance + ",poiType:" + v2XRoadEventEntity.getPoiType());
|
||||
CallerLogger.d(M_BIZ + TAG, "distance:" + distance + ",poiType:" + v2XRoadEventEntity.getPoiType());
|
||||
if (distance <= 500) {
|
||||
if (EventTypeEnumNew.GHOST_PROBE.getPoiType().equals(v2XRoadEventEntity.getPoiType())) {
|
||||
if (distance > 25) {
|
||||
@@ -78,7 +80,7 @@ public class V2XAlarmServer {
|
||||
double carBearing = currentLocation.getHeading();
|
||||
double eventBearing = eventLocation.getAngle();
|
||||
double diffAngle = DrivingDirectionUtils.getAngleDiff(carBearing, eventBearing);
|
||||
Logger.d(TAG, "car_bearing:" + carBearing + ",eventBearing:" + eventBearing + ",diffAngle:" + diffAngle);
|
||||
CallerLogger.d(M_BIZ + TAG, "car_bearing:" + carBearing + ",eventBearing:" + eventBearing + ",diffAngle:" + diffAngle);
|
||||
if (diffAngle <= 30) {
|
||||
// 3、计算当前车辆行驶方向与事件位置之间夹角《20度,保证道路事件在车辆前方
|
||||
double eventAngle = DrivingDirectionUtils.getDegreeOfCar2Poi(
|
||||
@@ -89,31 +91,31 @@ public class V2XAlarmServer {
|
||||
(int) currentLocation.getHeading()
|
||||
);
|
||||
|
||||
Logger.d(TAG, "eventAngle:" + eventAngle);
|
||||
CallerLogger.d(M_BIZ + TAG, "eventAngle:" + eventAngle);
|
||||
if (0 <= eventAngle && eventAngle <= 25) {
|
||||
if (showedEvents.contains(v2XRoadEventEntity)) {
|
||||
return null;
|
||||
}
|
||||
Logger.d(TAG, "showed---");
|
||||
CallerLogger.d(M_BIZ + TAG, "showed---");
|
||||
showedEvents.add(v2XRoadEventEntity);
|
||||
return v2XRoadEventEntity;
|
||||
}
|
||||
}else{
|
||||
HashMap map = new HashMap<String,Double>();
|
||||
map.put("diffAngle",diffAngle);
|
||||
V2XBizTrace.Companion.onAck("事件未触发,未达到触发角度",map);
|
||||
V2XBizTrace.Companion.onAck("事件未触发,未达到触发角度",map,true);
|
||||
}
|
||||
}else{
|
||||
HashMap map = new HashMap<String,Double>();
|
||||
map.put("distance",distance);
|
||||
V2XBizTrace.Companion.onAck("事件未触发,未达到触发距离",map);
|
||||
V2XBizTrace.Companion.onAck("事件未触发,未达到触发距离",map,true);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
Logger.w(TAG, "error: " + e.getMessage());
|
||||
CallerLogger.w(M_BIZ + TAG, "error: " + e.getMessage());
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -18,6 +18,8 @@ import com.mogo.eagle.core.network.MoGoRetrofitFactory
|
||||
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.DeviceUtils
|
||||
import com.mogo.eagle.function.biz.v2x.V2XBizTrace
|
||||
import com.mogo.eagle.function.biz.v2x.v2n.V2XPoiLoader
|
||||
import io.reactivex.android.schedulers.AndroidSchedulers
|
||||
import io.reactivex.disposables.Disposable
|
||||
import io.reactivex.schedulers.Schedulers
|
||||
@@ -102,7 +104,7 @@ internal class V2XRefreshModel {
|
||||
CallerLogger.d(SceneConstant.M_V2X + TAG, "请求成功,size为:${it.result?.v2XEventList?.size}")
|
||||
return@map it.result?.v2XEventList
|
||||
} else {
|
||||
CallerLogger.d(SceneConstant.M_V2X + TAG, "请求失败,code为:${it.code}")
|
||||
V2XBizTrace.onAck("${SceneConstant.M_V2X}$TAG", mapOf("v2xEventsSummaryError" to it.code), true)
|
||||
return@map ArrayList()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,26 +1,35 @@
|
||||
package com.mogo.eagle.function.biz.v2x.v2n.pnc
|
||||
|
||||
import android.os.*
|
||||
import androidx.core.util.*
|
||||
import com.mogo.eagle.core.data.config.*
|
||||
import com.mogo.eagle.core.data.enums.*
|
||||
import android.os.Handler
|
||||
import android.os.HandlerThread
|
||||
import android.os.Message
|
||||
import androidx.core.util.Pair
|
||||
import com.mogo.eagle.core.data.config.FunctionBuildConfig
|
||||
import com.mogo.eagle.core.data.enums.CommunicationType
|
||||
import com.mogo.eagle.core.data.enums.DataSourceType
|
||||
import com.mogo.eagle.core.data.enums.EventTypeEnumNew
|
||||
import com.mogo.eagle.core.data.enums.WarningDirectionEnum.ALERT_WARNING_TOP
|
||||
import com.mogo.eagle.core.data.map.entity.*
|
||||
import com.mogo.eagle.core.data.msgbox.*
|
||||
import com.mogo.eagle.core.data.map.entity.MarkerExploreWay
|
||||
import com.mogo.eagle.core.data.map.entity.MarkerLocation
|
||||
import com.mogo.eagle.core.data.map.entity.V2XRoadEventEntity
|
||||
import com.mogo.eagle.core.data.msgbox.MsgBoxBean
|
||||
import com.mogo.eagle.core.data.msgbox.MsgBoxType.V2X
|
||||
import com.mogo.eagle.core.data.msgbox.V2XMsg
|
||||
import com.mogo.eagle.core.function.angle.scenes.Default
|
||||
import com.mogo.eagle.core.function.angle.scenes.RoadEvent
|
||||
import com.mogo.eagle.core.function.api.autopilot.*
|
||||
import com.mogo.eagle.core.function.api.hmi.warning.*
|
||||
import com.mogo.eagle.core.function.call.autopilot.*
|
||||
import com.mogo.eagle.core.function.call.hmi.*
|
||||
import com.mogo.eagle.core.function.call.map.*
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotIdentifyListener
|
||||
import com.mogo.eagle.core.function.api.hmi.warning.IMoGoWarningStatusListener
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotIdentifyListenerManager
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationWGS84ListenerManager
|
||||
import com.mogo.eagle.core.function.call.hmi.CallerHmiManager
|
||||
import com.mogo.eagle.core.function.call.map.CallerVisualAngleManager
|
||||
import com.mogo.eagle.core.function.call.msgbox.CallerMsgBoxManager.saveMsgBox
|
||||
import com.mogo.eagle.core.utilcode.mogo.*
|
||||
import com.mogo.eagle.core.utilcode.util.*
|
||||
import com.mogo.eagle.core.utilcode.mogo.AppIdentityModeUtils
|
||||
import com.mogo.eagle.core.utilcode.util.CoordinateTransform
|
||||
import com.mogo.eagle.core.utilcode.util.CoordinateUtils
|
||||
import com.mogo.eagle.core.utilcode.util.DrivingDirectionUtils
|
||||
import com.mogo.eagle.function.biz.v2x.V2XBizTrace
|
||||
import com.mogo.eagle.function.biz.v2x.v2n.scenario.scene.airoad.*
|
||||
import com.mogo.eagle.function.biz.v2x.v2n.scenario.scene.airoad.AiRoadMarker
|
||||
import com.mogo.eagle.function.biz.v2x.v2n.scenario.scene.airoad.AiRoadMarker.Marker
|
||||
import com.mogo.eagle.function.biz.v2x.v2n.utils.V2XEventAnalyticsManager
|
||||
import mogo.telematics.pad.MessagePad.Header
|
||||
@@ -36,22 +45,28 @@ internal object V2NIdentifyDrawer {
|
||||
private const val TAG = "V2NIdentifyDataSubscriber"
|
||||
|
||||
private const val MSG_WHAT_DRAW_SHIGONE = 0x1010 // 道路施工
|
||||
private const val MSG_WHAT_DRAW_SHIGU = 0x1011 // 交通事故
|
||||
private const val MSG_WHAT_DRAW_YONGDU = 0x1012 // 交通拥堵
|
||||
private const val MSG_WHAT_DRAW_SHIGU = 0x1011 // 交通事故
|
||||
private const val MSG_WHAT_DRAW_YONGDU = 0x1012 // 交通拥堵
|
||||
|
||||
private val callback = Handler.Callback { msg ->
|
||||
if (msg.what == MSG_WHAT_DRAW_SHIGONE || msg.what == MSG_WHAT_DRAW_SHIGU) {
|
||||
val events = msg.obj as? List<*>
|
||||
if (events == null || events.isEmpty()) {
|
||||
V2XBizTrace.onAck(TAG, mapOf("shiGong-shiGu" to ""))
|
||||
V2XBizTrace.onAck(TAG, mapOf("shiGong-shiGu" to ""), true)
|
||||
return@Callback true
|
||||
}
|
||||
val car = CallerChassisLocationWGS84ListenerManager.getChassisLocationWGS84()
|
||||
val filtered = events.filterIsInstance(TrackedObject::class.java).filter { itx ->
|
||||
DrivingDirectionUtils.getDegreeOfCar2Poi(car.longitude, car.latitude, itx.longitude, itx.latitude, car.heading.toInt()) < 90
|
||||
DrivingDirectionUtils.getDegreeOfCar2Poi(
|
||||
car.longitude,
|
||||
car.latitude,
|
||||
itx.longitude,
|
||||
itx.latitude,
|
||||
car.heading.toInt()
|
||||
) < 90
|
||||
}
|
||||
if (filtered.isEmpty()) {
|
||||
V2XBizTrace.onAck(TAG, mapOf("shiGong-shiGu-filter" to ""))
|
||||
V2XBizTrace.onAck(TAG, mapOf("shiGong-shiGu-filter" to ""), true)
|
||||
return@Callback true
|
||||
}
|
||||
filtered.forEach { itx ->
|
||||
@@ -60,68 +75,121 @@ internal object V2NIdentifyDrawer {
|
||||
AiRoadMarker().apply {
|
||||
val poiType = getPoiType(itx.type).poiType
|
||||
val polygon = itx.polygonList.map { Pair.create(it.longitude, it.latitude) }
|
||||
marker(Marker(id, poiType, itx.latitude,itx.longitude, itx.heading, polygon, null,
|
||||
marker(Marker(id,
|
||||
poiType,
|
||||
itx.latitude,
|
||||
itx.longitude,
|
||||
itx.heading,
|
||||
polygon,
|
||||
null,
|
||||
V2XRoadEventEntity().also { e ->
|
||||
e.poiType = poiType
|
||||
e.location = MarkerLocation().also { l ->
|
||||
val p = CoordinateTransform.WGS84ToGCJ02(itx.longitude, itx.latitude)
|
||||
l.lon = p[0]
|
||||
l.lat = p[1]
|
||||
l.angle = itx.heading
|
||||
}
|
||||
e.noveltyInfo = MarkerExploreWay().also {
|
||||
it.poiType = poiType
|
||||
it.location = e.location
|
||||
it.polygon = polygon
|
||||
}
|
||||
}), true, isDrawRoadLine(poiType))
|
||||
e.location = MarkerLocation().also { l ->
|
||||
val p = CoordinateTransform.WGS84ToGCJ02(
|
||||
itx.longitude,
|
||||
itx.latitude
|
||||
)
|
||||
l.lon = p[0]
|
||||
l.lat = p[1]
|
||||
l.angle = itx.heading
|
||||
}
|
||||
e.noveltyInfo = MarkerExploreWay().also {
|
||||
it.poiType = poiType
|
||||
it.location = e.location
|
||||
it.polygon = polygon
|
||||
}
|
||||
}), true, isDrawRoadLine(poiType)
|
||||
)
|
||||
|
||||
val distance = CoordinateUtils.calculateLineDistance(itx.longitude, itx.latitude, car.longitude, car.latitude)
|
||||
val distance = CoordinateUtils.calculateLineDistance(
|
||||
itx.longitude,
|
||||
itx.latitude,
|
||||
car.longitude,
|
||||
car.latitude
|
||||
)
|
||||
val alertContent = getAlertContent(poiType, distance.toDouble())
|
||||
val ttsContent = getTtsContent(poiType, distance.toDouble())
|
||||
V2XBizTrace.onAck(TAG,"绘制poi事件:$poiType")
|
||||
saveMsgBox(MsgBoxBean(V2X, V2XMsg(poiType, alertContent, ttsContent,CommunicationType.V2N.name)))
|
||||
CallerHmiManager.warningV2X(poiType, alertContent, ttsContent, object : IMoGoWarningStatusListener {
|
||||
override fun onShow() {
|
||||
super.onShow()
|
||||
CallerVisualAngleManager.changeAngle(RoadEvent(itx.longitude, itx.latitude, itx.angle))
|
||||
}
|
||||
V2XBizTrace.onAck(TAG, "绘制poi事件:$poiType")
|
||||
saveMsgBox(
|
||||
MsgBoxBean(
|
||||
V2X,
|
||||
V2XMsg(
|
||||
poiType,
|
||||
alertContent,
|
||||
ttsContent,
|
||||
CommunicationType.V2N.name
|
||||
)
|
||||
)
|
||||
)
|
||||
CallerHmiManager.warningV2X(
|
||||
poiType,
|
||||
alertContent,
|
||||
ttsContent,
|
||||
object : IMoGoWarningStatusListener {
|
||||
override fun onShow() {
|
||||
super.onShow()
|
||||
CallerVisualAngleManager.changeAngle(
|
||||
RoadEvent(
|
||||
itx.longitude,
|
||||
itx.latitude,
|
||||
itx.angle
|
||||
)
|
||||
)
|
||||
}
|
||||
|
||||
override fun onDismiss() {
|
||||
super.onDismiss()
|
||||
CallerVisualAngleManager.changeAngle(Default())
|
||||
}
|
||||
}, ALERT_WARNING_TOP, 10000, false)
|
||||
override fun onDismiss() {
|
||||
super.onDismiss()
|
||||
CallerVisualAngleManager.changeAngle(Default())
|
||||
}
|
||||
},
|
||||
ALERT_WARNING_TOP,
|
||||
10000,
|
||||
false
|
||||
)
|
||||
//消息埋点
|
||||
V2XEventAnalyticsManager.triggerV2XEvent(poiType, alertContent, ttsContent,
|
||||
DataSourceType.AICLOUD,CommunicationType.V2N)
|
||||
V2XEventAnalyticsManager.triggerV2XEvent(
|
||||
poiType, alertContent, ttsContent,
|
||||
DataSourceType.AICLOUD, CommunicationType.V2N
|
||||
)
|
||||
}
|
||||
}.receive()
|
||||
}
|
||||
} else if (msg.what == MSG_WHAT_DRAW_YONGDU) {
|
||||
val events = msg.obj as? List<*>
|
||||
if (events == null || events.isEmpty()) {
|
||||
V2XBizTrace.onAck(TAG, mapOf("yongDu" to ""))
|
||||
V2XBizTrace.onAck(TAG, mapOf("yongDu" to ""), true)
|
||||
return@Callback true
|
||||
}
|
||||
val car = CallerChassisLocationWGS84ListenerManager.getChassisLocationWGS84()
|
||||
val filtered = events.filterIsInstance(MogoV2X.RTEData_PB::class.java).filter { itx ->
|
||||
val eventLon = itx.eventPos?.offsetLL?.positionLatLon?.lon?.let { it * 1.0 / 10_000_000 } ?: 0.0
|
||||
val eventLat = itx.eventPos?.offsetLL?.positionLatLon?.lat?.let { it * 1.0 / 10_000_000 } ?: 0.0
|
||||
DrivingDirectionUtils.getDegreeOfCar2Poi(car.longitude, car.latitude, eventLon, eventLat, car.heading.toInt()) < 90
|
||||
val eventLon =
|
||||
itx.eventPos?.offsetLL?.positionLatLon?.lon?.let { it * 1.0 / 10_000_000 }
|
||||
?: 0.0
|
||||
val eventLat =
|
||||
itx.eventPos?.offsetLL?.positionLatLon?.lat?.let { it * 1.0 / 10_000_000 }
|
||||
?: 0.0
|
||||
DrivingDirectionUtils.getDegreeOfCar2Poi(
|
||||
car.longitude,
|
||||
car.latitude,
|
||||
eventLon,
|
||||
eventLat,
|
||||
car.heading.toInt()
|
||||
) < 90
|
||||
}
|
||||
if (filtered.isEmpty()) {
|
||||
V2XBizTrace.onAck(TAG, mapOf("yongDu-filter" to ""))
|
||||
V2XBizTrace.onAck(TAG, mapOf("yongDu-filter" to ""), true)
|
||||
return@Callback true
|
||||
}
|
||||
filtered.forEach { itx ->
|
||||
val id = itx.rteId.toString()
|
||||
val lon = itx.eventPos?.offsetLL?.positionLatLon?.lon?.let { it * 1.0 / 10_000_000 } ?: 0.0
|
||||
val lat = itx.eventPos?.offsetLL?.positionLatLon?.lat?.let { it * 1.0 / 10_000_000 } ?: 0.0
|
||||
val lon = itx.eventPos?.offsetLL?.positionLatLon?.lon?.let { it * 1.0 / 10_000_000 }
|
||||
?: 0.0
|
||||
val lat = itx.eventPos?.offsetLL?.positionLatLon?.lat?.let { it * 1.0 / 10_000_000 }
|
||||
?: 0.0
|
||||
AiRoadMarker.aiMakers.getOrPut(id) {
|
||||
AiRoadMarker().apply {
|
||||
val poiType = getPoiType(itx.eventType).poiType
|
||||
marker(Marker(id, poiType, lat, lon, car.heading, null, null,
|
||||
marker(Marker(id, poiType, lat, lon, car.heading, null, null,
|
||||
V2XRoadEventEntity().also { e ->
|
||||
e.poiType = poiType
|
||||
e.location = MarkerLocation().also { l ->
|
||||
@@ -135,27 +203,59 @@ internal object V2NIdentifyDrawer {
|
||||
it.location = e.location
|
||||
it.polygon = emptyList()
|
||||
}
|
||||
}), true, isDrawRoadLine(poiType))
|
||||
}), true, isDrawRoadLine(poiType)
|
||||
)
|
||||
|
||||
val distance = CoordinateUtils.calculateLineDistance(lon, lat, car.longitude, car.latitude)
|
||||
val distance = CoordinateUtils.calculateLineDistance(
|
||||
lon,
|
||||
lat,
|
||||
car.longitude,
|
||||
car.latitude
|
||||
)
|
||||
val alertContent = getAlertContent(poiType, distance.toDouble())
|
||||
val ttsContent = getTtsContent(poiType, distance.toDouble())
|
||||
V2XBizTrace.onAck(TAG,"绘制poi事件:$poiType")
|
||||
saveMsgBox(MsgBoxBean(V2X, V2XMsg(poiType, alertContent, ttsContent,CommunicationType.V2N.name)))
|
||||
CallerHmiManager.warningV2X(poiType, alertContent, ttsContent, object : IMoGoWarningStatusListener {
|
||||
override fun onShow() {
|
||||
super.onShow()
|
||||
CallerVisualAngleManager.changeAngle(RoadEvent(lon, lat, car.heading))
|
||||
}
|
||||
V2XBizTrace.onAck(TAG, "绘制poi事件:$poiType")
|
||||
saveMsgBox(
|
||||
MsgBoxBean(
|
||||
V2X,
|
||||
V2XMsg(
|
||||
poiType,
|
||||
alertContent,
|
||||
ttsContent,
|
||||
CommunicationType.V2N.name
|
||||
)
|
||||
)
|
||||
)
|
||||
CallerHmiManager.warningV2X(
|
||||
poiType,
|
||||
alertContent,
|
||||
ttsContent,
|
||||
object : IMoGoWarningStatusListener {
|
||||
override fun onShow() {
|
||||
super.onShow()
|
||||
CallerVisualAngleManager.changeAngle(
|
||||
RoadEvent(
|
||||
lon,
|
||||
lat,
|
||||
car.heading
|
||||
)
|
||||
)
|
||||
}
|
||||
|
||||
override fun onDismiss() {
|
||||
super.onDismiss()
|
||||
CallerVisualAngleManager.changeAngle(Default())
|
||||
}
|
||||
}, ALERT_WARNING_TOP, 10000, false)
|
||||
override fun onDismiss() {
|
||||
super.onDismiss()
|
||||
CallerVisualAngleManager.changeAngle(Default())
|
||||
}
|
||||
},
|
||||
ALERT_WARNING_TOP,
|
||||
10000,
|
||||
false
|
||||
)
|
||||
//消息埋点
|
||||
V2XEventAnalyticsManager.triggerV2XEvent(poiType, alertContent, ttsContent,
|
||||
DataSourceType.AICLOUD,CommunicationType.V2N)
|
||||
V2XEventAnalyticsManager.triggerV2XEvent(
|
||||
poiType, alertContent, ttsContent,
|
||||
DataSourceType.AICLOUD, CommunicationType.V2N
|
||||
)
|
||||
}
|
||||
}.receive()
|
||||
}
|
||||
@@ -181,7 +281,7 @@ internal object V2NIdentifyDrawer {
|
||||
}
|
||||
|
||||
private fun getAlertContent(poiType: String, distance: Double): String {
|
||||
return when(poiType) {
|
||||
return when (poiType) {
|
||||
EventTypeEnumNew.TYPE_SOCKET_ROAD_SHIGONG.poiType -> {
|
||||
"前方${distance.toInt()}米道路施工"
|
||||
}
|
||||
@@ -201,7 +301,10 @@ internal object V2NIdentifyDrawer {
|
||||
return EventTypeEnumNew.TYPE_SOCKET_ROAD_SHIGONG.poiType == poiType
|
||||
}
|
||||
|
||||
private fun getPoiType(type: Int): EventTypeEnumNew = if (type == 501 || type == 502) EventTypeEnumNew.TYPE_SOCKET_ROAD_SHIGONG else if (type == 13) EventTypeEnumNew.TYPE_SOCKET_ROAD_SHIGU else if (type == 102) EventTypeEnumNew.TYPE_SOCKET_ROAD_CONGESTION else throw AssertionError("error!!!")
|
||||
private fun getPoiType(type: Int): EventTypeEnumNew =
|
||||
if (type == 501 || type == 502) EventTypeEnumNew.TYPE_SOCKET_ROAD_SHIGONG else if (type == 13) EventTypeEnumNew.TYPE_SOCKET_ROAD_SHIGU else if (type == 102) EventTypeEnumNew.TYPE_SOCKET_ROAD_CONGESTION else throw AssertionError(
|
||||
"error!!!"
|
||||
)
|
||||
|
||||
private val handler by lazy {
|
||||
val thread = HandlerThread("v2n_identify_drawer")
|
||||
@@ -225,12 +328,7 @@ internal object V2NIdentifyDrawer {
|
||||
|
||||
override fun onAutopilotV2nCongestionEvent(header: Header, rsi: RSI_PB) {
|
||||
super.onAutopilotV2nCongestionEvent(header, rsi)
|
||||
try {
|
||||
V2XBizTrace.onAck("onAutopilotV2nCongestionEvent", rsi)
|
||||
} catch (t: Throwable) {
|
||||
t.printStackTrace()
|
||||
}
|
||||
|
||||
V2XBizTrace.onAck("onAutopilotV2nCongestionEvent", rsi)
|
||||
rsi.rsiFrame?.rtes?.rteDataList?.filter {
|
||||
it.eventType == 102
|
||||
}?.takeIf {
|
||||
@@ -242,7 +340,7 @@ internal object V2NIdentifyDrawer {
|
||||
}
|
||||
|
||||
private fun drawShiGong(events: List<TrackedObject>) {
|
||||
if (AppIdentityModeUtils.isTaxi(FunctionBuildConfig.appIdentityMode) && FunctionBuildConfig.v2nMainSwitch && FunctionBuildConfig.isNewV2NData) {
|
||||
if (AppIdentityModeUtils.isTaxi(FunctionBuildConfig.appIdentityMode) && FunctionBuildConfig.v2nMainSwitch && FunctionBuildConfig.isNewV2NData) {
|
||||
handler.removeMessages(MSG_WHAT_DRAW_SHIGONE)
|
||||
handler.sendMessage(Message.obtain(handler, MSG_WHAT_DRAW_SHIGONE, events))
|
||||
}
|
||||
|
||||
@@ -136,11 +136,11 @@ class AiRoadMarker {
|
||||
return@post
|
||||
}
|
||||
if (l1 == null || l2 == null) {
|
||||
V2XBizTrace.onAck("$TAG -marker-3-line null return ----", "")
|
||||
V2XBizTrace.onAck("$TAG -marker-3-line null return ----", "", true)
|
||||
return@post
|
||||
}
|
||||
if (l1.points.isEmpty() || l2.points.isEmpty()) {
|
||||
V2XBizTrace.onAck("$TAG -marker-3-line points null return ----", "")
|
||||
V2XBizTrace.onAck("$TAG -marker-3-line points null return ----", "", true)
|
||||
return@post
|
||||
}
|
||||
V2XBizTrace.onAck("$TAG -marker-4-l2:", l2)
|
||||
|
||||
@@ -36,10 +36,10 @@ public class V2XRoadEventMarker implements IV2XMarker<V2XRoadEventEntity> {
|
||||
IMoGoOverlayManager overlayManager = CallerMapUIServiceManager.INSTANCE.getOverlayManager();
|
||||
if (overlayManager != null) {
|
||||
if (entity != null) {
|
||||
V2XBizTrace.Companion.onAck("V2XRoadEventMarker -> poiType : ", entity.getPoiType());
|
||||
V2XBizTrace.Companion.onAck("V2XRoadEventMarker -> poiType : ", entity.getPoiType(), false);
|
||||
if (isAiRoadEvent(entity.getPoiType())) {
|
||||
MarkerExploreWay noveltyInfo = entity.getNoveltyInfo();
|
||||
V2XBizTrace.Companion.onAck("V2XRoadEventMarker -> noveltyInfo : ",noveltyInfo.toString());
|
||||
V2XBizTrace.Companion.onAck("V2XRoadEventMarker -> noveltyInfo : ",noveltyInfo.toString(), false);
|
||||
Pair<Double, Double> gpsLocation = noveltyInfo.getGpsLocation();
|
||||
List<Pair<Double, Double>> polygons = noveltyInfo.getPolygon();
|
||||
if (gpsLocation != null && polygons != null) {
|
||||
@@ -57,7 +57,7 @@ public class V2XRoadEventMarker implements IV2XMarker<V2XRoadEventEntity> {
|
||||
.set3DMode(true)
|
||||
.icon3DRes(EventTypeEnumNew.getMarker3DRes(entity.getPoiType())).build(),DEFAULT);
|
||||
if (point != null) {
|
||||
V2XBizTrace.Companion.onAck("V2XRoadEventMarker -> --- add Marker type: ", entity.getPoiType());
|
||||
V2XBizTrace.Companion.onAck("V2XRoadEventMarker -> --- add Marker type: ", entity.getPoiType(), false);
|
||||
ArrayList<Point> markers = new ArrayList<>();
|
||||
markers.add(point);
|
||||
String id = entity.getLocation().getLon() + "_" + entity.getLocation().getLat();
|
||||
|
||||
@@ -48,7 +48,7 @@ public class V2XRoadEventScenario extends AbsV2XScenario<V2XRoadEventEntity> imp
|
||||
@Override
|
||||
public void init(V2XMessageEntity<V2XRoadEventEntity> v2XMessageEntity) {
|
||||
try {
|
||||
V2XBizTrace.Companion.onAck("v2XMessageEntity",v2XMessageEntity);
|
||||
V2XBizTrace.Companion.onAck("v2XMessageEntity",v2XMessageEntity,false);
|
||||
V2XRoadEventEntity v2XRoadEventEntity = v2XMessageEntity.getContent();
|
||||
if (v2XRoadEventEntity != null) {
|
||||
if (!isSameScenario(v2XMessageEntity)) {
|
||||
|
||||
@@ -123,7 +123,7 @@ class VipCarManager : IMogoOnMessageListener<VipMessage>, IMoGoTrafficLightListe
|
||||
}
|
||||
|
||||
if (trafficLightResult.currentRoadTrafficLight() == null) {
|
||||
V2XBizTrace.onAck("$M_V2X$TAG", "vip获取到灯态,但没找到对应车道数据 trafficLight:$$trafficLightResult")
|
||||
V2XBizTrace.onAck("$M_V2X$TAG", "vip获取到灯态,但没找到对应车道数据 trafficLight:$$trafficLightResult", true)
|
||||
result = null
|
||||
return
|
||||
}
|
||||
@@ -258,7 +258,7 @@ class VipCarManager : IMogoOnMessageListener<VipMessage>, IMoGoTrafficLightListe
|
||||
",crossId:${result?.crossId}" +
|
||||
",bearing:$bearing" +
|
||||
",controlTime:$controlTime"
|
||||
)
|
||||
,true)
|
||||
ToastUtils.showLong("服务异常,请稍后重试")
|
||||
})
|
||||
}
|
||||
|
||||
@@ -828,7 +828,7 @@ class MoGoAdasListenerImpl : OnAdasListener {
|
||||
* @param rsi 数据
|
||||
*/
|
||||
@ChainLog(
|
||||
linkChainLog = ChainConstant.CHAIN_TYPE_V2X,
|
||||
linkChainLog = ChainConstant.CHAIN_TYPE_STATUS,
|
||||
linkCode = ChainConstant.CHAIN_SOURCE_CLOUD,
|
||||
nodeAliasCode = ChainConstant.CHAIN_CODE_V2X_MSG,
|
||||
paramIndexes = [0, 1]
|
||||
@@ -848,7 +848,7 @@ class MoGoAdasListenerImpl : OnAdasListener {
|
||||
* @param parkingViolation 违停 ---包含 静态障碍车
|
||||
*/
|
||||
@ChainLog(
|
||||
linkChainLog = ChainConstant.CHAIN_TYPE_V2X,
|
||||
linkChainLog = ChainConstant.CHAIN_TYPE_STATUS,
|
||||
linkCode = ChainConstant.CHAIN_SOURCE_CLOUD,
|
||||
nodeAliasCode = ChainConstant.CHAIN_CODE_V2X_MSG,
|
||||
paramIndexes = [0]
|
||||
|
||||
@@ -407,4 +407,8 @@ class DevaToolsProvider : IDevaToolsProvider {
|
||||
override fun block(): IMoGoBlockProvider? = block
|
||||
|
||||
override fun usage(): IMoGoCpuUsageProvider? = usage
|
||||
|
||||
override fun setNetworkMode(isDebug: Boolean) {
|
||||
WeakNetworkStrategy.setDebug(isDebug)
|
||||
}
|
||||
}
|
||||
@@ -4,10 +4,10 @@ import android.content.Context
|
||||
import com.mogo.commons.constants.HostConst
|
||||
import com.mogo.commons.constants.SharedPrefsConstants
|
||||
import com.mogo.commons.debug.DebugConfig
|
||||
import com.mogo.eagle.core.data.config.HdMapBuildConfig
|
||||
import com.mogo.eagle.core.data.deva.bindingcar.BindingCarInfo
|
||||
import com.mogo.eagle.core.data.deva.bindingcar.BindingCarRequest
|
||||
import com.mogo.eagle.core.data.deva.bindingcar.ModifyBindingcarInfo
|
||||
import com.mogo.eagle.core.data.config.HdMapBuildConfig
|
||||
import com.mogo.eagle.core.data.deva.chain.ChainConstant
|
||||
import com.mogo.eagle.core.function.call.hmi.CallerHmiManager.showBindingCarDialog
|
||||
import com.mogo.eagle.core.function.call.hmi.CallerHmiManager.showModifyBindingCarDialog
|
||||
@@ -74,8 +74,19 @@ class BindingCarNetWorkManager private constructor() {
|
||||
.subscribe(object : Observer<BindingCarInfo> {
|
||||
override fun onSubscribe(d: Disposable) {}
|
||||
override fun onNext(info: BindingCarInfo) {
|
||||
if (info != null && info.getData() != null) {
|
||||
bindLog(mapOf("bindResult" to true,"carType" to getDefaultId(),"msg" to info))
|
||||
if (info?.getData() != null) {
|
||||
if ((info.code != 0 && info.code != 200)) {
|
||||
bindLog(mapOf("bindResult" to false, "msg" to info.toString()))
|
||||
return
|
||||
}
|
||||
|
||||
bindLog(
|
||||
mapOf(
|
||||
"bindResult" to true,
|
||||
"carType" to getDefaultId(),
|
||||
"msg" to info
|
||||
)
|
||||
)
|
||||
SharedPrefsMgr.getInstance(context).putString(
|
||||
SharedPrefsConstants.CAR_INFO,
|
||||
GsonUtils.toJson(info.getData())
|
||||
@@ -87,15 +98,22 @@ class BindingCarNetWorkManager private constructor() {
|
||||
}
|
||||
updateCarVrIconRes(info.getData().brandId)
|
||||
} else {
|
||||
SharedPrefsMgr.getInstance(context).putString(SharedPrefsConstants.CAR_INFO, "")
|
||||
e(SceneConstant.M_DEVA + TAG, "getBindingCarInfo data = null ---getDefaultId() : ${getDefaultId()} ")
|
||||
SharedPrefsMgr.getInstance(context)
|
||||
.putString(SharedPrefsConstants.CAR_INFO, "")
|
||||
e(
|
||||
SceneConstant.M_DEVA + TAG,
|
||||
"getBindingCarInfo data = null ---getDefaultId() : ${getDefaultId()} "
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
override fun onError(e: Throwable) {
|
||||
SharedPrefsMgr.getInstance(context).putString(SharedPrefsConstants.CAR_INFO, "")
|
||||
bindLog(mapOf("bindResult" to false,"msg" to e.toString()))
|
||||
e(SceneConstant.M_DEVA + TAG, "getBindingCarInfo onError e = " + e.toString() + "---e.getMessage = " + e.message + "---getDefaultId() : ${getDefaultId()}")
|
||||
bindLog(mapOf("bindResult" to false, "msg" to e.toString()))
|
||||
e(
|
||||
SceneConstant.M_DEVA + TAG,
|
||||
"getBindingCarInfo onError e = " + e.toString() + "---e.getMessage = " + e.message + "---getDefaultId() : ${getDefaultId()}"
|
||||
)
|
||||
}
|
||||
|
||||
override fun onComplete() {}
|
||||
@@ -131,14 +149,18 @@ class BindingCarNetWorkManager private constructor() {
|
||||
override fun onSubscribe(d: Disposable) {}
|
||||
override fun onNext(info: ModifyBindingcarInfo) {
|
||||
if (info != null) {
|
||||
if ((info.code != 0 && info.code != 200)) {
|
||||
bindLog(mapOf("bindingStatus" to false, "bindMsg" to info.toString()))
|
||||
return
|
||||
}
|
||||
callBack.invoke(info)
|
||||
bindLog(mapOf("bindingStatus" to true,"bindMsg" to info))
|
||||
bindLog(mapOf("bindingStatus" to true, "bindMsg" to info))
|
||||
updateCarVrIconRes(info.data.brandId)
|
||||
}
|
||||
}
|
||||
|
||||
override fun onError(e: Throwable) {
|
||||
bindLog(mapOf("bindingStatus" to false,"bindMsg" to e.toString()))
|
||||
bindLog(mapOf("bindingStatus" to false, "bindMsg" to e.toString()))
|
||||
}
|
||||
|
||||
override fun onComplete() {}
|
||||
@@ -147,7 +169,7 @@ class BindingCarNetWorkManager private constructor() {
|
||||
|
||||
private fun updateCarVrIconRes(brandId: String?) {
|
||||
d(SceneConstant.M_DEVA + TAG, "CarModelChange : ${DebugConfig.isCarModelChange()}")
|
||||
if(!DebugConfig.isCarModelChange()){
|
||||
if (!DebugConfig.isCarModelChange()) {
|
||||
return
|
||||
}
|
||||
if (brandId == null || brandId.isEmpty()) {
|
||||
@@ -188,7 +210,7 @@ class BindingCarNetWorkManager private constructor() {
|
||||
nodeAliasCode = ChainConstant.CHAIN_CODE_BINDING_CAR,
|
||||
paramIndexes = [0]
|
||||
)
|
||||
private fun bindLog(msg:Map<String,Any>){
|
||||
private fun bindLog(msg: Map<String, Any>) {
|
||||
d(SceneConstant.M_DEVA + TAG, "bindLog : $msg")
|
||||
}
|
||||
|
||||
|
||||
@@ -253,14 +253,6 @@ internal class OverViewImpl(ctx: Context) : IFlow<OverViewStatus>(ctx),
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 工控机连接状态
|
||||
*/
|
||||
override fun onAutopilotIpcConnectStatusChanged(status: Int, reason: String?) {
|
||||
super.onAutopilotIpcConnectStatusChanged(status, reason)
|
||||
}
|
||||
|
||||
|
||||
override fun onDestroy() {
|
||||
super.onDestroy()
|
||||
// CallerDevaToolsListenerManager.removeListener(TAG)
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
package com.zhjt.mogo_core_function_devatools.status.flow.rtk
|
||||
|
||||
import android.content.Context
|
||||
import android.util.Log
|
||||
import com.mogo.eagle.core.data.map.MogoLocation
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotStatusListener
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoChassisLocationWGS84Listener
|
||||
@@ -66,7 +65,7 @@ internal class RTKImpl(ctx: Context): IFlow<RTKStatus>(ctx), IMoGoAutopilotStatu
|
||||
check?.takeIf { it.isActive }?.cancel()
|
||||
isOldVersion.set(false)
|
||||
val info = status.healthInfoList?.find { "localization".equals(it.name, true) }
|
||||
Log.d(TAG, "info: $info")
|
||||
CallerLogger.d("$M_DEVA$TAG", "info: $info")
|
||||
if (info != null) {
|
||||
healthInfo.set(info)
|
||||
send(RTKStatus(getDesc(), getCode()))
|
||||
@@ -77,7 +76,7 @@ internal class RTKImpl(ctx: Context): IFlow<RTKStatus>(ctx), IMoGoAutopilotStatu
|
||||
check?.takeIf { it.isActive }?.cancel()
|
||||
isOldVersion.set(false)
|
||||
val info = statusInf.healthInfoList?.find { "localization".equals(it.name, true) }
|
||||
Log.d(TAG, "info: $info")
|
||||
CallerLogger.d("$M_DEVA$TAG", "info: $info")
|
||||
if (info != null) {
|
||||
healthInfo.set(info)
|
||||
send(RTKStatus(getDesc(), getCode()))
|
||||
|
||||
@@ -74,8 +74,6 @@ class TraceManager : IMoGoCloudListener, IMoGoAutopilotCarConfigListener {
|
||||
FwBuild(true, -1, pkgName + ChainConstant.CHAIN_LINK_LOG_ADAS_TRAFFIC_LIGHT)
|
||||
fwBuildMap[ChainConstant.CHAIN_TYPE_ANR_LEAK] =
|
||||
FwBuild(true, -1, pkgName + ChainConstant.CHAIN_LINK_LOG_RECORD_ANR)
|
||||
fwBuildMap[ChainConstant.CHAIN_TYPE_V2X] =
|
||||
FwBuild(true, -1, pkgName + ChainConstant.CHAIN_LINK_LOG_V2X)
|
||||
fwBuildMap[ChainConstant.CHAIN_TYPE_WEAK_NETWORK] =
|
||||
FwBuild(true, -1, pkgName + ChainConstant.CHAIN_LINK_LOG_RECORD_WEAK_NETWORK)
|
||||
fwBuildMap[ChainConstant.CHAIN_TYPE_OCH] =
|
||||
@@ -98,8 +96,6 @@ class TraceManager : IMoGoCloudListener, IMoGoAutopilotCarConfigListener {
|
||||
ChainLogParam(true, "红绿灯Union数据")
|
||||
traceInfoCache[ChainConstant.CHAIN_TYPE_ANR_LEAK] =
|
||||
ChainLogParam(true, "ANR Record")
|
||||
traceInfoCache[ChainConstant.CHAIN_TYPE_V2X] =
|
||||
ChainLogParam(true, "V2X(V2N/V2I)")
|
||||
traceInfoCache[ChainConstant.CHAIN_TYPE_WEAK_NETWORK] =
|
||||
ChainLogParam(true, "WeakNetWork Record")
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ object WeakNetworkStrategy {
|
||||
private const val TAG = "WeakNetworkStrategy"
|
||||
|
||||
// 记录到链路日志中的时间间隔
|
||||
private const val OUTPUT_TIME_INTERVAL = 15000
|
||||
private const val OUTPUT_TIME_INTERVAL = 2500
|
||||
|
||||
private const val WEAK_HTTP_RTT = 1300
|
||||
|
||||
@@ -23,6 +23,8 @@ object WeakNetworkStrategy {
|
||||
|
||||
private var lastOutputTime = 0L
|
||||
|
||||
private var isDebug = false
|
||||
|
||||
private val lock by lazy {
|
||||
ReentrantReadWriteLock()
|
||||
}
|
||||
@@ -53,6 +55,10 @@ object WeakNetworkStrategy {
|
||||
})
|
||||
}
|
||||
|
||||
fun setDebug(isDebug: Boolean) {
|
||||
this.isDebug = isDebug
|
||||
}
|
||||
|
||||
fun stopListen() {
|
||||
setListener(null)
|
||||
}
|
||||
@@ -63,10 +69,13 @@ object WeakNetworkStrategy {
|
||||
try {
|
||||
val currentTime = System.currentTimeMillis()
|
||||
if (currentTime - lastOutputTime > OUTPUT_TIME_INTERVAL) {
|
||||
if (isDebug) {
|
||||
invokeWeakResult("url为:$url, 耗时为:$timeStamp${if (isFail) " 连接失败!" else ""}")
|
||||
}
|
||||
if (timeStamp >= WEAK_HTTP_RTT) {
|
||||
ToastUtils.showShort("当前网络质量差!")
|
||||
} else if (timeStamp in 300 until WEAK_HTTP_RTT) {
|
||||
invokeWeakResult("url为:$url, 耗时为:$timeStamp${if (isFail) " 连接失败!" else ""}")
|
||||
// invokeWeakResult("url为:$url, 耗时为:$timeStamp${if (isFail) " 连接失败!" else ""}")
|
||||
SdtManager.startActiveCheck()
|
||||
}
|
||||
lastOutputTime = currentTime
|
||||
|
||||
@@ -11,6 +11,7 @@ import android.os.Build
|
||||
import android.os.Process
|
||||
import android.text.Html
|
||||
import android.util.AttributeSet
|
||||
import android.util.Log
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import androidx.annotation.RequiresApi
|
||||
@@ -21,6 +22,7 @@ import androidx.core.view.MenuCompat
|
||||
import androidx.core.view.isVisible
|
||||
import androidx.lifecycle.lifecycleScope
|
||||
import chassis.Chassis
|
||||
import com.mogo.cloud.network.cronet.NetworkQualityListener
|
||||
import com.mogo.cloud.network.cronet.QuicConfig
|
||||
import com.mogo.cloud.passport.MoGoAiCloudClient
|
||||
import com.mogo.cloud.passport.MoGoAiCloudClientConfig
|
||||
@@ -86,6 +88,7 @@ import com.mogo.eagle.core.utilcode.util.*
|
||||
import com.mogo.map.MogoData.Companion.mogoMapData
|
||||
import com.mogo.map.uicontroller.VisualAngleMode
|
||||
import com.mogo.map.uicontroller.VisualAngleMode.*
|
||||
import com.zhjt.service.chain.ChainLog
|
||||
import kotlinx.android.synthetic.main.view_debug_setting.view.*
|
||||
import kotlinx.coroutines.*
|
||||
import mogo.telematics.pad.MessagePad
|
||||
@@ -773,7 +776,35 @@ internal class DebugSettingView @JvmOverloads constructor(
|
||||
FunctionBuildConfig.isObuWarningFusionUnion = isChecked
|
||||
}
|
||||
tbCronet.setOnCheckedChangeListener { _, isChecked ->
|
||||
if (!isChecked) {
|
||||
CallerDevaToolsManager.setNetworkMode(true)
|
||||
}
|
||||
QuicConfig.setEnable(context, isChecked)
|
||||
QuicConfig.setNetworkListener(object : NetworkQualityListener {
|
||||
override fun onLatencyObservation(rttMs: Int, url: String?) {
|
||||
invokeCronetResult("****** Cronet Request Completed, the latency is $rttMs ms;url is $url")
|
||||
}
|
||||
|
||||
override fun onFailed(error: String?, url: String?) {
|
||||
invokeCronetResult("****** Cronet Request onFailed, error is $error;url is $url")
|
||||
}
|
||||
|
||||
override fun onCanceled(url: String?) {
|
||||
invokeCronetResult("****** Cronet Request onFailed, url is: $url")
|
||||
}
|
||||
|
||||
override fun onRttObservation(rttMs: Int, whenMs: Long, source: Int) {
|
||||
invokeCronetResult("rttMs is:$rttMs ms,source is:$source")
|
||||
}
|
||||
|
||||
override fun onThroughputObservation(
|
||||
throughputKbps: Int,
|
||||
whenMs: Long,
|
||||
source: Int
|
||||
) {
|
||||
invokeCronetResult("downstream throughput is:$throughputKbps,source is:$source")
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
//重启工控机所有节点
|
||||
@@ -2310,4 +2341,13 @@ internal class DebugSettingView @JvmOverloads constructor(
|
||||
}
|
||||
}
|
||||
|
||||
@ChainLog(
|
||||
linkChainLog = ChainConstant.CHAIN_TYPE_WEAK_NETWORK,
|
||||
linkCode = ChainConstant.CHAIN_SOURCE_WEAK_NETWORK,
|
||||
nodeAliasCode = ChainConstant.CHAIN_CODE_RECORD_WEAK_NETWORK,
|
||||
paramIndexes = [0]
|
||||
)
|
||||
private fun invokeCronetResult(json: String) {
|
||||
Log.d("CronetNetwork", json)
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,9 @@
|
||||
package com.mogo.eagle.core.function.hmi.ui.utils
|
||||
|
||||
import com.mogo.eagle.core.data.deva.chain.ChainCommon
|
||||
import com.mogo.eagle.core.data.deva.chain.ChainConstant
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationGCJ02ListenerManager
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_HMI
|
||||
import com.zhjt.service.chain.ChainLog
|
||||
@@ -9,14 +12,34 @@ class HmiActionLog {
|
||||
|
||||
companion object {
|
||||
|
||||
fun hmiAction(data: Any, data1: Any, param: Boolean = false) {
|
||||
CallerLogger.d(M_HMI + data.toString(), data1)
|
||||
if (param) {
|
||||
val cal = CallerChassisLocationGCJ02ListenerManager.getChassisLocationGCJ02()
|
||||
val lineId = CallerAutoPilotStatusListenerManager.getLineId()
|
||||
realParamAction(data, data1, ChainCommon(cal.latitude, cal.longitude, lineId))
|
||||
} else {
|
||||
realAction(data, data1)
|
||||
}
|
||||
}
|
||||
|
||||
@ChainLog(
|
||||
linkChainLog = ChainConstant.CHAIN_TYPE_STATUS,
|
||||
linkCode = ChainConstant.CHAIN_SOURCE_HMI,
|
||||
nodeAliasCode = ChainConstant.CHAIN_CODE_HMI_ACTIONS,
|
||||
paramIndexes = [0, 1]
|
||||
)
|
||||
fun hmiAction(data: Any, data1: Any) {
|
||||
CallerLogger.d(M_HMI + data.toString(), data1)
|
||||
private fun realAction(data: Any, data1: Any) {
|
||||
|
||||
}
|
||||
|
||||
@ChainLog(
|
||||
linkChainLog = ChainConstant.CHAIN_TYPE_STATUS,
|
||||
linkCode = ChainConstant.CHAIN_SOURCE_HMI,
|
||||
nodeAliasCode = ChainConstant.CHAIN_CODE_HMI_ACTIONS,
|
||||
paramIndexes = [0, 1, 2]
|
||||
)
|
||||
private fun realParamAction(data: Any, data1: Any, chainCommon: ChainCommon) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,7 +6,6 @@ import android.annotation.SuppressLint
|
||||
import android.content.Context
|
||||
import android.graphics.Color
|
||||
import android.util.AttributeSet
|
||||
import android.util.Log
|
||||
import android.view.LayoutInflater
|
||||
import android.view.animation.LinearInterpolator
|
||||
import android.widget.ImageView
|
||||
@@ -22,6 +21,9 @@ import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListener
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerParallelDrivingActionsListenerManager
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerParallelDrivingListenerManager
|
||||
import com.mogo.eagle.core.function.hmi.R
|
||||
import com.mogo.eagle.core.function.hmi.ui.utils.HmiActionLog
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_HMI
|
||||
import com.mogo.eagle.core.utilcode.util.ThreadUtils
|
||||
import com.mogo.eagle.core.utilcode.util.ToastUtils
|
||||
import com.zhjt.mogo.adas.data.bean.UnableLaunchReason
|
||||
@@ -74,9 +76,9 @@ class ParallelDriveView @JvmOverloads constructor(
|
||||
override fun onAttachedToWindow() {
|
||||
super.onAttachedToWindow()
|
||||
initView()
|
||||
CallerAutoPilotStatusListenerManager.addListener(TAG, this)
|
||||
CallerParallelDrivingListenerManager.addListener(TAG, this)
|
||||
CallerParallelDrivingActionsListenerManager.addListener(TAG, this)
|
||||
CallerAutoPilotStatusListenerManager.addListener("$M_HMI$TAG", this)
|
||||
CallerParallelDrivingListenerManager.addListener("$M_HMI$TAG", this)
|
||||
CallerParallelDrivingActionsListenerManager.addListener("$M_HMI$TAG", this)
|
||||
}
|
||||
|
||||
private fun initView() {
|
||||
@@ -88,7 +90,7 @@ class ParallelDriveView @JvmOverloads constructor(
|
||||
when (state) {
|
||||
0 -> {
|
||||
state = APP_REQUESTING
|
||||
Log.d(TAG, "Click-开始请求平行驾驶")
|
||||
HmiActionLog.hmiAction(TAG,"Click-开始请求平行驾驶")
|
||||
updateUI(APP_REQUESTING)
|
||||
reqParaDrive()
|
||||
listener?.onReqClick()
|
||||
@@ -96,18 +98,18 @@ class ParallelDriveView @JvmOverloads constructor(
|
||||
|
||||
APP_REQUESTING -> {
|
||||
cancelParaDrive()
|
||||
Log.d(TAG, "Click-请求已取消")
|
||||
HmiActionLog.hmiAction(TAG,"Click-请求已取消")
|
||||
ToastUtils.showShort("请求已取消!")
|
||||
checkAvailableAndUpdateUI()
|
||||
}
|
||||
|
||||
AD_REQUESTING -> {
|
||||
Log.d(TAG, "Click-自动驾驶正在请求平行驾驶")
|
||||
HmiActionLog.hmiAction(TAG,"Click-自动驾驶正在请求平行驾驶")
|
||||
ToastUtils.showShort("自动驾驶正在请求平行驾驶")
|
||||
}
|
||||
|
||||
UNAVAILABLE -> {
|
||||
Log.d(TAG, "Click-请P档驻车并松开油门刹车后请求")
|
||||
HmiActionLog.hmiAction(TAG,"Click-请P档驻车并松开油门刹车后请求")
|
||||
ToastUtils.showShort("请P档驻车并松开油门刹车后请求")
|
||||
}
|
||||
}
|
||||
@@ -124,7 +126,6 @@ class ParallelDriveView @JvmOverloads constructor(
|
||||
when (state) {
|
||||
7 -> {
|
||||
isAutoDriving = false
|
||||
Log.d(TAG, "onAutopilotStatusResponse-7")
|
||||
ThreadUtils.runOnUiThread({
|
||||
this.state = PARALLEL_DRIVING
|
||||
updateUI(PARALLEL_DRIVING)
|
||||
@@ -133,7 +134,6 @@ class ParallelDriveView @JvmOverloads constructor(
|
||||
|
||||
2 -> {
|
||||
isAutoDriving = true
|
||||
Log.d(TAG, "onAutopilotStatusResponse-2")
|
||||
if (this.autopilotState == 7) {
|
||||
ThreadUtils.runOnUiThread({
|
||||
checkAvailableAndUpdateUI()
|
||||
@@ -143,7 +143,6 @@ class ParallelDriveView @JvmOverloads constructor(
|
||||
|
||||
else -> {
|
||||
isAutoDriving = false
|
||||
Log.d(TAG, "onAutopilotStatusResponse-else")
|
||||
if (this.autopilotState == 7) {
|
||||
ThreadUtils.runOnUiThread({
|
||||
checkAvailableAndUpdateUI()
|
||||
@@ -158,14 +157,14 @@ class ParallelDriveView @JvmOverloads constructor(
|
||||
isParallelDrivingAbility: Boolean
|
||||
) {
|
||||
if (!isParallelDrivingAbility) {
|
||||
Log.d(TAG, "onParallelDrivingAbility-UNAVAILABLE")
|
||||
CallerLogger.d("$M_HMI$TAG", "onParallelDrivingAbility-UNAVAILABLE")
|
||||
ThreadUtils.runOnUiThread({
|
||||
if (state == PARALLEL_DRIVING) return@runOnUiThread
|
||||
state = UNAVAILABLE
|
||||
updateUI(UNAVAILABLE)
|
||||
}, ThreadUtils.MODE.QUEUE)
|
||||
} else {
|
||||
Log.d(TAG, "onParallelDrivingAbility-AVAILABLE")
|
||||
CallerLogger.d("$M_HMI$TAG", "onParallelDrivingAbility-AVAILABLE")
|
||||
ThreadUtils.runOnUiThread({
|
||||
if (state == PARALLEL_DRIVING) return@runOnUiThread
|
||||
state = 0
|
||||
@@ -176,8 +175,8 @@ class ParallelDriveView @JvmOverloads constructor(
|
||||
|
||||
override fun onParallelDrivingResp(parallelTaskProcessNotice: ParallelTaskProcessNoticeOuterClass.ParallelTaskProcessNotice?) {
|
||||
parallelTaskProcessNotice?.let {
|
||||
CallerLogger.d("$M_HMI$TAG", "onParallelDrivingResp-code:${it.code}")
|
||||
ThreadUtils.runOnUiThread({
|
||||
Log.d(TAG, "onParallelDrivingResp-code:${it.code}")
|
||||
when (it.code) {
|
||||
"START_SYNC" -> {// 同步中
|
||||
state = SYNCHRONIZING
|
||||
@@ -452,9 +451,9 @@ class ParallelDriveView @JvmOverloads constructor(
|
||||
|
||||
override fun onDetachedFromWindow() {
|
||||
super.onDetachedFromWindow()
|
||||
CallerAutoPilotStatusListenerManager.removeListener(TAG)
|
||||
CallerParallelDrivingListenerManager.removeListener(TAG)
|
||||
CallerParallelDrivingActionsListenerManager.removeListener(TAG)
|
||||
CallerAutoPilotStatusListenerManager.removeListener("$M_HMI$TAG")
|
||||
CallerParallelDrivingListenerManager.removeListener("$M_HMI$TAG")
|
||||
CallerParallelDrivingActionsListenerManager.removeListener("$M_HMI$TAG")
|
||||
}
|
||||
|
||||
interface ClickEventListener {
|
||||
|
||||
@@ -96,7 +96,6 @@ class SteeringWheelView : ConstraintLayout, IMoGoChassisSteeringStateListener,
|
||||
object : IMoGoAutopilotStatusListener {
|
||||
override fun onAutopilotStatusResponse(state: Int) {
|
||||
ThreadUtils.runOnUiThread {
|
||||
d("$M_BUS_P$TAG", "state = %s", state)
|
||||
if (autopilotIV != null) {
|
||||
if (state == IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_RUNNING) {
|
||||
if (!isBus(FunctionBuildConfig.appIdentityMode)) {
|
||||
|
||||
@@ -136,10 +136,7 @@ class SystemVersionView @JvmOverloads constructor(
|
||||
}
|
||||
|
||||
ivHDCache.setOnClickListener {
|
||||
hmiAction(
|
||||
"$M_HMI$TAG",
|
||||
"HD map view click , isHDCached:$isHDCached , lon:${getChassisLocationWGS84().longitude} , lat:${getChassisLocationWGS84().latitude}"
|
||||
)
|
||||
hmiAction("$M_HMI$TAG", mapOf("isHDCached" to isHDCached))
|
||||
if (isHDCached) {// 已缓存
|
||||
ToastUtils.showShort(resources.getString(R.string.offline_had_downloaded))
|
||||
} else {// 未缓存
|
||||
|
||||
@@ -41,7 +41,6 @@ import com.mogo.eagle.core.function.hmi.ui.widget.StatusBarView
|
||||
import com.mogo.eagle.core.function.main.modules.MogoModulesManager
|
||||
import com.mogo.eagle.core.function.main.windowview.FloatingViewHandler
|
||||
import com.mogo.eagle.core.utilcode.mogo.AppLaunchTimeUtils
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger.d
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger.i
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant
|
||||
@@ -59,10 +58,6 @@ import java.io.File
|
||||
|
||||
|
||||
/**
|
||||
* @author congtaowang
|
||||
* @since 2019-12-23
|
||||
*
|
||||
*
|
||||
* 描述:加载各个模块
|
||||
*/
|
||||
open class MainActivity : MvpActivity<MainView?, MainPresenter?>(), MainView,
|
||||
@@ -76,7 +71,8 @@ open class MainActivity : MvpActivity<MainView?, MainPresenter?>(), MainView,
|
||||
private var isFirst = false
|
||||
private var mConnAdapter: ConnInfoAdapter? = null
|
||||
private val dataList: List<AutopilotStatusInfo> = ArrayList()
|
||||
private var mLastStatus = 0x00
|
||||
// private var mLastStatus = 0x00
|
||||
private var mLastStatus = 0x01
|
||||
private var isFloatingLayerHidden = false
|
||||
|
||||
override fun getLayoutId(): Int {
|
||||
@@ -327,11 +323,11 @@ open class MainActivity : MvpActivity<MainView?, MainPresenter?>(), MainView,
|
||||
MogoStatusManager.getInstance().setMainPageIsBackgroundStatus(TAG, true)
|
||||
}
|
||||
|
||||
override fun onAutopilotStatusResponse(autoPilotStatusInfo: AutopilotStatusInfo) {
|
||||
override fun onAutopilotIpcConnectStatusChanged(status: Int, reason: String?) {
|
||||
super.onAutopilotIpcConnectStatusChanged(status, reason)
|
||||
UiThreadHandler.post {
|
||||
val status = autoPilotStatusInfo.ipcConnStatus
|
||||
if (mLastStatus != status) {
|
||||
val statusInfo = autoPilotStatusInfo.clone()
|
||||
if(mLastStatus != status){
|
||||
val statusInfo = CallerAutoPilotStatusListenerManager.getAutoPilotStatusInfo().clone()
|
||||
rvConnectInfo.post { updateConnectInfoView(statusInfo) }
|
||||
mLastStatus = status
|
||||
}
|
||||
|
||||
@@ -2372,7 +2372,7 @@
|
||||
android:padding="@dimen/dp_20"
|
||||
android:background="@drawable/radio_button_normal_background_right"
|
||||
android:textColor="#000"
|
||||
android:textOff="开启QUIC协议(服务器暂不支持)"
|
||||
android:textOff="开启QUIC协议(目前QA环境可用)"
|
||||
android:textOn="关闭QUIC协议"
|
||||
android:textSize="@dimen/dp_24" />
|
||||
</LinearLayout>
|
||||
|
||||
@@ -1,284 +0,0 @@
|
||||
package com.mogo.eagle.core.function.smp;
|
||||
|
||||
import android.content.Context;
|
||||
import android.graphics.BitmapFactory;
|
||||
|
||||
import com.amap.api.maps.AMap;
|
||||
import com.amap.api.maps.CameraUpdateFactory;
|
||||
import com.amap.api.maps.TextureMapView;
|
||||
import com.amap.api.maps.model.BitmapDescriptor;
|
||||
import com.amap.api.maps.model.BitmapDescriptorFactory;
|
||||
import com.amap.api.maps.model.CameraPosition;
|
||||
import com.amap.api.maps.model.LatLng;
|
||||
import com.amap.api.maps.model.Marker;
|
||||
import com.amap.api.maps.model.MarkerOptions;
|
||||
import com.amap.api.maps.model.Polyline;
|
||||
import com.autonavi.amap.mapcore.IPoint;
|
||||
import com.mogo.eagle.core.function.map.R;
|
||||
|
||||
import java.util.concurrent.ScheduledExecutorService;
|
||||
|
||||
/**
|
||||
* 包名: com.amap.api.navi.core
|
||||
* <p>
|
||||
* 创建时间:2018/3/1
|
||||
* 项目名称:AndroidNavigationSDK
|
||||
*
|
||||
* @author guibao.ggb
|
||||
* @email guibao.ggb@alibaba-inc.com
|
||||
* <p>
|
||||
* 类说明:自车位置管理Overlay类
|
||||
*/
|
||||
public class CarOverlay {
|
||||
|
||||
protected static final int CAR_MOVE_ANIMATION_PERIOD = 50;
|
||||
protected int carMoveAnimationFrameNum = 2;
|
||||
protected boolean mIsLock = true;
|
||||
protected IPoint mapAnchorBackup = null;
|
||||
protected double dXOffStep;
|
||||
protected double dYOffStep;
|
||||
protected float dAngleOffStep;
|
||||
protected int currentFrameIndex;
|
||||
protected float angleStart = 0;
|
||||
protected boolean isMoveStarted = false;
|
||||
protected float newAngle = 0;
|
||||
protected BitmapDescriptor carDescriptor = null;
|
||||
protected BitmapDescriptor fourCornersDescriptor = null;
|
||||
protected Marker carMarker;
|
||||
protected Marker directionMarker;
|
||||
protected AMap mAmap = null;
|
||||
protected TextureMapView mapView;
|
||||
protected boolean isDirectionVisible = true;
|
||||
protected LatLng endLatLng = null;
|
||||
protected Polyline leaderLine = null;
|
||||
protected final int DISTANCE_OFFSET = 150;// 默认 500 偏差
|
||||
|
||||
// API 默认 1800 UI 默认 360
|
||||
protected int angleModValue = 1800;
|
||||
|
||||
|
||||
private ScheduledExecutorService executorService;
|
||||
|
||||
public CarOverlay(Context context, TextureMapView mapView) {
|
||||
this.mapView = mapView;
|
||||
|
||||
// fourCornersDescriptor = BitmapDescriptorFactory.fromBitmap(BitmapFactory
|
||||
// .decodeResource(context.getResources(),
|
||||
// R.drawable.module_small_map_navi_direction));
|
||||
|
||||
carDescriptor = BitmapDescriptorFactory.fromBitmap(BitmapFactory
|
||||
.decodeResource(context.getResources(),
|
||||
R.drawable.module_small_map_view_my_location_logo));
|
||||
angleModValue = 1800;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置自车状态
|
||||
*
|
||||
* @param lock true 锁车 false 非锁车
|
||||
*/
|
||||
public void setLock(boolean lock) {
|
||||
mIsLock = lock;
|
||||
if (carMarker == null) {
|
||||
return;
|
||||
}
|
||||
if (mAmap == null) {
|
||||
return;
|
||||
}
|
||||
if (directionMarker == null) {
|
||||
return;
|
||||
}
|
||||
carMarker.setFlat(true);
|
||||
directionMarker.setGeoPoint(carMarker.getGeoPoint());
|
||||
carMarker.setGeoPoint(carMarker.getGeoPoint());
|
||||
carMarker.setRotateAngle(carMarker.getRotateAngle());
|
||||
if (mIsLock) {
|
||||
CameraPosition cameraPosition = new CameraPosition.Builder().target(carMarker.getPosition()).bearing(newAngle).tilt(0).zoom(16).build();
|
||||
mAmap.moveCamera(CameraUpdateFactory.newCameraPosition(cameraPosition));
|
||||
}
|
||||
}
|
||||
|
||||
public void reset() {
|
||||
if (carMarker != null) {
|
||||
carMarker.remove();
|
||||
}
|
||||
if (directionMarker != null) {
|
||||
directionMarker.remove();
|
||||
}
|
||||
if (leaderLine != null) {
|
||||
leaderLine.remove();
|
||||
}
|
||||
leaderLine = null;
|
||||
carMarker = null;
|
||||
directionMarker = null;
|
||||
|
||||
if (executorService != null) {
|
||||
if (!executorService.isShutdown()) {
|
||||
executorService.shutdown();
|
||||
}
|
||||
isMoveStarted = false;
|
||||
|
||||
executorService = null;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 绘制自车
|
||||
*
|
||||
* @param aMap
|
||||
* @param mLatLng
|
||||
* @param bearing
|
||||
*/
|
||||
public void draw(AMap aMap, LatLng mLatLng, float bearing) {
|
||||
if (aMap == null || mLatLng == null || carDescriptor == null) {
|
||||
return;
|
||||
}
|
||||
mAmap = aMap;
|
||||
try {
|
||||
if (carMarker == null) {
|
||||
carMarker = aMap.addMarker(new MarkerOptions().anchor(0.5f, 0.5f).setFlat(true).icon(carDescriptor).position(mLatLng));
|
||||
}
|
||||
|
||||
if (directionMarker == null) {
|
||||
directionMarker = aMap.addMarker(new MarkerOptions().anchor(0.5f, 0.5f).setFlat(true).icon(fourCornersDescriptor).position(mLatLng));
|
||||
directionMarker.setVisible(isDirectionVisible);
|
||||
}
|
||||
carMarker.setVisible(true);
|
||||
newAngle = bearing;
|
||||
IPoint resultGeoPnt = IPoint.obtain();
|
||||
// resultGeoPnt = NaviUtil.lonlat2Geo(mLatLng.latitude, mLatLng.longitude, 20);
|
||||
updateCarPosition(resultGeoPnt);
|
||||
resultGeoPnt.recycle();
|
||||
|
||||
} catch (Throwable e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private void updateCarPosition(IPoint p) {
|
||||
carMarker.setGeoPoint(p);
|
||||
carMarker.setFlat(true);
|
||||
carMarker.setRotateAngle(360 - newAngle);
|
||||
if (directionMarker != null) {
|
||||
directionMarker.setGeoPoint(p);
|
||||
}
|
||||
|
||||
if (mIsLock) {
|
||||
CameraPosition cameraPosition = new CameraPosition.Builder().target(carMarker.getPosition()).bearing(newAngle).tilt(0).zoom(16).build();
|
||||
mAmap.moveCamera(CameraUpdateFactory.changeBearingGeoCenter(newAngle, p));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public void setEndPoi(LatLng latlng) {
|
||||
endLatLng = latlng;
|
||||
}
|
||||
|
||||
/**
|
||||
* 释放自车资源
|
||||
*/
|
||||
public void destroy() {
|
||||
if (carMarker != null) {
|
||||
carMarker.remove();
|
||||
carMarker = null;
|
||||
}
|
||||
if (directionMarker != null) {
|
||||
directionMarker.remove();
|
||||
directionMarker = null;
|
||||
}
|
||||
carDescriptor = null;
|
||||
|
||||
if (executorService != null && !executorService.isShutdown()) {
|
||||
executorService.shutdown();
|
||||
isMoveStarted = false;
|
||||
|
||||
executorService = null;
|
||||
}
|
||||
}
|
||||
|
||||
private void calculateCarSmoothMoveOffset(IPoint newCenter, float newAngle) {
|
||||
if (carMarker == null) {
|
||||
return;
|
||||
}
|
||||
IPoint currentAnchorGeoPoint = carMarker.getGeoPoint();
|
||||
if (currentAnchorGeoPoint == null || currentAnchorGeoPoint.x == 0 || currentAnchorGeoPoint.y == 0) {
|
||||
currentAnchorGeoPoint = newCenter;
|
||||
}
|
||||
currentFrameIndex = 0;
|
||||
mapAnchorBackup = currentAnchorGeoPoint;
|
||||
dXOffStep = (newCenter.x - currentAnchorGeoPoint.x) / carMoveAnimationFrameNum;
|
||||
dYOffStep = (newCenter.y - currentAnchorGeoPoint.y) / carMoveAnimationFrameNum;
|
||||
// 获取当前的旋转角度
|
||||
angleStart = carMarker.getRotateAngle();
|
||||
boolean isFirst = false;
|
||||
|
||||
if (Float.compare(angleStart, newAngle) == 0) {
|
||||
isFirst = true;
|
||||
} else {
|
||||
angleStart = 360 - angleStart;
|
||||
}
|
||||
// 校正旋转角度问题
|
||||
float dAngleDelta = newAngle - angleStart;
|
||||
if (isFirst) {
|
||||
dAngleDelta = 0;
|
||||
}
|
||||
if (dAngleDelta > 180) {
|
||||
dAngleDelta = dAngleDelta - 360;
|
||||
}
|
||||
else if (dAngleDelta < -180) {
|
||||
dAngleDelta = dAngleDelta + 360;
|
||||
}
|
||||
dAngleOffStep = dAngleDelta / carMoveAnimationFrameNum;
|
||||
isMoveStarted = true;
|
||||
}
|
||||
|
||||
// protected void startSmoothMoveTimer() {
|
||||
// if (executorService == null) {
|
||||
// executorService = new ScheduledThreadPoolExecutor(1, new BasicThreadFactory.Builder().namingPattern("caroverlay-schedule-pool-%d").daemon(true).build());
|
||||
//
|
||||
// executorService.scheduleAtFixedRate(new Runnable() {
|
||||
// long currentSeconds;
|
||||
// @Override
|
||||
// public void run() {
|
||||
// try{
|
||||
// currentSeconds = System.currentTimeMillis();
|
||||
// mapSmoothMoveTimerTick();
|
||||
// } catch(Throwable e){
|
||||
// e.printStackTrace();
|
||||
// }
|
||||
// }
|
||||
// }, 0, CAR_MOVE_ANIMATION_PERIOD, TimeUnit.MILLISECONDS);
|
||||
// }
|
||||
// }
|
||||
|
||||
private void mapSmoothMoveTimerTick() {
|
||||
if (!isMoveStarted) {
|
||||
return;
|
||||
}
|
||||
if (carMarker == null) {
|
||||
return;
|
||||
}
|
||||
if (mAmap == null) {
|
||||
return;
|
||||
}
|
||||
try {
|
||||
IPoint p = carMarker.getGeoPoint();
|
||||
double newX, newY;
|
||||
if (currentFrameIndex++ < carMoveAnimationFrameNum) {
|
||||
newX = mapAnchorBackup.x + dXOffStep * currentFrameIndex;
|
||||
newY = mapAnchorBackup.y + dYOffStep * currentFrameIndex;
|
||||
newAngle = angleStart + dAngleOffStep * currentFrameIndex;
|
||||
newAngle %= angleModValue;
|
||||
if (newX != 0 || newY != 0) {
|
||||
p = new IPoint((int)newX, (int)newY);
|
||||
}
|
||||
updateCarPosition(p);
|
||||
}
|
||||
} catch (Throwable e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
package com.mogo.eagle.core.data.deva.chain
|
||||
|
||||
import com.mogo.eagle.core.data.app.AppConfigInfo
|
||||
|
||||
data class ChainCommon(val lat:Double, val lon:Double, val lineId:Long, val eagleVersionCode:Int = AppConfigInfo.appVersionCode) {
|
||||
}
|
||||
@@ -22,14 +22,13 @@ class ChainConstant {
|
||||
const val CHAIN_SOURCE_OCH = 13
|
||||
|
||||
//业务类型与下方文件名一一对应
|
||||
const val CHAIN_TYPE_STATUS = 0 // 各个业务初始化信息,配置信息.链接状态,点击信息
|
||||
const val CHAIN_TYPE_STATUS = 0 // 记录所有业务信息(正常调用,异常数据)
|
||||
const val CHAIN_TYPE_GNSS = 1 // 工控定位数据
|
||||
const val CHAIN_TYPE_SOCKET_AUTOPILOT = 2 // 包括自动驾驶状态,reportMsg,planning数据,全局路径数据,FM
|
||||
const val CHAIN_TYPE_SOCKET_DATA_TRACKED = 3 // 感知数据,现阶段记录云端漫游
|
||||
const val CHAIN_TYPE_SOCKET_TRAJECTORY = 4 // 前车引导线,用于调试
|
||||
const val CHAIN_TYPE_SOCKET_VEHICLE = 5 // 底盘数据
|
||||
const val CHAIN_TYPE_SOCKET_TRAFFIC_LIGHT = 6 // 多元红绿灯聚合数据
|
||||
const val CHAIN_TYPE_V2X = 100 // V2X(V2I、V2N)
|
||||
const val CHAIN_TYPE_ANR_LEAK = 300
|
||||
const val CHAIN_TYPE_WEAK_NETWORK = 400
|
||||
const val CHAIN_TYPE_OCH = 500
|
||||
@@ -42,7 +41,6 @@ class ChainConstant {
|
||||
const val CHAIN_LINK_LOG_ADAS_TRAJECTORY = "-adasTrajectory"
|
||||
const val CHAIN_LINK_LOG_ADAS_VEHICLE = "-adasVehicle"
|
||||
const val CHAIN_LINK_LOG_ADAS_TRAFFIC_LIGHT = "-UnionTrafficLight"
|
||||
const val CHAIN_LINK_LOG_V2X = "-eagleCloudWSV2X"
|
||||
const val CHAIN_LINK_LOG_RECORD_ANR = "-eagleRecordANR"
|
||||
const val CHAIN_LINK_LOG_RECORD_WEAK_NETWORK = "-eagleRecordWeakNetwork"
|
||||
const val CHAIN_LINK_LOG_OCH = "-eagleOch"
|
||||
@@ -102,8 +100,8 @@ class ChainConstant {
|
||||
const val CHAIN_CODE_HTTP_DNS_CITY_CODE = "CHAIN_CODE_HTTP_DNS_CITY_CODE"
|
||||
const val CHAIN_CODE_HTTP_DNS_ERROR_REASON = "CHAIN_CODE_HTTP_DNS_ERROR_REASON"
|
||||
|
||||
const val CHAIN_CODE_DATA_CENTER = "CHAIN_CODE_DATA_CENTER"
|
||||
const val CHAIN_CODE_V2X_MSG = "CHAIN_CODE_V2X_MSG"
|
||||
const val CHAIN_CODE_MSG_BOX = "CHAIN_CODE_MSG_BOX"
|
||||
const val CHAIN_CODE_HD_MAP_CALL = "CHAIN_CODE_HD_MAP_CALL"
|
||||
const val CHAIN_CODE_HD_MAP_ROAD_CROSS = "CHAIN_CODE_HD_MAP_ROAD_CROSS"
|
||||
const val CHAIN_CODE_HD_MAP_ICON_SET = "CHAIN_CODE_HD_MAP_ICON_SET"
|
||||
|
||||
@@ -40,7 +40,7 @@ public class MarkerUserInfo implements Serializable {
|
||||
int year = cal.get(Calendar.YEAR);
|
||||
|
||||
//2020-30=1990
|
||||
double ageDiffer = year - getAgeNumber();
|
||||
double ageDiffer = (double) (year - getAgeNumber());
|
||||
String ageStr = "" + ageDiffer;
|
||||
char[] ageChars = ageStr.toCharArray();
|
||||
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
package com.mogo.eagle.core.function.api.autopilot
|
||||
|
||||
import com.mogo.eagle.core.data.autopilot.AutopilotStatusInfo
|
||||
import mogo.telematics.pad.MessagePad
|
||||
import mogo_msg.MogoReportMsg
|
||||
import system_master.*
|
||||
@@ -12,14 +11,6 @@ import system_master.*
|
||||
*/
|
||||
interface IMoGoAutopilotStatusListener {
|
||||
|
||||
/**
|
||||
* 自动驾驶状态信息
|
||||
*
|
||||
* @param autoPilotStatusInfo 状态信息
|
||||
*/
|
||||
@Deprecated("3.3.0之后不建议使用此种回调方式,按需回调,主界面暂时使用用于check检查信息透出")
|
||||
fun onAutopilotStatusResponse(autoPilotStatusInfo: AutopilotStatusInfo) {}
|
||||
|
||||
/**
|
||||
* 自动驾驶状态信息
|
||||
*
|
||||
|
||||
@@ -249,4 +249,6 @@ interface IDevaToolsProvider : IProvider {
|
||||
* 各线程CPU使用率
|
||||
*/
|
||||
fun usage(): IMoGoCpuUsageProvider?
|
||||
|
||||
fun setNetworkMode(isDebug: Boolean)
|
||||
}
|
||||
@@ -4,6 +4,7 @@ import com.mogo.eagle.core.data.autopilot.AutopilotControlParameters
|
||||
import com.mogo.eagle.core.data.autopilot.AutopilotStatusInfo
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotStatusListener
|
||||
import com.mogo.eagle.core.function.call.base.CallerBase
|
||||
import com.mogo.eagle.core.function.call.trace.CallerTrace
|
||||
import com.mogo.eagle.core.utilcode.util.GsonUtils
|
||||
import mogo.telematics.pad.MessagePad
|
||||
import mogo_msg.MogoReportMsg
|
||||
@@ -37,7 +38,7 @@ object CallerAutoPilotStatusListenerManager : CallerBase<IMoGoAutopilotStatusLis
|
||||
|
||||
private var autopilotState: Int by Delegates.observable(0) { _, oldValue, newValue ->
|
||||
if (oldValue != newValue) {
|
||||
//todo emArrow chainLog
|
||||
CallerTrace.write("AutoPilotStatus", mapOf("AutoPilotStatus" to newValue))
|
||||
M_LISTENERS.forEach {
|
||||
val listener = it.value
|
||||
listener.onAutopilotStatusResponse(newValue)
|
||||
@@ -61,7 +62,6 @@ object CallerAutoPilotStatusListenerManager : CallerBase<IMoGoAutopilotStatusLis
|
||||
private var autoPilotMessageContent: String = ""
|
||||
|
||||
override fun doSomeAfterAddListener(tag: String, listener: IMoGoAutopilotStatusListener) {
|
||||
listener.onAutopilotStatusResponse(mAutopilotStatusInfo)
|
||||
listener.onAutopilotStatusResponse(autopilotState)
|
||||
if(dockerV.isNotEmpty()){
|
||||
listener.onAutopilotDockerInfo(dockerV)
|
||||
@@ -152,16 +152,12 @@ object CallerAutoPilotStatusListenerManager : CallerBase<IMoGoAutopilotStatusLis
|
||||
}
|
||||
|
||||
/**
|
||||
* 自动驾驶状态信息 回调
|
||||
* 自动驾驶状态信息更新(3.3.0版本之后,不回调此类高频数据)
|
||||
* @param autopilotStatusInfo 自动驾驶状态信息
|
||||
*/
|
||||
@Synchronized
|
||||
fun invokeAutoPilotStatus(autopilotStatusInfo: AutopilotStatusInfo) {
|
||||
mAutopilotStatusInfo = autopilotStatusInfo
|
||||
M_LISTENERS.forEach {
|
||||
val listener = it.value
|
||||
listener.onAutopilotStatusResponse(mAutopilotStatusInfo)
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -193,10 +189,10 @@ object CallerAutoPilotStatusListenerManager : CallerBase<IMoGoAutopilotStatusLis
|
||||
*/
|
||||
@Synchronized
|
||||
fun invokeAutopilotGuardian(guardianInfo: MogoReportMsg.MogoReportMessage?) {
|
||||
autoPilotMessageCode = guardianInfo?.code ?: ""
|
||||
autoPilotMessageContent = guardianInfo?.msg ?: ""
|
||||
M_LISTENERS.forEach {
|
||||
val listener = it.value
|
||||
autoPilotMessageCode = guardianInfo?.code ?: ""
|
||||
autoPilotMessageContent = guardianInfo?.msg ?: ""
|
||||
listener.onAutopilotGuardian(guardianInfo)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -60,7 +60,7 @@ object CallerAutopilotActionsListenerManager : CallerBase<IMoGoAutopilotActionsL
|
||||
isAutopilotAbility: Boolean, unableAutopilotReasons: ArrayList<UnableLaunchReason>?
|
||||
) {
|
||||
if (isConnected) {
|
||||
var isEquals: Boolean = true
|
||||
var isEquals = true
|
||||
if (unableAutopilotReasons != null && this.unableAutopilotReasons != null) {
|
||||
unableAutopilotReasons.let { onw ->
|
||||
onw.sortWith(compareBy(UnableLaunchReason::hashCode));
|
||||
|
||||
@@ -3,6 +3,7 @@ package com.mogo.eagle.core.function.call.autopilot
|
||||
import bag_manager.BagManagerOuterClass
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotRecordListener
|
||||
import com.mogo.eagle.core.function.call.base.CallerBase
|
||||
import com.mogo.eagle.core.function.call.trace.CallerTrace
|
||||
import mogo.telematics.pad.MessagePad
|
||||
import record_cache.RecordPanelOuterClass
|
||||
|
||||
@@ -17,6 +18,20 @@ object CallerAutopilotRecordListenerManager : CallerBase<IMoGoAutopilotRecordLis
|
||||
* 采集任务记录回调
|
||||
*/
|
||||
fun invokeAutopilotRecordResult(recordPanel: RecordPanelOuterClass.RecordPanel) {
|
||||
recordPanel.stat
|
||||
CallerTrace.write(
|
||||
"AutopilotRecord",
|
||||
mapOf(
|
||||
"recordPanelStat" to recordPanel.stat,
|
||||
"recordPanelFilePath" to (recordPanel.filename?:""),
|
||||
"recordPanelKey" to recordPanel.key,
|
||||
"recordPanelId" to recordPanel.id,
|
||||
"recordPanelDuration" to recordPanel.duration,
|
||||
"recordPanelDiskFree" to recordPanel.diskFree,
|
||||
"recordPanelNote" to (recordPanel.note?:""),
|
||||
"dockerV" to CallerAutoPilotStatusListenerManager.getDockerVersion()
|
||||
)
|
||||
)
|
||||
M_LISTENERS.forEach {
|
||||
val listener = it.value
|
||||
listener.onAutopilotRecordResult(recordPanel)
|
||||
@@ -36,8 +51,8 @@ object CallerAutopilotRecordListenerManager : CallerBase<IMoGoAutopilotRecordLis
|
||||
/**
|
||||
* 录包任务管理应答
|
||||
*/
|
||||
fun invokeBagManagerResult(bagManager: BagManagerOuterClass.BagManager){
|
||||
M_LISTENERS.forEach{
|
||||
fun invokeBagManagerResult(bagManager: BagManagerOuterClass.BagManager) {
|
||||
M_LISTENERS.forEach {
|
||||
val listener = it.value
|
||||
listener.onBagManagerResult(bagManager)
|
||||
}
|
||||
|
||||
@@ -8,7 +8,6 @@ import com.mogo.eagle.core.function.call.base.CallerBase
|
||||
*/
|
||||
object CallerChassisAccStateListenerManager : CallerBase<IMoGoChassisAccStateListener>() {
|
||||
|
||||
|
||||
/**
|
||||
* 车辆加速度
|
||||
* acc 加速度
|
||||
|
||||
@@ -8,7 +8,6 @@ import com.mogo.eagle.core.function.call.base.CallerBase
|
||||
*/
|
||||
object CallerChassisBrakeStateListenerManager : CallerBase<IMoGoChassisBrakeStateListener>() {
|
||||
|
||||
|
||||
/**
|
||||
* brake 刹车
|
||||
*/
|
||||
|
||||
@@ -2,6 +2,7 @@ package com.mogo.eagle.core.function.call.autopilot
|
||||
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoParallelDrivingActionsListener
|
||||
import com.mogo.eagle.core.function.call.base.CallerBase
|
||||
import com.mogo.eagle.core.function.call.trace.CallerTrace
|
||||
|
||||
|
||||
/**
|
||||
@@ -43,6 +44,7 @@ object CallerParallelDrivingActionsListenerManager :
|
||||
}
|
||||
|
||||
private fun notification() {
|
||||
CallerTrace.write("ParallelDriving", mapOf("ParallelState" to isParallelDrivingAbility))
|
||||
M_LISTENERS.forEach {
|
||||
val listener = it.value
|
||||
listener.onParallelDrivingAbility(
|
||||
|
||||
@@ -2,7 +2,7 @@ package com.mogo.eagle.core.function.call.autopilot
|
||||
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoParallelDrivingStatusListener
|
||||
import com.mogo.eagle.core.function.call.base.CallerBase
|
||||
import mogo.telematics.pad.MessagePad
|
||||
import com.mogo.eagle.core.function.call.trace.CallerTrace
|
||||
import mogo.yycp.paralleldriving.protocol.ParallelTaskProcessNoticeOuterClass
|
||||
|
||||
/**
|
||||
@@ -12,6 +12,7 @@ object CallerParallelDrivingListenerManager : CallerBase<IMoGoParallelDrivingSta
|
||||
|
||||
|
||||
fun invokeParallelDrivingListener(parallelTaskProcessNotice: ParallelTaskProcessNoticeOuterClass.ParallelTaskProcessNotice?) {
|
||||
CallerTrace.write("ParallelDriving", mapOf("ParallelData" to {parallelTaskProcessNotice?:""}))
|
||||
M_LISTENERS.forEach {
|
||||
val listener = it.value
|
||||
listener.onParallelDrivingResp(parallelTaskProcessNotice)
|
||||
|
||||
@@ -291,4 +291,8 @@ object CallerDevaToolsManager {
|
||||
fun block(): IMoGoBlockProvider? = devaToolsProviderApi?.block()
|
||||
|
||||
fun usage(): IMoGoCpuUsageProvider? = devaToolsProviderApi?.usage()
|
||||
|
||||
fun setNetworkMode(isDebug: Boolean) {
|
||||
devaToolsProviderApi?.setNetworkMode(isDebug)
|
||||
}
|
||||
}
|
||||
@@ -2,11 +2,10 @@ package com.mogo.eagle.core.function.call.msgbox
|
||||
|
||||
import android.content.Context
|
||||
import com.mogo.eagle.core.data.constants.MogoServicePaths
|
||||
import com.mogo.eagle.core.data.deva.chain.ChainConstant
|
||||
import com.mogo.eagle.core.data.msgbox.MsgBoxBean
|
||||
import com.mogo.eagle.core.function.api.datacenter.msgbox.IMsgBoxProvider
|
||||
import com.mogo.eagle.core.function.call.base.CallerBase
|
||||
import com.zhjt.service.chain.ChainLog
|
||||
import com.mogo.eagle.core.function.call.trace.CallerTrace
|
||||
|
||||
object CallerMsgBoxManager {
|
||||
|
||||
@@ -25,13 +24,8 @@ object CallerMsgBoxManager {
|
||||
/**
|
||||
* 存储数据到消息盒子
|
||||
*/
|
||||
@ChainLog(
|
||||
linkChainLog = ChainConstant.CHAIN_TYPE_V2X,
|
||||
linkCode = ChainConstant.CHAIN_SOURCE_CLOUD,
|
||||
nodeAliasCode = ChainConstant.CHAIN_CODE_MSG_BOX,
|
||||
paramIndexes = [0]
|
||||
)
|
||||
fun saveMsgBox(bean: MsgBoxBean) {
|
||||
CallerTrace.write(TAG,bean)
|
||||
providerApi?.saveMsg(bean)
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,46 @@
|
||||
package com.mogo.eagle.core.function.call.trace
|
||||
|
||||
import com.mogo.eagle.core.data.deva.chain.ChainCommon
|
||||
import com.mogo.eagle.core.data.deva.chain.ChainConstant
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationGCJ02ListenerManager
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant
|
||||
import com.zhjt.service.chain.ChainLog
|
||||
|
||||
class CallerTrace {
|
||||
|
||||
companion object {
|
||||
|
||||
fun write(data: Any, data1: Any, param: Boolean = true) {
|
||||
CallerLogger.d(SceneConstant.M_D_C + data.toString(), data1)
|
||||
if (param) {
|
||||
val cal = CallerChassisLocationGCJ02ListenerManager.getChassisLocationGCJ02()
|
||||
val lineId = CallerAutoPilotStatusListenerManager.getLineId()
|
||||
realParamAction(data, data1, ChainCommon(cal.latitude, cal.longitude, lineId))
|
||||
} else {
|
||||
realAction(data, data1)
|
||||
}
|
||||
}
|
||||
|
||||
@ChainLog(
|
||||
linkChainLog = ChainConstant.CHAIN_TYPE_STATUS,
|
||||
linkCode = ChainConstant.CHAIN_SOURCE_INIT,
|
||||
nodeAliasCode = ChainConstant.CHAIN_CODE_DATA_CENTER,
|
||||
paramIndexes = [0, 1]
|
||||
)
|
||||
private fun realAction(data: Any, data1: Any) {
|
||||
|
||||
}
|
||||
|
||||
@ChainLog(
|
||||
linkChainLog = ChainConstant.CHAIN_TYPE_STATUS,
|
||||
linkCode = ChainConstant.CHAIN_SOURCE_INIT,
|
||||
nodeAliasCode = ChainConstant.CHAIN_CODE_DATA_CENTER,
|
||||
paramIndexes = [0, 1, 2]
|
||||
)
|
||||
private fun realParamAction(data: Any, data1: Any, chainCommon: ChainCommon) {
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -63,7 +63,7 @@ strictfp class Real extends Number {
|
||||
epsilon *= 0.5;
|
||||
} while (1.0 + epsilon != 1.0);
|
||||
int mantissaBits = (int) Math.round(-Math.log(epsilon) / Math.log(2));
|
||||
SPLITTER = (1 << ((mantissaBits + 1) / 2)) + 1;
|
||||
SPLITTER = (double) (1 << ((mantissaBits + 1) / 2)) + 1;
|
||||
}
|
||||
|
||||
/** Returns the result of a + b, without loss of precision. */
|
||||
|
||||
@@ -24,7 +24,7 @@ public class DiskCacheManager {
|
||||
private static DiskLruCache mDiskLruCache = null;
|
||||
private DiskLruCache.Editor mEditor = null;
|
||||
private DiskLruCache.Snapshot mSnapshot = null;
|
||||
public static final long CACHE_MAXSIZE = 10 * 1024 * 1024;
|
||||
public static final long CACHE_MAXSIZE = 10L * 1024 * 1024;
|
||||
|
||||
public DiskCacheManager( Context context, String uniqueName) {
|
||||
try {
|
||||
|
||||
@@ -540,8 +540,12 @@ public class CommonUtils {
|
||||
try {
|
||||
packageName = TextUtils.isEmpty(packageName) ? context.getPackageName() : packageName;
|
||||
PackageManager packageManager = context.getPackageManager();
|
||||
PackageInfo packInfo = packageManager.getPackageInfo(packageName, 0);
|
||||
return packInfo.versionName;
|
||||
if(packageManager != null){
|
||||
PackageInfo packInfo = packageManager.getPackageInfo(packageName, 0);
|
||||
return packInfo.versionName;
|
||||
}else {
|
||||
return "";
|
||||
}
|
||||
} catch (Exception e) {
|
||||
return "";
|
||||
}
|
||||
@@ -558,6 +562,9 @@ public class CommonUtils {
|
||||
try {
|
||||
packageName = TextUtils.isEmpty(packageName) ? context.getPackageName() : packageName;
|
||||
PackageManager packageManager = context.getPackageManager();
|
||||
if(packageManager == null){
|
||||
return 0;
|
||||
}
|
||||
PackageInfo packInfo = packageManager.getPackageInfo(packageName, 0);
|
||||
return packInfo.versionCode;
|
||||
} catch (Exception e) {
|
||||
@@ -580,7 +587,7 @@ public class CommonUtils {
|
||||
}
|
||||
BufferedReader in = new BufferedReader(new InputStreamReader(proc.getInputStream()));
|
||||
StringBuffer stringBuffer = new StringBuffer();
|
||||
String line = null;
|
||||
String line;
|
||||
while ((line = in.readLine()) != null) {
|
||||
stringBuffer.append(line + " ");
|
||||
|
||||
|
||||
@@ -114,7 +114,6 @@ public final class FileUtils {
|
||||
Uri uri = Uri.parse(filePath);
|
||||
ContentResolver cr = Utils.getApp().getContentResolver();
|
||||
AssetFileDescriptor afd = cr.openAssetFileDescriptor(uri, "r");
|
||||
if (afd == null) return false;
|
||||
try {
|
||||
afd.close();
|
||||
} catch (IOException ignore) {
|
||||
|
||||
@@ -1072,17 +1072,17 @@ public final class ImageUtils {
|
||||
Bitmap ret = Bitmap.createBitmap(srcWidth, srcHeight + reflectionHeight, src.getConfig());
|
||||
Canvas canvas = new Canvas(ret);
|
||||
canvas.drawBitmap(src, 0, 0, null);
|
||||
canvas.drawBitmap(reflectionBitmap, 0, srcHeight + REFLECTION_GAP, null);
|
||||
canvas.drawBitmap(reflectionBitmap, 0, (float) (srcHeight + REFLECTION_GAP), null);
|
||||
Paint paint = new Paint(Paint.ANTI_ALIAS_FLAG);
|
||||
LinearGradient shader = new LinearGradient(
|
||||
0, srcHeight,
|
||||
0, ret.getHeight() + REFLECTION_GAP,
|
||||
0, (float) (ret.getHeight() + REFLECTION_GAP),
|
||||
0x70FFFFFF,
|
||||
0x00FFFFFF,
|
||||
Shader.TileMode.MIRROR);
|
||||
paint.setShader(shader);
|
||||
paint.setXfermode(new PorterDuffXfermode(PorterDuff.Mode.DST_IN));
|
||||
canvas.drawRect(0, srcHeight + REFLECTION_GAP, srcWidth, ret.getHeight(), paint);
|
||||
canvas.drawRect(0, (float) (srcHeight + REFLECTION_GAP), srcWidth, ret.getHeight(), paint);
|
||||
if (!reflectionBitmap.isRecycled()) reflectionBitmap.recycle();
|
||||
if (recycle && !src.isRecycled() && ret != src) src.recycle();
|
||||
return ret;
|
||||
|
||||
@@ -1158,7 +1158,7 @@ public final class SpanUtils {
|
||||
p.setStyle(Paint.Style.FILL);
|
||||
p.setColor(this.color);
|
||||
|
||||
c.drawRect(x, top, x + dir * stripeWidth, bottom, p);
|
||||
c.drawRect(x, top, (float) (x + dir * stripeWidth), bottom, p);
|
||||
|
||||
p.setStyle(style);
|
||||
p.setColor(color);
|
||||
@@ -1388,9 +1388,9 @@ public final class SpanUtils {
|
||||
} else if (mVerticalAlignment == ALIGN_CENTER) {
|
||||
transY = (bottom + top - rect.height()) / 2.0f;
|
||||
} else if (mVerticalAlignment == ALIGN_BASELINE) {
|
||||
transY = y - rect.height();
|
||||
transY = (float) (y - rect.height());
|
||||
} else {
|
||||
transY = bottom - rect.height();
|
||||
transY = (float) (bottom - rect.height());
|
||||
}
|
||||
canvas.translate(x, transY);
|
||||
} else {
|
||||
|
||||
@@ -4,10 +4,10 @@ import com.mogo.commons.debug.DebugConfig;
|
||||
import com.mogo.eagle.core.data.config.FunctionBuildConfig;
|
||||
|
||||
public class HostConst {
|
||||
public static final String HOST_DEV = "http://eagle-qa.zhidaozhixing.com";
|
||||
public static final String HOST_DEV = "https://eagle-qa.zhidaozhixing.com";
|
||||
public static final String HOST_RELEASE = "http://eagle-mis.zhidaozhixing.com";
|
||||
|
||||
public static final String HOST_EAGLE_QA = "http://eagle-dns-qa.zhidaozhixing.com/";
|
||||
public static final String HOST_EAGLE_QA = "https://eagle-dns-qa.zhidaozhixing.com/";
|
||||
public static final String HOST_EAGLE_RELEASE = "http://eagle-dns.zhidaozhixing.com/";
|
||||
|
||||
public static String getHost() {
|
||||
|
||||
@@ -64,24 +64,24 @@ bytex.ASM_API=ASM7
|
||||
LOGLIB_VERSION=1.10.7
|
||||
######## MogoAiCloudSDK Version ########
|
||||
# 网络请求LOGLIB_VERSION
|
||||
MOGO_NETWORK_VERSION=1.4.7.19
|
||||
MOGO_NETWORK_VERSION=1.4.7.20
|
||||
# 鉴权
|
||||
MOGO_PASSPORT_VERSION=1.4.7.19
|
||||
MOGO_PASSPORT_VERSION=1.4.7.20
|
||||
# 长链接
|
||||
MOGO_SOCKET_VERSION=1.4.7.19
|
||||
MOGO_SOCKET_VERSION=1.4.7.20
|
||||
# 数据采集
|
||||
MOGO_REALTIME_VERSION=1.4.7.19
|
||||
MOGO_REALTIME_VERSION=1.4.7.20
|
||||
# 直播推流
|
||||
MOGO_LIVE_VERSION=1.4.7.19
|
||||
MOGO_LIVE_VERSION=1.4.7.20
|
||||
# 直播拉流
|
||||
MOGO_TRAFFICLIVE_VERSION=1.4.7.19
|
||||
MOGO_TRAFFICLIVE_VERSION=1.4.7.20
|
||||
# 定位服务
|
||||
MOGO_LOCATION_VERSION=1.4.7.19
|
||||
MOGO_LOCATION_VERSION=1.4.7.20
|
||||
# 远程通讯模块
|
||||
MOGO_TELEMATIC_VERSION=1.4.7.19
|
||||
MOGO_TELEMATIC_VERSION=1.4.7.20
|
||||
######## MogoAiCloudSDK Version ########
|
||||
# 自研地图
|
||||
MAP_SDK_VERSION=3.3.0.10
|
||||
MAP_SDK_VERSION=3.3.2.1
|
||||
MAP_SDK_DATA_VERSION=1.0.0.7
|
||||
MAP_SDK_OPERATION_VERSION=1.1.4.1
|
||||
# websocket
|
||||
|
||||
@@ -39,8 +39,10 @@ public class PayloadEncoder {
|
||||
switch (typeName) {
|
||||
case "com.autonavi.nge.map.LonLat":
|
||||
LonLat lonLat = (LonLat) value;
|
||||
buffer.writeDouble(lonLat.getLon());
|
||||
buffer.writeDouble(lonLat.getLat());
|
||||
if(lonLat != null){
|
||||
buffer.writeDouble(lonLat.getLon());
|
||||
buffer.writeDouble(lonLat.getLat());
|
||||
}
|
||||
break;
|
||||
case "java.lang.Boolean":
|
||||
case "kotlin.Boolean":
|
||||
|
||||
@@ -709,7 +709,7 @@ class MapController(private var context: Context?, private val mMapView: IMapVie
|
||||
if(!isSurfaceCreated()) {
|
||||
return
|
||||
}
|
||||
setMarkerScale()
|
||||
// setMarkerScale()
|
||||
val currentZoom = zoomIndex
|
||||
if (DEBUG) {
|
||||
Log.d(TAG, "styleop--dispatchZoomChanged: currentZoom:${currentZoom},lastZoom:${lastZoom} ${mMapView.isTouching()}")
|
||||
|
||||
@@ -2,6 +2,7 @@ package com.zhidaoauto.map.sdk.inner.utils;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FileWriter;
|
||||
import java.io.IOException;
|
||||
import java.io.PrintWriter;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Date;
|
||||
@@ -33,12 +34,11 @@ public class MainInfo {
|
||||
if (null == dir) {
|
||||
return;
|
||||
}
|
||||
try {
|
||||
FileWriter fw = new FileWriter((dir + "log.txt"), true);
|
||||
try(FileWriter fw = new FileWriter((dir + "log.txt"), true)){
|
||||
String date = dateFormat.format(new Date());
|
||||
fw.write(date + " " + log + "\r\n");
|
||||
fw.close();
|
||||
} catch (Exception ex) {
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -50,11 +50,11 @@ public class MainInfo {
|
||||
if (null == dir) {
|
||||
return;
|
||||
}
|
||||
try {
|
||||
FileWriter fw = new FileWriter((dir + "log.txt"), true);
|
||||
|
||||
try(FileWriter fw = new FileWriter((dir + "log.txt"), true)){
|
||||
e.printStackTrace(new PrintWriter(fw));
|
||||
fw.close();
|
||||
} catch (Exception ex) {
|
||||
} catch (IOException ex) {
|
||||
ex.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -63,7 +63,7 @@ class MarkerOptions {
|
||||
|
||||
@JSONField(name = "alpha")
|
||||
private var alpha: Float = 1.0F
|
||||
var scale: Float = 0.7F
|
||||
var scale: Float = 1F
|
||||
private var offsetX: Int = 0
|
||||
private var offsetY: Int = 0
|
||||
var period: Int = 0
|
||||
@@ -138,7 +138,7 @@ class MarkerOptions {
|
||||
id=""
|
||||
offsetX = 0
|
||||
offsetY = 0
|
||||
scale = 0.7f
|
||||
scale = 1f
|
||||
anchorColor = ""
|
||||
rotateAngle = 0f
|
||||
visible = true
|
||||
@@ -584,7 +584,7 @@ class MarkerOptions {
|
||||
}
|
||||
|
||||
fun scale(scale: Float): MarkerOptions {
|
||||
this.scale = 0.7f*scale
|
||||
this.scale = scale
|
||||
return this
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user