Merge branch 'release_robotaxi-d-app-module_266_220425_2.6.6.1' into 'master'
Release robotaxi d app module 266 220425 2.6.6.1 See merge request zhjt/AndroidApp/MoGoEagleEye!15
This commit is contained in:
@@ -28,6 +28,7 @@ public class BusPassengerLineStationsAdapter extends RecyclerView.Adapter<Recycl
|
||||
private static final int LINE_START_STATION_ITEM = 0;
|
||||
private static final int LINE_END_STATION_ITEM = 1;
|
||||
private static final int LINE_MIDDLE_STATION_ITEM = 2;
|
||||
private String preArrivingStation = "";
|
||||
|
||||
public BusPassengerLineStationsAdapter(Context context, List<BusPassengerStation> stations){
|
||||
this.mContext = context;
|
||||
@@ -57,41 +58,58 @@ public class BusPassengerLineStationsAdapter extends RecyclerView.Adapter<Recycl
|
||||
BusPassengerStation station = mStations.get(position);
|
||||
if (holder instanceof StartStationViewHolder){
|
||||
StartStationViewHolder viewHolder = (StartStationViewHolder)holder;
|
||||
viewHolder.startStationName.setText(station.getName());
|
||||
if (!preArrivingStation.equals(station.getName())){
|
||||
viewHolder.startStationName.setText(station.getName());
|
||||
}
|
||||
if (station.getDrivingStatus() == STATION_STATUS_STOPPED && !station.isLeaving()){//到站
|
||||
viewHolder.curStationBg.setVisibility(View.VISIBLE);
|
||||
viewHolder.stationCircle.setVisibility(View.GONE);
|
||||
viewHolder.startStationName.setTextColor(mContext.getResources().getColor(R.color.bus_p_current_station_txt_color));
|
||||
viewHolder.startStationName.setSelected(true);
|
||||
preArrivingStation = station.getName();
|
||||
}else {
|
||||
viewHolder.curStationBg.setVisibility(View.GONE);
|
||||
viewHolder.stationCircle.setVisibility(View.VISIBLE);
|
||||
viewHolder.startStationName.setTextColor(mContext.getResources().getColor(R.color.bus_p_station_txt_color));
|
||||
viewHolder.startStationName.setSelected(false);
|
||||
}
|
||||
}else if (holder instanceof EndStationViewHolder){
|
||||
EndStationViewHolder viewHolder = (EndStationViewHolder)holder;
|
||||
viewHolder.endStationName.setText(station.getName());
|
||||
if (!preArrivingStation.equals(station.getName())){
|
||||
viewHolder.endStationName.setText(station.getName());
|
||||
}
|
||||
BusPassengerStation preStation = mStations.get(position -1);
|
||||
if ((preStation.getDrivingStatus() == STATION_STATUS_STOPPED && preStation.isLeaving())
|
||||
|| (station.getDrivingStatus() == STATION_STATUS_STOPPED && !station.isLeaving())){//到站
|
||||
viewHolder.curStationBg.setVisibility(View.VISIBLE);
|
||||
viewHolder.stationCircle.setVisibility(View.GONE);
|
||||
viewHolder.endStationName.setTextColor(mContext.getResources().getColor(R.color.bus_p_current_station_txt_color));
|
||||
viewHolder.endStationName.setSelected(true);
|
||||
preArrivingStation = station.getName();
|
||||
}else {
|
||||
viewHolder.curStationBg.setVisibility(View.GONE);
|
||||
viewHolder.stationCircle.setVisibility(View.VISIBLE);
|
||||
viewHolder.endStationName.setTextColor(mContext.getResources().getColor(R.color.bus_p_station_txt_color));
|
||||
viewHolder.endStationName.setSelected(false);
|
||||
}
|
||||
}else {
|
||||
MiddleStationViewHolder viewHolder = (MiddleStationViewHolder)holder;
|
||||
viewHolder.middleStationName.setText(station.getName());
|
||||
if (!preArrivingStation.equals(station.getName())){
|
||||
viewHolder.middleStationName.setText(station.getName());
|
||||
}
|
||||
BusPassengerStation preStation = mStations.get(position -1);
|
||||
if ((preStation.getDrivingStatus() == STATION_STATUS_STOPPED && preStation.isLeaving())
|
||||
|| (station.getDrivingStatus() == STATION_STATUS_STOPPED && !station.isLeaving())) {//到站
|
||||
viewHolder.curStationBg.setVisibility(View.VISIBLE);
|
||||
viewHolder.middleStationName.setTextColor(mContext.getResources().getColor(R.color.bus_p_current_station_txt_color));
|
||||
viewHolder.stationCircle.setVisibility(View.GONE);
|
||||
viewHolder.middleStationName.setSelected(true);
|
||||
preArrivingStation = station.getName();
|
||||
}else {
|
||||
viewHolder.curStationBg.setVisibility(View.GONE);
|
||||
viewHolder.middleStationName.setTextColor(mContext.getResources().getColor(R.color.bus_p_station_txt_color));
|
||||
viewHolder.stationCircle.setVisibility(View.VISIBLE);
|
||||
viewHolder.middleStationName.setSelected(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -144,9 +162,11 @@ class MiddleStationViewHolder extends RecyclerView.ViewHolder{
|
||||
|
||||
public TextView middleStationName;
|
||||
public ImageView curStationBg;
|
||||
public ImageView stationCircle;
|
||||
public MiddleStationViewHolder(@NonNull View itemView) {
|
||||
super(itemView);
|
||||
middleStationName = itemView.findViewById(R.id.bus_p_middle_station);
|
||||
curStationBg = itemView.findViewById(R.id.bus_p_middle_tag);
|
||||
stationCircle = itemView.findViewById(R.id.bus_p_middle_circle);
|
||||
}
|
||||
}
|
||||
@@ -198,13 +198,13 @@ public class BusPassengerMapDirectionView
|
||||
}
|
||||
boundsBuilder.include(currentLatLng);
|
||||
//第二个参数为四周留空宽度
|
||||
mAMap.animateCamera(CameraUpdateFactory.newLatLngBoundsRect(boundsBuilder.build(),100,100,100,100));
|
||||
mAMap.moveCamera(CameraUpdateFactory.newLatLngBoundsRect(boundsBuilder.build(),100,100,100,100));
|
||||
|
||||
}else {
|
||||
//设置希望展示的地图缩放级别
|
||||
CameraPosition cameraPosition = new CameraPosition.Builder()
|
||||
.target(mCarMarker.getPosition()).tilt(0).bearing(location.getBearing()).zoom(zoomLevel).build();
|
||||
mAMap.animateCamera(CameraUpdateFactory.newCameraPosition(cameraPosition));
|
||||
mAMap.moveCamera(CameraUpdateFactory.newCameraPosition(cameraPosition));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -14,7 +14,6 @@ import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.amap.api.maps.model.LatLng;
|
||||
import com.mogo.eagle.core.data.app.AppConfigInfo;
|
||||
import com.mogo.eagle.core.function.call.hmi.CallerHmiManager;
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger;
|
||||
import com.mogo.eagle.core.utilcode.util.UiThreadHandler;
|
||||
@@ -36,7 +35,8 @@ import static com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.M_BUS
|
||||
* @date: 2022/4/12
|
||||
*/
|
||||
public class BusPassengerRouteFragment extends
|
||||
BusPassengerBaseFragment<BusPassengerRouteFragment, BaseBusPassengerPresenter> implements IBusPassengerMapViewCallback {
|
||||
BusPassengerBaseFragment<BusPassengerRouteFragment, BaseBusPassengerPresenter>
|
||||
implements IBusPassengerMapViewCallback {
|
||||
|
||||
private final String TAG = "BusPassengerRouteFragment";
|
||||
|
||||
@@ -224,6 +224,10 @@ public class BusPassengerRouteFragment extends
|
||||
mStationsList.addAll(stations);
|
||||
mAdapter.notifyDataSetChanged();
|
||||
|
||||
if (currentStationIndex > -1){
|
||||
updateCurrentStation(currentStationIndex);
|
||||
}
|
||||
|
||||
if (currentStationIndex == 0 && isArrived){ //到达始发站且并未出发, 恢复站点marker 清楚路径 清空路径点
|
||||
clearPolyline();
|
||||
if (mMapDirectionView != null) mMapDirectionView.clearCoordinatesLatLng();
|
||||
@@ -282,4 +286,10 @@ public class BusPassengerRouteFragment extends
|
||||
int speedKM = (int) (Math.abs(speed) * 3.6F);
|
||||
mSpeedTv.setText(String.valueOf(speedKM));
|
||||
}
|
||||
|
||||
public void updateCurrentStation(int position) {
|
||||
if (mStationsListRv != null){
|
||||
mStationsListRv.smoothScrollToPosition(position);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
<solid android:color="@color/bus_p_tag_line_color" />
|
||||
<corners android:radius="@dimen/bus_p_station_circle_radius_size" />
|
||||
</shape>
|
||||
@@ -53,13 +53,15 @@
|
||||
|
||||
<TextView
|
||||
android:id="@+id/bus_p_cur_station_name"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_width="@dimen/bus_p_curent_station_txt_width"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_10"
|
||||
android:textColor="@color/bus_p_panel_cur_station_txt_color"
|
||||
android:textSize="@dimen/bus_p_curent_station_txt_size1"
|
||||
android:textStyle="bold"
|
||||
android:text="-- --"
|
||||
android:maxLines="1"
|
||||
android:ellipsize="end"
|
||||
android:elevation="@dimen/dp_10"
|
||||
app:layout_constraintLeft_toLeftOf="@+id/bus_p_cur_station_title"
|
||||
app:layout_constraintTop_toBottomOf="@+id/bus_p_cur_station_title" />
|
||||
|
||||
@@ -145,10 +145,12 @@
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/bus_p_line_stations_rl"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/bus_p_driver_number_plate_margin_top"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginTop="@dimen/dp_280"
|
||||
android:paddingBottom="@dimen/dp_30"
|
||||
android:paddingLeft="@dimen/bus_p_route_info_margin_left"
|
||||
android:paddingRight="@dimen/bus_p_route_info_margin_right"
|
||||
android:requiresFadingEdge="vertical"
|
||||
app:layout_constraintLeft_toLeftOf="@+id/bus_p_driver_num_plate_tv"
|
||||
app:layout_constraintTop_toBottomOf="@+id/dividing_line_2" />
|
||||
|
||||
|
||||
@@ -1,12 +1,13 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/bus_p_station_item_height"
|
||||
android:layout_height="wrap_content"
|
||||
android:minHeight="@dimen/bus_p_station_item_height"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="@dimen/bus_p_station_tag_line_width"
|
||||
android:layout_height="@dimen/bus_p_station_tag_line_height"
|
||||
android:layout_height="@dimen/bus_p_station_tag_line_height1"
|
||||
android:background="@color/bus_p_tag_line_color"
|
||||
android:layout_marginLeft="@dimen/dp_7"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
@@ -14,17 +15,21 @@
|
||||
|
||||
<TextView
|
||||
android:id="@+id/bus_p_end_station"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="--"
|
||||
android:textSize="@dimen/bus_p_station_txt_size"
|
||||
android:textStyle="bold"
|
||||
android:includeFontPadding = "false"
|
||||
android:singleLine="true"
|
||||
android:ellipsize="marquee"
|
||||
android:marqueeRepeatLimit="marquee_forever"
|
||||
android:layout_marginRight="@dimen/dp_60"
|
||||
android:textColor="@color/bus_p_station_txt_color"
|
||||
android:layout_marginLeft="@dimen/dp_45"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@+id/bus_p_end_tag"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/bus_p_end_tag"/>
|
||||
app:layout_constraintRight_toLeftOf="@+id/bus_p_end_tag"
|
||||
app:layout_constraintBottom_toBottomOf="parent"/>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/bus_p_end_circle"
|
||||
@@ -38,9 +43,11 @@
|
||||
android:id="@+id/bus_p_cur_end_station_tag"
|
||||
android:layout_width="@dimen/bus_p_cur_station_circle_width"
|
||||
android:layout_height="wrap_content"
|
||||
android:scaleType="fitXY"
|
||||
android:background="@drawable/bg_bus_p_arrived_station"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/bus_p_end_station"/>
|
||||
app:layout_constraintBottom_toBottomOf="@+id/bus_p_end_station"
|
||||
app:layout_constraintTop_toTopOf="@+id/bus_p_end_station"/>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/bus_p_end_tag"
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/bus_p_station_item_middle_height"
|
||||
android:layout_height="wrap_content"
|
||||
android:minHeight="@dimen/bus_p_station_item_middle_height"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
|
||||
<ImageView
|
||||
@@ -20,11 +21,17 @@
|
||||
app:layout_constraintLeft_toLeftOf="parent"/>
|
||||
<TextView
|
||||
android:id="@+id/bus_p_middle_station"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_width="@dimen/bus_p_station_txt_width"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="--"
|
||||
android:textSize="@dimen/bus_p_station_txt_size"
|
||||
android:textStyle="bold"
|
||||
android:layout_marginTop="@dimen/dp_20"
|
||||
android:layout_marginBottom="@dimen/dp_20"
|
||||
android:singleLine="true"
|
||||
android:ellipsize="marquee"
|
||||
android:marqueeRepeatLimit="marquee_forever"
|
||||
android:layout_marginRight="@dimen/dp_60"
|
||||
android:includeFontPadding = "false"
|
||||
android:textColor="@color/bus_p_current_station_txt_color"
|
||||
android:layout_marginLeft="@dimen/dp_45"
|
||||
@@ -32,15 +39,23 @@
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"/>
|
||||
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/bus_p_middle_circle"
|
||||
android:layout_width="@dimen/bus_p_station_circle_width_height"
|
||||
android:layout_height="@dimen/bus_p_station_circle_width_height"
|
||||
android:background="@drawable/bg_bus_p_middle_station_circle"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@+id/bus_p_middle_station"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/bus_p_middle_station"/>
|
||||
<ImageView
|
||||
android:id="@+id/bus_p_middle_tag"
|
||||
android:layout_width="@dimen/bus_p_cur_station_circle_width"
|
||||
android:layout_height="wrap_content"
|
||||
android:scaleType="fitXY"
|
||||
android:background="@drawable/bg_bus_p_arrived_station"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"/>
|
||||
app:layout_constraintTop_toTopOf="@+id/bus_p_middle_station"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/bus_p_middle_station"/>
|
||||
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
@@ -1,12 +1,13 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/bus_p_station_item_height"
|
||||
android:layout_height="wrap_content"
|
||||
android:minHeight="@dimen/bus_p_station_item_height"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="@dimen/bus_p_station_tag_line_width"
|
||||
android:layout_height="@dimen/bus_p_station_tag_line_height"
|
||||
android:layout_height="@dimen/bus_p_station_tag_line_height1"
|
||||
android:background="@color/bus_p_tag_line_color"
|
||||
android:layout_marginLeft="@dimen/dp_7"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
@@ -14,17 +15,21 @@
|
||||
|
||||
<TextView
|
||||
android:id="@+id/bus_p_start_station"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="@dimen/dp_45"
|
||||
android:includeFontPadding="false"
|
||||
android:text="--"
|
||||
android:singleLine="true"
|
||||
android:ellipsize="marquee"
|
||||
android:marqueeRepeatLimit="marquee_forever"
|
||||
android:textColor="@color/bus_p_station_txt_color"
|
||||
android:textSize="@dimen/bus_p_station_txt_size"
|
||||
android:textStyle="bold"
|
||||
android:includeFontPadding = "false"
|
||||
android:textColor="@color/bus_p_station_txt_color"
|
||||
android:layout_marginLeft="@dimen/dp_45"
|
||||
android:layout_marginRight="@dimen/dp_60"
|
||||
app:layout_constraintRight_toLeftOf="@+id/bus_p_start_tag"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@+id/bus_p_start_tag"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/bus_p_start_tag"/>
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/bus_p_start_circle"
|
||||
@@ -39,9 +44,11 @@
|
||||
android:id="@+id/bus_p_cur_start_station_tag"
|
||||
android:layout_width="@dimen/bus_p_cur_station_circle_width"
|
||||
android:layout_height="wrap_content"
|
||||
android:scaleType="fitXY"
|
||||
android:background="@drawable/bg_bus_p_arrived_station"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@+id/bus_p_start_station"/>
|
||||
app:layout_constraintTop_toTopOf="@+id/bus_p_start_station"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/bus_p_start_station"/>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/bus_p_start_tag"
|
||||
|
||||
@@ -43,7 +43,8 @@
|
||||
<dimen name="bus_p_station_tag_txt_size">36px</dimen>
|
||||
<dimen name="bus_p_station_item_height">80px</dimen>
|
||||
<dimen name="bus_p_station_item_middle_height">100px</dimen>
|
||||
<dimen name="bus_p_station_tag_line_height">50px</dimen>
|
||||
<dimen name="bus_p_station_tag_line_height">80px</dimen>
|
||||
<dimen name="bus_p_station_tag_line_height1">60px</dimen>
|
||||
<dimen name="bus_p_station_tag_line_width">6px</dimen>
|
||||
|
||||
<dimen name="bus_p_curent_station_panel_width">638px</dimen>
|
||||
@@ -52,4 +53,7 @@
|
||||
<dimen name="bus_p_curent_station_txt_size">44px</dimen>
|
||||
<dimen name="bus_p_curent_station_txt_size1">55px</dimen>
|
||||
<dimen name="bus_p_curent_station_tip_size1">40px</dimen>
|
||||
|
||||
<dimen name="bus_p_curent_station_txt_width">584px</dimen>
|
||||
<dimen name="bus_p_station_txt_width">550px</dimen>
|
||||
</resources>
|
||||
@@ -44,7 +44,8 @@
|
||||
<dimen name="bus_p_station_tag_txt_size">36px</dimen>
|
||||
<dimen name="bus_p_station_item_height">80px</dimen>
|
||||
<dimen name="bus_p_station_item_middle_height">100px</dimen>
|
||||
<dimen name="bus_p_station_tag_line_height">50px</dimen>
|
||||
<dimen name="bus_p_station_tag_line_height">80px</dimen>
|
||||
<dimen name="bus_p_station_tag_line_height1">60px</dimen>
|
||||
<dimen name="bus_p_station_tag_line_width">6px</dimen>
|
||||
|
||||
<dimen name="bus_p_curent_station_panel_width">638px</dimen>
|
||||
@@ -53,4 +54,7 @@
|
||||
<dimen name="bus_p_curent_station_txt_size">44px</dimen>
|
||||
<dimen name="bus_p_curent_station_txt_size1">55px</dimen>
|
||||
<dimen name="bus_p_curent_station_tip_size1">40px</dimen>
|
||||
|
||||
<dimen name="bus_p_curent_station_txt_width">584px</dimen>
|
||||
<dimen name="bus_p_station_txt_width">550px</dimen>
|
||||
</resources>
|
||||
@@ -47,6 +47,7 @@ dependencies {
|
||||
implementation rootProject.ext.dependencies.arouter
|
||||
annotationProcessor rootProject.ext.dependencies.aroutercompiler
|
||||
implementation rootProject.ext.dependencies.androidxconstraintlayout
|
||||
implementation rootProject.ext.dependencies.amapnavi3dmap
|
||||
|
||||
implementation rootProject.ext.dependencies.rxjava
|
||||
implementation rootProject.ext.dependencies.rxandroid
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
package com.mogo.och.bus.bean;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Created by pangfan on 2021/8/19
|
||||
*
|
||||
* 订单状态更新请求数据结构
|
||||
*/
|
||||
public class BusRoutePlanningUpdateReqBean {
|
||||
public String sn;
|
||||
public int lineId;
|
||||
public int startSiteId;
|
||||
public int endSiteId;
|
||||
public List<Result> points;
|
||||
|
||||
public static class Result {
|
||||
public Double latitude;
|
||||
public Double longitude;
|
||||
}
|
||||
|
||||
public BusRoutePlanningUpdateReqBean(String sn, int lineId, int startSiteId
|
||||
, int endSiteId, List<Result> points) {
|
||||
this.sn = sn;
|
||||
this.lineId = lineId;
|
||||
this.startSiteId = startSiteId;
|
||||
this.endSiteId = endSiteId;
|
||||
this.points = points;
|
||||
}
|
||||
}
|
||||
@@ -41,6 +41,7 @@ import com.mogo.module.common.constants.DataTypes;
|
||||
import com.mogo.module.common.view.OnPreventFastClickListener;
|
||||
import com.mogo.och.bus.R;
|
||||
import com.mogo.och.bus.ui.BusTrafficLightView;
|
||||
import com.mogo.och.bus.util.BDRouteDataTestUtils;
|
||||
import com.mogo.och.bus.view.BusArcView;
|
||||
import com.mogo.och.bus.view.SlidePanelView;
|
||||
|
||||
@@ -198,6 +199,8 @@ public abstract class BaseBusTabFragment<V extends IView, P extends Presenter<V>
|
||||
debugArrivedStation()
|
||||
);
|
||||
|
||||
findViewById(R.id.btnAutopilotRoute).setOnClickListener(view -> debugArrivedRoute());
|
||||
|
||||
tvOperationStatus.setOnClickListener(view -> {
|
||||
onChangeOperationStatus();
|
||||
});
|
||||
@@ -227,6 +230,10 @@ public abstract class BaseBusTabFragment<V extends IView, P extends Presenter<V>
|
||||
CallerHmiManager.INSTANCE.registerUpgradeTipsCallback(() -> mUpgradeTipIv);
|
||||
}
|
||||
|
||||
private void debugArrivedRoute() {
|
||||
BDRouteDataTestUtils.converToRouteData();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDestroyView() {
|
||||
super.onDestroyView();
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.mogo.och.bus.presenter;
|
||||
package com.mogo.och.bus.model;
|
||||
|
||||
import android.content.Context;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.mogo.och.bus.presenter;
|
||||
package com.mogo.och.bus.model;
|
||||
|
||||
import static com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.M_BUS;
|
||||
import static com.mogo.och.bus.constant.BusConst.STATION_STATUS_STOPPED;
|
||||
@@ -9,15 +9,19 @@ import android.os.Handler;
|
||||
import android.os.Message;
|
||||
import android.text.TextUtils;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
|
||||
import com.mogo.commons.AbsMogoApplication;
|
||||
import com.mogo.commons.debug.DebugConfig;
|
||||
import com.mogo.commons.voice.AIAssist;
|
||||
import com.mogo.eagle.core.data.BaseData;
|
||||
import com.mogo.eagle.core.data.autopilot.AutopilotControlParameters;
|
||||
import com.mogo.eagle.core.data.config.FunctionBuildConfig;
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotPlanningListener;
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotStatusListener;
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotManager;
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager;
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotPlanningListenerManager;
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger;
|
||||
import com.mogo.eagle.core.utilcode.mogo.toast.TipToast;
|
||||
import com.mogo.eagle.core.utilcode.util.NetworkUtils;
|
||||
@@ -27,6 +31,7 @@ import com.mogo.module.common.MogoApisHandler;
|
||||
import com.mogo.och.bus.bean.BusOperationStatusResponse;
|
||||
import com.mogo.och.bus.bean.BusOrderBean;
|
||||
import com.mogo.och.bus.bean.BusOrdersResponse;
|
||||
import com.mogo.och.bus.bean.BusRoutePlanningUpdateReqBean;
|
||||
import com.mogo.och.bus.bean.BusRoutesResponse;
|
||||
import com.mogo.och.bus.bean.BusRoutesResult;
|
||||
import com.mogo.och.bus.bean.BusStationBean;
|
||||
@@ -38,7 +43,9 @@ import com.mogo.och.bus.callback.ISlidePannelHideCallback;
|
||||
import com.mogo.och.bus.constant.BusConst;
|
||||
import com.mogo.och.bus.net.BusServiceManager;
|
||||
import com.mogo.och.bus.net.IBusServiceCallback;
|
||||
import com.mogo.och.bus.presenter.BusModelLoopManager;
|
||||
import com.mogo.och.bus.util.BusAnalyticsUtil;
|
||||
import com.mogo.och.bus.util.CoordinateCalculateRouteUtil;
|
||||
import com.mogo.och.bus.util.PinYinUtil;
|
||||
import com.mogo.service.statusmanager.IMogoStatusChangedListener;
|
||||
import com.mogo.service.statusmanager.StatusDescriptor;
|
||||
@@ -94,6 +101,8 @@ public class BusOrderModel {
|
||||
private ISlidePannelHideCallback slidePannelHideCallback;
|
||||
private IBusControllerStatusCallback mControllerStatusCallback; //Model->Presenter:VR mode等
|
||||
|
||||
List<BusRoutePlanningUpdateReqBean.Result> points = new ArrayList<>();//全路径信息
|
||||
|
||||
private boolean hadQueryLeaveAwayPassager = false;
|
||||
|
||||
private final Handler handler = new Handler(new Handler.Callback() {
|
||||
@@ -135,6 +144,9 @@ public class BusOrderModel {
|
||||
.getApis()
|
||||
.getStatusManagerApi()
|
||||
.registerStatusChangedListener( TAG, StatusDescriptor.VR_MODE, mMogoStatusChangedListener );
|
||||
|
||||
//自动驾驶路线规划接口
|
||||
CallerAutopilotPlanningListenerManager.INSTANCE.addListener(TAG, moGoAutopilotPlanningListener);
|
||||
}
|
||||
|
||||
//2022.1.28
|
||||
@@ -194,6 +206,57 @@ public class BusOrderModel {
|
||||
this.mControllerStatusCallback = callback;
|
||||
}
|
||||
|
||||
private final IMoGoAutopilotPlanningListener moGoAutopilotPlanningListener = new IMoGoAutopilotPlanningListener() {
|
||||
|
||||
@Override
|
||||
public void onAutopilotTrajectory(@NonNull List<MessagePad.TrajectoryPoint> trajectoryInfos) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAutopilotRotting(MessagePad.GlobalPathResp routeList) {
|
||||
if (null != routeList && routeList.getWayPointsList().size() > 0){
|
||||
points.clear();
|
||||
points.addAll(CoordinateCalculateRouteUtil.coordinateConverterWgsToGcjList(mContext,routeList.getWayPointsList()));
|
||||
updateOrderRoute();
|
||||
}
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
/**
|
||||
* 上报订单全路径规划数据
|
||||
*/
|
||||
public void updateOrderRoute() {
|
||||
if (!isGoingToNextStation || currentStationIndex >= stationList.size() || currentStationIndex-1 < 0 || points.size() == 0){
|
||||
return;
|
||||
}
|
||||
|
||||
BusStationBean currentStation = stationList.get( currentStationIndex -1);
|
||||
BusStationBean nextStation = stationList.get( currentStationIndex);
|
||||
|
||||
BusServiceManager.getInstance().updateOrderRoute(mContext, currentLineId, currentStation.getSiteId()
|
||||
, nextStation.getSiteId(), points, new IBusServiceCallback<BaseData>() {
|
||||
@Override
|
||||
public void onSuccess(BaseData o) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFail(String failMsg) {
|
||||
if (isGoingToNextStation){//重试
|
||||
updateOrderRoute();
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public void debugUpdateOrderRoute(List<MessagePad.Location> list){
|
||||
points.clear();
|
||||
points.addAll(CoordinateCalculateRouteUtil.coordinateConverterWgsToGcjList(mContext,list));
|
||||
updateOrderRoute();
|
||||
}
|
||||
|
||||
/**
|
||||
* 轮询bus待服务订单
|
||||
*/
|
||||
@@ -262,6 +325,9 @@ public class BusOrderModel {
|
||||
.getApis()
|
||||
.getRegisterCenterApi()
|
||||
.unregisterCarLocationChangedListener(TAG, mCarLocationChangedListener2);
|
||||
|
||||
//自动驾驶路线规划接口
|
||||
CallerAutopilotPlanningListenerManager.INSTANCE.removeListener(moGoAutopilotPlanningListener);
|
||||
}
|
||||
|
||||
private Object readResolve() {
|
||||
@@ -415,6 +481,8 @@ public class BusOrderModel {
|
||||
// }
|
||||
AutopilotControlParameters currentAutopilot = new AutopilotControlParameters();
|
||||
currentAutopilot.isSpeakVoice = !isRestart;
|
||||
currentAutopilot.routeID = busRoutesResult.getLineId();
|
||||
currentAutopilot.routeName = busRoutesResult.getName();
|
||||
currentAutopilot.startName = PinYinUtil.getPinYinHeadChar(currentStation.getName());
|
||||
currentAutopilot.endName = PinYinUtil.getPinYinHeadChar(nextStation.getName());
|
||||
currentAutopilot.startLatLon = new AutopilotControlParameters
|
||||
@@ -563,6 +631,8 @@ public class BusOrderModel {
|
||||
public void onFail(String failMsg) {
|
||||
if (!NetworkUtils.isConnected(mContext)) {
|
||||
TipToast.shortTip("网络异常,请稍后重试");
|
||||
}else {
|
||||
TipToast.shortTip(failMsg);
|
||||
}
|
||||
}
|
||||
});
|
||||
@@ -11,6 +11,7 @@ import com.mogo.eagle.core.network.RequestOptions;
|
||||
import com.mogo.eagle.core.network.SubscribeImpl;
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger;
|
||||
import com.mogo.och.bus.bean.BusQueryLinesResponse;
|
||||
import com.mogo.och.bus.bean.BusRoutePlanningUpdateReqBean;
|
||||
import com.mogo.och.bus.bean.BusRoutesResponse;
|
||||
import com.mogo.och.bus.bean.CarHeartbeatReqBean;
|
||||
import com.mogo.och.bus.bean.BusOperationStatusRequest;
|
||||
@@ -22,7 +23,9 @@ import com.mogo.och.bus.bean.BusUpdateSiteStatusRequest;
|
||||
import com.mogo.och.bus.bean.QueryLeaveAwayPassengersRequest;
|
||||
import com.mogo.och.bus.bean.QueryLeaveAwayPassengersResponse;
|
||||
import com.mogo.och.bus.constant.BusConst;
|
||||
import com.mogo.och.bus.presenter.BusOrderModel;
|
||||
import com.mogo.och.bus.model.BusOrderModel;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import io.reactivex.android.schedulers.AndroidSchedulers;
|
||||
import io.reactivex.schedulers.Schedulers;
|
||||
@@ -192,6 +195,18 @@ public class BusServiceManager {
|
||||
.subscribe(getSubscribeImpl(context,callback,"queryBusLines"));
|
||||
}
|
||||
|
||||
public void updateOrderRoute(Context context,int lineId, int startSiteId, int endSiteId
|
||||
, List< BusRoutePlanningUpdateReqBean.Result > points
|
||||
, IBusServiceCallback<BaseData> callback){
|
||||
mService.updateOrderRoute(MoGoAiCloudClientConfig.getInstance().getServiceAppId()
|
||||
,MoGoAiCloudClientConfig.getInstance().getToken()
|
||||
,new BusRoutePlanningUpdateReqBean(MoGoAiCloudClientConfig.getInstance().getSn()
|
||||
,lineId,startSiteId,endSiteId, points))
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(getSubscribeImpl(context,callback,"updateOrderRoute"));
|
||||
}
|
||||
|
||||
/**
|
||||
* 车机端上传心跳数据(只在出车状态时上传):包含高德坐标系经纬度
|
||||
* @param context
|
||||
|
||||
@@ -3,6 +3,7 @@ import com.mogo.eagle.core.data.BaseData;
|
||||
import com.mogo.och.bus.bean.BusOperationStatusRequest;
|
||||
import com.mogo.och.bus.bean.BusOrdersResponse;
|
||||
import com.mogo.och.bus.bean.BusQueryLinesResponse;
|
||||
import com.mogo.och.bus.bean.BusRoutePlanningUpdateReqBean;
|
||||
import com.mogo.och.bus.bean.BusRoutesResponse;
|
||||
import com.mogo.och.bus.bean.CarHeartbeatReqBean;
|
||||
import com.mogo.och.bus.bean.BusQueryLineStationsRequest;
|
||||
@@ -145,5 +146,10 @@ public interface IBusApiService {
|
||||
// @GET("/autopilot-car-hailing/line/v2/driver/bindLine/query")
|
||||
@GET("/autopilot-car-hailing/line/v2/driver/bus/bindLine/query")
|
||||
Observable<BusQueryLinesResponse> queryBusLines(@Header ("appId") String appId, @Header("ticket") String ticket, @Query("sn") String sn);
|
||||
|
||||
@Headers( {"Content-type:application/json;charset=UTF-8"} )
|
||||
// @POST( "/autopilot-car-hailing/location/v2/driver/heartbeat" )
|
||||
@POST( "/autopilot-car-hailing/location/v2/driver/bus/heartbeat" )
|
||||
Observable<BaseData> updateOrderRoute(@Header ("appId") String appId, @Header("ticket") String ticket, @Body BusRoutePlanningUpdateReqBean data);
|
||||
}
|
||||
|
||||
|
||||
@@ -9,6 +9,8 @@ import com.mogo.commons.mvp.Presenter;
|
||||
import com.mogo.eagle.core.utilcode.util.UiThreadHandler;
|
||||
import com.mogo.och.bus.bean.BusQueryLinesResponse;
|
||||
import com.mogo.och.bus.callback.IBusLinesCallback;
|
||||
import com.mogo.och.bus.model.BusLineModel;
|
||||
import com.mogo.och.bus.model.BusOrderModel;
|
||||
import com.mogo.och.bus.ui.BusSwitchLineView;
|
||||
|
||||
/**
|
||||
|
||||
@@ -4,6 +4,7 @@ import static com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.M_BUS
|
||||
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger;
|
||||
import com.mogo.och.bus.constant.BusConst;
|
||||
import com.mogo.och.bus.model.BusOrderModel;
|
||||
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
|
||||
@@ -21,6 +21,7 @@ import com.mogo.och.bus.callback.IBusControllerStatusCallback;
|
||||
import com.mogo.och.bus.callback.IRefreshBusStationsCallback;
|
||||
import com.mogo.och.bus.callback.ISlidePannelHideCallback;
|
||||
import com.mogo.och.bus.fragment.BusFragment;
|
||||
import com.mogo.och.bus.model.BusOrderModel;
|
||||
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1,177 @@
|
||||
package com.mogo.och.bus.util;
|
||||
|
||||
import android.content.Context;
|
||||
|
||||
import com.amap.api.maps.CoordinateConverter;
|
||||
import com.amap.api.maps.model.LatLng;
|
||||
import com.mogo.cloud.commons.utils.CoordinateUtils;
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.Logger;
|
||||
import com.mogo.och.bus.bean.BusRoutePlanningUpdateReqBean;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import mogo.telematics.pad.MessagePad;
|
||||
|
||||
import static com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.M_BUS;
|
||||
|
||||
/**
|
||||
* @author: wangmingjun
|
||||
* @date: 2022/3/28
|
||||
*/
|
||||
public class CoordinateCalculateRouteUtil {
|
||||
|
||||
public static float calculateRouteSumLength(List<LatLng> points){
|
||||
if (null == points || points.size() == 0) return 0;
|
||||
|
||||
float sumLength = 0;
|
||||
|
||||
//计算全路径总距离
|
||||
for (int i = 0;i + 1< points.size();i++){
|
||||
double preLat = points.get(i).latitude;
|
||||
double preLon = points.get(i).longitude;
|
||||
double laLat = points.get(i+1).latitude;
|
||||
double laLon = points.get(i+1).longitude;
|
||||
|
||||
float length = CoordinateUtils.calculateLineDistance(laLon,laLat,preLon,preLat);
|
||||
sumLength += length;
|
||||
}
|
||||
return sumLength;
|
||||
}
|
||||
|
||||
public static List<LatLng> coordinateConverterWgsToGcjListCommon(Context mContext, List<MessagePad.Location> models) {
|
||||
//转成MogoLatLng集合
|
||||
List<LatLng> list = new ArrayList<>();
|
||||
for (MessagePad.Location m : models) {
|
||||
LatLng mogoLatLng = coordinateConverterWgsToGcj(mContext, m);
|
||||
list.add(mogoLatLng);
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
public static LatLng coordinateConverterWgsToGcj(Context mContext, MessagePad.Location mogoLatLng) {
|
||||
CoordinateConverter mCoordinateConverter = new CoordinateConverter(mContext);
|
||||
mCoordinateConverter.from(CoordinateConverter.CoordType.GPS);
|
||||
mCoordinateConverter.coord(new LatLng(mogoLatLng.getLatitude(), mogoLatLng.getLongitude()));
|
||||
LatLng latLng = mCoordinateConverter.convert();
|
||||
return latLng;
|
||||
}
|
||||
|
||||
|
||||
public static List<BusRoutePlanningUpdateReqBean.Result> coordinateConverterWgsToGcjList(Context mContext, List<MessagePad.Location> mogoLatLngList) {
|
||||
List<BusRoutePlanningUpdateReqBean.Result> points = new ArrayList<>();
|
||||
for (MessagePad.Location m : mogoLatLngList) {
|
||||
LatLng mogoLatLng = CoordinateCalculateRouteUtil.coordinateConverterWgsToGcj(mContext, m);
|
||||
BusRoutePlanningUpdateReqBean.Result result = new BusRoutePlanningUpdateReqBean.Result();
|
||||
result.latitude = mogoLatLng.latitude;
|
||||
result.longitude = mogoLatLng.longitude;
|
||||
points.add(result);
|
||||
}
|
||||
return points;
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据实时定位的坐标确定出已行驶到那个坐标点 todo 有问题 暂不使用
|
||||
* @param mRoutePoints
|
||||
* @param realLon
|
||||
* @param realLat
|
||||
* @return 返回剩余路径集合
|
||||
*/
|
||||
@Deprecated
|
||||
public static List<LatLng> getCurrentPoinByCompare(List<LatLng> mRoutePoints, double realLon, double realLat) {
|
||||
// 疑似坐标 先以坐标中间1/2为第一个比对点
|
||||
int currentIndex = Math.round(mRoutePoints.size()/2);
|
||||
LatLng currentLatLng = mRoutePoints.get(currentIndex);
|
||||
|
||||
//差值初始化
|
||||
float baseDiffDis = CoordinateUtils.calculateLineDistance(realLon,realLat
|
||||
,currentLatLng.longitude,currentLatLng.latitude);// lon,lat, prelon, prelat
|
||||
|
||||
List<LatLng> latePoints = new ArrayList<>();
|
||||
//与选中点左右比较
|
||||
if (currentIndex -1 >= 0 && currentIndex+1<= mRoutePoints.size()-1){
|
||||
LatLng leftCurrentLatLng = mRoutePoints.get(currentIndex -1);
|
||||
LatLng rightCurentLatLng = mRoutePoints.get(currentIndex + 1);
|
||||
float leftDiffDis = CoordinateUtils.calculateLineDistance(realLon,realLat
|
||||
,leftCurrentLatLng.longitude,leftCurrentLatLng.latitude);
|
||||
float rightDiffDis = CoordinateUtils.calculateLineDistance(realLon,realLat,rightCurentLatLng.longitude,rightCurentLatLng.latitude);
|
||||
|
||||
if (rightDiffDis < leftDiffDis){ //靠近了右半边
|
||||
baseDiffDis = rightDiffDis;
|
||||
for (int i = currentIndex +1; i+1 <mRoutePoints.size() ;i++){
|
||||
float diff = CoordinateUtils.calculateLineDistance(realLon,realLat
|
||||
,mRoutePoints.get(i).longitude,mRoutePoints.get(i).latitude);
|
||||
Logger.d(M_BUS + "Compare右半边集合", "点:"+i+"------------baseDiffDis = "+baseDiffDis+"---diff="+diff);
|
||||
if (baseDiffDis >= diff){
|
||||
baseDiffDis = diff;
|
||||
currentIndex = i;
|
||||
if (i == mRoutePoints.size()-1){
|
||||
latePoints.addAll(mRoutePoints);
|
||||
}
|
||||
}else {
|
||||
latePoints.addAll(mRoutePoints.subList(currentIndex,mRoutePoints.size()-1));
|
||||
return latePoints;
|
||||
}
|
||||
}
|
||||
}else if (rightDiffDis > leftDiffDis){ //靠近左半边
|
||||
baseDiffDis = leftDiffDis;
|
||||
for (int j = currentIndex-1; j -1 >=0 ;j++){
|
||||
float diff = CoordinateUtils.calculateLineDistance(realLon,realLat,mRoutePoints.get(j).longitude,mRoutePoints.get(j).latitude);
|
||||
Logger.d(M_BUS + "Compare左半边集合", "点:"+j+"------------baseDiffDis = "+baseDiffDis+"---diff="+diff);
|
||||
if (baseDiffDis >= diff){
|
||||
baseDiffDis = diff;
|
||||
currentIndex = j;
|
||||
if (j == 0){
|
||||
latePoints.addAll(mRoutePoints);
|
||||
}
|
||||
}else {
|
||||
latePoints.addAll(mRoutePoints.subList(currentIndex,mRoutePoints.size()-1));
|
||||
return latePoints;
|
||||
}
|
||||
}
|
||||
}else {
|
||||
Logger.d(M_BUS + "正好相等", "点:"+currentIndex+"------------baseDiffDis = "+baseDiffDis+"---diff="+leftDiffDis);
|
||||
latePoints.addAll(mRoutePoints.subList(currentIndex,currentIndex));
|
||||
return latePoints;
|
||||
}
|
||||
}
|
||||
return latePoints;
|
||||
}
|
||||
|
||||
/**
|
||||
* 简单粗暴 直接比较 todo 需要优化
|
||||
* @param mRoutePoints
|
||||
* @param realLon
|
||||
* @param realLat
|
||||
* @return
|
||||
*/
|
||||
public static List<LatLng> getRemainPointListByCompare(List<LatLng> mRoutePoints,double realLon,double realLat) {
|
||||
List<LatLng> latePoints = new ArrayList<>();
|
||||
int currentIndex = 0; //记录疑似点
|
||||
if (mRoutePoints.size() > 0){
|
||||
//基础点
|
||||
LatLng baseLatLng = mRoutePoints.get(0);
|
||||
float baseDiffDis = CoordinateUtils.calculateLineDistance(realLon,realLat
|
||||
,baseLatLng.longitude,baseLatLng.latitude);// lon,lat, prelon, prelat
|
||||
|
||||
for (int i= 1; i < mRoutePoints.size(); i++){
|
||||
LatLng latLng = mRoutePoints.get(i);
|
||||
float diff = CoordinateUtils.calculateLineDistance(realLon,realLat
|
||||
,latLng.longitude,latLng.latitude);
|
||||
if (baseDiffDis > diff){
|
||||
// Logger.d(M_TAXI + "calculateRouteSumLength", "点:"+i+"-------先记录点----- ");
|
||||
baseDiffDis = diff;
|
||||
currentIndex = i;
|
||||
}
|
||||
}
|
||||
Logger.d(M_BUS + "calculateRouteSumLength", "点:"+currentIndex+"-------是最近的点------ ");
|
||||
if (currentIndex == mRoutePoints.size()-1){
|
||||
latePoints.add(mRoutePoints.get(currentIndex));
|
||||
}else {
|
||||
latePoints.addAll(mRoutePoints.subList(currentIndex,mRoutePoints.size()-1));
|
||||
}
|
||||
return latePoints;
|
||||
}
|
||||
return latePoints;
|
||||
}
|
||||
}
|
||||
@@ -48,6 +48,7 @@
|
||||
android:fadingEdgeLength="40dp"
|
||||
android:layout_marginTop="@dimen/dp_50"
|
||||
android:layout_marginLeft="@dimen/dp_80"
|
||||
android:layout_marginRight="@dimen/dp_80"
|
||||
android:layout_marginBottom="@dimen/dp_30"/>
|
||||
|
||||
<TextView
|
||||
|
||||
@@ -222,13 +222,23 @@
|
||||
android:textSize="30sp"
|
||||
app:layout_constraintRight_toRightOf="@id/btnAutopilotDisable"
|
||||
app:layout_constraintTop_toBottomOf="@id/btnAutopilotRunning" />
|
||||
<Button
|
||||
android:id="@+id/btnAutopilotRoute"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="#023D35"
|
||||
android:text="上传全路径"
|
||||
android:textSize="30sp"
|
||||
app:layout_constraintRight_toRightOf="@id/btnAutopilotDisable"
|
||||
app:layout_constraintTop_toBottomOf="@id/btnAutopilotArrive" />
|
||||
|
||||
<androidx.constraintlayout.widget.Group
|
||||
android:id="@+id/groupTestPanel"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:visibility="gone"
|
||||
app:constraint_referenced_ids="btnAutopilotArrive,btnAutopilotDisable,btnAutopilotEnable,btnAutopilotRunning"
|
||||
app:constraint_referenced_ids="btnAutopilotArrive,btnAutopilotDisable,btnAutopilotEnable
|
||||
,btnAutopilotRunning,btnAutopilotRoute"
|
||||
tools:visibility="visible" />
|
||||
|
||||
<!-- <com.mogo.och.bus.ui.BusTrafficLightView-->
|
||||
|
||||
@@ -2,7 +2,8 @@
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="282px">
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingBottom="@dimen/dp_80">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/switch_line_item_select_iv"
|
||||
@@ -14,11 +15,14 @@
|
||||
|
||||
<TextView
|
||||
android:id="@+id/switch_line_name"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintLeft_toRightOf="@+id/switch_line_item_select_iv"
|
||||
android:layout_marginLeft="@dimen/dp_33"
|
||||
android:maxLines="2"
|
||||
android:ellipsize="end"
|
||||
android:textStyle="bold"
|
||||
android:textColor="@android:color/white"
|
||||
android:text="@string/bus_switch_line_name"
|
||||
@@ -26,7 +30,7 @@
|
||||
|
||||
<TextView
|
||||
android:id="@+id/switch_line_start_station"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="@dimen/dp_17"
|
||||
android:layout_marginTop="@dimen/dp_30"
|
||||
@@ -35,6 +39,7 @@
|
||||
android:text="@string/bus_switch_line_start"
|
||||
android:textColor="#B9C3E9"
|
||||
android:textSize="@dimen/dp_36"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/switch_line_name"
|
||||
app:layout_constraintLeft_toRightOf="@+id/switch_line_start_greenDot"/>
|
||||
|
||||
@@ -69,7 +74,7 @@
|
||||
|
||||
<TextView
|
||||
android:id="@+id/switch_line_end_station"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="@dimen/dp_17"
|
||||
android:layout_marginTop="@dimen/dp_30"
|
||||
@@ -78,6 +83,7 @@
|
||||
android:text="@string/bus_switch_line_end"
|
||||
android:textColor="#B9C3E9"
|
||||
android:textSize="@dimen/dp_36"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintLeft_toRightOf="@+id/switch_line_end_blueDot"
|
||||
app:layout_constraintTop_toBottomOf="@+id/switch_line_start_station"/>
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
@@ -1,3 +1,5 @@
|
||||
import java.text.SimpleDateFormat
|
||||
|
||||
apply plugin: 'com.android.application'
|
||||
apply plugin: 'com.alibaba.arouter'
|
||||
apply plugin: 'kotlin-android'
|
||||
@@ -180,6 +182,7 @@ android {
|
||||
buildConfigField 'String', 'SOCKET_APP_ID', '\"com.mogo.launcher\"'
|
||||
buildConfigField 'String', 'WORKING_BRANCH_NAME', getWorkingBranchName()
|
||||
buildConfigField 'String', 'WORKING_BRANCH_HASH', getWorkingBranchHash()
|
||||
buildConfigField 'String', 'APP_BUILD_TIME', getBuildTime()
|
||||
// 是否支持目的地导航策略
|
||||
buildConfigField 'boolean', 'IS_SUPPORT_SCHEDULE_CALCULATE_NOT_HOME_COMPANY_DISTANCE_FOR_PUSH', 'false'
|
||||
}
|
||||
@@ -331,6 +334,16 @@ def getWorkingBranchHash() {
|
||||
return "\"${workingBranchHash}\""
|
||||
}
|
||||
|
||||
static def getBuildTime() {
|
||||
def buildTimeFormat = "yyyy-MM-dd HH:mm:ss"
|
||||
//设置时间格式
|
||||
SimpleDateFormat formatter = new SimpleDateFormat(buildTimeFormat, Locale.getDefault())
|
||||
//获取当前时间
|
||||
Date curDate = new Date(System.currentTimeMillis())
|
||||
def buildTime = formatter.format(curDate)
|
||||
return "\"${buildTime}\""
|
||||
}
|
||||
|
||||
|
||||
boolean isAndroidTestBuild() {
|
||||
for (String s : gradle.startParameter.taskNames) {
|
||||
|
||||
@@ -73,6 +73,7 @@ public class MogoApplication extends MainMoGoApplication {
|
||||
// 初始化构建APP的时候的分支及提交HASH,用于辅助定位问题
|
||||
AppConfigInfo.INSTANCE.setWorkingBranchName(BuildConfig.WORKING_BRANCH_NAME);
|
||||
AppConfigInfo.INSTANCE.setWorkingBranchHash(BuildConfig.WORKING_BRANCH_HASH);
|
||||
AppConfigInfo.INSTANCE.setAppBuildTime(BuildConfig.APP_BUILD_TIME);
|
||||
|
||||
// 使用与渠道配置一样的gps提供者提供的数据,app/productFlavors/fPadLenovo.gradle GPS_PROVIDER 0-Android系统,1-工控机,2-OBU
|
||||
FunctionBuildConfig.gpsProvider = BuildConfig.GPS_PROVIDER;
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
import java.text.SimpleDateFormat
|
||||
|
||||
apply plugin: 'com.android.application'
|
||||
|
||||
android {
|
||||
@@ -24,6 +26,15 @@ android {
|
||||
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
||||
}
|
||||
}
|
||||
//插入构建时间
|
||||
buildTypes.each {
|
||||
//设置时间格式
|
||||
SimpleDateFormat formatter = new SimpleDateFormat("yyyyMMdd.HHmmss", Locale.getDefault())
|
||||
//获取当前时间
|
||||
Date curDate = new Date(System.currentTimeMillis())
|
||||
String buildTime = formatter.format(curDate)
|
||||
it.buildConfigField 'String', 'BUILD_TIME', "\"${buildTime}\""
|
||||
}
|
||||
compileOptions {
|
||||
sourceCompatibility JavaVersion.VERSION_1_8
|
||||
targetCompatibility JavaVersion.VERSION_1_8
|
||||
@@ -44,17 +55,19 @@ android {
|
||||
|
||||
dependencies {
|
||||
implementation fileTree(dir: 'libs', include: ['*.jar'])
|
||||
implementation 'androidx.appcompat:appcompat:1.3.1'
|
||||
implementation 'androidx.constraintlayout:constraintlayout:2.1.1'
|
||||
implementation rootProject.ext.dependencies.material
|
||||
implementation rootProject.ext.dependencies.androidxconstraintlayout
|
||||
implementation rootProject.ext.dependencies.androidxappcompat
|
||||
implementation 'androidx.recyclerview:recyclerview:1.2.0'
|
||||
testImplementation 'junit:junit:4.13.2'
|
||||
androidTestImplementation 'androidx.test.ext:junit:1.1.3'
|
||||
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
|
||||
implementation "com.google.code.gson:gson:2.8.9"
|
||||
implementation rootProject.ext.dependencies.gson
|
||||
implementation project(':libraries:mogo-adas')
|
||||
implementation project(':core:mogo-core-data')
|
||||
implementation project(':core:mogo-core-utils')
|
||||
implementation 'org.greenrobot:eventbus:3.2.0'
|
||||
implementation 'com.android.support:multidex:1.0.3'
|
||||
implementation 'com.mogo.cloud:telematic:1.3.55'
|
||||
implementation 'com.jcraft:jsch:0.1.55'
|
||||
}
|
||||
|
||||
@@ -29,6 +29,7 @@
|
||||
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" /> <!-- 用于访问GPS定位 -->
|
||||
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
|
||||
<uses-permission android:name="android.permission.ACCESS_LOCATION_EXTRA_COMMANDS" />
|
||||
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW" />
|
||||
|
||||
<application
|
||||
android:allowBackup="true"
|
||||
@@ -54,6 +55,11 @@
|
||||
android:theme="@style/AppTheme.NoActionBar">
|
||||
|
||||
</activity>
|
||||
<activity
|
||||
android:name=".ui.HelpActivity"
|
||||
android:theme="@style/AppTheme.NoActionBar">
|
||||
|
||||
</activity>
|
||||
</application>
|
||||
|
||||
</manifest>
|
||||
@@ -9,7 +9,9 @@ import com.zhidao.adas.client.bean.ErrorData;
|
||||
import com.zhidao.adas.client.bean.GlobalPathResp;
|
||||
import com.zhidao.adas.client.bean.GnssInfo;
|
||||
import com.zhidao.adas.client.bean.MogoReportMessage;
|
||||
import com.zhidao.adas.client.bean.PerceptionObstacles;
|
||||
import com.zhidao.adas.client.bean.PerceptionTrafficLight;
|
||||
import com.zhidao.adas.client.bean.PredictionObstacleTrajectory;
|
||||
import com.zhidao.adas.client.bean.RecordPanel;
|
||||
import com.zhidao.adas.client.bean.TrackedObjects;
|
||||
import com.zhidao.adas.client.bean.Trajectory;
|
||||
@@ -56,6 +58,7 @@ public class DataDistribution {
|
||||
}
|
||||
|
||||
public void registerOnAdasClientListener(OnAdasClientListener listener) {
|
||||
this.listener = null;
|
||||
this.listener = listener;
|
||||
// if (!listeners.contains(listener)) {
|
||||
// listeners.add(listener);
|
||||
@@ -98,6 +101,8 @@ public class DataDistribution {
|
||||
public final List<String> listAutopilotState = new ArrayList<>();
|
||||
public final List<String> listMogoReportMessage = new ArrayList<>();
|
||||
public final List<String> listPerceptionTrafficLight = new ArrayList<>();
|
||||
public final List<String> listPredictionObstacleTrajectory = new ArrayList<>();
|
||||
public final List<String> listPerceptionObstacles = new ArrayList<>();
|
||||
public final List<String> listBasicInfoReq = new ArrayList<>();
|
||||
public final List<String> listRecordPanel = new ArrayList<>();
|
||||
public final List<String> listGlobalPathResp = new ArrayList<>();
|
||||
@@ -114,7 +119,8 @@ public class DataDistribution {
|
||||
}
|
||||
|
||||
private String onTransmit(String time, BaseInfo data) {
|
||||
String str = cutDown(data.toString());
|
||||
String temp = data.toString();
|
||||
String str = cutDown(temp);
|
||||
if (data instanceof Trajectory) {
|
||||
listTrajectory.add(0, time + str);
|
||||
if (listTrajectory.size() > LIST_SIZE) {
|
||||
@@ -205,6 +211,32 @@ public class DataDistribution {
|
||||
// for (OnAdasClientListener listener : listeners) {
|
||||
// listener.onPerceptionTrafficLight((PerceptionTrafficLight) data);
|
||||
// }
|
||||
// }
|
||||
} else if (data instanceof PredictionObstacleTrajectory) {
|
||||
listPredictionObstacleTrajectory.add(0, time + str);
|
||||
if (listPredictionObstacleTrajectory.size() > LIST_SIZE) {
|
||||
listPredictionObstacleTrajectory.remove(listPredictionObstacleTrajectory.size() - 1);
|
||||
}
|
||||
if (listener != null) {
|
||||
listener.onRefresh();
|
||||
}
|
||||
// if (!listeners.isEmpty()) {
|
||||
// for (OnAdasClientListener listener : listeners) {
|
||||
// listener.onRefresh();
|
||||
// }
|
||||
// }
|
||||
} else if (data instanceof PerceptionObstacles) {
|
||||
listPerceptionObstacles.add(0, time + str);
|
||||
if (listPerceptionObstacles.size() > LIST_SIZE) {
|
||||
listPerceptionObstacles.remove(listPerceptionObstacles.size() - 1);
|
||||
}
|
||||
if (listener != null) {
|
||||
listener.onRefresh();
|
||||
}
|
||||
// if (!listeners.isEmpty()) {
|
||||
// for (OnAdasClientListener listener : listeners) {
|
||||
// listener.onRefresh();
|
||||
// }
|
||||
// }
|
||||
} else if (data instanceof BasicInfoReq) {
|
||||
listBasicInfoReq.add(0, time + str);
|
||||
@@ -295,7 +327,7 @@ public class DataDistribution {
|
||||
// }
|
||||
}
|
||||
|
||||
return str;
|
||||
return temp;
|
||||
}
|
||||
|
||||
private class WriteThread implements Runnable {
|
||||
|
||||
@@ -9,6 +9,8 @@ import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.EditText;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.RadioButton;
|
||||
import android.widget.RadioGroup;
|
||||
import android.widget.TextView;
|
||||
import android.widget.Toast;
|
||||
|
||||
@@ -113,6 +115,16 @@ public class AutopilotConfigAdapter extends RecyclerView.Adapter<AutopilotConfig
|
||||
}
|
||||
holder.setViaData();
|
||||
holder.del.setVisibility(isShowDel ? View.VISIBLE : View.GONE);
|
||||
if (mode.isBus) {
|
||||
holder.bus.setChecked(true);
|
||||
} else {
|
||||
holder.taxi.setChecked(true);
|
||||
}
|
||||
if (!TextUtils.isEmpty(mode.routeName)) {
|
||||
holder.route_name.setText(mode.routeName);
|
||||
}
|
||||
if (mode.routeID != -1)
|
||||
holder.route_id.setText(String.valueOf(mode.routeID));
|
||||
}
|
||||
|
||||
//返回Item的数量
|
||||
@@ -132,14 +144,24 @@ public class AutopilotConfigAdapter extends RecyclerView.Adapter<AutopilotConfig
|
||||
EditText start_lat;
|
||||
EditText end_lon;
|
||||
EditText end_lat;
|
||||
EditText route_id;
|
||||
EditText route_name;
|
||||
TextView num;
|
||||
TextView del;
|
||||
ImageView add;
|
||||
ImageView minus;
|
||||
ViaPositionAdapter adapter;
|
||||
RadioGroup car_type;
|
||||
RadioButton taxi;
|
||||
RadioButton bus;
|
||||
|
||||
MyViewHolder(View itemView) {
|
||||
super(itemView);
|
||||
route_id = itemView.findViewById(R.id.route_id);
|
||||
route_name = itemView.findViewById(R.id.route_name);
|
||||
car_type = itemView.findViewById(R.id.car_type);
|
||||
taxi = itemView.findViewById(R.id.taxi);
|
||||
bus = itemView.findViewById(R.id.bus);
|
||||
recyclerView = itemView.findViewById(R.id.RecyclerView);
|
||||
path_name = itemView.findViewById(R.id.path_name);
|
||||
speed = itemView.findViewById(R.id.speed);
|
||||
@@ -154,6 +176,12 @@ public class AutopilotConfigAdapter extends RecyclerView.Adapter<AutopilotConfig
|
||||
add = itemView.findViewById(R.id.add);
|
||||
minus = itemView.findViewById(R.id.minus);
|
||||
initRecyclerView();
|
||||
car_type.setOnCheckedChangeListener(new RadioGroup.OnCheckedChangeListener() {
|
||||
@Override
|
||||
public void onCheckedChanged(RadioGroup group, int checkedId) {
|
||||
datas.get(getBindingAdapterPosition()).isBus = checkedId == R.id.bus;
|
||||
}
|
||||
});
|
||||
minus.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
@@ -366,6 +394,53 @@ public class AutopilotConfigAdapter extends RecyclerView.Adapter<AutopilotConfig
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
route_name.addTextChangedListener(new TextWatcher() {
|
||||
@Override
|
||||
public void beforeTextChanged(CharSequence s, int start, int count, int after) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onTextChanged(CharSequence s, int start, int before, int count) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void afterTextChanged(Editable s) {
|
||||
datas.get(getBindingAdapterPosition()).routeName = s.toString().trim();
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
route_id.addTextChangedListener(new TextWatcher() {
|
||||
@Override
|
||||
public void beforeTextChanged(CharSequence s, int start, int count, int after) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onTextChanged(CharSequence s, int start, int before, int count) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void afterTextChanged(Editable s) {
|
||||
if (!TextUtils.isEmpty(s)) {
|
||||
try {
|
||||
datas.get(getBindingAdapterPosition()).routeID = Integer.parseInt(s.toString().trim());
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
speed.setText("");
|
||||
Toast.makeText(mContext, "输入不合法", Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
} else {
|
||||
datas.get(getBindingAdapterPosition()).routeID = -1;
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private void initRecyclerView() {
|
||||
|
||||
@@ -0,0 +1,67 @@
|
||||
package com.zhidao.adas.client.adapter;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.EditText;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.zhidao.adas.client.R;
|
||||
import com.zhidao.adas.client.base.BaseAdapter;
|
||||
import com.zhidao.adas.client.base.BaseViewHolder;
|
||||
import com.zhidao.adas.client.bean.IPCConnectState;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Date;
|
||||
import java.util.Locale;
|
||||
|
||||
|
||||
/**
|
||||
* 连接状态
|
||||
*/
|
||||
public class ConnectStatusAdapter extends BaseAdapter<IPCConnectState, ConnectStatusAdapter.ViewHolder> {
|
||||
private final SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSS ", Locale.getDefault());
|
||||
private static final String POS = "%03d. ";
|
||||
|
||||
public void refreshView() {
|
||||
// notifyItemChanged(mDatas.size()-1,0);
|
||||
notifyItemRangeChanged(0, getItemCount());
|
||||
}
|
||||
|
||||
@Override
|
||||
public long getItemId(int position) {
|
||||
return position;
|
||||
}
|
||||
|
||||
@SuppressLint("SetTextI18n")
|
||||
@Override
|
||||
protected void onBindDataToItem(ViewHolder viewHolder, IPCConnectState data, int position) {
|
||||
viewHolder.id.setText(String.format(Locale.getDefault(), POS, getItemCount() - position));
|
||||
viewHolder.editText.setText(sdf.format(new Date(data.time)) + "\n" + data.status);
|
||||
viewHolder.editText.setTextColor(mContext.getResources().getColor(data.color));
|
||||
}
|
||||
|
||||
@Override
|
||||
protected View getItemViewResource(ViewGroup viewGroup) {
|
||||
return LayoutInflater.from(mContext).inflate(R.layout.item_status, viewGroup, false);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
protected ViewHolder getViewHolder(View view) {
|
||||
return new ViewHolder(view, this);
|
||||
}
|
||||
|
||||
|
||||
class ViewHolder extends BaseViewHolder<ConnectStatusAdapter> {
|
||||
EditText editText;
|
||||
TextView id;
|
||||
|
||||
public ViewHolder(View itemView, ConnectStatusAdapter adapter) {
|
||||
super(itemView, adapter);
|
||||
editText = itemView.findViewById(R.id.log);
|
||||
id = itemView.findViewById(R.id.id);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -31,7 +31,7 @@ public class LineAdapter extends BaseAdapter<AutoPilotMode, LineAdapter.ViewHold
|
||||
|
||||
@Override
|
||||
protected void onBindDataToItem(ViewHolder viewHolder, AutoPilotMode data, int position) {
|
||||
viewHolder.title.setText(data.name + " " + data.startName + "->" + data.endName);
|
||||
viewHolder.title.setText("(" + (data.isBus ? "Bus" : "Taxi") + ")" + data.name + " " + data.startName + "->" + data.endName);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -2,14 +2,38 @@ package com.zhidao.adas.client.base;
|
||||
|
||||
import android.os.Handler;
|
||||
import android.os.Message;
|
||||
import android.view.Gravity;
|
||||
import android.widget.Toast;
|
||||
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
|
||||
import com.zhidao.adas.client.ui.MainActivity;
|
||||
|
||||
import java.lang.ref.WeakReference;
|
||||
|
||||
public abstract class BaseActivity extends AppCompatActivity {
|
||||
private BaseHandler mBaseHandler;
|
||||
private Toast toast;
|
||||
|
||||
protected void showToastCenter(String msg) {
|
||||
showToastCenter(msg, Toast.LENGTH_SHORT);
|
||||
}
|
||||
|
||||
protected void showToastCenter(String msg, int duration) {
|
||||
runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
if (toast != null) {
|
||||
toast.cancel();
|
||||
toast = null;
|
||||
}
|
||||
toast = Toast.makeText(BaseActivity.this, "", duration); //如果有居中显示需求
|
||||
toast.setGravity(Gravity.CENTER, 0, 0);
|
||||
toast.setText(msg);
|
||||
toast.show();
|
||||
}
|
||||
});
|
||||
}
|
||||
@Override
|
||||
protected void onDestroy() {
|
||||
super.onDestroy();
|
||||
|
||||
@@ -15,6 +15,9 @@ public class AutoPilotMode {
|
||||
public Location endLatLon;
|
||||
public double speedLimit;
|
||||
public List<Location> wayLatLons;
|
||||
public int routeID = -1;//道路ID
|
||||
public String routeName;//道路名称
|
||||
public boolean isBus = false;//true:bus false:taxi
|
||||
|
||||
public List<MessagePad.Location> getWayLatLons() {
|
||||
if (wayLatLons == null || wayLatLons.isEmpty()) return null;
|
||||
@@ -52,8 +55,13 @@ public class AutoPilotMode {
|
||||
}
|
||||
}
|
||||
}
|
||||
return TextUtils.isEmpty(name) || TextUtils.isEmpty(startName) || TextUtils.isEmpty(endName) ||
|
||||
startLatLon == null || startLatLon.isNull() || endLatLon == null || endLatLon.isNull() ||
|
||||
speedLimit == 0.0;
|
||||
if (isBus) {
|
||||
return TextUtils.isEmpty(name) || TextUtils.isEmpty(startName) || TextUtils.isEmpty(endName) ||
|
||||
startLatLon == null || startLatLon.isNull() || endLatLon == null || endLatLon.isNull() ||
|
||||
speedLimit == 0.0 || routeID == -1 || TextUtils.isEmpty(routeName);
|
||||
} else
|
||||
return TextUtils.isEmpty(name) || TextUtils.isEmpty(startName) || TextUtils.isEmpty(endName) ||
|
||||
startLatLon == null || startLatLon.isNull() || endLatLon == null || endLatLon.isNull() ||
|
||||
speedLimit == 0.0;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,6 +3,7 @@ package com.zhidao.adas.client.bean;
|
||||
import androidx.annotation.ColorRes;
|
||||
|
||||
public class IPCConnectState {
|
||||
public final long time;
|
||||
public final String status;
|
||||
@ColorRes
|
||||
public final int color;
|
||||
@@ -10,5 +11,6 @@ public class IPCConnectState {
|
||||
public IPCConnectState(String status, @ColorRes int color) {
|
||||
this.status = status;
|
||||
this.color = color;
|
||||
time = System.currentTimeMillis();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
package com.zhidao.adas.client.bean;
|
||||
|
||||
import com.google.protobuf.TextFormat;
|
||||
|
||||
import mogo.telematics.pad.MessagePad;
|
||||
import perception.ObjectOuterClass;
|
||||
import prediction.Prediction;
|
||||
|
||||
public class PerceptionObstacles extends BaseInfo {
|
||||
public final ObjectOuterClass.TrackedObjects bean;
|
||||
|
||||
public PerceptionObstacles(MessagePad.Header header, ObjectOuterClass.TrackedObjects bean) {
|
||||
super("接收", bean.getSerializedSize(), header);
|
||||
this.bean = bean;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return super.toString() + TextFormat.printer().escapingNonAscii(false).printToString(bean);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
package com.zhidao.adas.client.bean;
|
||||
|
||||
import com.google.protobuf.TextFormat;
|
||||
|
||||
import mogo.telematics.pad.MessagePad;
|
||||
import prediction.Prediction;
|
||||
|
||||
public class PredictionObstacleTrajectory extends BaseInfo {
|
||||
public final Prediction.mPredictionObjects bean;
|
||||
|
||||
public PredictionObstacleTrajectory(MessagePad.Header header, Prediction.mPredictionObjects bean) {
|
||||
super("接收", bean.getSerializedSize(), header);
|
||||
this.bean = bean;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return super.toString() + TextFormat.printer().escapingNonAscii(false).printToString(bean);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -15,7 +15,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.zhidao.support.adas.high.common;
|
||||
package com.zhidao.adas.client.ssh;
|
||||
|
||||
|
||||
import java.math.BigInteger;
|
||||
@@ -1,8 +1,10 @@
|
||||
package com.zhidao.support.adas.high.common;
|
||||
package com.zhidao.adas.client.ssh;
|
||||
|
||||
|
||||
|
||||
|
||||
import com.zhidao.support.adas.high.common.CupidLogUtils;
|
||||
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.security.Key;
|
||||
import java.security.KeyFactory;
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.zhidao.support.adas.high.common;
|
||||
package com.zhidao.adas.client.ssh;
|
||||
|
||||
import android.text.TextUtils;
|
||||
|
||||
@@ -6,7 +6,7 @@ import com.jcraft.jsch.ChannelExec;
|
||||
import com.jcraft.jsch.JSch;
|
||||
import com.jcraft.jsch.JSchException;
|
||||
import com.jcraft.jsch.Session;
|
||||
import com.zhidao.support.adas.high.bean.SSHResult;
|
||||
import com.zhidao.support.adas.high.common.CupidLogUtils;
|
||||
|
||||
import java.io.ByteArrayOutputStream;
|
||||
import java.io.IOException;
|
||||
@@ -0,0 +1,65 @@
|
||||
package com.zhidao.adas.client.ssh;
|
||||
|
||||
import android.text.TextUtils;
|
||||
|
||||
import com.zhidao.support.adas.high.common.ThreadPoolManager;
|
||||
|
||||
public class SSHManager {
|
||||
private OnSShListener listener;
|
||||
|
||||
public interface OnSShListener {
|
||||
/**
|
||||
* 向IPC发送命令返回结果
|
||||
*
|
||||
* @param info
|
||||
*/
|
||||
void onSSHResult(SSHResult info);
|
||||
}
|
||||
|
||||
private String ipcConnectedIp;
|
||||
private SSH ssh;
|
||||
|
||||
public void shutdownIPC() {
|
||||
sendIPCCmd("sudo -S shutdown -h now");
|
||||
}
|
||||
|
||||
public void rebootIPC() {
|
||||
sendIPCCmd("sudo -S reboot");
|
||||
}
|
||||
|
||||
public void rebootAPDocker() {
|
||||
sendIPCCmd("docker restart autocar_default_1");
|
||||
}
|
||||
|
||||
private void sendIPCCmd(final String cmd) {
|
||||
if (ssh == null) {
|
||||
if (TextUtils.isEmpty(ipcConnectedIp)) {
|
||||
if (listener != null) {
|
||||
listener.onSSHResult(new SSHResult(SSHResult.RESULT_CODE.IP_UNKNOWN, cmd, "IPC IP未知"));
|
||||
}
|
||||
return;
|
||||
}
|
||||
ThreadPoolManager.getsInstance().execute(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
ssh = new SSH();
|
||||
String encodePwd = SSHTool.getEncodePwd();
|
||||
String privateKey = SSHTool.getPrivateKey();
|
||||
try {
|
||||
String pwd = RSATool.decodeByPrivateKey(encodePwd, Base64.decodeBase64(privateKey));
|
||||
ssh.connect(ipcConnectedIp, 22, "reset", pwd);
|
||||
SSHResult result = ssh.exec(cmd, pwd);
|
||||
if (listener != null)
|
||||
listener.onSSHResult(result);
|
||||
} catch (Exception e) {
|
||||
if (listener != null)
|
||||
listener.onSSHResult(new SSHResult(SSHResult.RESULT_CODE.ERROR, cmd, e.getMessage()));
|
||||
e.printStackTrace();
|
||||
}
|
||||
ssh.disConnect();
|
||||
ssh = null;
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,10 +1,22 @@
|
||||
package com.zhidao.support.adas.high.bean;
|
||||
package com.zhidao.adas.client.ssh;
|
||||
|
||||
import com.zhidao.adas.client.DataDistribution;
|
||||
import com.zhidao.adas.client.bean.MySSHResult;
|
||||
import com.zhidao.support.adas.high.common.CupidLogUtils;
|
||||
|
||||
/**
|
||||
* SSH返回结果
|
||||
*/
|
||||
public class SSHResult {
|
||||
|
||||
public void onSSHResult(final SSHResult info) {
|
||||
MySSHResult result = new MySSHResult(info.toString(), 0);
|
||||
DataDistribution.getInstance().addData(result);
|
||||
// showToastCenter("IPC命令下发结果:" + info.code + " 命令:" + info.cmd + " 信息:" + info.msg);
|
||||
// CupidLogUtils.w(TAG, "IPC命令下发结果:" + info.code + " 命令:" + info.cmd + " 信息:" + info.msg);
|
||||
}
|
||||
|
||||
|
||||
public interface RESULT_CODE {
|
||||
/**
|
||||
* 工控机IP未知
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.zhidao.support.adas.high.common;
|
||||
package com.zhidao.adas.client.ssh;
|
||||
|
||||
public class SSHTool {
|
||||
static {
|
||||
@@ -15,8 +15,8 @@ import androidx.recyclerview.widget.SimpleItemAnimator;
|
||||
import com.zhidao.adas.client.R;
|
||||
import com.zhidao.adas.client.adapter.LineAdapter;
|
||||
import com.zhidao.adas.client.base.BaseAdapter;
|
||||
import com.zhidao.adas.client.bean.UpdateDataEvent;
|
||||
import com.zhidao.adas.client.bean.AutoPilotMode;
|
||||
import com.zhidao.adas.client.bean.UpdateDataEvent;
|
||||
import com.zhidao.adas.client.utils.Constants;
|
||||
import com.zhidao.support.adas.high.AdasManager;
|
||||
|
||||
@@ -109,6 +109,10 @@ public class AutoPilotModeDialog extends Dialog {
|
||||
builder.setSpeedLimit(data.speedLimit);
|
||||
builder.setVehicleType(9);
|
||||
builder.setIsSpeakVoice(true);
|
||||
if (data.isBus) {
|
||||
builder.setRouteID(data.routeID);
|
||||
builder.setRouteName(data.routeName);
|
||||
}
|
||||
AdasManager.getInstance().sendAutoPilotModeReq(1, 0, builder.build());
|
||||
AutoPilotModeDialog.this.dismiss();
|
||||
}
|
||||
|
||||
@@ -189,7 +189,7 @@ public class AutopilotConfigActivity extends BaseActivity {
|
||||
});
|
||||
} else {
|
||||
builder.setTitle("保存失败")
|
||||
.setMessage("请输入必填项\n所有输入框均必填\uD83E\uDD2A")
|
||||
.setMessage("请输入必填项\n所有输入框均必填\uD83E\uDD2A\n(Bus必须输入道路名称和道路ID)")
|
||||
.setPositiveButton("确认",
|
||||
new DialogInterface.OnClickListener() {
|
||||
public void onClick(DialogInterface dialog, int whichButton) {
|
||||
|
||||
@@ -0,0 +1,181 @@
|
||||
package com.zhidao.adas.client.ui;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.content.Context;
|
||||
import android.graphics.PixelFormat;
|
||||
import android.util.DisplayMetrics;
|
||||
import android.view.Gravity;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.MotionEvent;
|
||||
import android.view.View;
|
||||
import android.view.WindowManager;
|
||||
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.zhidao.adas.client.R;
|
||||
import com.zhidao.adas.client.adapter.ConnectStatusAdapter;
|
||||
import com.zhidao.adas.client.adapter.DataShowAdapter;
|
||||
import com.zhidao.adas.client.bean.IPCConnectState;
|
||||
import com.zhidao.adas.client.utils.MyLinearLayoutManager;
|
||||
|
||||
import java.lang.reflect.Field;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author xuxinchao
|
||||
* @description
|
||||
* @since: 2022/4/20
|
||||
*/
|
||||
public class FloatWindow implements View.OnTouchListener {
|
||||
|
||||
private final Activity mContext;
|
||||
private WindowManager.LayoutParams mWindowParams;
|
||||
private WindowManager mWindowManager;
|
||||
|
||||
private View mFloatLayout;
|
||||
private float mInViewX;
|
||||
private float mInViewY;
|
||||
private float mDownInScreenX;
|
||||
private float mDownInScreenY;
|
||||
private float mInScreenX;
|
||||
private float mInScreenY;
|
||||
private RecyclerView rv_status;
|
||||
private ConnectStatusAdapter adapter;
|
||||
private List<IPCConnectState> list;
|
||||
|
||||
public FloatWindow(Activity context, List<IPCConnectState> list) {
|
||||
this.mContext = context;
|
||||
this.list = list;
|
||||
initFloatWindow();
|
||||
}
|
||||
public void refreshView(){
|
||||
if (adapter!=null){
|
||||
adapter.refreshView();
|
||||
}
|
||||
}
|
||||
|
||||
private void initRV() {
|
||||
//创建默认的线性LayoutManager 横向的GridLayoutManager
|
||||
MyLinearLayoutManager linearLayoutManager = new MyLinearLayoutManager(mContext);
|
||||
// linearLayoutManager.setStackFromEnd(true);//列表再底部开始展示,反转后由上面开始展示
|
||||
// linearLayoutManager.setReverseLayout(true);//列表翻转
|
||||
rv_status.setLayoutManager(linearLayoutManager);
|
||||
//如果可以确定每个item的高度是固定的,设置这个选项可以提高性能
|
||||
rv_status.setHasFixedSize(false);
|
||||
rv_status.setNestedScrollingEnabled(false);
|
||||
adapter = new ConnectStatusAdapter();
|
||||
adapter.setHasStableIds(true);
|
||||
rv_status.setAdapter(adapter);
|
||||
adapter.setData(list);
|
||||
}
|
||||
|
||||
private void initFloatWindow() {
|
||||
LayoutInflater inflater = LayoutInflater.from(mContext);
|
||||
if (inflater == null)
|
||||
return;
|
||||
mFloatLayout = (View) inflater.inflate(R.layout.layout_float, null);
|
||||
rv_status = mFloatLayout.findViewById(R.id.rv_status);
|
||||
mFloatLayout.setOnTouchListener(this);
|
||||
initRV();
|
||||
mWindowParams = new WindowManager.LayoutParams();
|
||||
// mWindowManager = (WindowManager) mContext.getSystemService(Context.WINDOW_SERVICE);
|
||||
// if (Build.VERSION.SDK_INT >= 26) {//8.0新特性
|
||||
// mWindowParams.type = WindowManager.LayoutParams.TYPE_APPLICATION_OVERLAY;
|
||||
// }else{
|
||||
// mWindowParams.type = WindowManager.LayoutParams.TYPE_SYSTEM_ALERT;
|
||||
// }
|
||||
|
||||
mWindowManager = mContext.getWindowManager();
|
||||
|
||||
mWindowParams.format = PixelFormat.RGBA_8888;
|
||||
mWindowParams.flags = WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE;
|
||||
mWindowParams.gravity = Gravity.START | Gravity.TOP;
|
||||
mWindowParams.width = WindowManager.LayoutParams.WRAP_CONTENT;
|
||||
mWindowParams.height = WindowManager.LayoutParams.WRAP_CONTENT;
|
||||
mWindowParams.alpha = 0.9F;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onTouch(View view, MotionEvent motionEvent) {
|
||||
return floatLayoutTouch(motionEvent);
|
||||
}
|
||||
|
||||
private boolean floatLayoutTouch(MotionEvent motionEvent) {
|
||||
switch (motionEvent.getAction()) {
|
||||
case MotionEvent.ACTION_DOWN:
|
||||
// 获取相对View的坐标,即以此View左上角为原点
|
||||
mInViewX = motionEvent.getX();
|
||||
mInViewY = motionEvent.getY();
|
||||
// 获取相对屏幕的坐标,即以屏幕左上角为原点
|
||||
mDownInScreenX = motionEvent.getRawX();
|
||||
mDownInScreenY = motionEvent.getRawY() - getSysBarHeight(mContext);
|
||||
mInScreenX = motionEvent.getRawX();
|
||||
mInScreenY = motionEvent.getRawY() - getSysBarHeight(mContext);
|
||||
break;
|
||||
case MotionEvent.ACTION_MOVE:
|
||||
// 更新浮动窗口位置参数
|
||||
mInScreenX = motionEvent.getRawX();
|
||||
mInScreenY = motionEvent.getRawY() - getSysBarHeight(mContext);
|
||||
mWindowParams.x = (int) (mInScreenX - mInViewX);
|
||||
mWindowParams.y = (int) (mInScreenY - mInViewY);
|
||||
// 手指移动的时候更新小悬浮窗的位置
|
||||
mWindowManager.updateViewLayout(mFloatLayout, mWindowParams);
|
||||
break;
|
||||
case MotionEvent.ACTION_UP:
|
||||
// 如果手指离开屏幕时,xDownInScreen和xInScreen相等,且yDownInScreen和yInScreen相等,则视为触发了单击事件。
|
||||
if (mDownInScreenX == mInScreenX && mDownInScreenY == mInScreenY) {
|
||||
|
||||
}
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public void showFloatWindow(float y) {
|
||||
if (mFloatLayout.getParent() == null) {
|
||||
DisplayMetrics metrics = new DisplayMetrics();
|
||||
// 默认固定位置,靠屏幕右边缘的中间
|
||||
mWindowManager.getDefaultDisplay().getMetrics(metrics);
|
||||
mWindowParams.x = metrics.widthPixels;
|
||||
mWindowParams.y = (int) (y);
|
||||
mWindowManager.addView(mFloatLayout, mWindowParams);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public void hideFloatWindow() {
|
||||
if (mFloatLayout.getParent() != null)
|
||||
mWindowManager.removeView(mFloatLayout);
|
||||
}
|
||||
|
||||
public void setFloatLayoutAlpha(boolean alpha) {
|
||||
if (alpha)
|
||||
mFloatLayout.setAlpha((float) 0.5);
|
||||
else
|
||||
mFloatLayout.setAlpha(1);
|
||||
}
|
||||
|
||||
private int sbar = -1;
|
||||
|
||||
// 获取系统状态栏高度
|
||||
public int getSysBarHeight(Context contex) {
|
||||
if (sbar == -1) {
|
||||
Class<?> c;
|
||||
Object obj;
|
||||
Field field;
|
||||
int x;
|
||||
sbar = 0;
|
||||
try {
|
||||
c = Class.forName("com.android.internal.R$dimen");
|
||||
obj = c.newInstance();
|
||||
field = c.getField("status_bar_height");
|
||||
x = Integer.parseInt(field.get(obj).toString());
|
||||
sbar = contex.getResources().getDimensionPixelSize(x);
|
||||
} catch (Exception e1) {
|
||||
e1.printStackTrace();
|
||||
}
|
||||
}
|
||||
return sbar;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
package com.zhidao.adas.client.ui;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.view.View;
|
||||
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
import com.zhidao.adas.client.R;
|
||||
import com.zhidao.adas.client.base.BaseActivity;
|
||||
|
||||
public class HelpActivity extends BaseActivity {
|
||||
@Override
|
||||
protected void onCreate(@Nullable Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_help);
|
||||
showToastCenter("点击屏幕任意位置,退出帮助页面");
|
||||
}
|
||||
|
||||
public void onBack(View view) {
|
||||
finish();
|
||||
}
|
||||
}
|
||||
@@ -146,6 +146,12 @@ public class InfoFragment extends BaseFragment {
|
||||
case Constants.TITLE.RECEIVE_PERCEPTION_TRAFFIC_LIGHT:
|
||||
adapter.setData(DataDistribution.getInstance().listPerceptionTrafficLight);
|
||||
break;
|
||||
case Constants.TITLE.RECEIVE_PREDICTION_OBSTACLE_TRAJECTORY:
|
||||
adapter.setData(DataDistribution.getInstance().listPredictionObstacleTrajectory);
|
||||
break;
|
||||
case Constants.TITLE.RECEIVE_PERCEPTION_OBSTACLES:
|
||||
adapter.setData(DataDistribution.getInstance().listPerceptionObstacles);
|
||||
break;
|
||||
case Constants.TITLE.RECEIVE_ERROR:
|
||||
adapter.setData(DataDistribution.getInstance().listErrorData);
|
||||
break;
|
||||
|
||||
@@ -4,6 +4,7 @@ import static com.mogo.telematic.MogoProtocolMsg.NORMAL_DATA;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.DialogInterface;
|
||||
import android.content.Intent;
|
||||
import android.content.res.Configuration;
|
||||
import android.os.Bundle;
|
||||
import android.os.Message;
|
||||
@@ -11,7 +12,6 @@ import android.text.Editable;
|
||||
import android.text.TextUtils;
|
||||
import android.text.TextWatcher;
|
||||
import android.util.Log;
|
||||
import android.view.Gravity;
|
||||
import android.view.View;
|
||||
import android.view.WindowManager;
|
||||
import android.widget.AdapterView;
|
||||
@@ -56,7 +56,9 @@ import com.zhidao.adas.client.bean.GnssInfo;
|
||||
import com.zhidao.adas.client.bean.IPCConnectState;
|
||||
import com.zhidao.adas.client.bean.MogoReportMessage;
|
||||
import com.zhidao.adas.client.bean.MySSHResult;
|
||||
import com.zhidao.adas.client.bean.PerceptionObstacles;
|
||||
import com.zhidao.adas.client.bean.PerceptionTrafficLight;
|
||||
import com.zhidao.adas.client.bean.PredictionObstacleTrajectory;
|
||||
import com.zhidao.adas.client.bean.RecordPanel;
|
||||
import com.zhidao.adas.client.bean.TrackedObjects;
|
||||
import com.zhidao.adas.client.bean.Trajectory;
|
||||
@@ -71,12 +73,11 @@ import com.zhidao.support.adas.high.OnAdasConnectStatusListener;
|
||||
import com.zhidao.support.adas.high.OnAdasListener;
|
||||
import com.zhidao.support.adas.high.OnMultiDeviceListener;
|
||||
import com.zhidao.support.adas.high.bean.IPCUpgradeStateInfo;
|
||||
import com.zhidao.support.adas.high.bean.SSHResult;
|
||||
import com.zhidao.adas.client.ssh.SSHResult;
|
||||
import com.zhidao.support.adas.high.common.Constants.IPC_CONNECTION_STATUS;
|
||||
import com.zhidao.support.adas.high.common.CupidLogUtils;
|
||||
import com.zhidao.support.adas.high.common.ProtocolStatus;
|
||||
import com.zhidao.support.adas.high.common.ReceiveTimeoutManager;
|
||||
import com.zhidao.support.recorder.RecordDataManager;
|
||||
|
||||
import java.net.Inet4Address;
|
||||
import java.net.InetAddress;
|
||||
@@ -91,14 +92,16 @@ import chassis.VehicleStateOuterClass;
|
||||
import io.netty.channel.Channel;
|
||||
import mogo.telematics.pad.MessagePad;
|
||||
import mogo_msg.MogoReportMsg;
|
||||
import perception.ObjectOuterClass;
|
||||
import perception.TrafficLightOuterClass;
|
||||
import prediction.Prediction;
|
||||
import record_cache.RecordPanelOuterClass;
|
||||
|
||||
public class MainActivity extends BaseActivity implements OnAdasListener, OnAdasConnectStatusListener, BaseAdapter.OnItemClickListener<String> {
|
||||
private final static String TAG = MainActivity.class.getSimpleName();
|
||||
private static final int WHAT_IPC_IP = 0x00;
|
||||
private static final int WHAT_DRIVER_IP = 0x01;
|
||||
private static final int WHATIPC_CONNECT_STATE = 0x02;
|
||||
private static final int WHAT_IPC_CONNECT_STATE = 0x02;
|
||||
private EditText etIp;
|
||||
private ImageView role;
|
||||
private ImageView tvIp;
|
||||
@@ -124,7 +127,7 @@ public class MainActivity extends BaseActivity implements OnAdasListener, OnAdas
|
||||
|
||||
private final List<String> titleFragmentData = new ArrayList<>();
|
||||
private final List<String> titleBtnData = new ArrayList<>();
|
||||
|
||||
private final List<IPCConnectState> connectStatusList = new ArrayList<>();
|
||||
private InfoTitleAdapter btnAdapter;
|
||||
private InfoTitleAdapter fragmentAdapter;
|
||||
|
||||
@@ -141,6 +144,8 @@ public class MainActivity extends BaseActivity implements OnAdasListener, OnAdas
|
||||
private InfoFragment errorFragment;
|
||||
private InfoFragment reportMessageFragment;
|
||||
private InfoFragment perceptionTrafficLightFragment;
|
||||
private InfoFragment predictionObstacleTrajectoryFragment;
|
||||
private InfoFragment perceptionObstaclesFragment;
|
||||
private VersionFragment versionFragment;
|
||||
private FragmentManager manager;
|
||||
private FragmentTransaction transaction;
|
||||
@@ -151,7 +156,8 @@ public class MainActivity extends BaseActivity implements OnAdasListener, OnAdas
|
||||
private int connectStatus;
|
||||
private AutoPilotModeDialog autoPilotModeDialog;
|
||||
private ListPopupWindow listPopupWindow;
|
||||
|
||||
private FloatWindow floatWindow;
|
||||
private View include_title;
|
||||
// @Override
|
||||
// protected void onStart() {
|
||||
// super.onStart();
|
||||
@@ -207,6 +213,7 @@ public class MainActivity extends BaseActivity implements OnAdasListener, OnAdas
|
||||
|
||||
|
||||
private void initView() {
|
||||
include_title = findViewById(R.id.include_title);
|
||||
etIp = findViewById(R.id.et_ip);
|
||||
role = findViewById(R.id.role);
|
||||
line = findViewById(R.id.line);
|
||||
@@ -278,7 +285,6 @@ public class MainActivity extends BaseActivity implements OnAdasListener, OnAdas
|
||||
etIp.setSelection(ip.length());
|
||||
}
|
||||
|
||||
// infoTitleList.add("录音测试");
|
||||
//初始化fragment
|
||||
manager = getSupportFragmentManager();
|
||||
transaction = manager.beginTransaction();
|
||||
@@ -379,6 +385,13 @@ public class MainActivity extends BaseActivity implements OnAdasListener, OnAdas
|
||||
showLocalIP();
|
||||
}
|
||||
});
|
||||
title.setOnLongClickListener(new View.OnLongClickListener() {
|
||||
@Override
|
||||
public boolean onLongClick(View v) {
|
||||
startActivity(new Intent(MainActivity.this, HelpActivity.class));
|
||||
return true;
|
||||
}
|
||||
});
|
||||
|
||||
tvIp.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
@@ -393,6 +406,18 @@ public class MainActivity extends BaseActivity implements OnAdasListener, OnAdas
|
||||
}
|
||||
}
|
||||
});
|
||||
tvConnectState.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
if (floatWindow == null) {
|
||||
floatWindow = new FloatWindow(MainActivity.this, connectStatusList);
|
||||
floatWindow.showFloatWindow(include_title.getY() + include_title.getHeight());
|
||||
} else {
|
||||
floatWindow.hideFloatWindow();
|
||||
floatWindow = null;
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private void showListPopupWindow() {
|
||||
@@ -427,10 +452,12 @@ public class MainActivity extends BaseActivity implements OnAdasListener, OnAdas
|
||||
titleFragmentData.add(Constants.TITLE.RECEIVE_GNSS_INFO);
|
||||
titleFragmentData.add(Constants.TITLE.RECEIVE_TRAJECTORY);
|
||||
titleFragmentData.add(Constants.TITLE.RECEIVE_TRACKED_OBJECTS);
|
||||
titleFragmentData.add(Constants.TITLE.RECEIVE_PERCEPTION_OBSTACLES);
|
||||
titleFragmentData.add(Constants.TITLE.RECEIVE_VEHICLE_STATE);
|
||||
titleFragmentData.add(Constants.TITLE.RECEIVE_AUTOPILOT_STATE);
|
||||
titleFragmentData.add(Constants.TITLE.RECEIVE_REPORT_MESSAGE);
|
||||
titleFragmentData.add(Constants.TITLE.RECEIVE_PERCEPTION_TRAFFIC_LIGHT);
|
||||
titleFragmentData.add(Constants.TITLE.RECEIVE_PREDICTION_OBSTACLE_TRAJECTORY);
|
||||
titleFragmentData.add(Constants.TITLE.RECEIVE_CAR_CONFIG_RESP);
|
||||
titleFragmentData.add(Constants.TITLE.RECEIVE_RECORD_RESULT);
|
||||
titleFragmentData.add(Constants.TITLE.RECEIVE_GLOBAL_PATH_RESP);
|
||||
@@ -446,12 +473,9 @@ public class MainActivity extends BaseActivity implements OnAdasListener, OnAdas
|
||||
titleBtnData.add("数据采集5秒");
|
||||
titleBtnData.add("数据采集start");
|
||||
titleBtnData.add("数据采集end");
|
||||
titleBtnData.add("录音测试");
|
||||
titleBtnData.add("发送信号灯");
|
||||
titleBtnData.add("自动驾驶限速");
|
||||
titleBtnData.add("重启Docker");
|
||||
titleBtnData.add("重启IPC");
|
||||
titleBtnData.add("关机");
|
||||
titleBtnData.add("重启所有节点");
|
||||
titleBtnData.add("采集类型");
|
||||
titleBtnData.add("打开演示模式");
|
||||
titleBtnData.add("关闭演示模式");
|
||||
@@ -474,6 +498,22 @@ public class MainActivity extends BaseActivity implements OnAdasListener, OnAdas
|
||||
btnAdapter.setOnItemClickListener(this);
|
||||
}
|
||||
|
||||
/**
|
||||
* 感知接口 提示
|
||||
*
|
||||
* @param isSeriaNet 是否是透传接口
|
||||
*/
|
||||
private void hintTrackedObjects(boolean isSeriaNet) {
|
||||
int value = 0;
|
||||
MessagePad.CarConfigResp carConfigResp = AdasManager.getInstance().getCarConfig();
|
||||
if (carConfigResp != null) {
|
||||
value = carConfigResp.getProtocolVersionValue();
|
||||
}
|
||||
if (isSeriaNet && value < 3 && value > 0 || value > 2) {
|
||||
showToastCenter("当前工控机协议版本:" + value + ",此接口不受支持");
|
||||
}
|
||||
}
|
||||
|
||||
private void initFragmentRecyclerView() {
|
||||
//创建默认的线性LayoutManager 横向的GridLayoutManager
|
||||
LinearLayoutManager linearLayoutManager = new LinearLayoutManager(this);
|
||||
@@ -508,6 +548,7 @@ public class MainActivity extends BaseActivity implements OnAdasListener, OnAdas
|
||||
}
|
||||
break;
|
||||
case Constants.TITLE.RECEIVE_TRACKED_OBJECTS:
|
||||
hintTrackedObjects(false);
|
||||
if (viewFragment == null)
|
||||
viewFragment = new InfoFragment(data);
|
||||
if (!viewFragment.isVisible()) {
|
||||
@@ -588,6 +629,23 @@ public class MainActivity extends BaseActivity implements OnAdasListener, OnAdas
|
||||
transaction.commit();
|
||||
}
|
||||
break;
|
||||
case Constants.TITLE.RECEIVE_PREDICTION_OBSTACLE_TRAJECTORY:
|
||||
if (predictionObstacleTrajectoryFragment == null)
|
||||
predictionObstacleTrajectoryFragment = new InfoFragment(data);
|
||||
if (!predictionObstacleTrajectoryFragment.isVisible()) {
|
||||
transaction.replace(R.id.fl_info, predictionObstacleTrajectoryFragment);
|
||||
transaction.commit();
|
||||
}
|
||||
break;
|
||||
case Constants.TITLE.RECEIVE_PERCEPTION_OBSTACLES:
|
||||
hintTrackedObjects(true);
|
||||
if (perceptionObstaclesFragment == null)
|
||||
perceptionObstaclesFragment = new InfoFragment(data);
|
||||
if (!perceptionObstaclesFragment.isVisible()) {
|
||||
transaction.replace(R.id.fl_info, perceptionObstaclesFragment);
|
||||
transaction.commit();
|
||||
}
|
||||
break;
|
||||
case Constants.TITLE.RECEIVE_CAR_CONFIG_RESP:
|
||||
AdasManager.getInstance().sendCarConfigReq();
|
||||
if (versionFragment == null)
|
||||
@@ -630,47 +688,56 @@ public class MainActivity extends BaseActivity implements OnAdasListener, OnAdas
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private String onUpdateConnectStateView() {
|
||||
String status;
|
||||
private int getStatusColor(int connectStatus) {
|
||||
int color;
|
||||
switch (connectStatus) {
|
||||
case IPC_CONNECTION_STATUS.CONNECTED:
|
||||
status = "已连接";
|
||||
color = R.color.connect_status_connected;
|
||||
break;
|
||||
default:
|
||||
case IPC_CONNECTION_STATUS.DISCONNECTED:
|
||||
status = "未连接";
|
||||
color = R.color.connect_status_disconnected;
|
||||
break;
|
||||
case IPC_CONNECTION_STATUS.CONNECTING:
|
||||
status = "连接中";
|
||||
color = R.color.connect_status_connecting;
|
||||
break;
|
||||
case IPC_CONNECTION_STATUS.SEARCH_ADDRESS:
|
||||
status = "搜索IP";
|
||||
color = R.color.connect_status_search_address;
|
||||
break;
|
||||
case IPC_CONNECTION_STATUS.NOT_FOUND_ADDRESS:
|
||||
status = "未找到";
|
||||
color = R.color.connect_status_disconnecting;
|
||||
break;
|
||||
}
|
||||
return color;
|
||||
}
|
||||
|
||||
private String onUpdateConnectStateView() {
|
||||
String status;
|
||||
switch (connectStatus) {
|
||||
case IPC_CONNECTION_STATUS.CONNECTED:
|
||||
status = "已连接";
|
||||
break;
|
||||
default:
|
||||
case IPC_CONNECTION_STATUS.DISCONNECTED:
|
||||
status = "未连接";
|
||||
break;
|
||||
case IPC_CONNECTION_STATUS.CONNECTING:
|
||||
status = "连接中";
|
||||
break;
|
||||
case IPC_CONNECTION_STATUS.SEARCH_ADDRESS:
|
||||
status = "搜索IP";
|
||||
break;
|
||||
case IPC_CONNECTION_STATUS.NOT_FOUND_ADDRESS:
|
||||
status = "未找到";
|
||||
break;
|
||||
}
|
||||
Message msg = Message.obtain();
|
||||
msg.obj = new IPCConnectState(status, color);
|
||||
msg.what = WHATIPC_CONNECT_STATE;
|
||||
msg.obj = new IPCConnectState(status, getStatusColor(connectStatus));
|
||||
msg.what = WHAT_IPC_CONNECT_STATE;
|
||||
getHandler().sendMessage(msg);
|
||||
return status;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onSSHResult(final SSHResult info) {
|
||||
MySSHResult result = new MySSHResult(info.toString(), 0);
|
||||
DataDistribution.getInstance().addData(result);
|
||||
showToastCenter("IPC命令下发结果:" + info.code + " 命令:" + info.cmd + " 信息:" + info.msg);
|
||||
CupidLogUtils.w(TAG, "IPC命令下发结果:" + info.code + " 命令:" + info.cmd + " 信息:" + info.msg);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(ProtocolStatus status, byte[] bytes) {
|
||||
@@ -720,6 +787,18 @@ public class MainActivity extends BaseActivity implements OnAdasListener, OnAdas
|
||||
DataDistribution.getInstance().addData(base);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onPredictionObstacleTrajectory(MessagePad.Header header, Prediction.mPredictionObjects predictionObjects) {
|
||||
PredictionObstacleTrajectory base = new PredictionObstacleTrajectory(header, predictionObjects);
|
||||
DataDistribution.getInstance().addData(base);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onTrackedObjects(MessagePad.Header header, ObjectOuterClass.TrackedObjects trackedObjects) {
|
||||
PerceptionObstacles base = new PerceptionObstacles(header, trackedObjects);
|
||||
DataDistribution.getInstance().addData(base);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBasicInfoReq(MessagePad.Header header, MessagePad.BasicInfoReq basicInfoReq) {
|
||||
BasicInfoReq info = new BasicInfoReq(header, basicInfoReq);
|
||||
@@ -766,29 +845,6 @@ public class MainActivity extends BaseActivity implements OnAdasListener, OnAdas
|
||||
}
|
||||
|
||||
|
||||
private Toast toast;
|
||||
|
||||
public void showToastCenter(String msg) {
|
||||
showToastCenter(msg, Toast.LENGTH_SHORT);
|
||||
}
|
||||
|
||||
public void showToastCenter(String msg, int duration) {
|
||||
runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
if (toast != null) {
|
||||
toast.cancel();
|
||||
toast = null;
|
||||
}
|
||||
toast = Toast.makeText(MainActivity.this, "", duration); //如果有居中显示需求
|
||||
toast.setGravity(Gravity.CENTER, 0, 0);
|
||||
toast.setText(msg);
|
||||
toast.show();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
private void initAdas() {
|
||||
CupidLogUtils.e(TAG, "--->初始化");
|
||||
AdasOptions options;
|
||||
@@ -857,7 +913,6 @@ public class MainActivity extends BaseActivity implements OnAdasListener, OnAdas
|
||||
AdasManager.getInstance().create(options, this);
|
||||
|
||||
AdasManager.getInstance().setOnAdasListener(this);
|
||||
// AdasManager.getInstance().setOnAdasConnectStatusListener(this);
|
||||
if (BuildConfig.IS_CLIENT) {
|
||||
/*—————————————作为乘客端———————————*/
|
||||
|
||||
@@ -881,18 +936,6 @@ public class MainActivity extends BaseActivity implements OnAdasListener, OnAdas
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
protected void onPause() {
|
||||
super.onPause();
|
||||
// AdasManager.getInstance().pause();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onResume() {
|
||||
super.onResume();
|
||||
// AdasManager.getInstance().resume();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onDestroy() {
|
||||
super.onDestroy();
|
||||
@@ -906,7 +949,12 @@ public class MainActivity extends BaseActivity implements OnAdasListener, OnAdas
|
||||
|
||||
|
||||
@Override
|
||||
public void onConnectionIPCStatus(int ipcConnectionStatus, String failedMsg) {
|
||||
public void onConnectionIPCStatus(int ipcConnectionStatus, String reason) {
|
||||
Log.i(TAG, "连接状态=" + (reason == null ? "主动断开连接" : reason));
|
||||
connectStatusList.add(0, new IPCConnectState(reason == null ? "主动断开连接" : reason, getStatusColor(ipcConnectionStatus)));
|
||||
if (connectStatusList.size() > 100) {
|
||||
connectStatusList.remove(connectStatusList.size() - 1);
|
||||
}
|
||||
connectStatus = ipcConnectionStatus;
|
||||
String status = onUpdateConnectStateView();
|
||||
if (connectStatus == IPC_CONNECTION_STATUS.CONNECTED) {
|
||||
@@ -917,10 +965,6 @@ public class MainActivity extends BaseActivity implements OnAdasListener, OnAdas
|
||||
Constants.addIpcUsedIps(this, ips, tem);
|
||||
}
|
||||
} else if (connectStatus == IPC_CONNECTION_STATUS.DISCONNECTED) {
|
||||
if (!TextUtils.isEmpty(failedMsg)) {
|
||||
status += " failedMsg=" + failedMsg;
|
||||
showToastCenter("连接失败:" + failedMsg);
|
||||
}
|
||||
getHandler().sendEmptyMessage(WHAT_IPC_IP);
|
||||
}
|
||||
// LogSave.getInstance().saveLog("连接状态", status);
|
||||
@@ -1012,12 +1056,6 @@ public class MainActivity extends BaseActivity implements OnAdasListener, OnAdas
|
||||
CupidLogUtils.w(TAG, "AutopilotRecord===>send:" + bEnd);
|
||||
break;
|
||||
case 6:
|
||||
//录音测试
|
||||
CupidLogUtils.w(TAG, "录音测试");
|
||||
RecordDataManager.getInstance().init(MainActivity.this, "1234567", "", 22, "", "");
|
||||
RecordDataManager.getInstance().record();
|
||||
break;
|
||||
case 7:
|
||||
//发送信号灯
|
||||
MessagePad.TrafficLightStatus left = MessagePad.TrafficLightStatus.newBuilder()
|
||||
.setPhaseNo("1")
|
||||
@@ -1041,7 +1079,7 @@ public class MainActivity extends BaseActivity implements OnAdasListener, OnAdas
|
||||
.build();
|
||||
AdasManager.getInstance().sendTrafficLightData("10038", 26.848153, 112.574883, "180.0", "SN", 100413, -4, 201, 0, detail);
|
||||
break;
|
||||
case 8:
|
||||
case 7:
|
||||
//速度设置
|
||||
AlertDialog.Builder builder = new AlertDialog.Builder(this);
|
||||
builder.setTitle("自动驾驶限速");
|
||||
@@ -1068,27 +1106,20 @@ public class MainActivity extends BaseActivity implements OnAdasListener, OnAdas
|
||||
builder.show();//显示Dialog对话框
|
||||
|
||||
break;
|
||||
case 8:
|
||||
//重启所有节点
|
||||
AdasManager.getInstance().sendSystemCmdReq(MessagePad.SystemCmdType.SYSTEMCMD_REBOOT);
|
||||
break;
|
||||
|
||||
case 9:
|
||||
//重启Docker
|
||||
AdasManager.getInstance().rebootAPDocker();
|
||||
break;
|
||||
case 10:
|
||||
//重启IPC
|
||||
AdasManager.getInstance().rebootIPC();
|
||||
break;
|
||||
case 11:
|
||||
//关机
|
||||
AdasManager.getInstance().shutdownIPC();
|
||||
break;
|
||||
case 12:
|
||||
//采集类型
|
||||
AdasManager.getInstance().sendRecordCause(recordKey, recordFileName, "1", "变道有干扰");
|
||||
break;
|
||||
case 13:
|
||||
case 10:
|
||||
//打开演示模式
|
||||
AdasManager.getInstance().sendDemoModeReq(1);
|
||||
break;
|
||||
case 14:
|
||||
case 11:
|
||||
//关闭演示模式
|
||||
AdasManager.getInstance().sendDemoModeReq(0);
|
||||
break;
|
||||
@@ -1107,7 +1138,10 @@ public class MainActivity extends BaseActivity implements OnAdasListener, OnAdas
|
||||
ipcIp.setVisibility(View.VISIBLE);
|
||||
ipcIp.setText("司机IP:" + NSDNettyManager.getInstance().getConnServerIp());
|
||||
break;
|
||||
case WHATIPC_CONNECT_STATE:
|
||||
case WHAT_IPC_CONNECT_STATE:
|
||||
if (floatWindow != null) {
|
||||
floatWindow.refreshView();
|
||||
}
|
||||
IPCConnectState status = (IPCConnectState) msg.obj;
|
||||
tvConnectState.setText(status.status);
|
||||
tvConnectState.setTextColor(getResources().getColor(status.color));
|
||||
|
||||
@@ -167,10 +167,11 @@ public class VersionFragment extends BaseFragment {
|
||||
list.add(new Config("最大自动驾驶限速:", adasConfig == null ? null : adasConfig.getMaxSpeedLimit() + "m/s"));
|
||||
list.add(new Config("最小加速度:", adasConfig == null ? null : adasConfig.getMinAcceleration() + "m/s²"));
|
||||
list.add(new Config("最大加速度:", adasConfig == null ? null : adasConfig.getMaxAcceleration() + "m/s²"));
|
||||
list.add(new Config("IPC通信协议版本:", adasConfig == null ? null : String.valueOf(adasConfig.getProtocolVersion().getNumber())));
|
||||
list.add(new Config("IPC通信协议版本:", adasConfig == null ? null : String.valueOf(adasConfig.getProtocolVersionValue())));
|
||||
list.add(new Config("APP通信协议版本:", String.valueOf(AdasManager.getInstance().getProtocolVersion())));
|
||||
}
|
||||
list.add(new Config("ADAS LIB版本:", AdasManager.getInstance().getAdasVersion()));
|
||||
list.add(new Config("APP构建时间:", BuildConfig.BUILD_TIME));
|
||||
adapter.setData(list);
|
||||
}
|
||||
|
||||
|
||||
@@ -150,6 +150,8 @@ public class Constants {
|
||||
String RECEIVE_AUTOPILOT_STATE = "自动驾驶状态";
|
||||
String RECEIVE_REPORT_MESSAGE = "监控事件";
|
||||
String RECEIVE_PERCEPTION_TRAFFIC_LIGHT = "感知红绿灯";
|
||||
String RECEIVE_PREDICTION_OBSTACLE_TRAJECTORY = "他车轨迹预测";
|
||||
String RECEIVE_PERCEPTION_OBSTACLES = "透传障碍物";
|
||||
|
||||
// String RECEIVE_BASIC_INFO_REQ = "自动驾驶设备基础信息请求";
|
||||
String RECEIVE_CAR_CONFIG_RESP = "信息与配置";
|
||||
|
||||
9
app_ipc_monitoring/src/main/res/drawable/bg_float.xml
Normal file
9
app_ipc_monitoring/src/main/res/drawable/bg_float.xml
Normal file
@@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<solid android:color="#FAFFFFFF" />
|
||||
<stroke
|
||||
android:width="0.8dp"
|
||||
android:color="#A140E0D0" />
|
||||
<!-- 圆角 -->
|
||||
<corners android:radius="6dp" />
|
||||
</shape>
|
||||
BIN
app_ipc_monitoring/src/main/res/drawable/help.png
Normal file
BIN
app_ipc_monitoring/src/main/res/drawable/help.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 370 KiB |
10
app_ipc_monitoring/src/main/res/layout/activity_help.xml
Normal file
10
app_ipc_monitoring/src/main/res/layout/activity_help.xml
Normal file
@@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<ImageView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:onClick="onBack"
|
||||
android:scaleType="fitXY"
|
||||
android:src="@drawable/help"
|
||||
tools:context=".ui.HelpActivity" />
|
||||
|
||||
@@ -20,6 +20,79 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<RadioGroup
|
||||
android:id="@+id/car_type"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/taxi"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Taxi" />
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/bus"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Bus" />
|
||||
</RadioGroup>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginStart="10dp"
|
||||
android:layout_toStartOf="@id/speed"
|
||||
android:text="道路名称:"
|
||||
android:textColor="#000"
|
||||
android:textSize="16sp" />
|
||||
|
||||
|
||||
<EditText
|
||||
android:id="@+id/route_name"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_toStartOf="@id/hint_speed"
|
||||
android:hint="路线名称"
|
||||
android:inputType="text"
|
||||
android:maxLines="1"
|
||||
android:textColor="#000"
|
||||
android:textSize="25sp" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginStart="5dp"
|
||||
android:layout_toStartOf="@id/speed"
|
||||
android:text="道路ID:"
|
||||
android:textColor="#000"
|
||||
android:textSize="16sp" />
|
||||
|
||||
|
||||
<EditText
|
||||
android:id="@+id/route_id"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_toStartOf="@id/hint_speed"
|
||||
android:hint="路线名称"
|
||||
android:inputType="number"
|
||||
android:maxLines="1"
|
||||
android:textColor="#000"
|
||||
android:textSize="25sp" />
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
@@ -16,6 +16,6 @@
|
||||
android:gravity="center"
|
||||
android:text="INFO"
|
||||
android:textColor="@drawable/item_text_color"
|
||||
android:textSize="16sp" />
|
||||
android:textSize="14sp" />
|
||||
|
||||
</LinearLayout>
|
||||
31
app_ipc_monitoring/src/main/res/layout/item_status.xml
Normal file
31
app_ipc_monitoring/src/main/res/layout/item_status.xml
Normal file
@@ -0,0 +1,31 @@
|
||||
<?xml version="1.0" encoding="utf-8"?><!--测试列表Item-->
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="5dp"
|
||||
android:layout_marginTop="3dp"
|
||||
android:layout_marginRight="5dp"
|
||||
android:layout_marginBottom="3dp"
|
||||
android:background="?android:attr/selectableItemBackground"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/id"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="#999999"
|
||||
android:textSize="12sp" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/log"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@android:color/transparent"
|
||||
android:cursorVisible="false"
|
||||
android:focusable="false"
|
||||
android:textColor="#ff0000"
|
||||
android:textSize="12sp" />
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
17
app_ipc_monitoring/src/main/res/layout/layout_float.xml
Normal file
17
app_ipc_monitoring/src/main/res/layout/layout_float.xml
Normal file
@@ -0,0 +1,17 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/bg_float"
|
||||
android:orientation="vertical">
|
||||
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/rv_status"
|
||||
android:layout_width="260dp"
|
||||
android:layout_height="280dp"
|
||||
android:layout_marginTop="2dp"
|
||||
android:layout_marginBottom="2dp" />
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
@@ -28,4 +28,7 @@
|
||||
<!--是否模糊-->
|
||||
<item name="android:backgroundDimEnabled">true</item>
|
||||
</style>
|
||||
<style name="AppTheme.AppBarOverlay" parent="ThemeOverlay.AppCompat.Dark.ActionBar" />
|
||||
|
||||
<style name="AppTheme.PopupOverlay" parent="ThemeOverlay.AppCompat.Light" />
|
||||
</resources>
|
||||
|
||||
@@ -310,11 +310,11 @@ class MoGoAutopilotProvider :
|
||||
}
|
||||
|
||||
override fun setIPCShutDown() {
|
||||
AdasManager.getInstance().shutdownIPC()
|
||||
// AdasManager.getInstance().shutdownIPC()
|
||||
}
|
||||
|
||||
override fun setIPCReboot() {
|
||||
AdasManager.getInstance().rebootAPDocker()
|
||||
// AdasManager.getInstance().rebootAPDocker()
|
||||
}
|
||||
|
||||
override fun recordCause(key: String?, name: String?, id: String?, reason: String?) {
|
||||
|
||||
@@ -39,14 +39,15 @@ import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_
|
||||
import com.zhidao.support.adas.high.AdasManager
|
||||
import com.zhidao.support.adas.high.OnAdasListener
|
||||
import com.zhidao.support.adas.high.bean.IPCUpgradeStateInfo
|
||||
import com.zhidao.support.adas.high.bean.SSHResult
|
||||
import com.zhidao.support.adas.high.common.ProtocolStatus
|
||||
import com.zhjt.service.chain.ChainLog
|
||||
import com.zhjt.service.chain.TracingConstants.Endpoint.Companion.PAD
|
||||
import mogo.telematics.pad.MessagePad
|
||||
import mogo.telematics.pad.MessagePad.TrackedObject
|
||||
import mogo_msg.MogoReportMsg
|
||||
import perception.ObjectOuterClass
|
||||
import perception.TrafficLightOuterClass
|
||||
import prediction.Prediction
|
||||
import record_cache.RecordPanelOuterClass
|
||||
|
||||
/**
|
||||
@@ -97,6 +98,19 @@ class MoGoAdasListenerImpl : OnAdasListener {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 透传的融合障碍物 他车数据
|
||||
* 当 MessagePad.CarConfigResp.getProtocolVersionValue() >=3 时此回调有数据,老接口“MessagePad.TrackedObjects”不会回调任何数据
|
||||
*
|
||||
* @param header 头
|
||||
* @param trackedObjects 数据
|
||||
*/
|
||||
override fun onTrackedObjects(
|
||||
header: MessagePad.Header?,
|
||||
trackedObjects: ObjectOuterClass.TrackedObjects?
|
||||
) {
|
||||
}
|
||||
|
||||
//自车定位信息
|
||||
@ChainLog(
|
||||
linkChainLog = CHAIN_LINK_LOG_WEB_SOCKET_AUTOPILOT,
|
||||
@@ -175,7 +189,7 @@ class MoGoAdasListenerImpl : OnAdasListener {
|
||||
if (autopilotStatusInfo.connectIP == null) {
|
||||
autopilotStatusInfo.connectIP = AdasManager.getInstance().ipcConnectedIp
|
||||
}
|
||||
if(autopilotStatusInfo.connectPort == null){
|
||||
if (autopilotStatusInfo.connectPort == null) {
|
||||
autopilotStatusInfo.connectPort = AdasManager.getInstance().ipcConnectedPort
|
||||
}
|
||||
if (autopilotStatusInfo.dockVersion == null) {
|
||||
@@ -214,6 +228,13 @@ class MoGoAdasListenerImpl : OnAdasListener {
|
||||
|
||||
}
|
||||
|
||||
override fun onPredictionObstacleTrajectory(
|
||||
header: MessagePad.Header?,
|
||||
predictionObjects: Prediction.mPredictionObjects?
|
||||
) {
|
||||
//他车轨迹预测
|
||||
}
|
||||
|
||||
override fun onBasicInfoReq(
|
||||
header: MessagePad.Header,
|
||||
basicInfoReq: MessagePad.BasicInfoReq?
|
||||
@@ -318,13 +339,13 @@ class MoGoAdasListenerImpl : OnAdasListener {
|
||||
}
|
||||
}
|
||||
|
||||
override fun onSSHResult(info: SSHResult?) {
|
||||
if (info != null && "docker restart autocar_default_1" == info.cmd) {
|
||||
showDockerRebootResult(info.code, info.msg)
|
||||
} else {
|
||||
CallerLogger.w("$M_ADAS_IMPL$TAG", "onSSHResult : result info is null")
|
||||
}
|
||||
}
|
||||
// override fun onSSHResult(info: com.zhidao.adas.client.ssh.SSHResult?) {
|
||||
// if (info != null && "docker restart autocar_default_1" == info.cmd) {
|
||||
// showDockerRebootResult(info.code, info.msg)
|
||||
// } else {
|
||||
// CallerLogger.w("$M_ADAS_IMPL$TAG", "onSSHResult : result info is null")
|
||||
// }
|
||||
// }
|
||||
|
||||
override fun onError(status: ProtocolStatus, bytes: ByteArray) {
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ import com.mogo.eagle.core.function.autopilot.network.AdasServiceModel
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_ADAS_IMPL
|
||||
import com.mogo.eagle.core.utilcode.mogo.toast.TipToast
|
||||
import com.mogo.eagle.core.utilcode.util.ToastUtils
|
||||
import com.zhidao.support.adas.high.AdasManager
|
||||
import com.zhidao.support.adas.high.OnAdasConnectStatusListener
|
||||
import com.zhidao.support.adas.high.common.Constants
|
||||
@@ -44,8 +44,6 @@ class MoGoAdasMsgConnectStatusListenerImpl : OnAdasConnectStatusListener,
|
||||
CallerAutoPilotStatusListenerManager.getAutoPilotStatusInfo().connectPort =
|
||||
AdasManager.getInstance().ipcConnectedPort
|
||||
CallerAutoPilotStatusListenerManager.getAutoPilotStatusInfo().connectStatus = true
|
||||
CallerAutoPilotStatusListenerManager.invokeAutoPilotStatus()
|
||||
|
||||
// 同步SN给工控机
|
||||
syncBasicInfoToAutopilot()
|
||||
// 开启轮询上传自动驾驶状态
|
||||
@@ -55,7 +53,7 @@ class MoGoAdasMsgConnectStatusListenerImpl : OnAdasConnectStatusListener,
|
||||
CallerLogger.d("$M_ADAS_IMPL$TAG", "webSocket 连接失败 reason:$reason")
|
||||
if (connectStatus) {
|
||||
reason?.let {
|
||||
TipToast.shortTip("工控机连接断开,原因:$it , 等待重连")
|
||||
ToastUtils.showLong("工控机连接断开,原因:$it , 等待重连")
|
||||
}
|
||||
connectStatus = false
|
||||
}
|
||||
@@ -69,7 +67,6 @@ class MoGoAdasMsgConnectStatusListenerImpl : OnAdasConnectStatusListener,
|
||||
mCurrentAutopilotSpeed = 0.0f
|
||||
CallerAutoPilotStatusListenerManager.getAutoPilotStatusInfo().state = 0
|
||||
CallerAutoPilotStatusListenerManager.getAutoPilotStatusInfo().pilotmode = 0
|
||||
CallerAutoPilotStatusListenerManager.invokeAutoPilotStatus()
|
||||
} else if (ipcConnectionStatus == Constants.IPC_CONNECTION_STATUS.CONNECTING) {
|
||||
CallerLogger.d("$M_ADAS_IMPL$TAG", "webSocket 正在连接")
|
||||
} else if (ipcConnectionStatus == Constants.IPC_CONNECTION_STATUS.SEARCH_ADDRESS) {
|
||||
@@ -77,6 +74,8 @@ class MoGoAdasMsgConnectStatusListenerImpl : OnAdasConnectStatusListener,
|
||||
} else if (ipcConnectionStatus == Constants.IPC_CONNECTION_STATUS.NOT_FOUND_ADDRESS) {
|
||||
CallerLogger.d("$M_ADAS_IMPL$TAG", "webSocket 找不到可用IP 传入的IP不可用或固定IP列表中所有IP不可用")
|
||||
}
|
||||
CallerAutoPilotStatusListenerManager.getAutoPilotStatusInfo().connectStatusDescribe=reason
|
||||
CallerAutoPilotStatusListenerManager.invokeAutoPilotStatus()
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -73,6 +73,6 @@ class V2XWarningBroadcastReceiver : BroadcastReceiver() {
|
||||
if (EventTypeEnum.TYPE_USECASE_ID_IVP.poiType == v2xType.toString()) {
|
||||
CallerHmiManager.showLimitingVelocity(1)
|
||||
}
|
||||
CallerHmiManager.showWarningV2X(v2xType, alertContent, ttsContent, tag, null, true, 5000L)
|
||||
CallerHmiManager.showWarningV2X(v2xType.toString(), alertContent, ttsContent, tag, null, true, 5000L)
|
||||
}
|
||||
}
|
||||
@@ -22,13 +22,16 @@ import com.mogo.eagle.core.data.enums.SidePattern
|
||||
import com.mogo.eagle.core.data.enums.WarningDirectionEnum
|
||||
import com.mogo.eagle.core.data.notice.NoticeNormalData
|
||||
import com.mogo.eagle.core.data.notice.NoticeTrafficStylePushData
|
||||
import com.mogo.eagle.core.data.report.ReportEntity
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotRecordListener
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotStatusListener
|
||||
import com.mogo.eagle.core.function.api.hmi.IMoGoHmiViewProxy
|
||||
import com.mogo.eagle.core.function.api.hmi.view.IViewLimitingVelocity
|
||||
import com.mogo.eagle.core.function.api.hmi.view.IViewNotification
|
||||
import com.mogo.eagle.core.function.api.hmi.view.IViewTrafficLight
|
||||
import com.mogo.eagle.core.function.api.hmi.warning.IMoGoWaringProvider
|
||||
import com.mogo.eagle.core.function.api.hmi.warning.IMoGoWarningStatusListener
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotRecordListenerManager
|
||||
import com.mogo.eagle.core.function.call.check.CallerCheckManager
|
||||
import com.mogo.eagle.core.function.call.devatools.CallerDevaToolsManager
|
||||
@@ -44,16 +47,19 @@ import com.mogo.eagle.core.function.hmi.ui.camera.CameraListView
|
||||
import com.mogo.eagle.core.function.hmi.ui.notice.NoticeBannerView
|
||||
import com.mogo.eagle.core.function.hmi.ui.notice.NoticeNormalBannerView
|
||||
import com.mogo.eagle.core.function.hmi.ui.setting.DebugSettingView
|
||||
import com.mogo.eagle.core.function.hmi.ui.setting.ReportListFloatWindow
|
||||
import com.mogo.eagle.core.function.hmi.ui.tools.AutoPilotAndCheckView
|
||||
import com.mogo.eagle.core.function.hmi.ui.widget.V2XNotificationView
|
||||
import com.mogo.eagle.core.utilcode.mogo.AppIdentityModeUtils
|
||||
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.TimeUtils
|
||||
import com.mogo.eagle.core.utilcode.util.ToastUtils
|
||||
import com.mogo.module.common.enums.EventTypeEnum
|
||||
import kotlinx.android.synthetic.main.fragment_hmi.*
|
||||
import kotlinx.coroutines.*
|
||||
import mogo_msg.MogoReportMsg
|
||||
import record_cache.RecordPanelOuterClass
|
||||
import java.util.*
|
||||
|
||||
@@ -68,7 +74,8 @@ class MoGoHmiFragment : MvpFragment<MoGoHmiContract.View?, HmiPresenter?>(),
|
||||
IMoGoWaringProvider,
|
||||
IMoGoHmiViewProxy,
|
||||
MoGoHmiContract.View,
|
||||
IMoGoAutopilotRecordListener {
|
||||
IMoGoAutopilotRecordListener,
|
||||
IMoGoAutopilotStatusListener {
|
||||
private val TAG = "MoGoHmiFragment"
|
||||
|
||||
// DebugSettingView
|
||||
@@ -101,6 +108,10 @@ class MoGoHmiFragment : MvpFragment<MoGoHmiContract.View?, HmiPresenter?>(),
|
||||
// V2X预警弹窗 View 代理
|
||||
private var mViewNotification: IViewNotification? = null
|
||||
|
||||
//工控机节点上报列表
|
||||
private var reportList = arrayListOf<ReportEntity>()
|
||||
//工控机上报列表悬浮窗
|
||||
private var reportListFloatWindow: ReportListFloatWindow?=null
|
||||
|
||||
override fun vipIdentification(visible: Boolean) {
|
||||
ThreadUtils.runOnUiThread {
|
||||
@@ -143,6 +154,7 @@ class MoGoHmiFragment : MvpFragment<MoGoHmiContract.View?, HmiPresenter?>(),
|
||||
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
||||
super.onViewCreated(view, savedInstanceState)
|
||||
CallerAutopilotRecordListenerManager.addListener(TAG, this)
|
||||
CallerAutoPilotStatusListenerManager.addListener(TAG, this)
|
||||
|
||||
/*// TODO 这里后面需要改成独立进程通讯后台获取YUV
|
||||
view.postDelayed({
|
||||
@@ -174,6 +186,7 @@ class MoGoHmiFragment : MvpFragment<MoGoHmiContract.View?, HmiPresenter?>(),
|
||||
override fun onDestroyView() {
|
||||
super.onDestroyView()
|
||||
CallerAutopilotRecordListenerManager.removeListener(TAG)
|
||||
CallerAutoPilotStatusListenerManager.removeListener(TAG)
|
||||
}
|
||||
|
||||
|
||||
@@ -386,7 +399,7 @@ class MoGoHmiFragment : MvpFragment<MoGoHmiContract.View?, HmiPresenter?>(),
|
||||
*/
|
||||
override fun toggleDebugView() {
|
||||
CallerLogger.d("$M_HMI$TAG", "长按显示状态工具栏")
|
||||
context?.let {
|
||||
activity?.let {
|
||||
if (mDebugSettingViewFloat != null) {
|
||||
WarningFloat.dismiss(mDebugSettingViewFloat!!.config.floatTag, false)
|
||||
mDebugSettingViewFloat = null
|
||||
@@ -394,6 +407,19 @@ class MoGoHmiFragment : MvpFragment<MoGoHmiContract.View?, HmiPresenter?>(),
|
||||
} else {
|
||||
if (mDebugSettingView == null) {
|
||||
mDebugSettingView = DebugSettingView(it)
|
||||
mDebugSettingView?.setClickListener(object: DebugSettingView.ClickListener{
|
||||
override fun showReportListWindow(show: Boolean) {
|
||||
if(show){
|
||||
//打开工控机上报列表
|
||||
reportListFloatWindow = ReportListFloatWindow(it)
|
||||
reportListFloatWindow?.showFloatWindow()
|
||||
reportListFloatWindow?.refreshData(reportList)
|
||||
}else{
|
||||
//关闭工控机上报列表
|
||||
reportListFloatWindow?.hideFloatWindow()
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
var side = SidePattern.RIGHT
|
||||
var gravity = Gravity.RIGHT
|
||||
@@ -438,14 +464,14 @@ class MoGoHmiFragment : MvpFragment<MoGoHmiContract.View?, HmiPresenter?>(),
|
||||
/**
|
||||
* 展示VR下V2X预警
|
||||
*
|
||||
* @param v2xType V2X类型
|
||||
* @param poiType V2X类型
|
||||
* @param alertContent 提醒文本
|
||||
* @param ttsContent tts语音播报消息
|
||||
* @param tag tag绑定弹窗的标志
|
||||
*/
|
||||
@Synchronized
|
||||
override fun showWarningV2X(
|
||||
v2xType: Int,
|
||||
v2xType: String,
|
||||
alertContent: CharSequence?,
|
||||
ttsContent: String?,
|
||||
tag: String?,
|
||||
@@ -461,9 +487,9 @@ class MoGoHmiFragment : MvpFragment<MoGoHmiContract.View?, HmiPresenter?>(),
|
||||
if (floatWindow == null || TextUtils.isEmpty(showTag) || !floatWindow.isShow() || floatWindow.config.floatTag != tag) {
|
||||
// 代理View初始化了才可以弹窗
|
||||
mViewNotification?.let { notificationView ->
|
||||
notificationView.setWarningIcon(EventTypeEnum.getWarningIcon(v2xType.toString()))
|
||||
notificationView.setWarningIcon(EventTypeEnum.getWarningIcon(v2xType))
|
||||
val warningContent = alertContent
|
||||
?: EventTypeEnum.getWarningContent(v2xType.toString())
|
||||
?: EventTypeEnum.getWarningContent(v2xType)
|
||||
if (warningContent.isEmpty()) {
|
||||
CallerLogger.e("$M_HMI$TAG", "Show warningContent is null or empty!")
|
||||
return@launchWhenResumed
|
||||
@@ -979,6 +1005,23 @@ class MoGoHmiFragment : MvpFragment<MoGoHmiContract.View?, HmiPresenter?>(),
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 工控机监控节点上报
|
||||
*/
|
||||
override fun onAutopilotGuardian(guardianInfo: MogoReportMsg.MogoReportMessage?) {
|
||||
ThreadUtils.runOnUiThread{
|
||||
guardianInfo?.let {
|
||||
if(reportList.size>20){
|
||||
reportList.removeLast()
|
||||
}
|
||||
reportList.add(0,
|
||||
ReportEntity(TimeUtils.millis2String(System.currentTimeMillis()),
|
||||
it.src,it.level,it.msg,it.code,it.resultList,it.actionsList))
|
||||
reportListFloatWindow?.refreshData(reportList)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
override fun onDestroy() {
|
||||
super.onDestroy()
|
||||
CallerLogger.d("$M_HMI$TAG", "onDestroy")
|
||||
|
||||
@@ -0,0 +1,133 @@
|
||||
package com.mogo.eagle.core.function.hmi.ui.setting
|
||||
|
||||
import android.app.Activity
|
||||
import android.graphics.PixelFormat
|
||||
import android.util.DisplayMetrics
|
||||
import android.view.*
|
||||
import androidx.recyclerview.widget.LinearLayoutManager
|
||||
import androidx.recyclerview.widget.RecyclerView
|
||||
import com.mogo.eagle.core.data.gnss.AccelerationEntity
|
||||
import com.mogo.eagle.core.function.hmi.R
|
||||
import java.lang.reflect.Field
|
||||
|
||||
/**
|
||||
* @author XuXinChao
|
||||
* @description 可拖拽实时加速度面板
|
||||
* @since: 2022/4/21
|
||||
*/
|
||||
class AccelerationFloatWindow constructor(activity: Activity) : View.OnTouchListener{
|
||||
|
||||
private var mActivity: Activity = activity
|
||||
private var mWindowParams: WindowManager.LayoutParams? = null
|
||||
private var mWindowManager: WindowManager? = null
|
||||
private lateinit var rvAccelerationList: RecyclerView
|
||||
private var accelerationListAdapter: AccelerationListAdapter?=null
|
||||
|
||||
private lateinit var mFloatLayout: View
|
||||
private var mInViewX = 0f
|
||||
private var mInViewY = 0f
|
||||
private var mDownInScreenX = 0f
|
||||
private var mDownInScreenY = 0f
|
||||
private var mInScreenX = 0f
|
||||
private var mInScreenY = 0f
|
||||
|
||||
init {
|
||||
initFloatWindow();
|
||||
}
|
||||
|
||||
private fun initFloatWindow() {
|
||||
mFloatLayout = LayoutInflater.from(mActivity).inflate(R.layout.view_acceleration_float, null) as View
|
||||
mFloatLayout.setOnTouchListener(this)
|
||||
rvAccelerationList= mFloatLayout.findViewById(R.id.rvAccelerationList)
|
||||
mWindowParams = WindowManager.LayoutParams()
|
||||
// mWindowManager = (WindowManager) mContext.getSystemService(Context.WINDOW_SERVICE);
|
||||
// if (Build.VERSION.SDK_INT >= 26) {//8.0新特性
|
||||
// mWindowParams.type = WindowManager.LayoutParams.TYPE_APPLICATION_OVERLAY;
|
||||
// }else{
|
||||
// mWindowParams.type = WindowManager.LayoutParams.TYPE_SYSTEM_ALERT;
|
||||
// }
|
||||
mWindowManager = mActivity.windowManager
|
||||
mWindowParams?.let {
|
||||
it.format = PixelFormat.RGBA_8888
|
||||
it.flags = WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE
|
||||
it.gravity = Gravity.START or Gravity.TOP
|
||||
it.width = 600
|
||||
it.height = WindowManager.LayoutParams.WRAP_CONTENT
|
||||
it.alpha = 0.8f
|
||||
}
|
||||
accelerationListAdapter= AccelerationListAdapter(mActivity)
|
||||
rvAccelerationList.layoutManager = LinearLayoutManager(mActivity,
|
||||
LinearLayoutManager.VERTICAL,false)
|
||||
rvAccelerationList.adapter = accelerationListAdapter
|
||||
rvAccelerationList.isNestedScrollingEnabled = false
|
||||
}
|
||||
|
||||
fun refreshData(data:List<AccelerationEntity>){
|
||||
accelerationListAdapter?.setDada(data)
|
||||
accelerationListAdapter?.notifyDataSetChanged()
|
||||
}
|
||||
|
||||
|
||||
override fun onTouch(v: View?, motionEvent: MotionEvent?): Boolean {
|
||||
when (motionEvent?.action) {
|
||||
MotionEvent.ACTION_DOWN -> {
|
||||
// 获取相对View的坐标,即以此View左上角为原点
|
||||
mInViewX = motionEvent.x
|
||||
mInViewY = motionEvent.y
|
||||
// 获取相对屏幕的坐标,即以屏幕左上角为原点
|
||||
mDownInScreenX = motionEvent.rawX
|
||||
mDownInScreenY = motionEvent.rawY - getSysBarHeight(mActivity)
|
||||
mInScreenX = motionEvent.rawX
|
||||
mInScreenY = motionEvent.rawY - getSysBarHeight(mActivity)
|
||||
}
|
||||
MotionEvent.ACTION_MOVE -> {
|
||||
// 更新浮动窗口位置参数
|
||||
mInScreenX = motionEvent.rawX
|
||||
mInScreenY = motionEvent.rawY - getSysBarHeight(mActivity)
|
||||
mWindowParams!!.x = (mInScreenX - mInViewX).toInt()
|
||||
mWindowParams!!.y = (mInScreenY - mInViewY).toInt()
|
||||
// 手指移动的时候更新小悬浮窗的位置
|
||||
mWindowManager!!.updateViewLayout(mFloatLayout, mWindowParams)
|
||||
}
|
||||
// MotionEvent.ACTION_UP -> // 如果手指离开屏幕时,xDownInScreen和xInScreen相等,且yDownInScreen和yInScreen相等,则视为触发了单击事件。
|
||||
// if (mDownInScreenX === mInScreenX && mDownInScreenY === mInScreenY) {
|
||||
// }
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
||||
fun showFloatWindow() {
|
||||
if (mFloatLayout.parent == null) {
|
||||
val metrics = DisplayMetrics()
|
||||
// 默认固定位置,靠屏幕右边缘的中间
|
||||
mWindowManager!!.defaultDisplay.getMetrics(metrics)
|
||||
mWindowParams!!.x = metrics.widthPixels
|
||||
mWindowParams!!.y = metrics.heightPixels / 2 - getSysBarHeight(mActivity)
|
||||
mWindowManager!!.addView(mFloatLayout, mWindowParams)
|
||||
}
|
||||
}
|
||||
|
||||
fun hideFloatWindow() {
|
||||
if (mFloatLayout.parent != null) mWindowManager!!.removeView(mFloatLayout)
|
||||
}
|
||||
|
||||
// 获取系统状态栏高度
|
||||
private fun getSysBarHeight(activity: Activity): Int {
|
||||
val c: Class<*>
|
||||
val obj: Any
|
||||
val field: Field
|
||||
val x: Int
|
||||
var sbar = 0
|
||||
try {
|
||||
c = Class.forName("com.android.internal.R\$dimen")
|
||||
obj = c.newInstance()
|
||||
field = c.getField("status_bar_height")
|
||||
x = field.get(obj).toString().toInt()
|
||||
sbar = activity.resources.getDimensionPixelSize(x)
|
||||
} catch (e1: Exception) {
|
||||
e1.printStackTrace()
|
||||
}
|
||||
return sbar
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
package com.mogo.eagle.core.function.hmi.ui.setting
|
||||
|
||||
import android.content.Context
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import android.widget.TextView
|
||||
import androidx.recyclerview.widget.RecyclerView
|
||||
import com.mogo.eagle.core.data.gnss.AccelerationEntity
|
||||
import com.mogo.eagle.core.function.hmi.R
|
||||
|
||||
/**
|
||||
* @author XuXinChao
|
||||
* @description 实时加速度列表适配器
|
||||
* @since: 2022/4/20
|
||||
*/
|
||||
class AccelerationListAdapter(context: Context) :
|
||||
RecyclerView.Adapter<AccelerationListAdapter.AccelerationListHolder>() {
|
||||
|
||||
private var context: Context? = context
|
||||
private var data:List<AccelerationEntity>? = null
|
||||
|
||||
fun setDada( data: List<AccelerationEntity>?){
|
||||
this.data = data
|
||||
}
|
||||
|
||||
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): AccelerationListHolder {
|
||||
val view = LayoutInflater.from(parent.context)
|
||||
.inflate(R.layout.item_acceleration_detail, parent, false)
|
||||
return AccelerationListHolder(view)
|
||||
}
|
||||
|
||||
override fun onBindViewHolder(holder: AccelerationListHolder, position: Int) {
|
||||
data?.let { it ->
|
||||
val accelerationEntity = it[position]
|
||||
holder.tvMoment.text = accelerationEntity.moment
|
||||
holder.tvAcceleration.text = accelerationEntity.acceleration
|
||||
}
|
||||
}
|
||||
|
||||
override fun getItemCount() = data?.size ?: 0
|
||||
|
||||
class AccelerationListHolder(itemView: View) : RecyclerView.ViewHolder(itemView){
|
||||
var tvMoment: TextView = itemView.findViewById(R.id.tvMoment)
|
||||
var tvAcceleration: TextView = itemView.findViewById(R.id.tvAcceleration)
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,6 +1,7 @@
|
||||
package com.mogo.eagle.core.function.hmi.ui.setting
|
||||
|
||||
import android.annotation.SuppressLint
|
||||
import android.app.Activity
|
||||
import android.content.Context
|
||||
import android.graphics.Color
|
||||
import android.os.Build
|
||||
@@ -24,6 +25,7 @@ import com.mogo.eagle.core.data.constants.MoGoConfig
|
||||
import com.mogo.eagle.core.data.deva.chain.ChainConstant
|
||||
import com.mogo.eagle.core.data.deva.scene.SceneModule
|
||||
import com.mogo.eagle.core.data.enums.TrafficTypeEnum
|
||||
import com.mogo.eagle.core.data.gnss.AccelerationEntity
|
||||
import com.mogo.eagle.core.data.map.MogoLocation
|
||||
import com.mogo.eagle.core.data.obu.ObuStatusInfo
|
||||
import com.mogo.eagle.core.data.upgrade.UpgradeVersionEntity
|
||||
@@ -60,11 +62,13 @@ import com.mogo.eagle.core.utilcode.util.*
|
||||
import com.mogo.map.MogoMap
|
||||
import com.mogo.map.uicontroller.VisualAngleMode
|
||||
import com.mogo.map.uicontroller.VisualAngleMode.*
|
||||
import com.zhidao.easysocket.utils.L
|
||||
import kotlinx.android.synthetic.main.view_debug_setting.view.*
|
||||
import mogo.telematics.pad.MessagePad
|
||||
import mogo_msg.MogoReportMsg
|
||||
import java.util.*
|
||||
import kotlin.collections.ArrayList
|
||||
import kotlin.math.abs
|
||||
|
||||
/**
|
||||
* @author xiaoyuzhou
|
||||
@@ -90,6 +94,11 @@ class DebugSettingView @JvmOverloads constructor(
|
||||
private var mAutoPilotStatusInfo: AutopilotStatusInfo? = null
|
||||
private var mGnssInfo: MessagePad.GnssInfo? = null
|
||||
|
||||
private var accelerationFloatWindow: AccelerationFloatWindow?=null
|
||||
private var accelerationList = arrayListOf<AccelerationEntity>()
|
||||
private var accelerationIsShow: Boolean = false //实时加速度面板是否展示
|
||||
private var accelerationThresholdNum: Double = 0.0
|
||||
|
||||
// 感知识别「已知类型」数据个数
|
||||
private var mIdentifyDataSize = 0
|
||||
|
||||
@@ -102,9 +111,6 @@ class DebugSettingView @JvmOverloads constructor(
|
||||
// 全局路径规划点个数
|
||||
private var mRouteInfoSize = 0
|
||||
|
||||
//当前PAD支持的CPU架构
|
||||
private var cpuList = "CPU架构:"
|
||||
|
||||
//日志过滤标签集合
|
||||
private val sceneMap = mutableMapOf<String, SceneModule>()
|
||||
|
||||
@@ -140,6 +146,8 @@ class DebugSettingView @JvmOverloads constructor(
|
||||
|
||||
private var lastVisualAngleMode: VisualAngleMode? = null
|
||||
|
||||
private var clickListener: ClickListener? = null
|
||||
|
||||
init {
|
||||
LayoutInflater.from(context).inflate(R.layout.view_debug_setting, this, true)
|
||||
initView()
|
||||
@@ -265,12 +273,6 @@ class DebugSettingView @JvmOverloads constructor(
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
for (element in DeviceUtils.getABIs()) {
|
||||
cpuList = "$cpuList$element "
|
||||
}
|
||||
tvCPUFrameworkInfo.text = cpuList
|
||||
|
||||
/**
|
||||
* 控制中心
|
||||
*/
|
||||
@@ -603,6 +605,11 @@ class DebugSettingView @JvmOverloads constructor(
|
||||
//初始化ADAS日志开关状态
|
||||
tbADASLog.isChecked = CallerAutoPilotManager.isEnableLog()
|
||||
|
||||
//查看上报历史列表
|
||||
tbReportMore.setOnCheckedChangeListener { _, isChecked ->
|
||||
clickListener?.showReportListWindow(isChecked)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -965,6 +972,33 @@ class DebugSettingView @JvmOverloads constructor(
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 实时加速度面板控制
|
||||
*/
|
||||
tbOpenAcceleration.setOnCheckedChangeListener { _, isChecked ->
|
||||
if(isChecked){
|
||||
//打开实时加速度面板
|
||||
accelerationFloatWindow = context?.let { AccelerationFloatWindow(it as Activity) }
|
||||
accelerationFloatWindow?.showFloatWindow()
|
||||
etThreshold.visibility = View.VISIBLE
|
||||
btnThresholdDefine.visibility = View.VISIBLE
|
||||
}else{
|
||||
//关闭实时加速度面板
|
||||
accelerationFloatWindow?.hideFloatWindow()
|
||||
etThreshold.visibility = View.GONE
|
||||
btnThresholdDefine.visibility = View.GONE
|
||||
}
|
||||
accelerationIsShow = isChecked
|
||||
}
|
||||
|
||||
btnThresholdDefine.setOnClickListener {
|
||||
try{
|
||||
accelerationThresholdNum = etThreshold.text.toString().toDouble()
|
||||
}catch(e:java.lang.Exception){
|
||||
ToastUtils.showShort("请输入正确的阈值")
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1039,6 +1073,13 @@ class DebugSettingView @JvmOverloads constructor(
|
||||
MoGoAiCloudClientConfig.getInstance().isShowNetDebugLog = isChecked
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置是否输出OBU日志 true-打印日志,false-不打印日志
|
||||
*/
|
||||
tbObuLog.setOnCheckedChangeListener { _, isChecked ->
|
||||
L.setEnableLog(isChecked)
|
||||
}
|
||||
|
||||
cbTraceLog.isChecked = CallerDevaToolsManager.getTraceLogStatus()
|
||||
//链路Log输出日志
|
||||
cbTraceLog.setOnCheckedChangeListener { _, isChecked ->
|
||||
@@ -1169,8 +1210,9 @@ class DebugSettingView @JvmOverloads constructor(
|
||||
it.iterator().forEach {map ->
|
||||
val name = if(map.key.contains("{")) map.key.replace("{","") else map.key
|
||||
val url = if(map.value.contains("}")) map.value.replace("}","") else map.value
|
||||
upgradeVersionList.add(UpgradeVersionEntity(name,url))
|
||||
upgradeVersionList.add(UpgradeVersionEntity(name.trim(),url))
|
||||
}
|
||||
upgradeVersionList.sortByDescending { upgradeVersionEntity ->upgradeVersionEntity.name }
|
||||
upgradeListAdapter?.setDada(dataFilter(upgradeVersionList))
|
||||
upgradeListAdapter?.notifyDataSetChanged()
|
||||
}
|
||||
@@ -1404,15 +1446,16 @@ class DebugSettingView @JvmOverloads constructor(
|
||||
* 版本信息
|
||||
*/
|
||||
tvAppVersionName.text = "鹰眼版本名:${AppUtils.getAppVersionName()}"
|
||||
tvAppVersionCode.text = "鹰眼版本号:${AppUtils.getAppVersionCode()}"
|
||||
tvObuSdkVersion.text = "OBU-SDK版本:${AppConfigInfo.obuSdkVersion}"
|
||||
tvAutopilotProtocolVersionInfo.text =
|
||||
"Autopilot协议版本:${CallerAutoPilotManager.getProtocolVersion()}"
|
||||
tvIpcProtocolVersionInfo.text = "工控机协议版本:${AppConfigInfo.protocolVersionNumber}"
|
||||
if(AppConfigInfo.protocolVersionNumber==0){
|
||||
tvIpcProtocolVersionInfo.text="工控机协议版本:未知"
|
||||
}else{
|
||||
tvIpcProtocolVersionInfo.text = "工控机协议版本:${AppConfigInfo.protocolVersionNumber}"
|
||||
}
|
||||
tvMoGoMapVersion.text = "HD-Map版本:${MogoMap.getInstance().mogoMap.mapVersion}"
|
||||
tvGitBranchInfo.text = "Git分支:${AppConfigInfo.workingBranchName}"
|
||||
tvGitHashInfo.text = "Git-Hash:${AppConfigInfo.workingBranchHash}"
|
||||
tvAndroidSystemVersion.text = "Android系统版本:" + DeviceUtils.getSDKVersionName()
|
||||
tvAppBuildTimeInfo.text = "版本构建时间:${AppConfigInfo.appBuildTime}"
|
||||
|
||||
/**
|
||||
* 状态中心
|
||||
@@ -1464,11 +1507,17 @@ class DebugSettingView @JvmOverloads constructor(
|
||||
)
|
||||
|
||||
tvAutopilotConnectStatus.text = Html.fromHtml(
|
||||
"Autopilot系统连接状态:${
|
||||
"工控机连接状态:${
|
||||
if (AppConfigInfo.isConnectAutopilot) {
|
||||
"<font color='blue'>正常"
|
||||
} else {
|
||||
"<font color='red'>异常"
|
||||
"<font color='red'>异常 原因:${
|
||||
if(AppConfigInfo.connectStatusDescribe.isNullOrEmpty()){
|
||||
"主动断开连接"
|
||||
}else{
|
||||
AppConfigInfo.connectStatusDescribe
|
||||
}
|
||||
}"
|
||||
}
|
||||
}"
|
||||
)
|
||||
@@ -1565,18 +1614,40 @@ class DebugSettingView @JvmOverloads constructor(
|
||||
override fun onAutopilotStatusResponse(autoPilotStatusInfo: AutopilotStatusInfo) {
|
||||
mAutoPilotStatusInfo = autoPilotStatusInfo
|
||||
AppConfigInfo.isConnectAutopilot = autoPilotStatusInfo.connectStatus
|
||||
if (autoPilotStatusInfo.connectStatus) {
|
||||
adasConnectStatus = true
|
||||
}
|
||||
AppConfigInfo.connectStatusDescribe = autoPilotStatusInfo.connectStatusDescribe
|
||||
|
||||
// if (autoPilotStatusInfo.connectStatus) {
|
||||
// adasConnectStatus = true
|
||||
// }
|
||||
//ADAS断开连接,提示异常
|
||||
if (adasConnectStatus && !autoPilotStatusInfo.connectStatus) {
|
||||
adasConnectStatus = false
|
||||
toastMsg("Autopilot系统连接状态异常")
|
||||
}
|
||||
// if (adasConnectStatus && !autoPilotStatusInfo.connectStatus) {
|
||||
// adasConnectStatus = false
|
||||
// toastMsg("工控机连接断开")
|
||||
// }
|
||||
}
|
||||
|
||||
override fun onAutopilotCarStateData(gnssInfo: MessagePad.GnssInfo?) {
|
||||
mGnssInfo = gnssInfo
|
||||
//实时加速度列表
|
||||
ThreadUtils.runOnUiThread{
|
||||
if(accelerationIsShow){
|
||||
if(accelerationList.size > 9){
|
||||
accelerationList.removeLast()
|
||||
}
|
||||
gnssInfo?.acceleration?.let {
|
||||
if(accelerationList.isEmpty()){
|
||||
accelerationList.add(AccelerationEntity(TimeUtils.millis2String(System.currentTimeMillis(),TimeUtils.getHourMinSecondFormat()),it.toString()))
|
||||
}
|
||||
if(abs(it.minus(accelerationList.first().acceleration.toDouble())) > abs(accelerationThresholdNum)){
|
||||
accelerationList.add(0, AccelerationEntity(TimeUtils.millis2String(System.currentTimeMillis(),TimeUtils.getHourMinSecondFormat()),it.toString()))
|
||||
}
|
||||
|
||||
accelerationFloatWindow?.refreshData(accelerationList)
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@RequiresApi(Build.VERSION_CODES.N)
|
||||
@@ -1609,7 +1680,7 @@ class DebugSettingView @JvmOverloads constructor(
|
||||
carConfigResp.let {
|
||||
AppConfigInfo.plateNumber = it.plateNumber//车牌号
|
||||
AppConfigInfo.iPCMacAddress = it.macAddress//工控机MAC地址
|
||||
AppConfigInfo.protocolVersionNumber = it.protocolVersion.number//工控机协议版本
|
||||
AppConfigInfo.protocolVersionNumber = it.protocolVersionValue//工控机协议版本
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1724,4 +1795,12 @@ class DebugSettingView @JvmOverloads constructor(
|
||||
}
|
||||
}
|
||||
|
||||
fun setClickListener(clickListener: ClickListener) {
|
||||
this.clickListener = clickListener
|
||||
}
|
||||
|
||||
interface ClickListener{
|
||||
fun showReportListWindow(show: Boolean)
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,90 @@
|
||||
package com.mogo.eagle.core.function.hmi.ui.setting
|
||||
|
||||
import android.annotation.SuppressLint
|
||||
import android.content.Context
|
||||
import android.graphics.Color
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import android.widget.TextView
|
||||
import androidx.recyclerview.widget.RecyclerView
|
||||
import com.mogo.eagle.core.data.report.ReportEntity
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotManager
|
||||
import com.mogo.eagle.core.function.hmi.R
|
||||
|
||||
/**
|
||||
* @author XuXinChao
|
||||
* @description 工控机上报列表适配器
|
||||
* @since: 2022/4/13
|
||||
*/
|
||||
class ReportListAdapter(context: Context) :
|
||||
RecyclerView.Adapter<ReportListAdapter.ReportListHolder>() {
|
||||
|
||||
private var context: Context? = context
|
||||
private var data:List<ReportEntity>? = null
|
||||
|
||||
public fun setDada( data: List<ReportEntity>?){
|
||||
this.data = data
|
||||
}
|
||||
|
||||
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): ReportListHolder {
|
||||
val view = LayoutInflater.from(parent.context)
|
||||
.inflate(R.layout.item_report_detail, parent, false)
|
||||
return ReportListHolder(view)
|
||||
}
|
||||
|
||||
@SuppressLint("SetTextI18n")
|
||||
override fun onBindViewHolder(holder: ReportListHolder, position: Int) {
|
||||
data?.let { it ->
|
||||
val reportEntity = it[position]
|
||||
reportEntity.let {
|
||||
holder.tvReportTime.text = it.time
|
||||
holder.tvReportSrc.text = "src:${it.src}"
|
||||
holder.tvReportLevel.text = "level:${it.level}"
|
||||
holder.tvReportMsg.text = "msg:${it.msg}"
|
||||
holder.tvReportCode.text = "code:${it.code}"
|
||||
var resultStr = "result:"
|
||||
for (result in it.resultList) {
|
||||
resultStr = "$resultStr$result${CallerAutoPilotManager.getReportResultDesc(result)} "
|
||||
}
|
||||
holder.tvReportResult.text = resultStr
|
||||
var actionStr = "action:"
|
||||
for (action in it.actionsList) {
|
||||
actionStr = "$actionStr$action${CallerAutoPilotManager.getReportActionDesc(action)} "
|
||||
}
|
||||
holder.tvReportActions.text = actionStr
|
||||
|
||||
if ("error" == it.level) {
|
||||
//字体为红色,吐司提示
|
||||
holder.tvReportSrc.setTextColor(Color.RED)
|
||||
holder.tvReportLevel.setTextColor(Color.RED)
|
||||
holder.tvReportMsg.setTextColor(Color.RED)
|
||||
holder.tvReportCode.setTextColor(Color.RED)
|
||||
holder.tvReportResult.setTextColor(Color.RED)
|
||||
holder.tvReportActions.setTextColor(Color.RED)
|
||||
} else {
|
||||
holder.tvReportSrc.setTextColor(Color.WHITE)
|
||||
holder.tvReportLevel.setTextColor(Color.WHITE)
|
||||
holder.tvReportMsg.setTextColor(Color.WHITE)
|
||||
holder.tvReportCode.setTextColor(Color.WHITE)
|
||||
holder.tvReportResult.setTextColor(Color.WHITE)
|
||||
holder.tvReportActions.setTextColor(Color.WHITE)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
override fun getItemCount() = data?.size ?: 0
|
||||
|
||||
class ReportListHolder(itemView: View) : RecyclerView.ViewHolder(itemView){
|
||||
var tvReportTime: TextView = itemView.findViewById(R.id.tvReportTime)
|
||||
var tvReportSrc: TextView = itemView.findViewById(R.id.tvReportSrc)
|
||||
var tvReportLevel: TextView = itemView.findViewById(R.id.tvReportLevel)
|
||||
var tvReportMsg: TextView = itemView.findViewById(R.id.tvReportMsg)
|
||||
var tvReportCode: TextView = itemView.findViewById(R.id.tvReportCode)
|
||||
var tvReportResult: TextView = itemView.findViewById(R.id.tvReportResult)
|
||||
var tvReportActions: TextView = itemView.findViewById(R.id.tvReportActions)
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,125 @@
|
||||
package com.mogo.eagle.core.function.hmi.ui.setting
|
||||
|
||||
import android.app.Activity
|
||||
import android.graphics.PixelFormat
|
||||
import android.util.DisplayMetrics
|
||||
import android.view.*
|
||||
import androidx.recyclerview.widget.LinearLayoutManager
|
||||
import androidx.recyclerview.widget.RecyclerView
|
||||
import com.mogo.eagle.core.data.report.ReportEntity
|
||||
import com.mogo.eagle.core.function.hmi.R
|
||||
import java.lang.reflect.Field
|
||||
|
||||
/**
|
||||
* @author XuXinChao
|
||||
* @description 工控机上报列表面板
|
||||
* @since: 2022/4/13
|
||||
*/
|
||||
class ReportListFloatWindow constructor(activity: Activity) : View.OnTouchListener{
|
||||
|
||||
private var mActivity: Activity = activity
|
||||
private var mWindowParams: WindowManager.LayoutParams? = null
|
||||
private var mWindowManager: WindowManager? = null
|
||||
private lateinit var rvReportList: RecyclerView
|
||||
private var reportListAdapter: ReportListAdapter?=null
|
||||
|
||||
private lateinit var mFloatLayout: View
|
||||
private var mInViewX = 0f
|
||||
private var mInViewY = 0f
|
||||
private var mDownInScreenX = 0f
|
||||
private var mDownInScreenY = 0f
|
||||
private var mInScreenX = 0f
|
||||
private var mInScreenY = 0f
|
||||
|
||||
init {
|
||||
initFloatWindow();
|
||||
}
|
||||
|
||||
private fun initFloatWindow() {
|
||||
mFloatLayout = LayoutInflater.from(mActivity).inflate(R.layout.view_report_list, null) as View
|
||||
mFloatLayout.setOnTouchListener(this)
|
||||
rvReportList= mFloatLayout.findViewById(R.id.rv_report_list)
|
||||
mWindowParams = WindowManager.LayoutParams()
|
||||
mWindowManager = mActivity.windowManager
|
||||
mWindowParams?.let {
|
||||
it.format = PixelFormat.RGBA_8888
|
||||
it.flags = WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE
|
||||
it.gravity = Gravity.START or Gravity.TOP
|
||||
it.width = 800
|
||||
it.height = 1000
|
||||
it.alpha = 0.9f
|
||||
}
|
||||
reportListAdapter= ReportListAdapter(mActivity)
|
||||
rvReportList.layoutManager = LinearLayoutManager(mActivity,
|
||||
LinearLayoutManager.VERTICAL,false)
|
||||
rvReportList.adapter = reportListAdapter
|
||||
}
|
||||
|
||||
fun refreshData(data:List<ReportEntity>){
|
||||
reportListAdapter?.setDada(data)
|
||||
reportListAdapter?.notifyDataSetChanged()
|
||||
}
|
||||
|
||||
override fun onTouch(v: View?, motionEvent: MotionEvent?): Boolean {
|
||||
when (motionEvent?.action) {
|
||||
MotionEvent.ACTION_DOWN -> {
|
||||
// 获取相对View的坐标,即以此View左上角为原点
|
||||
mInViewX = motionEvent.x
|
||||
mInViewY = motionEvent.y
|
||||
// 获取相对屏幕的坐标,即以屏幕左上角为原点
|
||||
mDownInScreenX = motionEvent.rawX
|
||||
mDownInScreenY = motionEvent.rawY - getSysBarHeight(mActivity)
|
||||
mInScreenX = motionEvent.rawX
|
||||
mInScreenY = motionEvent.rawY - getSysBarHeight(mActivity)
|
||||
}
|
||||
MotionEvent.ACTION_MOVE -> {
|
||||
// 更新浮动窗口位置参数
|
||||
mInScreenX = motionEvent.rawX
|
||||
mInScreenY = motionEvent.rawY - getSysBarHeight(mActivity)
|
||||
mWindowParams!!.x = (mInScreenX - mInViewX).toInt()
|
||||
mWindowParams!!.y = (mInScreenY - mInViewY).toInt()
|
||||
// 手指移动的时候更新小悬浮窗的位置
|
||||
mWindowManager!!.updateViewLayout(mFloatLayout, mWindowParams)
|
||||
}
|
||||
// MotionEvent.ACTION_UP -> // 如果手指离开屏幕时,xDownInScreen和xInScreen相等,且yDownInScreen和yInScreen相等,则视为触发了单击事件。
|
||||
// if (mDownInScreenX === mInScreenX && mDownInScreenY === mInScreenY) {
|
||||
// }
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
||||
fun showFloatWindow() {
|
||||
if (mFloatLayout.parent == null) {
|
||||
val metrics = DisplayMetrics()
|
||||
// 默认固定位置,靠屏幕右边缘的中间
|
||||
mWindowManager!!.defaultDisplay.getMetrics(metrics)
|
||||
mWindowParams!!.x = metrics.widthPixels
|
||||
mWindowParams!!.y = metrics.heightPixels / 2 - getSysBarHeight(mActivity)
|
||||
mWindowManager!!.addView(mFloatLayout, mWindowParams)
|
||||
}
|
||||
}
|
||||
|
||||
fun hideFloatWindow() {
|
||||
if (mFloatLayout.parent != null) mWindowManager!!.removeView(mFloatLayout)
|
||||
}
|
||||
|
||||
// 获取系统状态栏高度
|
||||
private fun getSysBarHeight(activity: Activity): Int {
|
||||
val c: Class<*>
|
||||
val obj: Any
|
||||
val field: Field
|
||||
val x: Int
|
||||
var sbar = 0
|
||||
try {
|
||||
c = Class.forName("com.android.internal.R\$dimen")
|
||||
obj = c.newInstance()
|
||||
field = c.getField("status_bar_height")
|
||||
x = field.get(obj).toString().toInt()
|
||||
sbar = activity.resources.getDimensionPixelSize(x)
|
||||
} catch (e1: Exception) {
|
||||
e1.printStackTrace()
|
||||
}
|
||||
return sbar
|
||||
}
|
||||
|
||||
}
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 1.7 KiB |
@@ -0,0 +1,25 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvMoment"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="@color/foreground_wtf"
|
||||
android:gravity="center_horizontal"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvAcceleration"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="10dp"
|
||||
android:textColor="@color/foreground_wtf"
|
||||
android:gravity="center_horizontal"
|
||||
/>
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
@@ -0,0 +1,55 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvReportTime"
|
||||
style="@style/DebugSettingText"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvReportSrc"
|
||||
style="@style/DebugSettingText"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvReportLevel"
|
||||
style="@style/DebugSettingText"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvReportMsg"
|
||||
style="@style/DebugSettingText"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvReportCode"
|
||||
style="@style/DebugSettingText"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvReportResult"
|
||||
style="@style/DebugSettingText"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvReportActions"
|
||||
style="@style/DebugSettingText"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:background="#F0F0F0" />
|
||||
|
||||
</LinearLayout>
|
||||
@@ -0,0 +1,31 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="500dp"
|
||||
android:layout_height="wrap_content"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:orientation="vertical">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:src="@drawable/icon_drag"
|
||||
android:padding="15dp"
|
||||
android:layout_gravity="center_horizontal"
|
||||
/>
|
||||
|
||||
<com.mogo.eagle.core.widget.RoundConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@color/dialog_bg_color"
|
||||
app:roundLayoutRadius="10dp">
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/rvAccelerationList"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="5dp"
|
||||
/>
|
||||
|
||||
</com.mogo.eagle.core.widget.RoundConstraintLayout>
|
||||
|
||||
</LinearLayout>
|
||||
@@ -12,109 +12,145 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_350"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintBottom_toBottomOf="parent">
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
tools:visibility="visible">
|
||||
|
||||
<LinearLayout
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<View
|
||||
android:id="@+id/vReportLine"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="6dp"
|
||||
android:background="#F0F0F0" />
|
||||
android:background="#F0F0F0"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<ToggleButton
|
||||
android:id="@+id/tbReportMore"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@null"
|
||||
android:drawableEnd="@drawable/icon_right"
|
||||
android:drawablePadding="5dp"
|
||||
android:gravity="center"
|
||||
android:padding="10dp"
|
||||
android:textOff="打开历史"
|
||||
android:textOn="关闭历史"
|
||||
android:textSize="@dimen/dp_24"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/vReportLine" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvReportSrc"
|
||||
style="@style/DebugSettingText"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content" />
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
app:layout_constraintBottom_toBottomOf="@id/tbReportMore"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toLeftOf="@id/tbReportMore"
|
||||
app:layout_constraintTop_toBottomOf="@id/vReportLine"
|
||||
app:layout_constraintTop_toTopOf="@id/tbReportMore" />
|
||||
|
||||
<View
|
||||
android:id="@+id/vReportSrcLine"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:background="#F0F0F0" />
|
||||
android:background="#F0F0F0"
|
||||
app:layout_constraintTop_toBottomOf="@id/tbReportMore" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvReportLevel"
|
||||
style="@style/DebugSettingText"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content" />
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintTop_toBottomOf="@id/vReportSrcLine" />
|
||||
|
||||
<View
|
||||
android:id="@+id/vReportLevelLine"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:background="#F0F0F0" />
|
||||
android:background="#F0F0F0"
|
||||
app:layout_constraintTop_toBottomOf="@id/tvReportLevel" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvReportMsg"
|
||||
style="@style/DebugSettingText"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content" />
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintTop_toBottomOf="@id/vReportLevelLine" />
|
||||
|
||||
<View
|
||||
android:id="@+id/vReportMsgLine"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:background="#F0F0F0" />
|
||||
android:background="#F0F0F0"
|
||||
app:layout_constraintTop_toBottomOf="@id/tvReportMsg" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvReportCode"
|
||||
style="@style/DebugSettingText"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content" />
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintTop_toBottomOf="@id/vReportMsgLine" />
|
||||
|
||||
<View
|
||||
android:id="@+id/vReportCodeLine"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:background="#F0F0F0" />
|
||||
android:background="#F0F0F0"
|
||||
app:layout_constraintTop_toBottomOf="@id/tvReportCode" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvReportResult"
|
||||
style="@style/DebugSettingText"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content" />
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintTop_toBottomOf="@id/vReportCodeLine" />
|
||||
|
||||
<View
|
||||
android:id="@+id/vReportResultLine"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:background="#F0F0F0" />
|
||||
android:background="#F0F0F0"
|
||||
app:layout_constraintTop_toBottomOf="@id/tvReportResult" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvReportActions"
|
||||
style="@style/DebugSettingText"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content" />
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintTop_toBottomOf="@id/vReportResultLine" />
|
||||
|
||||
<View
|
||||
android:id="@+id/vReportActionsLine"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:background="#F0F0F0" />
|
||||
android:background="#F0F0F0"
|
||||
app:layout_constraintTop_toBottomOf="@id/tvReportActions" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvReportSec"
|
||||
style="@style/DebugSettingText"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content" />
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintTop_toBottomOf="@id/vReportActionsLine" />
|
||||
|
||||
<View
|
||||
android:id="@+id/vReportSecLine"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:background="#F0F0F0" />
|
||||
android:background="#F0F0F0"
|
||||
app:layout_constraintTop_toBottomOf="@id/tvReportSec" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvReportNSec"
|
||||
style="@style/DebugSettingText"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:background="#F0F0F0" />
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintTop_toBottomOf="@id/vReportSecLine" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</ScrollView>
|
||||
|
||||
@@ -221,7 +257,8 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:visibility="gone">
|
||||
android:visibility="gone"
|
||||
tools:visibility="visible">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvAppVersionName"
|
||||
@@ -234,28 +271,6 @@
|
||||
android:layout_height="1dp"
|
||||
android:background="#F0F0F0" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvAppVersionCode"
|
||||
style="@style/DebugSettingText"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:background="#F0F0F0" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvObuSdkVersion"
|
||||
style="@style/DebugSettingText"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:background="#F0F0F0" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvAutopilotProtocolVersionInfo"
|
||||
style="@style/DebugSettingText"
|
||||
@@ -301,29 +316,7 @@
|
||||
android:background="#F0F0F0" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvGitHashInfo"
|
||||
style="@style/DebugSettingText"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:background="#F0F0F0" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvAndroidSystemVersion"
|
||||
style="@style/DebugSettingText"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:background="#F0F0F0" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvCPUFrameworkInfo"
|
||||
android:id="@+id/tvAppBuildTimeInfo"
|
||||
style="@style/DebugSettingText"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content" />
|
||||
@@ -351,7 +344,8 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:visibility="gone">
|
||||
android:visibility="gone"
|
||||
tools:visibility="visible">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvServerEnvironment"
|
||||
@@ -448,7 +442,8 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:visibility="gone">
|
||||
android:visibility="gone"
|
||||
tools:visibility="visible">
|
||||
|
||||
<ToggleButton
|
||||
android:id="@+id/tbDomainController"
|
||||
@@ -465,7 +460,8 @@
|
||||
android:id="@+id/domainControllerLayout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:visibility="gone">
|
||||
android:visibility="gone"
|
||||
tools:visibility="visible">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvAutopilotInfo"
|
||||
@@ -649,7 +645,8 @@
|
||||
android:visibility="gone"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toLeftOf="@id/btnSystemRestart"
|
||||
app:layout_constraintTop_toBottomOf="@id/recordPackageDivider" />
|
||||
app:layout_constraintTop_toBottomOf="@id/recordPackageDivider"
|
||||
tools:visibility="visible" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/btnSystemRestart"
|
||||
@@ -659,7 +656,8 @@
|
||||
android:visibility="gone"
|
||||
app:layout_constraintLeft_toRightOf="@id/btnSystemUpgrade"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/recordPackageDivider" />
|
||||
app:layout_constraintTop_toBottomOf="@id/recordPackageDivider"
|
||||
tools:visibility="visible" />
|
||||
|
||||
|
||||
<TextView
|
||||
@@ -708,7 +706,8 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:visibility="gone">
|
||||
android:visibility="gone"
|
||||
tools:visibility="visible">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvSteeringInfo"
|
||||
@@ -751,7 +750,8 @@
|
||||
android:id="@+id/obuControllerLayout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:visibility="gone">
|
||||
android:visibility="gone"
|
||||
tools:visibility="visible">
|
||||
|
||||
<Button
|
||||
android:id="@+id/btnSetObuIP"
|
||||
@@ -833,7 +833,8 @@
|
||||
android:id="@+id/eagleEyeControllerLayout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:visibility="gone">
|
||||
android:visibility="gone"
|
||||
tools:visibility="visible">
|
||||
|
||||
<Button
|
||||
android:id="@+id/btnBrakeThreshold"
|
||||
@@ -941,7 +942,8 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:columnCount="2"
|
||||
android:visibility="gone">
|
||||
android:visibility="gone"
|
||||
tools:visibility="visible">
|
||||
|
||||
<ToggleButton
|
||||
android:id="@+id/tbChangeCurrentSkinMode"
|
||||
@@ -1043,6 +1045,46 @@
|
||||
android:textOff="关闭「SN绑定控制」"
|
||||
android:textOn="打开「SN绑定控制」"
|
||||
android:textSize="@dimen/dp_24" />
|
||||
|
||||
<ToggleButton
|
||||
android:id="@+id/tbOpenAcceleration"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_columnWeight="1"
|
||||
android:layout_margin="2dp"
|
||||
android:gravity="center"
|
||||
android:textOff="打开「加速度面板」"
|
||||
android:textOn="关闭「加速度面板」"
|
||||
android:textSize="@dimen/dp_24" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatEditText
|
||||
android:id="@+id/etThreshold"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_columnWeight="1"
|
||||
android:layout_margin="2dp"
|
||||
android:background="@drawable/debug_setting_edit_bg"
|
||||
android:gravity="center"
|
||||
android:hint="过滤阈值"
|
||||
android:paddingTop="5dp"
|
||||
android:paddingBottom="5dp"
|
||||
android:textSize="14sp"
|
||||
android:visibility="gone"
|
||||
tools:visibility="visible" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/btnThresholdDefine"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_columnWeight="1"
|
||||
android:layout_margin="2dp"
|
||||
android:gravity="center"
|
||||
android:text="设置加速度变化幅度过滤阈值"
|
||||
android:textSize="@dimen/dp_24"
|
||||
android:visibility="gone"
|
||||
tools:visibility="visible" />
|
||||
|
||||
|
||||
</GridLayout>
|
||||
|
||||
<ToggleButton
|
||||
@@ -1060,7 +1102,8 @@
|
||||
android:id="@+id/hdMapControllerLayout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:visibility="gone">
|
||||
android:visibility="gone"
|
||||
tools:visibility="visible">
|
||||
|
||||
<Button
|
||||
android:id="@+id/changesight_top_btn"
|
||||
@@ -1265,6 +1308,7 @@
|
||||
android:id="@+id/tbIsDemoMode"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="2dp"
|
||||
android:padding="@dimen/dp_10"
|
||||
android:textColor="#000"
|
||||
android:textOff="开启美化模式"
|
||||
@@ -1278,6 +1322,7 @@
|
||||
android:id="@+id/tbIsDrawAutopilotTrajectoryData"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="2dp"
|
||||
android:padding="@dimen/dp_10"
|
||||
android:textColor="#000"
|
||||
android:textOff="强制绘制引导线"
|
||||
@@ -1285,14 +1330,12 @@
|
||||
android:textSize="@dimen/dp_24"
|
||||
app:layout_constraintLeft_toRightOf="@id/tbIsDemoMode"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/btnOpenObuFusion"
|
||||
|
||||
|
||||
/>
|
||||
app:layout_constraintTop_toTopOf="@id/tbIsDemoMode" />
|
||||
|
||||
<ToggleButton
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="2dp"
|
||||
android:padding="@dimen/dp_10"
|
||||
android:textColor="#000"
|
||||
android:textOff="强制绘制路径规划"
|
||||
@@ -1377,7 +1420,8 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:visibility="gone">
|
||||
android:visibility="gone"
|
||||
tools:visibility="visible">
|
||||
|
||||
<com.google.android.flexbox.FlexboxLayout
|
||||
android:id="@+id/flLogControl"
|
||||
@@ -1429,8 +1473,18 @@
|
||||
android:gravity="center"
|
||||
android:textOff="打开「网络」Log"
|
||||
android:textOn="关闭「网络」Log"
|
||||
android:textSize="@dimen/dp_24"
|
||||
/>
|
||||
android:textSize="@dimen/dp_24" />
|
||||
|
||||
<ToggleButton
|
||||
android:id="@+id/tbObuLog"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="2dp"
|
||||
android:gravity="center"
|
||||
android:textOff="打开「OBU」Log"
|
||||
android:textOn="关闭「OBU」Log"
|
||||
android:textSize="@dimen/dp_24" />
|
||||
|
||||
|
||||
</com.google.android.flexbox.FlexboxLayout>
|
||||
|
||||
@@ -1467,7 +1521,7 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:checked="false"
|
||||
android:text="OBU日志" />
|
||||
android:text="OBU-MOGO日志" />
|
||||
|
||||
<CheckBox
|
||||
android:id="@+id/cbHmiLog"
|
||||
@@ -1655,7 +1709,8 @@
|
||||
android:id="@+id/apkCenterLayout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:visibility="gone">
|
||||
android:visibility="gone"
|
||||
tools:visibility="visible">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/ivApkSearch"
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="840px"
|
||||
android:layout_height="584px"
|
||||
android:orientation="vertical"
|
||||
>
|
||||
|
||||
<ImageView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:src="@drawable/icon_drag"
|
||||
android:padding="15dp"
|
||||
android:layout_gravity="center_horizontal"
|
||||
/>
|
||||
|
||||
<com.mogo.eagle.core.widget.RoundConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/dialog_bg_color"
|
||||
app:roundLayoutRadius="10dp">
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/rv_report_list"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"/>
|
||||
|
||||
</com.mogo.eagle.core.widget.RoundConstraintLayout>
|
||||
|
||||
</LinearLayout>
|
||||
@@ -36,6 +36,9 @@ public class IdentifyDataDrawer {
|
||||
*/
|
||||
private static final ConcurrentHashMap<String, MessagePad.TrackedObject> mMarkersCaches = new ConcurrentHashMap<>();
|
||||
|
||||
/**
|
||||
* kalman缓存数据
|
||||
*/
|
||||
private static final ConcurrentHashMap<String, KalmanFilter> algoCache = new ConcurrentHashMap<>();
|
||||
|
||||
/**
|
||||
@@ -85,7 +88,6 @@ public class IdentifyDataDrawer {
|
||||
return;
|
||||
}
|
||||
|
||||
long start = System.currentTimeMillis();
|
||||
//清除缓存
|
||||
for (MessagePad.TrackedObject data : resultList) {
|
||||
if (trafficDataUuidList.size() > 0 && trafficDataUuidList.contains("" + data.getUuid())) {
|
||||
@@ -97,18 +99,13 @@ public class IdentifyDataDrawer {
|
||||
algoCache.remove(uuid);
|
||||
});
|
||||
|
||||
CallerLogger.INSTANCE.d(M_HMI + "arrow48", "origin data size : " + resultList.size());
|
||||
ArrayList<MessagePad.TrackedObject> filterList = filterTrafficData(resultList);
|
||||
|
||||
long cost = System.currentTimeMillis() - start;
|
||||
CallerLogger.INSTANCE.d(M_HMI + "arrow48", "cost : " + cost);
|
||||
|
||||
if (filterList.size() > 0) {
|
||||
// 绘制新数据
|
||||
MogoMarkerManager.getInstance(mContext)
|
||||
.updateBatchMarkerPosition(filterList);
|
||||
}
|
||||
CallerLogger.INSTANCE.d(M_HMI + "arrow48", "mMarkersCaches : " + mMarkersCaches.size());
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -129,48 +126,40 @@ public class IdentifyDataDrawer {
|
||||
//首次过来的数据不添加,首次未添加的感知物在调用完绘制方法后再塞入cache map
|
||||
MessagePad.TrackedObject cacheData = mMarkersCaches.get(uuid);
|
||||
if (cacheData != null) {
|
||||
MessagePad.TrackedObject correctData;
|
||||
//todo 进行修正
|
||||
double correctHeading = kalmanCorrect(data);
|
||||
if(correctHeading != cacheData.getHeading()){
|
||||
CallerLogger.INSTANCE.d(M_HMI + "arrow48", "uuid: " + uuid + " , kalmanCorrect : " + correctHeading + " , 修正 上一帧 : " + cacheData.getHeading() + " , 当前帧 : " + data.getHeading());
|
||||
if (data.getSpeed() < 0.5) {
|
||||
data.toBuilder().setHeading(cacheData.getHeading()).setLongitude(cacheData.getLongitude()).setLatitude(cacheData.getLatitude()).build();
|
||||
}
|
||||
correctData = data.toBuilder().setHeading(correctHeading).build();
|
||||
mFilterTrafficData.add(correctData);
|
||||
mFilterTrafficData.add(data);
|
||||
//更新已存在的感知物体数据
|
||||
mMarkersCaches.put(uuid, correctData);
|
||||
}else{
|
||||
mMarkersCaches.put(uuid, data);
|
||||
}
|
||||
mMarkersCaches.put(uuid, data);
|
||||
trafficDataUuidList.add(uuid);
|
||||
}
|
||||
return mFilterTrafficData;
|
||||
}
|
||||
|
||||
private double kalmanCorrect(MessagePad.TrackedObject data) {
|
||||
//todo 相信滤波的定位点做验证,将原始data修改经纬度和航向角返回
|
||||
private MessagePad.TrackedObject kalmanCorrectData(MessagePad.TrackedObject data) {
|
||||
String uuid = "" + data.getUuid();
|
||||
if (algoCache.containsKey(uuid)) {
|
||||
Object o = algoCache.get(uuid);
|
||||
KalmanFilter kf = (KalmanFilter) o;
|
||||
assert kf != null;
|
||||
double[] lonLat = kf.filter(data.getLongitude(), data.getLatitude());
|
||||
algoCache.put(uuid, kf);
|
||||
MessagePad.TrackedObject cacheTrackObj = mMarkersCaches.get(uuid);
|
||||
assert cacheTrackObj != null;
|
||||
if (data.getSpeed() >= 1.5) {
|
||||
double heading = MogoMap.getInstance().getMogoMap().getUIController().getAngle(cacheTrackObj.getLongitude(), cacheTrackObj.getLatitude(), lonLat[0], lonLat[1]);
|
||||
CallerLogger.INSTANCE.d(M_HMI + "arrow48", " uuid : " + uuid + " , origin heading : " + data.getHeading() + " , correct heading : " + heading + " ---- " + (data.getHeading() - heading));
|
||||
return heading;
|
||||
if (data.getSpeed() < 0.5) {
|
||||
return data.toBuilder().setHeading(cacheTrackObj.getHeading()).setLongitude(cacheTrackObj.getLongitude()).setLatitude(cacheTrackObj.getLatitude()).build();
|
||||
} else {
|
||||
return data.getHeading();
|
||||
return data;
|
||||
}
|
||||
} else {
|
||||
double r = 0.00005;
|
||||
double r = 0.000005;
|
||||
if (AdasRecognizedType.valueFrom(data.getType()) == AdasRecognizedType.classIdTrafficBus || AdasRecognizedType.valueFrom(data.getType()) == AdasRecognizedType.classIdTrafficTruck) {
|
||||
r = 0.0001;
|
||||
r = 0.00001;
|
||||
}
|
||||
algoCache.put(uuid, new KalmanFilter(data.getLongitude(), data.getLatitude(), r));
|
||||
return data.getHeading();
|
||||
return data;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -185,3 +174,4 @@ public class IdentifyDataDrawer {
|
||||
trafficDataUuidList.clear();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@ public class KalmanFilter {
|
||||
}
|
||||
|
||||
public double[] filter(double lon, double lat) {
|
||||
for(int i = 0; i < 2; ++i) {
|
||||
for (int i = 0; i < 2; ++i) {
|
||||
this.xhatminus[this.idx][i] = this.xhat[1 - this.idx][i];
|
||||
this.pMinus[this.idx][i] = this.p[1 - this.idx][i] + 1.0E-6D;
|
||||
this.k[this.idx][i] = this.pMinus[this.idx][i] / (this.pMinus[this.idx][i] + this.r);
|
||||
@@ -31,4 +31,5 @@ public class KalmanFilter {
|
||||
this.idx = 1 - this.idx;
|
||||
return new double[]{lon1, lat1};
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
package com.mogo.eagle.core.function.obu.mogo
|
||||
|
||||
import android.content.Context
|
||||
import android.telecom.Call
|
||||
import android.util.Log
|
||||
import com.alibaba.android.arouter.launcher.ARouter
|
||||
import com.mogo.cloud.passport.MoGoAiCloudClientConfig
|
||||
import com.mogo.eagle.core.data.app.AppConfigInfo
|
||||
@@ -346,7 +344,7 @@ class MogoPrivateObuManager private constructor() {
|
||||
// CallerHmiManager.showWarning(direction)
|
||||
|
||||
//显示弹框,语音提示
|
||||
CallerHmiManager.showWarningV2X(appId.toInt(),
|
||||
CallerHmiManager.showWarningV2X(appId,
|
||||
alertContent,
|
||||
ttsContent,// 只有第一次才tts,防止更新的时候不断的提醒
|
||||
(appId + direction.direction).toString(),//使用当前事件类型+方向记录tag,当发生变化的时候关闭当前弹出新的
|
||||
@@ -456,7 +454,7 @@ class MogoPrivateObuManager private constructor() {
|
||||
// if (level == 2 || level == 3) { //不考虑level
|
||||
//显示警告红边
|
||||
CallerHmiManager.showWarning(direction)
|
||||
CallerHmiManager.showWarningV2X(v2xType.toInt(),
|
||||
CallerHmiManager.showWarningV2X(v2xType,
|
||||
alertContent,
|
||||
ttsContent,// 只有第一次才tts,防止更新的时候不断的提醒
|
||||
(v2xType + direction.direction).toString(),//使用当前事件类型+方向记录tag,当发生变化的时候关闭当前弹出新的
|
||||
@@ -655,7 +653,7 @@ class MogoPrivateObuManager private constructor() {
|
||||
ttsContent = EventTypeEnum.getWarningTts(appId.toString())
|
||||
alertContent = EventTypeEnum.getWarningContent(appId.toString())
|
||||
CallerHmiManager.showWarningV2X(
|
||||
appId, alertContent, ttsContent,// 只有第一次才tts,防止更新的时候不断的提醒
|
||||
appId.toString(), alertContent, ttsContent,// 只有第一次才tts,防止更新的时候不断的提醒
|
||||
appId.toString(), null, true, 5000L
|
||||
)
|
||||
}
|
||||
@@ -722,7 +720,7 @@ class MogoPrivateObuManager private constructor() {
|
||||
val maxSpeed = currentLight.glosa_suggested_speed_max.toInt()
|
||||
if (maxSpeed > 0) {
|
||||
CallerHmiManager.showWarningV2X(
|
||||
EventTypeEnum.TYPE_USECASE_ID_IVP_GREEN.poiType.toInt(),
|
||||
EventTypeEnum.TYPE_USECASE_ID_IVP_GREEN.poiType,
|
||||
alertContent,
|
||||
ttsContent,// 只有第一次才tts,防止更新的时候不断的提醒
|
||||
appId.toString(),
|
||||
@@ -855,7 +853,7 @@ class MogoPrivateObuManager private constructor() {
|
||||
)
|
||||
if (level == 2 || level == 3) {
|
||||
//显示弹框,语音提示
|
||||
CallerHmiManager.showWarningV2X(appId,
|
||||
CallerHmiManager.showWarningV2X(appId.toString(),
|
||||
alertContent,
|
||||
ttsContent,// 只有第一次才tts,防止更新的时候不断的提醒
|
||||
(appId + direction.direction).toString(),//使用当前事件类型+方向记录tag,当发生变化的时候关闭当前弹出新的
|
||||
|
||||
@@ -45,6 +45,7 @@ dependencies {
|
||||
implementation rootProject.ext.dependencies.androidxccorektx
|
||||
implementation rootProject.ext.dependencies.androidxappcompat
|
||||
implementation rootProject.ext.dependencies.androidxconstraintlayout
|
||||
implementation rootProject.ext.dependencies.localbroadcastmanager
|
||||
implementation rootProject.ext.dependencies.arouter
|
||||
implementation rootProject.ext.dependencies.rxandroid
|
||||
implementation rootProject.ext.dependencies.flexbox
|
||||
|
||||
@@ -11,7 +11,6 @@ import com.mogo.cloud.passport.IMoGoTokenCallback
|
||||
import com.mogo.cloud.passport.MoGoAiCloudClient
|
||||
import com.mogo.cloud.passport.MoGoAiCloudClientConfig
|
||||
import com.mogo.commons.network.ParamsUtil
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_V2X
|
||||
import com.mogo.eagle.core.data.enums.TrafficTypeEnum
|
||||
import com.mogo.eagle.core.data.map.MogoLatLng
|
||||
import com.mogo.eagle.core.data.map.MogoLocation
|
||||
@@ -19,7 +18,6 @@ import com.mogo.eagle.core.data.traffic.TrafficData
|
||||
import com.mogo.eagle.core.function.api.hmi.warning.IMoGoWarningStatusListener
|
||||
import com.mogo.eagle.core.function.api.map.listener.IMoGoMapLocationListener
|
||||
import com.mogo.eagle.core.function.call.hmi.CallerHmiManager
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
|
||||
import com.mogo.eagle.core.function.call.map.CallerMapLocationListenerManager
|
||||
import com.mogo.eagle.core.function.call.map.CallerMapUIServiceManager
|
||||
import com.mogo.eagle.core.function.call.map.CallerVisualAngleManager
|
||||
@@ -44,6 +42,9 @@ import com.mogo.eagle.core.function.v2x.events.scenario.impl.V2XScenarioManager
|
||||
import com.mogo.eagle.core.function.v2x.events.utils.*
|
||||
import com.mogo.eagle.core.function.v2x.events.voice.V2XVoiceManager
|
||||
import com.mogo.eagle.core.network.utils.GsonUtil
|
||||
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.mogo.storage.SharedPrefsMgr
|
||||
import com.mogo.eagle.core.utilcode.util.ThreadUtils
|
||||
import com.mogo.eagle.core.utilcode.util.TimeUtils
|
||||
import com.mogo.eagle.core.utilcode.util.Utils
|
||||
@@ -60,13 +61,13 @@ import com.mogo.service.statusmanager.IMogoStatusChangedListener
|
||||
import com.mogo.service.statusmanager.StatusDescriptor
|
||||
import com.mogo.service.statusmanager.StatusDescriptor.ACC_STATUS
|
||||
import com.mogo.service.statusmanager.StatusDescriptor.SEEK_HELPING
|
||||
import com.mogo.eagle.core.utilcode.mogo.storage.SharedPrefsMgr
|
||||
import com.mogo.v2x.V2XManager
|
||||
import com.mogo.v2x.callback.IV2XCallback
|
||||
import com.mogo.v2x.config.V2XConfig
|
||||
import com.mogo.v2x.data.V2XAdvanceWarning
|
||||
import com.mogo.v2x.data.V2XMarkerCardResult
|
||||
import com.mogo.v2x.data.V2XOptimalRoute
|
||||
import com.mogo.v2x.data.V2XWarningTarget
|
||||
import com.mogo.v2x.event.V2XEvent
|
||||
import com.shuyu.gsyvideoplayer.GSYVideoManager
|
||||
import com.shuyu.gsyvideoplayer.cache.CacheFactory
|
||||
@@ -78,11 +79,10 @@ import com.shuyu.gsyvideoplayer.utils.GSYVideoType
|
||||
import kotlinx.coroutines.*
|
||||
import kotlinx.coroutines.android.asCoroutineDispatcher
|
||||
import tv.danmaku.ijk.media.player.IjkMediaPlayer
|
||||
import java.lang.Exception
|
||||
import java.lang.IllegalStateException
|
||||
import java.util.concurrent.TimeUnit
|
||||
import java.util.concurrent.atomic.AtomicBoolean
|
||||
|
||||
|
||||
object V2XEventManager : IMoGoMapLocationListener, IMoGoTokenCallback, IV2XCallback,
|
||||
IMogoMapListener, IMogoStatusChangedListener {
|
||||
|
||||
@@ -433,7 +433,7 @@ object V2XEventManager : IMoGoMapLocationListener, IMoGoTokenCallback, IV2XCallb
|
||||
* V2XEvent事件回调
|
||||
*/
|
||||
override fun onAck(event: V2XEvent) {
|
||||
CallerLogger.d("$M_V2X$TAG", "OK->: ${event.javaClass.name}")
|
||||
CallerLogger.d("$M_V2X$TAG", "OK->: $event")
|
||||
when (event) {
|
||||
is V2XEvent.ForwardsWarning -> {
|
||||
handleAdvanceWarningEvent(event)
|
||||
@@ -449,10 +449,22 @@ object V2XEventManager : IMoGoMapLocationListener, IMoGoTokenCallback, IV2XCallb
|
||||
is V2XEvent.Road -> {
|
||||
handleRoadMarkerEvent(event.data)
|
||||
}
|
||||
else -> throw IllegalStateException("invalid event type for $event")
|
||||
is V2XEvent.Warning -> {
|
||||
handleWarningTargetEvent(event.data)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private fun handleWarningTargetEvent(data: V2XWarningTarget) {
|
||||
val v2xMessageEntity = V2XMessageEntity<V2XWarningTarget>()
|
||||
v2xMessageEntity.type = V2XTypeEnum.ALERT_THE_FRONT_WEAKNESS
|
||||
// 设置数据
|
||||
v2xMessageEntity.content = data
|
||||
val intent = Intent(BROADCAST_SCENE_HANDLER_ACTION)
|
||||
intent.putExtra(BROADCAST_SCENE_EXTRA_KEY, v2xMessageEntity)
|
||||
LocalBroadcastManager.getInstance(Utils.getApp()).sendBroadcast(intent)
|
||||
}
|
||||
|
||||
private fun handleRoadMarkerEvent(data: V2XMarkerCardResult) {
|
||||
try {
|
||||
BridgeApi.v2xStatus()?.let {
|
||||
@@ -546,7 +558,7 @@ object V2XEventManager : IMoGoMapLocationListener, IMoGoTokenCallback, IV2XCallb
|
||||
}
|
||||
// 显示弹框,语音提示
|
||||
CallerHmiManager.showWarningV2X(
|
||||
appId,
|
||||
appId.toString(),
|
||||
content,
|
||||
tts,
|
||||
"$appId",
|
||||
|
||||
@@ -8,6 +8,8 @@ import com.mogo.eagle.core.utilcode.util.TimeUtils;
|
||||
import com.mogo.module.common.entity.MarkerExploreWay;
|
||||
import com.mogo.module.common.entity.MarkerLocation;
|
||||
import com.mogo.module.common.entity.V2XRoadEventEntity;
|
||||
import com.mogo.module.common.enums.EventTypeEnum;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
import java.util.concurrent.CopyOnWriteArrayList;
|
||||
@@ -50,7 +52,13 @@ public class V2XAlarmServer {
|
||||
// 计算车辆距离指定气泡的距离
|
||||
MarkerLocation eventLocation = v2XRoadEventEntity.getLocation();
|
||||
// 1、判断是否到达了触发距离,20 ~ 500,
|
||||
if (v2XRoadEventEntity.getDistance() <= 500) {
|
||||
double distance = v2XRoadEventEntity.getDistance();
|
||||
if (distance <= 500) {
|
||||
if (EventTypeEnum.GHOST_PROBE.getPoiType().equals(v2XRoadEventEntity.getPoiType())) {
|
||||
if (distance > 25) {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
// 2、道路事件方向与当前行驶方向角度偏差《20度以内
|
||||
double carBearing = currentLocation.getBearing();
|
||||
double eventBearing = eventLocation.getAngle();
|
||||
|
||||
@@ -98,7 +98,7 @@ public class V2XRoadEventScenario extends AbsV2XScenario<V2XRoadEventEntity> imp
|
||||
V2XRoadEventEntity content = entity != null ? entity.getContent() : null;
|
||||
if (content != null) {
|
||||
//显示警告红边
|
||||
CallerHmiManager.INSTANCE.showWarningV2X(entity.getType(), content.getAlarmContent(), content.getTts(), TAG, this, !entity.isOnlyShow(), TimeUnit.SECONDS.toMillis(5));
|
||||
CallerHmiManager.INSTANCE.showWarningV2X(content.getPoiType(), content.getAlarmContent(), content.getTts(), TAG, this, !entity.isOnlyShow(), TimeUnit.SECONDS.toMillis(5));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -122,7 +122,9 @@ public class V2XRoadEventScenario extends AbsV2XScenario<V2XRoadEventEntity> imp
|
||||
|
||||
@Override
|
||||
public void onShow() {
|
||||
CallerVisualAngleManager.INSTANCE.changeVisualAngle(CallerVisualAngleManager.Scene.RoadEvent.INSTANCE);
|
||||
if (isNeedChangeAngle()) {
|
||||
CallerVisualAngleManager.INSTANCE.changeVisualAngle(CallerVisualAngleManager.Scene.RoadEvent.INSTANCE);
|
||||
}
|
||||
CallerHmiManager.INSTANCE.showWarning(WarningDirectionEnum.ALERT_WARNING_TOP, TimeUnit.HOURS.toMillis(1));
|
||||
V2XMessageEntity<V2XRoadEventEntity> entity = getV2XMessageEntity();
|
||||
if (entity != null) {
|
||||
@@ -140,10 +142,21 @@ public class V2XRoadEventScenario extends AbsV2XScenario<V2XRoadEventEntity> imp
|
||||
}
|
||||
}
|
||||
|
||||
private boolean isNeedChangeAngle() {
|
||||
V2XMessageEntity<V2XRoadEventEntity> entity = getV2XMessageEntity();
|
||||
V2XRoadEventEntity content = entity != null ? entity.getContent() : null;
|
||||
if (content == null) {
|
||||
return true;
|
||||
}
|
||||
return !EventTypeEnum.GHOST_PROBE.getPoiType().equals(content.getPoiType());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDismiss() {
|
||||
CallerHmiManager.INSTANCE.dismissWarning(WarningDirectionEnum.ALERT_WARNING_TOP);
|
||||
CallerVisualAngleManager.INSTANCE.changeVisualAngle(new CallerVisualAngleManager.Scene.Default(3, TimeUnit.SECONDS));
|
||||
if (isNeedChangeAngle()) {
|
||||
CallerVisualAngleManager.INSTANCE.changeVisualAngle(new CallerVisualAngleManager.Scene.Default(3, TimeUnit.SECONDS));
|
||||
}
|
||||
clearPOI();
|
||||
release();
|
||||
}
|
||||
|
||||
@@ -53,7 +53,7 @@ public class V2XOptimalRouteVREventScenario
|
||||
if (entity != null) {
|
||||
V2XOptimalRouteDataRes content = entity.getContent();
|
||||
if (content != null) {
|
||||
CallerHmiManager.INSTANCE.showWarningV2X(entity.getType(), "为您推荐最优路线", "已为您选择最优路线", TAG, this, !entity.isOnlyShow(), TimeUnit.SECONDS.toMillis(30));
|
||||
CallerHmiManager.INSTANCE.showWarningV2X(entity.getType() + "", "为您推荐最优路线", "已为您选择最优路线", TAG, this, !entity.isOnlyShow(), TimeUnit.SECONDS.toMillis(30));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,9 +6,7 @@ import android.graphics.Color;
|
||||
import android.text.Spannable;
|
||||
import android.text.SpannableStringBuilder;
|
||||
import android.text.style.ForegroundColorSpan;
|
||||
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
import com.mogo.eagle.core.data.enums.WarningDirectionEnum;
|
||||
import com.mogo.eagle.core.data.map.MogoLocation;
|
||||
import com.mogo.eagle.core.function.api.hmi.warning.IMoGoWarningStatusListener;
|
||||
@@ -18,8 +16,7 @@ import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger;
|
||||
import com.mogo.eagle.core.function.v2x.events.scenario.impl.AbsV2XScenario;
|
||||
import com.mogo.eagle.core.function.v2x.events.scenario.view.IV2XMarker;
|
||||
import com.mogo.module.common.entity.V2XMessageEntity;
|
||||
import com.mogo.module.common.entity.V2XWarningEntity;
|
||||
|
||||
import com.mogo.v2x.data.V2XWarningTarget;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Locale;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
@@ -32,7 +29,7 @@ import java.util.concurrent.TimeUnit;
|
||||
public class V2XFrontWarningScenario extends AbsV2XScenario implements IMoGoMapLocationListener, IMoGoWarningStatusListener {
|
||||
private static final String TAG = "V2XWarningMarker";
|
||||
private static final V2XWarningMarker sV2XWarningMarker = new V2XWarningMarker();
|
||||
private V2XWarningEntity mMarkerEntity;
|
||||
private V2XWarningTarget mMarkerEntity;
|
||||
|
||||
private WarningDirectionEnum mDirection;
|
||||
|
||||
@@ -45,8 +42,8 @@ public class V2XFrontWarningScenario extends AbsV2XScenario implements IMoGoMapL
|
||||
CallerLogger.INSTANCE.d(M_V2X + TAG, "----- init -----:\n" + (v2XMessageEntity == null ? "null" : v2XMessageEntity.toString()));
|
||||
try {
|
||||
setV2XMessageEntity(v2XMessageEntity);
|
||||
if (v2XMessageEntity != null && v2XMessageEntity.getContent() instanceof V2XWarningEntity) {
|
||||
mMarkerEntity = (V2XWarningEntity) v2XMessageEntity.getContent();
|
||||
if (v2XMessageEntity != null && v2XMessageEntity.getContent() instanceof V2XWarningTarget) {
|
||||
mMarkerEntity = (V2XWarningTarget) v2XMessageEntity.getContent();
|
||||
show();
|
||||
}
|
||||
} catch (Exception e) {
|
||||
@@ -62,24 +59,27 @@ public class V2XFrontWarningScenario extends AbsV2XScenario implements IMoGoMapL
|
||||
int v2xType = getV2XTypeForFrontWarning(mMarkerEntity);
|
||||
V2XMessageEntity entity = getV2XMessageEntity();
|
||||
if (v2xType != 0) {
|
||||
CallerHmiManager.INSTANCE.showWarningV2X(v2xType, getAlertContentForFrontWarning(mMarkerEntity), mMarkerEntity.getTts(), TAG, this, !entity.isOnlyShow(), TimeUnit.SECONDS.toMillis(3));
|
||||
CallerHmiManager.INSTANCE.showWarningV2X(v2xType + "", getAlertContentForFrontWarning(mMarkerEntity), mMarkerEntity.getTts(), TAG, this, !entity.isOnlyShow(), TimeUnit.SECONDS.toMillis(3));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private int getV2XTypeForFrontWarning(V2XWarningEntity entity) {
|
||||
private int getV2XTypeForFrontWarning(V2XWarningTarget entity) {
|
||||
switch (entity.getType()) {
|
||||
case 1:
|
||||
case 11:
|
||||
entity.setTts("注意行人");
|
||||
return 0X2B0201;
|
||||
case 2:
|
||||
entity.setTts("注意自行车");
|
||||
case 4:
|
||||
entity.setTts("注意摩托车");
|
||||
return 0X2B0202;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
private CharSequence getAlertContentForFrontWarning(V2XWarningEntity entity) {
|
||||
private CharSequence getAlertContentForFrontWarning(V2XWarningTarget entity) {
|
||||
double dis = entity.getDistance();
|
||||
//距离四舍五入保留整数
|
||||
BigDecimal bg = new BigDecimal(dis);
|
||||
|
||||
@@ -169,7 +169,7 @@ class RedLightWarningManager : IMoGoTrafficLightListener, IMoGoVipSetListener,
|
||||
private fun redLightWarning() {
|
||||
CallerLogger.d("$M_V2X$TAG", "=====闯红灯预警=====")
|
||||
ThreadUtils.runOnUiThread {
|
||||
CallerHmiManager.showWarningV2X(EventTypeEnum.TYPE_USECASE_ID_IVP.poiType.toInt(), EventTypeEnum.TYPE_USECASE_ID_IVP.content, EventTypeEnum.TYPE_USECASE_ID_IVP.tts, EventTypeEnum.TYPE_USECASE_ID_IVP.poiType, null, true, 5000L)
|
||||
CallerHmiManager.showWarningV2X(EventTypeEnum.TYPE_USECASE_ID_IVP.poiType, EventTypeEnum.TYPE_USECASE_ID_IVP.content, EventTypeEnum.TYPE_USECASE_ID_IVP.tts, EventTypeEnum.TYPE_USECASE_ID_IVP.poiType, null, true, 5000L)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -187,7 +187,7 @@ class RedLightWarningManager : IMoGoTrafficLightListener, IMoGoVipSetListener,
|
||||
EventTypeEnum.getWarningTts(EventTypeEnum.TYPE_USECASE_ID_IVP_GREEN.poiType),
|
||||
speed
|
||||
)
|
||||
CallerHmiManager.showWarningV2X(EventTypeEnum.TYPE_USECASE_ID_IVP_GREEN.poiType.toInt(), content, tts, EventTypeEnum.TYPE_USECASE_ID_IVP_GREEN.poiType, null, true, 5000L)
|
||||
CallerHmiManager.showWarningV2X(EventTypeEnum.TYPE_USECASE_ID_IVP_GREEN.poiType, content, tts, EventTypeEnum.TYPE_USECASE_ID_IVP_GREEN.poiType, null, true, 5000L)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -131,7 +131,7 @@ class VipCarManager : IMogoOnMessageListener<VipMessage>, IMoGoTrafficLightListe
|
||||
if (abs(currentResult!!.remain - it.remain) > 5 && currentResult.isGreen()) {
|
||||
CallerLogger.d("$M_V2X$TAG", "调用showWarningV2X to show")
|
||||
CallerHmiManager.showWarningV2X(
|
||||
EventTypeEnum.TYPE_VIP_IDENTIFICATION.poiType.toInt(),
|
||||
EventTypeEnum.TYPE_VIP_IDENTIFICATION.poiType,
|
||||
EventTypeEnum.TYPE_VIP_IDENTIFICATION.content,
|
||||
EventTypeEnum.TYPE_VIP_IDENTIFICATION.tts,
|
||||
EventTypeEnum.TYPE_VIP_IDENTIFICATION.poiType,
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
"lat":39.969055,
|
||||
"lon":116.410811
|
||||
},
|
||||
"poiType":"10011",
|
||||
"poiType":"10024",
|
||||
"type":"CARD_TYPE_ROAD_CONDITION",
|
||||
"uploadType":"2",
|
||||
"userInfo":{
|
||||
@@ -41,5 +41,5 @@
|
||||
"userName":"零下的雨"
|
||||
}
|
||||
},
|
||||
"poiType":"10011"
|
||||
"poiType":"10024"
|
||||
}
|
||||
@@ -9,6 +9,7 @@ object AppConfigInfo {
|
||||
/*应用构建基本信息*/
|
||||
var workingBranchName: String? = null
|
||||
var workingBranchHash: String? = null
|
||||
var appBuildTime: String? = null
|
||||
|
||||
/*应用基本信息*/
|
||||
var appName: String? = null
|
||||
@@ -50,6 +51,9 @@ object AppConfigInfo {
|
||||
// 是否连接工控机
|
||||
var isConnectAutopilot: Boolean = false
|
||||
|
||||
//连接工控机状态文字描述
|
||||
var connectStatusDescribe: String? = null
|
||||
|
||||
// 是否OBU
|
||||
var isConnectObu: Boolean = false
|
||||
|
||||
|
||||
@@ -50,6 +50,10 @@ fun AutopilotControlParameters.toRouteInfo(): MessagePad.RouteInfo{
|
||||
locBuilder.longitude = it.lon
|
||||
routeInfo.addWayPoints(locBuilder.build())
|
||||
}
|
||||
if (this.routeID > 0) {
|
||||
routeInfo.routeID = this.routeID
|
||||
}
|
||||
routeInfo.routeName = this.routeName
|
||||
routeInfo.startName = this.startName
|
||||
routeInfo.endName = this.endName
|
||||
routeInfo.vehicleType = this.vehicleType
|
||||
@@ -76,6 +80,10 @@ class AutopilotControlParameters {
|
||||
@JvmField
|
||||
var vehicleType // 运营类型
|
||||
= 0
|
||||
@JvmField
|
||||
var routeID = 0 //线路id(bus用)
|
||||
@JvmField
|
||||
var routeName = "" //线路名称(bus用)
|
||||
|
||||
/**
|
||||
* 是否播放adas的 开始自动驾驶 语音
|
||||
|
||||
@@ -20,6 +20,10 @@ class AutopilotStatusInfo : Serializable {
|
||||
*/
|
||||
var connectPort: Int = 4110
|
||||
var connectStatus = false
|
||||
/**
|
||||
* 工控机连接状态文字描述
|
||||
*/
|
||||
var connectStatusDescribe: String? = null
|
||||
var version: String? = null
|
||||
|
||||
/**
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
package com.mogo.eagle.core.data.gnss
|
||||
|
||||
/**
|
||||
* @author XuXinChao
|
||||
* @description 实时加速度实例
|
||||
* @since: 2022/4/20
|
||||
*/
|
||||
data class AccelerationEntity(
|
||||
var moment: String,//时刻
|
||||
var acceleration: String//加速度
|
||||
) {
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
package com.mogo.eagle.core.data.report
|
||||
|
||||
/**
|
||||
* @author XuXinChao
|
||||
* @description 工控机上报实例
|
||||
* @since: 2022/4/13
|
||||
*/
|
||||
data class ReportEntity(
|
||||
var time: String,//上报时间
|
||||
var src: String,//消息来源
|
||||
var level: String,//消息等级 error info
|
||||
var msg: String,//研发自己看的信息;对标准日志来说就是日志内容
|
||||
var code: String, //error日志中的错误原因,这是一个类似宏的受约束字段,用字符串的目的是便于排查问题时查看
|
||||
var resultList: List<String>,//带来的后果;例如pad无法启动驾驶,远程驾驶无法启动等;可供监控后台做错误分类;pad无法理解code时也可参考此字段
|
||||
var actionsList: List<String>,//试验性字段。消息发出者希望触发的动作,例如:触发短信报警,自动创建工单,要求pad弹框等
|
||||
// var sec: Int,//秒
|
||||
// var nsec: Int//纳秒 sec和nsec拼接起来是消息发送事件
|
||||
) {
|
||||
|
||||
}
|
||||
@@ -1,7 +1,6 @@
|
||||
package com.mogo.eagle.core.function.api.hmi.warning
|
||||
|
||||
import android.view.View
|
||||
import android.view.WindowManager.LayoutParams
|
||||
import com.mogo.eagle.core.data.enums.WarningDirectionEnum
|
||||
import com.mogo.eagle.core.data.notice.NoticeNormalData
|
||||
import com.mogo.eagle.core.data.notice.NoticeTrafficStylePushData
|
||||
@@ -68,12 +67,12 @@ interface IMoGoWaringProvider : IMoGoHmiViewProxy {
|
||||
/**
|
||||
* 展示VR下V2X预警
|
||||
*
|
||||
* @param v2xType V2X类型
|
||||
* @param poiType V2X类型
|
||||
* @param alertContent 提醒文本
|
||||
* @param ttsContent tts语音播报消息
|
||||
* @param tag tag绑定弹窗的标志
|
||||
*/
|
||||
fun showWarningV2X(v2xType: Int, alertContent: CharSequence?, ttsContent: String?, tag: String?, listenerIMoGo: IMoGoWarningStatusListener?, playTts: Boolean, expireTime: Long)
|
||||
fun showWarningV2X(v2xType: String, alertContent: CharSequence?, ttsContent: String?, tag: String?, listenerIMoGo: IMoGoWarningStatusListener?, playTts: Boolean, expireTime: Long)
|
||||
|
||||
/**
|
||||
* 关闭指定floatTag 的 VR下V2X预警弹窗
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
package com.mogo.eagle.core.function.call.hmi
|
||||
|
||||
import android.view.View
|
||||
import android.view.WindowManager.LayoutParams
|
||||
import com.alibaba.android.arouter.launcher.ARouter
|
||||
import com.mogo.eagle.core.data.constants.MoGoFragmentPaths
|
||||
import com.mogo.eagle.core.data.enums.WarningDirectionEnum
|
||||
@@ -92,12 +91,12 @@ object CallerHmiManager : CallerBase() {
|
||||
/**
|
||||
* 展示VR下V2X预警
|
||||
*
|
||||
* @param v2xType V2X类型
|
||||
* @param poiType V2X类型
|
||||
* @param alertContent 提醒文本
|
||||
* @param ttsContent tts语音播报消息
|
||||
* @param tag tag绑定弹窗的标志
|
||||
*/
|
||||
fun showWarningV2X(v2xType: Int, alertContent: CharSequence?, ttsContent: String?, tag: String?, listenerIMoGo: IMoGoWarningStatusListener?, playTts: Boolean, expireTime: Long = 5000L) {
|
||||
fun showWarningV2X(v2xType: String, alertContent: CharSequence?, ttsContent: String?, tag: String?, listenerIMoGo: IMoGoWarningStatusListener?, playTts: Boolean, expireTime: Long = 5000L) {
|
||||
waringProviderApi?.showWarningV2X(v2xType, alertContent, ttsContent, tag, listenerIMoGo, playTts, expireTime)
|
||||
}
|
||||
|
||||
|
||||
@@ -39,6 +39,10 @@ public final class TimeUtils {
|
||||
return getSafeDateFormat("yyyy-MM-dd HH:mm:ss");
|
||||
}
|
||||
|
||||
public static SimpleDateFormat getHourMinSecondFormat(){
|
||||
return getSafeDateFormat("HH:mm:ss");
|
||||
}
|
||||
|
||||
@SuppressLint("SimpleDateFormat")
|
||||
public static SimpleDateFormat getSafeDateFormat(String pattern) {
|
||||
Map<String, SimpleDateFormat> sdfMap = SDF_THREAD_LOCAL.get();
|
||||
|
||||
@@ -82,7 +82,7 @@ MOGO_LOCATION_VERSION=1.3.55
|
||||
MOGO_TELEMATIC_VERSION=1.3.55
|
||||
######## MogoAiCloudSDK Version ########
|
||||
# 自研地图
|
||||
MAP_SDK_VERSION=2.1.0.6
|
||||
MAP_SDK_VERSION=2.1.0.6-2
|
||||
MAP_SDK_OPERATION_VERSION=1.0.12
|
||||
# websocket
|
||||
WEBSOCKET_VERSION=1.1.7
|
||||
@@ -90,8 +90,8 @@ WEBSOCKET_VERSION=1.1.7
|
||||
applicationId=com.mogo.launcer
|
||||
applicationName=IntelligentPilot
|
||||
# RoboBus司机端:2.5.1;RoboTaxi司机端:2.5.1;RoboTaxi乘客端:1.0.0
|
||||
versionCode=2060500
|
||||
versionName=2.6.5
|
||||
versionCode=2060600
|
||||
versionName=2.6.6
|
||||
|
||||
################# 新架构模块Maven版本管理 #################
|
||||
MOGO_CORE_FUNCTION_AUTOPILOT_VERSION=0.0.58.10
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user