[add] 乘客屏速度数据信息
This commit is contained in:
@@ -5,39 +5,38 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginTop="@dimen/dp_72">
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/fl_speed"
|
||||
android:layout_width="@dimen/dp_616"
|
||||
android:layout_height="@dimen/dp_320"
|
||||
android:layout_marginLeft="@dimen/dp_16"
|
||||
android:layout_marginTop="@dimen/dp_40"
|
||||
android:layout_width="@dimen/bus_ext_speed_width"
|
||||
android:layout_height="@dimen/bus_ext_speed_height"
|
||||
android:layout_marginLeft="@dimen/module_mogo_och_margin_left"
|
||||
android:layout_marginTop="@dimen/module_mogo_och_margin_left"
|
||||
android:background="@drawable/bus_yi_biao_pan_bg_nor"
|
||||
android:elevation="@dimen/bus_dp_10"
|
||||
android:padding="@dimen/bus_dp_20"
|
||||
android:visibility="visible"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<com.mogo.eagle.core.function.hmi.ui.widget.TrafficDataView
|
||||
<com.mogo.och.bus.view.BusArcView
|
||||
android:id="@+id/bus_arc"
|
||||
android:layout_width="@dimen/dp_616"
|
||||
android:layout_height="@dimen/dp_320"
|
||||
android:layout_width="@dimen/bus_ext_arcView_width"
|
||||
android:layout_height="@dimen/bus_ext_arcView_height"
|
||||
android:layout_gravity="center" />
|
||||
|
||||
</FrameLayout>
|
||||
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/module_mogo_och_autopilot_status"
|
||||
android:layout_width="@dimen/module_mogo_och_autopilot_status_bg_width"
|
||||
android:layout_height="@dimen/module_mogo_och_autopilot_status_bg_height"
|
||||
android:layout_marginLeft="@dimen/module_mogo_och_margin_left"
|
||||
app:layout_constraintTop_toBottomOf="@+id/fl_speed"
|
||||
android:layout_marginTop="@dimen/bus_ext_arcView_top"
|
||||
android:background="@drawable/bus_autopilot_status_bg"
|
||||
android:gravity="center"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/fl_speed"
|
||||
tools:visibility="visible">
|
||||
android:gravity="center"
|
||||
tools:visibility="visible" >
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/bus_autopilot_btn_iv"
|
||||
@@ -45,18 +44,17 @@
|
||||
android:layout_height="56px"
|
||||
android:layout_centerVertical="true"
|
||||
android:src="@drawable/bus_ic_autopilot" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/bus_autopolot_btn_tv"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerVertical="true"
|
||||
android:text="自动驾驶"
|
||||
android:layout_marginLeft="28px"
|
||||
android:layout_toRightOf="@+id/bus_autopilot_btn_iv"
|
||||
android:text="自动驾驶"
|
||||
android:textColor="@color/bus_autopilot_text_color_normal"
|
||||
android:textSize="@dimen/module_mogo_och_autopilot_status_text_size"
|
||||
android:textStyle="bold" />
|
||||
android:layout_centerVertical="true"
|
||||
android:textStyle="bold"/>
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
@@ -91,24 +89,21 @@
|
||||
android:layout_marginLeft="@dimen/module_mogo_och_margin_left"
|
||||
android:background="@drawable/bus_switch_map_bg"
|
||||
android:elevation="@dimen/bus_dp_10"
|
||||
android:gravity="center"
|
||||
android:orientation="horizontal"
|
||||
android:padding="@dimen/bus_dp_20"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/module_mogo_och_operation_status"
|
||||
app:layout_constraintLeft_toRightOf="@+id/module_mogo_och_operation_status">
|
||||
app:layout_constraintLeft_toRightOf="@+id/module_mogo_och_operation_status"
|
||||
android:gravity="center"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/bus_switch_model_icon"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content" />
|
||||
</LinearLayout>
|
||||
|
||||
<CheckedTextView
|
||||
android:id="@+id/module_mogo_och_operation_status"
|
||||
android:layout_width="@dimen/module_mogo_och_operation_status_bg_width"
|
||||
android:layout_height="@dimen/module_mogo_och_operation_status_bg_height"
|
||||
android:layout_marginLeft="@dimen/module_mogo_och_margin_left"
|
||||
android:layout_marginBottom="@dimen/module_mogo_och_margin_bottom"
|
||||
android:background="@drawable/bus_operation_status_bg"
|
||||
android:elevation="@dimen/dp_10"
|
||||
android:gravity="center"
|
||||
@@ -117,8 +112,10 @@
|
||||
android:textColor="@color/bus_autopilot_text_color_selector"
|
||||
android:textSize="@dimen/module_mogo_och_autopilot_status_text_size"
|
||||
android:textStyle="bold"
|
||||
android:layout_marginLeft="@dimen/module_mogo_och_margin_left"
|
||||
android:layout_marginBottom="@dimen/module_mogo_och_margin_bottom"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent" />
|
||||
app:layout_constraintLeft_toLeftOf="parent"/>
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/module_mogo_och_setting_layout"
|
||||
@@ -130,23 +127,21 @@
|
||||
android:elevation="@dimen/dp_10"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toRightOf="@id/bus_switch_model_layout">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/module_och_bus_upgrade_red_tip"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentTop="true"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_alignParentTop="true"
|
||||
android:layout_gravity="right"
|
||||
android:background="@drawable/bus_setting_tip_red_cir_bg"
|
||||
android:visibility="gone"
|
||||
android:elevation="8px"
|
||||
android:visibility="gone" />
|
||||
|
||||
android:background="@drawable/bus_setting_tip_red_cir_bg" />
|
||||
<ImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerInParent="true"
|
||||
android:layout_gravity="center"
|
||||
android:layout_centerInParent="true"
|
||||
android:background="@drawable/bus_setting_btn_bg" />
|
||||
</RelativeLayout>
|
||||
|
||||
@@ -156,11 +151,11 @@
|
||||
android:layout_height="@dimen/module_mogo_och_operation_status_bg_height"
|
||||
android:layout_marginLeft="@dimen/module_mogo_och_margin_left"
|
||||
android:layout_marginBottom="@dimen/module_mogo_och_margin_bottom"
|
||||
android:elevation="@dimen/dp_10"
|
||||
android:src="@drawable/bus_badcase_btn_bg"
|
||||
android:elevation="@dimen/dp_10"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toRightOf="@id/module_mogo_och_setting_layout" />
|
||||
app:layout_constraintLeft_toRightOf="@id/module_mogo_och_setting_layout"/>
|
||||
|
||||
<com.mogo.och.bus.view.SlidePanelView
|
||||
android:id="@+id/module_mogo_och_slide_panel"
|
||||
@@ -219,7 +214,6 @@
|
||||
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"
|
||||
|
||||
@@ -35,6 +35,7 @@ public class TapPositionView extends ConstraintLayout {
|
||||
|
||||
public TapPositionView(Context context, @Nullable AttributeSet attrs) {
|
||||
super(context, attrs);
|
||||
Log.d(TAG, "2");
|
||||
LayoutInflater.from(context).inflate(R.layout.hmi_tap_position, this);
|
||||
tabP = findViewById(R.id.tap_p);
|
||||
tabR = findViewById(R.id.tap_r);
|
||||
|
||||
@@ -133,6 +133,16 @@ public class AMapCustomView
|
||||
// mWayPointList.add(new NaviLatLng(40.035897, 116.329582));
|
||||
// mWayPointList.add(new NaviLatLng(40.036396, 116.322166));
|
||||
Log.d(TAG, "initView:" + mWayPointList.toString());
|
||||
// mWayPointList.add(new NaviLatLng(39.968847, 116.406952));
|
||||
// mWayPointList.add(new NaviLatLng(39.969058, 116.407346));
|
||||
// mWayPointList.add(new NaviLatLng(39.968955, 116.401767));
|
||||
// mWayPointList.add(new NaviLatLng(39.968626, 116.394938));
|
||||
// mWayPointList.add(new NaviLatLng(39.968433, 116.388725));
|
||||
// mWayPointList.add(new NaviLatLng(39.968542, 116.383775));
|
||||
// mWayPointList.add(new NaviLatLng(40.037808, 116.342539));
|
||||
// mWayPointList.add(new NaviLatLng(40.037239, 116.337172));
|
||||
// mWayPointList.add(new NaviLatLng(40.035897, 116.329582));
|
||||
// mWayPointList.add(new NaviLatLng(40.036396, 116.322166));
|
||||
|
||||
//顺义国展路线
|
||||
// mWayPointList.add(new NaviLatLng(40.097621,116.526495));
|
||||
@@ -280,7 +290,7 @@ public class AMapCustomView
|
||||
//导航全程光柱
|
||||
options.setTrafficBarEnabled(false);
|
||||
//指南针
|
||||
// options.setCompassEnabled(false);
|
||||
options.setCompassEnabled(false);
|
||||
options.setTilt((int) tilt);
|
||||
//自车车标
|
||||
options.setCarBitmap(BitmapFactory.decodeResource(this.getResources(), R.drawable.module_small_map_view_my_location_logo));
|
||||
@@ -695,4 +705,42 @@ public class AMapCustomView
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAutopilotTrajectory(@NotNull List<MessagePad.TrajectoryPoint> trajectoryInfos) {
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据全路径获取起始点和经停点进行导航路线绘制
|
||||
* 自动驾驶启动后获得数据,获取全路径的具体时间要进行路测
|
||||
* 室内某个bag包自动驾驶启动8s后返回
|
||||
*/
|
||||
@Override
|
||||
public void onAutopilotRotting(@org.jetbrains.annotations.Nullable MessagePad.GlobalPathResp globalPathResp) {
|
||||
List list = globalPathResp.getWayPointsList();
|
||||
int minCount = 2;
|
||||
if (list.size() >= minCount) {
|
||||
Location sLocation = (Location) list.get(0);
|
||||
Location eLocation = (Location) list.get(list.size() - 1);
|
||||
mStartLatlng = new NaviLatLng(sLocation.getLongitude(), sLocation.getLatitude());
|
||||
mEndLatlng = new NaviLatLng(eLocation.getLongitude(), eLocation.getLatitude());
|
||||
sList.add(mStartLatlng);
|
||||
eList.add(mEndLatlng);
|
||||
for (int i = 1; i < list.size() - minCount; i++) {
|
||||
Location wayLoc = (Location) list.get(i);
|
||||
NaviLatLng way = new NaviLatLng(wayLoc.getLongitude(), wayLoc.getLatitude());
|
||||
mWayPointList.add(way);
|
||||
}
|
||||
}
|
||||
int strategy = 0;
|
||||
try {
|
||||
//再次强调,最后一个参数为true时代表多路径,否则代表单路径
|
||||
strategy = mAMapNavi.strategyConvert(true, false, false, false, false);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
Log.d(TAG, "calculateDriveRoute ADAS全局路径坐标:" + list.size() + "," + sList.toString() + "," + eList.toString() + "," + mWayPointList.toString());
|
||||
//指定路径绘制导航路线
|
||||
mAMapNavi.calculateDriveRoute(sList, eList, mWayPointList, strategy);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user