[merge]
This commit is contained in:
Binary file not shown.
|
After Width: | Height: | Size: 21 KiB |
@@ -56,6 +56,15 @@
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent" />
|
||||
|
||||
<com.mogo.eagle.core.function.hmi.ui.widget.RomaPassengerView
|
||||
android:layout_width="@dimen/dp_121"
|
||||
android:layout_height="@dimen/dp_121"
|
||||
android:layout_marginRight="@dimen/dp_751"
|
||||
android:layout_marginBottom="@dimen/dp_59"
|
||||
android:background="@drawable/iv_roma_bus_passenger_bg"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent" />
|
||||
|
||||
<com.mogo.och.common.module.wigets.OCHBorderShadowLayout
|
||||
android:id="@+id/arrive_station_shadow"
|
||||
android:layout_width="wrap_content"
|
||||
@@ -152,13 +161,4 @@
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<ImageView
|
||||
android:layout_width="@dimen/dp_299"
|
||||
android:layout_height="@dimen/dp_75"
|
||||
android:layout_marginRight="@dimen/dp_40"
|
||||
android:layout_marginBottom="@dimen/dp_48"
|
||||
android:src="@drawable/bus_p_mogo_nor"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintRight_toLeftOf="@+id/bus_p_route_panel" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
@@ -58,7 +58,7 @@
|
||||
app:layout_constraintBottom_toBottomOf="@+id/bus_p_speed_tv"
|
||||
app:layout_constraintLeft_toRightOf="@+id/bus_p_speed_tv" />
|
||||
|
||||
<com.mogo.och.bus.passenger.ui.BusPassengerTrafficLightView
|
||||
<com.mogo.eagle.core.function.hmi.ui.widget.SingleTrafficLightView
|
||||
android:id="@+id/bus_p_traffic_light_view"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="@dimen/dp_121"
|
||||
android:layout_height="@dimen/dp_121"
|
||||
android:background="@drawable/iv_roma_bus_passenger_bg"
|
||||
tools:ignore="MissingDefaultResource">
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
@@ -1,6 +1,5 @@
|
||||
package com.mogo.och.bus.fragment;
|
||||
|
||||
import static com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.M_BUS;
|
||||
import static com.mogo.och.bus.constant.BusConst.TIMER_START_AUTOPILOT_INTERVAL;
|
||||
|
||||
import android.animation.ObjectAnimator;
|
||||
@@ -22,7 +21,6 @@ import androidx.constraintlayout.widget.Group;
|
||||
import com.mogo.commons.mvp.IView;
|
||||
import com.mogo.commons.mvp.MvpFragment;
|
||||
import com.mogo.commons.mvp.Presenter;
|
||||
import com.mogo.eagle.core.data.config.FunctionBuildConfig;
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotRecordListener;
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotStatusListener;
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager;
|
||||
@@ -30,17 +28,14 @@ import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotRecordListener
|
||||
import com.mogo.eagle.core.function.call.devatools.CallerDevaToolsManager;
|
||||
import com.mogo.eagle.core.function.call.hmi.CallerHmiManager;
|
||||
import com.mogo.eagle.core.function.call.map.CallerMapUIServiceManager;
|
||||
import com.mogo.eagle.core.function.call.map.CallerVisualAngleManager;
|
||||
import com.mogo.eagle.core.function.hmi.ui.msgbox.DriverMsgBoxBubbleView;
|
||||
import com.mogo.eagle.core.function.hmi.ui.msgbox.DriverMsgBoxButtonView;
|
||||
import com.mogo.eagle.core.function.hmi.ui.msgbox.DriverMsgBoxListView;
|
||||
import com.mogo.eagle.core.function.hmi.ui.widget.TrafficDataView;
|
||||
import com.mogo.eagle.core.function.smp.view.SmallMapView;
|
||||
import com.mogo.eagle.core.function.view.MapBizView;
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger;
|
||||
import com.mogo.eagle.core.utilcode.mogo.view.OnPreventFastClickListener;
|
||||
import com.mogo.eagle.core.utilcode.util.UiThreadHandler;
|
||||
import com.mogo.map.MogoMapUIController;
|
||||
import com.mogo.map.listener.IMogoMapListener;
|
||||
import com.mogo.map.listener.MogoMapListenerHandler;
|
||||
import com.mogo.map.uicontroller.IMogoMapUIController;
|
||||
@@ -78,7 +73,6 @@ public abstract class BaseBusTabFragment<V extends IView, P extends Presenter<V>
|
||||
protected TextView tvArrived;
|
||||
protected RelativeLayout mSettingBtn;
|
||||
protected RelativeLayout mBadcaseBtn;
|
||||
protected RelativeLayout mAICollectBtn;
|
||||
private FrameLayout flStationPanelContainer;
|
||||
private MapBizView mapBizView;
|
||||
private Group groupTestPanel;
|
||||
@@ -147,18 +141,12 @@ public abstract class BaseBusTabFragment<V extends IView, P extends Presenter<V>
|
||||
if (controller != null) {
|
||||
//切换地图的远近视图
|
||||
if (controller.getCurrentMapVisualAngle().isLongSight()) {
|
||||
CallerVisualAngleManager.INSTANCE.updateLongSightLevel(false);
|
||||
Objects.requireNonNull(CallerMapUIServiceManager.INSTANCE.getMapUIController()).setLockMode(true);
|
||||
controller.changeMapVisualAngle(VisualAngleMode.MODE_MEDIUM_SIGHT, null);
|
||||
mSwitchMapModeImage.setImageResource(R.drawable.bus_switch_map_medium);
|
||||
} else if (controller.getCurrentMapVisualAngle().isMediumSight()) {
|
||||
CallerVisualAngleManager.INSTANCE.updateLongSightLevel(true);
|
||||
if (FunctionBuildConfig.isRomaMode) {
|
||||
controller.setRomaMode(1);
|
||||
} else {
|
||||
Objects.requireNonNull(CallerMapUIServiceManager.INSTANCE.getMapUIController()).setLockMode(false);
|
||||
controller.changeMapVisualAngle(VisualAngleMode.MODE_LONG_SIGHT, null);
|
||||
}
|
||||
Objects.requireNonNull(CallerMapUIServiceManager.INSTANCE.getMapUIController()).setLockMode(false);
|
||||
controller.changeMapVisualAngle(VisualAngleMode.MODE_LONG_SIGHT, null);
|
||||
mSwitchMapModeImage.setImageResource(R.drawable.bus_switch_map_long);
|
||||
} else {
|
||||
controller.changeMapVisualAngle(VisualAngleMode.MODE_MEDIUM_SIGHT, null);
|
||||
@@ -218,21 +206,17 @@ public abstract class BaseBusTabFragment<V extends IView, P extends Presenter<V>
|
||||
CallerAutopilotRecordListenerManager.INSTANCE.addListener(TAG, this);
|
||||
}
|
||||
|
||||
mAICollectBtn = findViewById(R.id.module_mogo_och_ai_collet_rl);
|
||||
if (mAICollectBtn != null) {
|
||||
CallerDevaToolsManager.INSTANCE.initAiCollect(mAICollectBtn);
|
||||
}
|
||||
//消息盒子
|
||||
viewDriverMsgBoxButton = findViewById(R.id.viewDriverMsgBoxButton);
|
||||
viewDriverMsgBoxList = findViewById(R.id.viewDriverMsgBoxList);
|
||||
viewDriverMsgBoxBubble = findViewById(R.id.viewDriverMsgBoxBubble);
|
||||
viewDriverMsgBoxButton.setClickListener(show -> {
|
||||
if(show){
|
||||
if (show) {
|
||||
viewDriverMsgBoxList.setVisibility(View.VISIBLE);
|
||||
viewDriverMsgBoxList.notifyData();
|
||||
viewDriverMsgBoxBubble.setVisibility(View.GONE);
|
||||
viewDriverMsgBoxBubble.isShowData(false);
|
||||
}else{
|
||||
} else {
|
||||
viewDriverMsgBoxList.setVisibility(View.GONE);
|
||||
viewDriverMsgBoxBubble.setVisibility(View.VISIBLE);
|
||||
viewDriverMsgBoxBubble.isShowData(true);
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
<com.mogo.eagle.core.function.view.MapBizView
|
||||
android:id="@+id/mapBizView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"/>
|
||||
android:layout_height="match_parent" />
|
||||
|
||||
<com.mogo.eagle.core.function.hmi.ui.setting.ToggleDebugViewTrigger
|
||||
android:layout_width="@dimen/dp_400"
|
||||
@@ -39,7 +39,7 @@
|
||||
<!--浓雾预警动画-->
|
||||
<com.mogo.eagle.core.function.hmi.ui.widget.V2XFogEventView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"/>
|
||||
android:layout_height="match_parent" />
|
||||
|
||||
<!--V2X预警红色边框-->
|
||||
<com.mogo.eagle.core.function.hmi.ui.widget.V2XWarningView
|
||||
@@ -309,24 +309,11 @@
|
||||
android:src="@drawable/bad_case_selector" />
|
||||
</RelativeLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/module_mogo_och_ai_collet_rl"
|
||||
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_selector"
|
||||
android:elevation="@dimen/dp_10"
|
||||
<com.mogo.eagle.core.function.hmi.ui.widget.RomaView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toRightOf="@id/module_mogo_och_badcase_rl">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="@dimen/dp_80"
|
||||
android:layout_height="@dimen/dp_80"
|
||||
android:layout_centerInParent="true"
|
||||
android:layout_gravity="center"
|
||||
android:src="@drawable/ai_collect_selector" />
|
||||
</RelativeLayout>
|
||||
app:layout_constraintLeft_toRightOf="@id/module_mogo_och_badcase_rl"/>
|
||||
|
||||
<com.mogo.och.bus.view.SlidePanelView
|
||||
android:id="@+id/module_mogo_och_slide_panel"
|
||||
@@ -414,7 +401,6 @@
|
||||
android:layout_marginBottom="30dp"
|
||||
android:visibility="visible"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
/>
|
||||
app:layout_constraintEnd_toEndOf="parent" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
@@ -14,11 +14,9 @@ import androidx.fragment.app.FragmentTransaction;
|
||||
|
||||
import com.mogo.commons.module.status.MogoStatusManager;
|
||||
import com.mogo.commons.mvp.MvpFragment;
|
||||
import com.mogo.eagle.core.data.config.FunctionBuildConfig;
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotStatusListener;
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager;
|
||||
import com.mogo.eagle.core.function.call.map.CallerMapUIServiceManager;
|
||||
import com.mogo.eagle.core.function.call.map.CallerVisualAngleManager;
|
||||
import com.mogo.eagle.core.function.hmi.ui.msgbox.PassengerMsgBoxBubbleView;
|
||||
import com.mogo.eagle.core.function.hmi.ui.msgbox.PassengerMsgBoxButtonView;
|
||||
import com.mogo.eagle.core.function.hmi.ui.msgbox.PassengerMsgBoxListView;
|
||||
@@ -52,7 +50,7 @@ import java.util.Objects;
|
||||
* @author tongchenfei
|
||||
*/
|
||||
public class TaxiPassengerBaseFragment extends MvpFragment<TaxiPassengerBaseFragment, BaseTaxiPassengerPresenter>
|
||||
implements IMogoMapListener, TaxiPassengerTaxiView, ITPClickStartAutopilotCallback{
|
||||
implements IMogoMapListener, TaxiPassengerTaxiView, ITPClickStartAutopilotCallback {
|
||||
|
||||
static final String TAG = "TaxiPassengerBaseFragment";
|
||||
|
||||
@@ -109,11 +107,11 @@ public class TaxiPassengerBaseFragment extends MvpFragment<TaxiPassengerBaseFrag
|
||||
viewPassengerMsgBoxBubble = findViewById(R.id.viewPassengerMsgBoxBubble);
|
||||
viewPassengerMsgBoxList = findViewById(R.id.viewPassengerMsgBoxList);
|
||||
viewPassengerMsgBoxButton.setClickListener(show -> {
|
||||
if(show){
|
||||
if (show) {
|
||||
viewPassengerMsgBoxList.setVisibility(View.VISIBLE);
|
||||
viewPassengerMsgBoxBubble.setVisibility(View.GONE);
|
||||
viewPassengerMsgBoxBubble.isShowData(false);
|
||||
}else{
|
||||
} else {
|
||||
viewPassengerMsgBoxList.setVisibility(View.GONE);
|
||||
viewPassengerMsgBoxBubble.setVisibility(View.VISIBLE);
|
||||
viewPassengerMsgBoxBubble.isShowData(true);
|
||||
@@ -146,18 +144,12 @@ public class TaxiPassengerBaseFragment extends MvpFragment<TaxiPassengerBaseFrag
|
||||
if (controller != null) {
|
||||
//切换地图的远近视图
|
||||
if (controller.getCurrentMapVisualAngle().isLongSight()) {
|
||||
CallerVisualAngleManager.INSTANCE.updateLongSightLevel(false);
|
||||
Objects.requireNonNull(CallerMapUIServiceManager.INSTANCE.getMapUIController()).setLockMode(true);
|
||||
controller.changeMapVisualAngle(VisualAngleMode.MODE_MEDIUM_SIGHT, null);
|
||||
mMapswitchBtn.setImageResource(R.drawable.taxi_p_switch_map_medium);
|
||||
} else if (controller.getCurrentMapVisualAngle().isMediumSight()) {
|
||||
CallerVisualAngleManager.INSTANCE.updateLongSightLevel(true);
|
||||
if (FunctionBuildConfig.isRomaMode) {
|
||||
controller.setRomaMode(1);
|
||||
} else {
|
||||
Objects.requireNonNull(CallerMapUIServiceManager.INSTANCE.getMapUIController()).setLockMode(false);
|
||||
controller.changeMapVisualAngle(VisualAngleMode.MODE_LONG_SIGHT, null);
|
||||
}
|
||||
Objects.requireNonNull(CallerMapUIServiceManager.INSTANCE.getMapUIController()).setLockMode(false);
|
||||
controller.changeMapVisualAngle(VisualAngleMode.MODE_LONG_SIGHT, null);
|
||||
mMapswitchBtn.setImageResource(R.drawable.taxi_p_switch_map_long);
|
||||
} else {
|
||||
controller.changeMapVisualAngle(VisualAngleMode.MODE_MEDIUM_SIGHT, null);
|
||||
@@ -167,7 +159,7 @@ public class TaxiPassengerBaseFragment extends MvpFragment<TaxiPassengerBaseFrag
|
||||
//OverlayLeftViewUtils.INSTANCE.dismissOverlayView();
|
||||
});
|
||||
findViewById(R.id.iv_temp).setOnClickListener(view -> {
|
||||
OverlayLeftViewUtils.INSTANCE.showOverlayView(getActivity(),0,true,-1,true);
|
||||
OverlayLeftViewUtils.INSTANCE.showOverlayView(getActivity(), 0, true, -1, true);
|
||||
//showOrHideArrivedEndLayout(true, "北京北京北京", "1527481606997577728");
|
||||
//showOrHidePressengerCheckPager(true, "开始站点开", "开始站点开始站点开始", "2", "京A888888", "18811539480");
|
||||
//OCHFloatWindowManager.getInstance().ShowFloatWindow(getContext());
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 12 KiB |
@@ -54,6 +54,15 @@
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent" />
|
||||
|
||||
<com.mogo.eagle.core.function.hmi.ui.widget.RomaPassengerView
|
||||
android:layout_width="100dp"
|
||||
android:layout_height="100dp"
|
||||
android:layout_marginStart="@dimen/dp_557"
|
||||
android:layout_marginBottom="50dp"
|
||||
android:background="@drawable/iv_roma_passenger_bg"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/module_och_taxi_swich_map_iv"
|
||||
android:layout_width="@dimen/module_mogo_och_operation_status_bg_width"
|
||||
@@ -177,7 +186,7 @@
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<com.mogo.och.taxi.passenger.ui.TaxiPassengerTrafficLightView
|
||||
<com.mogo.eagle.core.function.hmi.ui.widget.SingleTrafficLightView
|
||||
android:id="@+id/traffic_light_view"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="100dp"
|
||||
android:layout_height="100dp"
|
||||
android:background="@drawable/iv_roma_passenger_bg"
|
||||
tools:ignore="MissingDefaultResource">
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
@@ -25,7 +25,6 @@ import androidx.fragment.app.FragmentTransaction;
|
||||
import com.mogo.commons.mvp.IView;
|
||||
import com.mogo.commons.mvp.MvpFragment;
|
||||
import com.mogo.commons.mvp.Presenter;
|
||||
import com.mogo.eagle.core.data.config.FunctionBuildConfig;
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotRecordListener;
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotStatusListener;
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager;
|
||||
@@ -33,7 +32,6 @@ import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotRecordListener
|
||||
import com.mogo.eagle.core.function.call.devatools.CallerDevaToolsManager;
|
||||
import com.mogo.eagle.core.function.call.hmi.CallerHmiManager;
|
||||
import com.mogo.eagle.core.function.call.map.CallerMapUIServiceManager;
|
||||
import com.mogo.eagle.core.function.call.map.CallerVisualAngleManager;
|
||||
import com.mogo.eagle.core.function.hmi.ui.msgbox.DriverMsgBoxBubbleView;
|
||||
import com.mogo.eagle.core.function.hmi.ui.msgbox.DriverMsgBoxButtonView;
|
||||
import com.mogo.eagle.core.function.hmi.ui.msgbox.DriverMsgBoxListView;
|
||||
@@ -43,7 +41,6 @@ import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger;
|
||||
import com.mogo.eagle.core.utilcode.mogo.view.OnPreventFastClickListener;
|
||||
import com.mogo.eagle.core.utilcode.util.ToastUtils;
|
||||
import com.mogo.eagle.core.utilcode.util.UiThreadHandler;
|
||||
import com.mogo.map.MogoMapUIController;
|
||||
import com.mogo.map.listener.IMogoMapListener;
|
||||
import com.mogo.map.uicontroller.IMogoMapUIController;
|
||||
import com.mogo.map.uicontroller.VisualAngleMode;
|
||||
@@ -84,7 +81,6 @@ public abstract class BaseTaxiTabFragment<V extends IView, P extends Presenter<V
|
||||
private ImageView mCloseNaviIcon;
|
||||
protected RelativeLayout mSettingBtn;
|
||||
protected LinearLayout mBadcaseBtn;
|
||||
protected LinearLayout mAICollectBtn;
|
||||
//消息盒子
|
||||
protected DriverMsgBoxButtonView driverMsgBoxButtonView;
|
||||
protected DriverMsgBoxListView viewDriverMsgBoxList;
|
||||
@@ -197,18 +193,12 @@ public abstract class BaseTaxiTabFragment<V extends IView, P extends Presenter<V
|
||||
if (controller != null) {
|
||||
//切换地图的远近视图
|
||||
if (controller.getCurrentMapVisualAngle().isLongSight()) {
|
||||
CallerVisualAngleManager.INSTANCE.updateLongSightLevel(false);
|
||||
Objects.requireNonNull(CallerMapUIServiceManager.INSTANCE.getMapUIController()).setLockMode(true);
|
||||
controller.changeMapVisualAngle(VisualAngleMode.MODE_MEDIUM_SIGHT, null);
|
||||
mSwitchBtnIcon.setImageResource(R.drawable.taxi_switch_map_medium);
|
||||
} else if (controller.getCurrentMapVisualAngle().isMediumSight()) {
|
||||
CallerVisualAngleManager.INSTANCE.updateLongSightLevel(true);
|
||||
if (FunctionBuildConfig.isRomaMode) {
|
||||
controller.setRomaMode(1);
|
||||
} else {
|
||||
Objects.requireNonNull(CallerMapUIServiceManager.INSTANCE.getMapUIController()).setLockMode(false);
|
||||
controller.changeMapVisualAngle(VisualAngleMode.MODE_LONG_SIGHT, null);
|
||||
}
|
||||
Objects.requireNonNull(CallerMapUIServiceManager.INSTANCE.getMapUIController()).setLockMode(false);
|
||||
controller.changeMapVisualAngle(VisualAngleMode.MODE_LONG_SIGHT, null);
|
||||
mSwitchBtnIcon.setImageResource(R.drawable.taxi_switch_map_long);
|
||||
} else {
|
||||
mSwitchBtnIcon.setImageResource(R.drawable.taxi_switch_map_medium);
|
||||
@@ -233,11 +223,6 @@ public abstract class BaseTaxiTabFragment<V extends IView, P extends Presenter<V
|
||||
CallerAutopilotRecordListenerManager.INSTANCE.addListener(TAG, this);
|
||||
}
|
||||
|
||||
mAICollectBtn = findViewById(R.id.module_och_taxi_ai_collect_ll);
|
||||
if (mAICollectBtn != null) {
|
||||
CallerDevaToolsManager.INSTANCE.initAiCollect(mAICollectBtn);
|
||||
}
|
||||
|
||||
panelView = LayoutInflater.from(getContext()).inflate(getStationPanelViewId(), flStationPanelContainer);
|
||||
ctvAutopilotStatusRL.setOnClickListener(new OnPreventFastClickListener() {
|
||||
@Override
|
||||
@@ -298,12 +283,12 @@ public abstract class BaseTaxiTabFragment<V extends IView, P extends Presenter<V
|
||||
});
|
||||
|
||||
driverMsgBoxButtonView.setClickListener(show -> {
|
||||
if(show){
|
||||
if (show) {
|
||||
viewDriverMsgBoxList.setVisibility(View.VISIBLE);
|
||||
viewDriverMsgBoxList.notifyData();
|
||||
viewDriverMsgBoxBubble.setVisibility(View.GONE);
|
||||
viewDriverMsgBoxBubble.isShowData(false);
|
||||
}else{
|
||||
} else {
|
||||
viewDriverMsgBoxList.setVisibility(View.GONE);
|
||||
viewDriverMsgBoxBubble.setVisibility(View.VISIBLE);
|
||||
viewDriverMsgBoxBubble.isShowData(true);
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
<com.mogo.eagle.core.function.view.MapBizView
|
||||
android:id="@+id/mapBizView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"/>
|
||||
android:layout_height="match_parent" />
|
||||
|
||||
<com.mogo.eagle.core.function.hmi.ui.setting.ToggleDebugViewTrigger
|
||||
android:layout_width="@dimen/dp_400"
|
||||
@@ -21,36 +21,34 @@
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/module_mogo_och_speed_layout"
|
||||
android:layout_height="@dimen/taxi_tab_speed_width_height"
|
||||
android:layout_width="@dimen/taxi_tab_speed_width_height"
|
||||
android:layout_height="@dimen/taxi_tab_speed_width_height"
|
||||
android:layout_marginLeft="20dp"
|
||||
android:layout_marginTop="20dp"
|
||||
android:elevation="@dimen/dp_10"
|
||||
android:orientation="vertical"
|
||||
android:gravity="center_horizontal"
|
||||
android:background="@drawable/taxi_speed_bg"
|
||||
android:elevation="@dimen/dp_10"
|
||||
android:gravity="center_horizontal"
|
||||
android:orientation="vertical"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/module_mogo_och_speed_tv"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="32dp"
|
||||
android:paddingTop="6dp"
|
||||
android:textColor="#FFFFFF"
|
||||
android:id="@+id/module_mogo_och_speed_tv"
|
||||
android:text="0"
|
||||
android:textSize="74dp"
|
||||
/>
|
||||
android:textColor="#FFFFFF"
|
||||
android:textSize="74dp" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="-10dp"
|
||||
android:text="KM/H"
|
||||
android:textColor="#FFFFFF"
|
||||
android:layout_marginTop="-10dp"
|
||||
android:textSize="32dp"
|
||||
/>
|
||||
android:textSize="32dp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
@@ -58,8 +56,8 @@
|
||||
android:id="@+id/module_mogo_och_autopilot_status"
|
||||
android:layout_width="@dimen/taxi_tab_autoaploit_width"
|
||||
android:layout_height="@dimen/taxi_tab_autoaploit_height"
|
||||
android:layout_marginTop="20dp"
|
||||
android:layout_marginLeft="220dp"
|
||||
android:layout_marginTop="20dp"
|
||||
android:background="@drawable/taxi_autopilot_bg_selector"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
@@ -71,24 +69,24 @@
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/module_och_autopilot_iv"
|
||||
android:layout_marginTop="@dimen/dp_56"
|
||||
android:layout_width="@dimen/dp_65"
|
||||
android:layout_height="@dimen/dp_65"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:src="@drawable/taxi_ic_autopilot"
|
||||
/>
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginTop="@dimen/dp_56"
|
||||
android:src="@drawable/taxi_ic_autopilot" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/module_och_autopilot_tv"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="180dp"
|
||||
android:elevation="@dimen/dp_12"
|
||||
android:layout_below="@+id/module_och_autopilot_iv"
|
||||
android:layout_marginTop="@dimen/dp_10"
|
||||
android:elevation="@dimen/dp_12"
|
||||
android:gravity="center_horizontal"
|
||||
android:text="开启自动驾驶"
|
||||
android:textColor="@color/taxi_autopilot_text_color_normal"
|
||||
android:textSize="32dp"
|
||||
android:layout_below="@+id/module_och_autopilot_iv"
|
||||
tools:visibility="visible" />
|
||||
|
||||
</RelativeLayout>
|
||||
@@ -96,7 +94,7 @@
|
||||
<!--浓雾预警动画-->
|
||||
<com.mogo.eagle.core.function.hmi.ui.widget.V2XFogEventView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"/>
|
||||
android:layout_height="match_parent" />
|
||||
|
||||
<!--V2X预警红色边框-->
|
||||
<com.mogo.eagle.core.function.hmi.ui.widget.V2XWarningView
|
||||
@@ -111,11 +109,11 @@
|
||||
<com.mogo.eagle.core.function.hmi.ui.widget.VipIdentificationView
|
||||
android:layout_width="@dimen/module_vip_width"
|
||||
android:layout_height="@dimen/module_vip_height"
|
||||
android:visibility="gone"
|
||||
android:layout_marginStart="@dimen/dp_640"
|
||||
android:layout_marginTop="@dimen/dp_80"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"/>
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<!--pnc行为决策-->
|
||||
<com.mogo.eagle.core.function.hmi.ui.vehicle.PncActionsView
|
||||
@@ -161,7 +159,7 @@
|
||||
android:visibility="gone"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/ivCameraIcon"
|
||||
tools:visibility="visible"/>
|
||||
tools:visibility="visible" />
|
||||
|
||||
<!--消息盒子选择入口-->
|
||||
<com.mogo.eagle.core.function.hmi.ui.msgbox.DriverMsgBoxButtonView
|
||||
@@ -171,8 +169,7 @@
|
||||
android:layout_marginTop="15dp"
|
||||
android:layout_marginEnd="25dp"
|
||||
app:layout_constraintRight_toLeftOf="@id/viewLimitingVelocity"
|
||||
app:layout_constraintTop_toBottomOf="@+id/ivCameraIcon"
|
||||
/>
|
||||
app:layout_constraintTop_toBottomOf="@+id/ivCameraIcon" />
|
||||
<!--消息盒子打开视图-->
|
||||
<com.mogo.eagle.core.function.hmi.ui.msgbox.DriverMsgBoxListView
|
||||
android:id="@+id/viewDriverMsgBoxList"
|
||||
@@ -226,10 +223,10 @@
|
||||
android:id="@+id/module_mogo_och_station_panel_container"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="244dp"
|
||||
android:background="@android:color/transparent"
|
||||
app:layout_constraintLeft_toLeftOf="@+id/module_mogo_och_speed_layout"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
android:layout_marginTop="244dp"
|
||||
app:layout_goneMarginTop="@dimen/module_mogo_och_station_panel_container_margin_top_no_call"
|
||||
tools:visibility="visible" />
|
||||
|
||||
@@ -254,16 +251,17 @@
|
||||
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/taxi_driver_role_tv"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="@dimen/taxi_diver_role_size"
|
||||
android:textColor="@color/taxi_role_text_color"
|
||||
android:layout_marginLeft="@dimen/dp_20"
|
||||
android:layout_marginBottom="@dimen/dp_20"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"/>
|
||||
android:textColor="@color/taxi_role_text_color"
|
||||
android:textSize="@dimen/taxi_diver_role_size"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent" />
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/module_och_taxi_setting_layout"
|
||||
@@ -309,35 +307,24 @@
|
||||
android:layout_height="@dimen/module_mogo_och_operation_status_bg_height"
|
||||
android:layout_marginLeft="40dp"
|
||||
android:layout_marginBottom="@dimen/module_mogo_och_margin_bottom"
|
||||
android:elevation="@dimen/dp_10"
|
||||
android:background="@drawable/taxi_operation_status_bg_selector"
|
||||
android:elevation="@dimen/dp_10"
|
||||
android:gravity="center"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toRightOf="@id/module_och_taxi_swich_map_layout">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="@dimen/dp_80"
|
||||
android:layout_height="@dimen/dp_80"
|
||||
android:layout_gravity="center"
|
||||
android:background="@drawable/bad_case_selector"/>
|
||||
android:background="@drawable/bad_case_selector" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/module_och_taxi_ai_collect_ll"
|
||||
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="40dp"
|
||||
android:layout_marginBottom="@dimen/module_mogo_och_margin_bottom"
|
||||
android:elevation="@dimen/dp_10"
|
||||
android:gravity="center"
|
||||
android:background="@drawable/taxi_operation_status_bg_selector"
|
||||
<com.mogo.eagle.core.function.hmi.ui.widget.RomaView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toRightOf="@id/module_och_taxi_badcase_ll">
|
||||
<ImageView
|
||||
android:layout_width="@dimen/dp_80"
|
||||
android:layout_height="@dimen/dp_80"
|
||||
android:layout_gravity="center"
|
||||
android:background="@drawable/ai_collect_selector"/>
|
||||
</LinearLayout>
|
||||
app:layout_constraintLeft_toRightOf="@id/module_och_taxi_badcase_ll"/>
|
||||
|
||||
<Button
|
||||
android:id="@+id/btnAutopilotDisable"
|
||||
@@ -368,6 +355,7 @@
|
||||
android:visibility="gone"
|
||||
app:layout_constraintRight_toRightOf="@id/btnAutopilotDisable"
|
||||
app:layout_constraintTop_toBottomOf="@id/btnAutopilotEnable" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/btnAutopilotmanco"
|
||||
android:layout_width="wrap_content"
|
||||
@@ -385,24 +373,26 @@
|
||||
android:visibility="gone"
|
||||
app:constraint_referenced_ids="btnAutopilotDisable,btnAutopilotEnable,btnAutopilotRunning,btnAutopilotmanco"
|
||||
tools:visibility="gone" />
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/module_mogo_och_navi_panel_container"
|
||||
android:layout_width="600dp"
|
||||
android:layout_height="600dp"
|
||||
android:layout_marginRight="38dp"
|
||||
android:layout_marginBottom="38dp"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent" />
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/taxi_close_navi_icon"
|
||||
android:layout_width="@dimen/dp_80"
|
||||
android:layout_height="@dimen/dp_80"
|
||||
android:layout_marginBottom="534dp"
|
||||
android:layout_marginRight="532dp"
|
||||
android:layout_marginBottom="534dp"
|
||||
android:src="@drawable/taxi_close_navi_icon"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
android:src="@drawable/taxi_close_navi_icon"/>
|
||||
app:layout_constraintRight_toRightOf="parent" />
|
||||
|
||||
<com.mogo.eagle.core.function.smp.view.SmallMapView
|
||||
android:id="@+id/smallMapView"
|
||||
@@ -412,7 +402,6 @@
|
||||
android:layout_marginBottom="30dp"
|
||||
android:visibility="visible"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
/>
|
||||
app:layout_constraintEnd_toEndOf="parent" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
@@ -0,0 +1,28 @@
|
||||
package com.mogo.eagle.function.biz.v2x
|
||||
|
||||
import com.mogo.commons.debug.DebugConfig
|
||||
import com.mogo.eagle.core.data.deva.chain.ChainConstant
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_V2X
|
||||
import com.zhjt.service.chain.ChainLog
|
||||
import com.zhjt.service.chain.TracingConstants
|
||||
|
||||
class V2XBizTrace {
|
||||
|
||||
companion object {
|
||||
|
||||
@ChainLog(
|
||||
linkChainLog = ChainConstant.CHAIN_LINK_LOG_CLOUD_V2N,
|
||||
linkCode = ChainConstant.CHAIN_LINK_CLOUD,
|
||||
endpoint = TracingConstants.Endpoint.PAD,
|
||||
nodeAliasCode = ChainConstant.CHAIN_ALIAS_CODE_CLOUD_V2N,
|
||||
paramIndexes = [0, 1],
|
||||
clientPkFileName = "sn"
|
||||
)
|
||||
fun onAck(data: Any, data1: Any) {
|
||||
if (DebugConfig.isDebug()) {
|
||||
CallerLogger.d("$M_V2X${data.toString()}", data1)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2,9 +2,11 @@ package com.mogo.eagle.function.biz.v2x.v2n
|
||||
|
||||
import android.content.Context
|
||||
import android.content.Intent
|
||||
import android.os.Build
|
||||
import android.os.Handler
|
||||
import android.os.Looper
|
||||
import android.util.Log
|
||||
import androidx.annotation.RequiresApi
|
||||
import androidx.localbroadcastmanager.content.LocalBroadcastManager
|
||||
import com.mogo.eagle.core.data.autopilot.AutopilotStatusInfo
|
||||
import com.mogo.eagle.core.data.deva.chain.ChainConstant.Companion.CHAIN_ALIAS_CODE_CLOUD_V2N
|
||||
@@ -54,6 +56,7 @@ import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.Logger
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_V2X
|
||||
import com.mogo.eagle.core.utilcode.util.Utils
|
||||
import com.mogo.eagle.function.biz.v2x.V2XBizTrace
|
||||
import com.mogo.eagle.function.biz.v2x.v2n.network.callback.IV2XCallback
|
||||
import com.zhjt.service.chain.ChainLog
|
||||
import com.zhjt.service.chain.TracingConstants
|
||||
@@ -138,6 +141,7 @@ object V2XEventManager : IMoGoChassisLocationGCJ02Listener, IV2XCallback,
|
||||
v2XMessageEntity.type = V2XMessageEntity.V2XTypeEnum.ALERT_ROAD_WARNING
|
||||
v2XMessageEntity.content = v2XRoadEventEntity
|
||||
V2XScenarioManager.getInstance().handlerMessage(v2XMessageEntity)
|
||||
V2XBizTrace.onAck("巡航处理 handlerMessage v2XMessageEntity", " $v2XMessageEntity")
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -182,6 +186,7 @@ object V2XEventManager : IMoGoChassisLocationGCJ02Listener, IV2XCallback,
|
||||
}
|
||||
}
|
||||
|
||||
@RequiresApi(Build.VERSION_CODES.N)
|
||||
@ChainLog(
|
||||
linkChainLog = CHAIN_LINK_LOG_CLOUD_V2N,
|
||||
linkCode = CHAIN_LINK_CLOUD,
|
||||
@@ -212,7 +217,7 @@ object V2XEventManager : IMoGoChassisLocationGCJ02Listener, IV2XCallback,
|
||||
return
|
||||
}
|
||||
}
|
||||
Logger.d("$M_V2X$TAG", "poiType : $poiType , 触发道路事件")
|
||||
CallerLogger.d("$M_V2X$TAG", "poiType : $poiType , 触发道路事件")
|
||||
CallerHmiManager.warningV2X(poiType, tts, tts, null, ALERT_WARNING_TOP, isFromObu = false)
|
||||
}
|
||||
}
|
||||
@@ -327,13 +332,17 @@ object V2XEventManager : IMoGoChassisLocationGCJ02Listener, IV2XCallback,
|
||||
)
|
||||
)
|
||||
)
|
||||
CallerHmiManager.warningV2X(tempAppId.toString(), tempContent, tempTts, object : IMoGoWarningStatusListener {
|
||||
val change = changeVisualAngle
|
||||
override fun onShow() {
|
||||
if (change) {
|
||||
CallerVisualAngleManager.changeAngle(TooClose)
|
||||
CallerHmiManager.warningV2X(
|
||||
tempAppId.toString(),
|
||||
tempContent,
|
||||
tempTts,
|
||||
object : IMoGoWarningStatusListener {
|
||||
val change = changeVisualAngle
|
||||
override fun onShow() {
|
||||
if (change) {
|
||||
CallerVisualAngleManager.changeAngle(TooClose)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
override fun onDismiss() {
|
||||
if (change) {
|
||||
|
||||
@@ -8,20 +8,20 @@ import android.view.animation.DecelerateInterpolator
|
||||
import androidx.core.util.Pair
|
||||
import com.mogo.eagle.core.data.map.MogoLatLng
|
||||
import com.mogo.eagle.core.data.map.entity.V2XRoadEventEntity
|
||||
import com.mogo.eagle.core.function.call.autopilot.*
|
||||
import com.mogo.eagle.core.function.call.map.*
|
||||
import com.mogo.eagle.function.biz.v2x.v2n.scenario.scene.road.V2XAiRoadEventMarker
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.Logger
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationWGS84ListenerManager
|
||||
import com.mogo.eagle.core.function.call.map.CallerMapUIServiceManager
|
||||
import com.mogo.eagle.core.utilcode.util.CoordinateUtils
|
||||
import com.mogo.eagle.core.utilcode.util.DrivingDirectionUtils
|
||||
import com.mogo.eagle.function.biz.v2x.V2XBizTrace
|
||||
import com.mogo.eagle.function.biz.v2x.v2n.remove.MarkerRemoveManager
|
||||
import com.mogo.eagle.function.biz.v2x.v2n.remove.MarkerWrapper
|
||||
import com.mogo.eagle.function.biz.v2x.v2n.scenario.scene.road.V2XAiRoadEventMarker
|
||||
import com.mogo.map.MogoMap
|
||||
import com.mogo.map.overlay.IMogoPolyline
|
||||
import com.mogo.map.overlay.MogoPolylineOptions
|
||||
import java.util.*
|
||||
import java.util.concurrent.atomic.AtomicReference
|
||||
import java.util.concurrent.ConcurrentHashMap
|
||||
import com.mogo.eagle.function.biz.v2x.v2n.remove.MarkerRemoveManager
|
||||
import com.mogo.eagle.function.biz.v2x.v2n.remove.MarkerWrapper
|
||||
import com.mogo.eagle.core.utilcode.util.CoordinateUtils
|
||||
import java.util.concurrent.atomic.AtomicReference
|
||||
|
||||
/**
|
||||
* Ai云道路施工事件,道路颜色标记类
|
||||
@@ -81,29 +81,45 @@ class AiRoadMarker {
|
||||
}
|
||||
if (drawRoadLine) {
|
||||
//施工中心点前方的自车行驶方向上300米距离
|
||||
val l1 = MogoMap.getInstance().mogoMap.getCenterLineRangeInfo(marker.poi_lon, marker.poi_lat, location.heading.toFloat(), 300f)
|
||||
val l1 = MogoMap.getInstance().mogoMap.getCenterLineRangeInfo(
|
||||
marker.poi_lon,
|
||||
marker.poi_lat,
|
||||
location.heading.toFloat(),
|
||||
300f
|
||||
)
|
||||
//施工中心点后方的自车行驶方向上300米距离
|
||||
Logger.d(TAG, "--- marker --- 3 --- l1: $l1")
|
||||
val l2 = MogoMap.getInstance().mogoMap.getCenterLineRangeInfo(marker.poi_lon, marker.poi_lat, location.heading.toFloat(), -300f)
|
||||
V2XBizTrace.onAck("$TAG --- marker --- 3 --- l1:", l1)
|
||||
val l2 = MogoMap.getInstance().mogoMap.getCenterLineRangeInfo(
|
||||
marker.poi_lon,
|
||||
marker.poi_lat,
|
||||
location.heading.toFloat(),
|
||||
-300f
|
||||
)
|
||||
if (l1.points.isEmpty() || l2.points.isEmpty()) {
|
||||
Logger.d(TAG, "--- marker --- 3 --- return ----")
|
||||
V2XBizTrace.onAck("$TAG --- marker --- 3 --- return ----", "")
|
||||
return
|
||||
}
|
||||
Logger.d(TAG, "--- marker --- 4 --- l2: $l2")
|
||||
V2XBizTrace.onAck("$TAG --- marker --- 4 --- l2:", l2)
|
||||
val points = LinkedList<MogoLatLng>()
|
||||
if (l2 != null && l2.points.isNotEmpty()) {
|
||||
points.addAll(l2.points.reversed().map {
|
||||
MogoLatLng(it.second, it.first)
|
||||
})
|
||||
}
|
||||
val centerX= marker.poi_lon
|
||||
val centerX = marker.poi_lon
|
||||
val centerY = marker.poi_lat
|
||||
Logger.d(TAG, "--- marker --- 5 --- marker: $marker")
|
||||
V2XBizTrace.onAck("$TAG --- marker --- 5 --- marker:", marker)
|
||||
val farthestPoint = marker.polygon?.let {
|
||||
var find: Pair<Double, Double> = Pair(centerX, centerY)
|
||||
var min = Long.MAX_VALUE
|
||||
for (p in it) {
|
||||
val angle = DrivingDirectionUtils.getDegreeOfCar2Poi2(centerX, centerY, p.first, p.second, location.heading)
|
||||
val angle = DrivingDirectionUtils.getDegreeOfCar2Poi2(
|
||||
centerX,
|
||||
centerY,
|
||||
p.first,
|
||||
p.second,
|
||||
location.heading
|
||||
)
|
||||
if (angle < min) {
|
||||
min = angle
|
||||
find = p
|
||||
@@ -112,10 +128,17 @@ class AiRoadMarker {
|
||||
MogoLatLng(find.second, find.first)
|
||||
} ?: MogoLatLng(centerY, centerX)
|
||||
marker.farthestPoint = Pair(farthestPoint.lon, farthestPoint.lat)
|
||||
Logger.d(TAG, "--- marker --- 6 --- marker: $marker")
|
||||
V2XBizTrace.onAck("$TAG --- marker --- 6 --- marker:", marker)
|
||||
if (l1 != null && l1.points.isNotEmpty()) {
|
||||
for (l in l1.points) {
|
||||
if (DrivingDirectionUtils.getDegreeOfCar2Poi2(farthestPoint.lon, farthestPoint.lat, l.first, l.second, (location.heading + 180)) < 90L) {
|
||||
if (DrivingDirectionUtils.getDegreeOfCar2Poi2(
|
||||
farthestPoint.lon,
|
||||
farthestPoint.lat,
|
||||
l.first,
|
||||
l.second,
|
||||
(location.heading + 180)
|
||||
) < 90L
|
||||
) {
|
||||
points.add(l.let { MogoLatLng(it.second, it.first) })
|
||||
}
|
||||
}
|
||||
@@ -128,12 +151,16 @@ class AiRoadMarker {
|
||||
val total = points.size
|
||||
val colors = ArrayList<Int>()
|
||||
(0..total).forEach { i ->
|
||||
colors += evaluator.evaluate(interceptor.getInterpolation(i * 1f / total), START_COLOR, END_COLOR) as Int
|
||||
colors += evaluator.evaluate(
|
||||
interceptor.getInterpolation(i * 1f / total),
|
||||
START_COLOR,
|
||||
END_COLOR
|
||||
) as Int
|
||||
}
|
||||
var line = line.get()
|
||||
options.points(points)
|
||||
options.colorValues(colors)
|
||||
Logger.d(TAG, "--- marker --- 7 --- points: ${points.size}")
|
||||
V2XBizTrace.onAck("$TAG --- marker --- 7 --- points:", "${points.size}")
|
||||
if (line == null || line.isDestroyed) {
|
||||
val l = overlayManager?.addPolyline(options)
|
||||
this.line.set(l)
|
||||
@@ -156,9 +183,9 @@ class AiRoadMarker {
|
||||
|
||||
private fun removeLine() {
|
||||
val old = line.get()
|
||||
Logger.d(TAG, "--- removeRedLine --- 1 ---")
|
||||
V2XBizTrace.onAck("$TAG --- removeRedLine --- 1", "")
|
||||
if (old != null) {
|
||||
Logger.d(TAG, "--- removeRedLine --- 2 ---")
|
||||
V2XBizTrace.onAck("$TAG --- removeRedLine --- 2", "")
|
||||
line.set(null)
|
||||
old.isVisible = false
|
||||
old.remove()
|
||||
@@ -166,7 +193,7 @@ class AiRoadMarker {
|
||||
}
|
||||
|
||||
private fun unMarker(marker: Marker) {
|
||||
Logger.d(TAG, "--- unMarker ---")
|
||||
V2XBizTrace.onAck("$TAG --- unMarker ---", "")
|
||||
this.marker.set(null)
|
||||
removeLine()
|
||||
roadMarker.removeMarkers()
|
||||
@@ -175,12 +202,15 @@ class AiRoadMarker {
|
||||
}
|
||||
|
||||
fun receive() {
|
||||
Logger.d(TAG, "receive --- 1 ---")
|
||||
V2XBizTrace.onAck("$TAG --- receive --- 1 ---", "")
|
||||
val poi = this.marker.get()
|
||||
val car = CallerChassisLocationWGS84ListenerManager.getChassisLocationWGS84()
|
||||
if (poi != null) {
|
||||
val distance = CoordinateUtils.calculateLineDistance(car.longitude, car.latitude, poi.poi_lon, poi.poi_lat)
|
||||
Logger.d(TAG, "receive --- 2 ---:car:[${car.longitude}, ${car.latitude}] -> poi:[${poi.poi_lon}, ${poi.poi_lat}] --> distance:$distance")
|
||||
V2XBizTrace.onAck(
|
||||
"$TAG --- receive --- 2 ---",
|
||||
"car:[${car.longitude}, ${car.latitude}] -> poi:[${poi.poi_lon}, ${poi.poi_lat}] --> distance:$distance"
|
||||
)
|
||||
if (distance < 500) {
|
||||
checkExpired()
|
||||
} else {
|
||||
|
||||
@@ -1,11 +1,14 @@
|
||||
package com.mogo.eagle.function.biz.v2x.v2n.scenario.scene.road;
|
||||
|
||||
import android.util.Log;
|
||||
import static com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.M_V2X;
|
||||
|
||||
import androidx.core.util.Pair;
|
||||
import com.mogo.eagle.core.data.enums.EventTypeEnumNew;
|
||||
import com.mogo.eagle.core.data.map.entity.MarkerExploreWay;
|
||||
import com.mogo.eagle.core.data.map.entity.MarkerLocation;
|
||||
import com.mogo.eagle.core.data.map.entity.V2XRoadEventEntity;
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger;
|
||||
import com.mogo.eagle.function.biz.v2x.V2XBizTrace;
|
||||
import com.mogo.eagle.function.biz.v2x.v2n.bridge.BridgeApi;
|
||||
import com.mogo.eagle.function.biz.v2x.v2n.manager.IMoGoV2XMarkerManager;
|
||||
import com.mogo.eagle.function.biz.v2x.v2n.remove.MarkerWrapper;
|
||||
@@ -33,10 +36,10 @@ public class V2XRoadEventMarker implements IV2XMarker<V2XRoadEventEntity> {
|
||||
IMoGoV2XMarkerManager marker = BridgeApi.INSTANCE.v2xMarker();
|
||||
if (marker != null) {
|
||||
if (entity != null) {
|
||||
Log.d("RWJ", "V2XRoadEventMarker:" + entity.getPoiType());
|
||||
V2XBizTrace.Companion.onAck("V2XRoadEventMarker -> poiType : ", entity.getPoiType());
|
||||
if (isAiRoadEvent(entity.getPoiType())) {
|
||||
MarkerExploreWay noveltyInfo = entity.getNoveltyInfo();
|
||||
Log.d("RWJ", "V2XRoadEventMarker -> noveltyInfo:" + noveltyInfo);
|
||||
V2XBizTrace.Companion.onAck("V2XRoadEventMarker -> noveltyInfo : ",noveltyInfo.toString());
|
||||
if (noveltyInfo != null) {
|
||||
Pair<Double, Double> gpsLocation = noveltyInfo.getGpsLocation();
|
||||
List<Pair<Double, Double>> polygons = noveltyInfo.getPolygon();
|
||||
@@ -51,13 +54,13 @@ public class V2XRoadEventMarker implements IV2XMarker<V2XRoadEventEntity> {
|
||||
} else {
|
||||
IMogoMarker iMarker = marker.drawableAlarmPOI(BridgeApi.INSTANCE.context(), entity, null);
|
||||
if (iMarker != null) {
|
||||
Log.d("RWJ", "V2XRoadEventMarker:" + entity.getPoiType() + "--- add Marker");
|
||||
V2XBizTrace.Companion.onAck("V2XRoadEventMarker -> --- add Marker type: ", entity.getPoiType());
|
||||
ArrayList<IMogoMarker> markers = new ArrayList<>();
|
||||
markers.add(iMarker);
|
||||
String id = entity.getLocation().getLon() + "_" + entity.getLocation().getLat();
|
||||
MarkerRemoveManager.INSTANCE.addMarker(new MarkerWrapper(id, entity.getLocation().getLon(), entity.getLocation().getLat(), 0, markers, null, null));
|
||||
} else {
|
||||
Log.d("RWJ", "V2XRoadEventMarker:" + entity.getPoiType() + "--- return empty marker");
|
||||
CallerLogger.INSTANCE.d(M_V2X + "RWJ", "V2XRoadEventMarker:" + entity.getPoiType() + "--- return empty marker");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -29,6 +29,7 @@ import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_V2X
|
||||
import com.mogo.eagle.core.utilcode.util.ToastUtils
|
||||
import com.mogo.eagle.core.utilcode.util.UiThreadHandler
|
||||
import com.mogo.eagle.function.biz.v2x.V2XBizTrace
|
||||
import com.mogo.eagle.function.biz.v2x.trafficlight.core.MogoTrafficLightManager
|
||||
import com.mogo.eagle.function.biz.v2x.vip.network.VipNetWorkModel
|
||||
import com.zhjt.service_biz.BizConfig
|
||||
@@ -110,6 +111,7 @@ class VipCarManager : IMogoOnMessageListener<VipMessage>, IMoGoTrafficLightListe
|
||||
|
||||
if (exit) {
|
||||
CallerLogger.d("$M_V2X$TAG", "驶离路口,返回 , then resetConditions")
|
||||
V2XBizTrace.onAck("驶离路口","resetConditions")
|
||||
resetConditions()
|
||||
exit = false
|
||||
return
|
||||
@@ -120,7 +122,7 @@ class VipCarManager : IMogoOnMessageListener<VipMessage>, IMoGoTrafficLightListe
|
||||
"$M_V2X$TAG",
|
||||
"vip 获取到灯态,但没找到对应车道数据 trafficLightResult : $trafficLightResult , then resetConditions"
|
||||
)
|
||||
resetConditions()
|
||||
result = null
|
||||
return
|
||||
}
|
||||
|
||||
@@ -155,6 +157,7 @@ class VipCarManager : IMogoOnMessageListener<VipMessage>, IMoGoTrafficLightListe
|
||||
MSG_WHAT_VIP_CANCEL,
|
||||
cancelDelayTime - System.currentTimeMillis()
|
||||
)
|
||||
V2XBizTrace.onAck("setVip","time:$cancelDelayTime")
|
||||
CallVipSetListenerManager.invokeVipSetStatus(true)
|
||||
CallerTrafficLightListenerManager.addListener(TAG, this)
|
||||
}
|
||||
@@ -164,6 +167,7 @@ class VipCarManager : IMogoOnMessageListener<VipMessage>, IMoGoTrafficLightListe
|
||||
if (handler.hasMessages(MSG_WHAT_VIP_CANCEL)) {
|
||||
handler.removeMessages(MSG_WHAT_VIP_CANCEL)
|
||||
}
|
||||
V2XBizTrace.onAck("cancelVip","resetConditions")
|
||||
resetConditions()
|
||||
CallVipSetListenerManager.invokeVipSetStatus(false)
|
||||
CallerTrafficLightListenerManager.removeListener(TAG)
|
||||
@@ -192,7 +196,7 @@ class VipCarManager : IMogoOnMessageListener<VipMessage>, IMoGoTrafficLightListe
|
||||
}
|
||||
}
|
||||
|
||||
fun turnLight(controlTime: Int) {
|
||||
private fun turnLight(controlTime: Int) {
|
||||
if (result == null || mContext == null) return
|
||||
val mogoLocation = CallerChassisLocationWGS84ListenerManager.getChassisLocationWGS84()
|
||||
if (mogoLocation != null) {
|
||||
@@ -202,6 +206,14 @@ class VipCarManager : IMogoOnMessageListener<VipMessage>, IMoGoTrafficLightListe
|
||||
result!!.lightId, result!!.crossId, bearing, controlTime,
|
||||
// 100445, "10037", 90.0, controlTime, //衡阳25号路口测试数据
|
||||
{
|
||||
V2XBizTrace.onAck(
|
||||
TAG + "turnLight", "code:${it.code}" +
|
||||
",light:${this.result ?: ""}" +
|
||||
",lightId:${result?.lightId}" +
|
||||
",crossId:${result?.crossId}" +
|
||||
",bearing:$bearing" +
|
||||
",controlTime:$controlTime"
|
||||
)
|
||||
// 请求变灯成功,直接提示
|
||||
if (it.sn == MoGoAiCloudClientConfig.getInstance().sn && it.code == 0) {
|
||||
CallerLogger.d("$M_V2X$TAG", "变灯请求成功")
|
||||
@@ -222,42 +234,39 @@ class VipCarManager : IMogoOnMessageListener<VipMessage>, IMoGoTrafficLightListe
|
||||
return@turnLightToGreen
|
||||
}
|
||||
|
||||
// 请求变灯失败,根据灯态来提示。 此处灯态未获取到
|
||||
if (this.result == null || this.result?.currentRoadTrafficLight() == null) {
|
||||
showWarning(
|
||||
EventTypeEnumNew.TYPE_VIP_ERROR_IDENTIFICATION.poiType,
|
||||
EventTypeEnumNew.TYPE_VIP_ERROR_IDENTIFICATION.content + ", 稍后重试",
|
||||
EventTypeEnumNew.TYPE_VIP_ERROR_IDENTIFICATION.tts
|
||||
)
|
||||
return@turnLightToGreen
|
||||
}
|
||||
|
||||
// 如果当前为红灯,则提示
|
||||
if (this.result!!.currentRoadTrafficLight()!!.isRed()) {
|
||||
val time = if (it.countDown / 60 >= 1) {
|
||||
"${it.countDown / 60}分${it.countDown % 60}秒后重试"
|
||||
} else {
|
||||
val temp = if (it.countDown == 0) {
|
||||
1
|
||||
} else {
|
||||
it.countDown
|
||||
}
|
||||
"${temp}秒后重试"
|
||||
}
|
||||
showWarning(
|
||||
EventTypeEnumNew.TYPE_VIP_ERROR_IDENTIFICATION.poiType,
|
||||
EventTypeEnumNew.TYPE_VIP_ERROR_IDENTIFICATION.content + time,
|
||||
EventTypeEnumNew.TYPE_VIP_ERROR_IDENTIFICATION.tts
|
||||
)
|
||||
} else {
|
||||
CallerLogger.d(
|
||||
"$M_V2X$TAG",
|
||||
"变灯请求失败,当前为非红灯不做展示 , light : ${result.toString()} , trafficLightControl : $it"
|
||||
)
|
||||
}
|
||||
// // 如果当前为红灯,则提示
|
||||
// if (this.result!!.currentRoadTrafficLight()!!.isRed()) {
|
||||
// val time = if (it.countDown / 60 >= 1) {
|
||||
// "${it.countDown / 60}分${it.countDown % 60}秒后重试"
|
||||
// } else {
|
||||
// val temp = if (it.countDown == 0) {
|
||||
// 1
|
||||
// } else {
|
||||
// it.countDown
|
||||
// }
|
||||
// "${temp}秒后重试"
|
||||
// }
|
||||
// showWarning(
|
||||
// EventTypeEnumNew.TYPE_VIP_ERROR_IDENTIFICATION.poiType,
|
||||
// EventTypeEnumNew.TYPE_VIP_ERROR_IDENTIFICATION.content + time,
|
||||
// EventTypeEnumNew.TYPE_VIP_ERROR_IDENTIFICATION.tts
|
||||
// )
|
||||
// } else {
|
||||
// CallerLogger.d(
|
||||
// "$M_V2X$TAG",
|
||||
// "变灯请求失败,当前为非红灯不做展示 , light : ${result.toString()} , trafficLightControl : $it"
|
||||
// )
|
||||
// }
|
||||
},
|
||||
{ errorMsg ->
|
||||
CallerLogger.e("$M_V2X$TAG", "变灯请求失败 msg : $errorMsg")
|
||||
V2XBizTrace.onAck(
|
||||
TAG + "turnLight", "变灯请求失败 msg:$errorMsg" +
|
||||
",lightId:${result?.lightId}" +
|
||||
",crossId:${result?.crossId}" +
|
||||
",bearing:$bearing" +
|
||||
",controlTime:$controlTime"
|
||||
)
|
||||
ToastUtils.showLong("服务异常,请稍后重试")
|
||||
})
|
||||
}
|
||||
|
||||
@@ -5,16 +5,21 @@ import androidx.lifecycle.lifecycleScope
|
||||
import com.google.protobuf.TextFormat
|
||||
import com.mogo.cloud.passport.MoGoAiCloudClientConfig
|
||||
import com.mogo.eagle.core.data.app.AppConfigInfo
|
||||
import com.mogo.eagle.core.data.biz.trafficlight.TrafficLightResult
|
||||
import com.mogo.eagle.core.data.config.FunctionBuildConfig
|
||||
import com.mogo.eagle.core.data.deva.chain.ChainConstant
|
||||
import com.mogo.eagle.core.data.deva.chain.ChainConstant.Companion.CHAIN_LINK_LOG_CONNECT_STATUS
|
||||
import com.mogo.eagle.core.data.multidisplay.TelematicConstant
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotControlManager
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotControlManager.setDemoMode
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotControlManager.setIgnoreConditionDraw
|
||||
import com.mogo.eagle.core.function.call.devatools.CallerDevaToolsManager
|
||||
import com.mogo.eagle.core.function.call.telematic.CallerTelematicListenerManager
|
||||
import com.mogo.eagle.core.function.call.v2x.CallerTrafficLightListenerManager
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.*
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant
|
||||
import com.mogo.eagle.core.utilcode.util.GsonUtils
|
||||
import com.mogo.eagle.core.utilcode.util.ThreadUtils
|
||||
import com.mogo.eagle.core.utilcode.util.ToastUtils
|
||||
import com.mogo.telematic.MogoProtocolMsg
|
||||
import com.mogo.telematic.NSDNettyManager
|
||||
@@ -31,7 +36,6 @@ import mogo.telematics.pad.MessagePad
|
||||
class TeleMsgHandler : IMsgHandler {
|
||||
|
||||
companion object{
|
||||
private const val BUSINESS_STRING = 100
|
||||
private const val TAG = "TeleMsgHandler"
|
||||
}
|
||||
|
||||
@@ -126,8 +130,22 @@ class TeleMsgHandler : IMsgHandler {
|
||||
}
|
||||
}
|
||||
}
|
||||
BUSINESS_STRING -> {
|
||||
CallerTelematicListenerManager.invokeReceivedMsg(BUSINESS_STRING, it.body)
|
||||
TelematicConstant.BUSINESS_STRING -> {
|
||||
CallerTelematicListenerManager.invokeReceivedMsg(TelematicConstant.BUSINESS_STRING, it.body)
|
||||
}
|
||||
TelematicConstant.SHOW_TRAFFIC_LIGHT -> {
|
||||
val trafficLightJson = String(it.body)
|
||||
CallerTrafficLightListenerManager.invokeTrafficLightStatus(GsonUtils.fromJson(trafficLightJson, TrafficLightResult::class.java))
|
||||
}
|
||||
TelematicConstant.HIDE_TRAFFIC_LIGHT -> {
|
||||
ThreadUtils.runOnUiThread {
|
||||
CallerTrafficLightListenerManager.invokeEnterCrossRoad(false)
|
||||
}
|
||||
}
|
||||
TelematicConstant.OPEN_ROMA_STATUS -> {
|
||||
ThreadUtils.runOnUiThread {
|
||||
CallerTelematicListenerManager.invokeReceivedMsg(TelematicConstant.OPEN_ROMA_STATUS,it.body)
|
||||
}
|
||||
}
|
||||
else -> {
|
||||
}
|
||||
@@ -173,8 +191,13 @@ class TeleMsgHandler : IMsgHandler {
|
||||
invokeNettyConnResult("司机屏SN未获取到,不发送给乘客屏")
|
||||
}
|
||||
}
|
||||
BUSINESS_STRING -> {
|
||||
CallerTelematicListenerManager.invokeReceivedMsg(BUSINESS_STRING, it.body)
|
||||
TelematicConstant.BUSINESS_STRING -> {
|
||||
CallerTelematicListenerManager.invokeReceivedMsg(TelematicConstant.BUSINESS_STRING, it.body)
|
||||
}
|
||||
TelematicConstant.OPEN_ROMA_STATUS -> {
|
||||
ThreadUtils.runOnUiThread {
|
||||
CallerTelematicListenerManager.invokeReceivedMsg(TelematicConstant.OPEN_ROMA_STATUS,it.body)
|
||||
}
|
||||
}
|
||||
else -> {
|
||||
}
|
||||
|
||||
@@ -3,12 +3,17 @@ package com.mogo.eagle.core.function.datacenter.v2x
|
||||
import android.content.Context
|
||||
import android.os.Handler
|
||||
import com.mogo.eagle.core.data.biz.trafficlight.*
|
||||
import com.mogo.eagle.core.data.config.FunctionBuildConfig
|
||||
import com.mogo.eagle.core.data.enums.DataSourceType
|
||||
import com.mogo.eagle.core.data.enums.TrafficLightEnum
|
||||
import com.mogo.eagle.core.data.multidisplay.TelematicConstant
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotIdentifyListener
|
||||
import com.mogo.eagle.core.function.api.datacenter.union.IMoGoTrafficLightListener
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotIdentifyListenerManager
|
||||
import com.mogo.eagle.core.function.call.telematic.CallerTelematicManager
|
||||
import com.mogo.eagle.core.function.call.v2x.CallerTrafficLightListenerManager
|
||||
import com.mogo.eagle.core.utilcode.mogo.AppIdentityModeUtils
|
||||
import com.mogo.eagle.core.utilcode.util.GsonUtils
|
||||
import perception.TrafficLightOuterClass
|
||||
import perception.TrafficLightOuterClass.TrafficLight
|
||||
|
||||
@@ -85,7 +90,7 @@ class TrafficLightDispatcher : IMoGoAutopilotIdentifyListener, IMoGoTrafficLight
|
||||
}
|
||||
if (light == null) {
|
||||
//隐藏红绿灯显示
|
||||
CallerTrafficLightListenerManager.disableTrafficLight()
|
||||
hide()
|
||||
} else {
|
||||
onTrafficLightPlusSource(light.convert(), 0, DataSourceType.TELEMATIC)
|
||||
}
|
||||
@@ -101,6 +106,9 @@ class TrafficLightDispatcher : IMoGoAutopilotIdentifyListener, IMoGoTrafficLight
|
||||
if (!hasObuLightStatus) {
|
||||
hasAiLightStatus = true
|
||||
updateTrafficLight(trafficLightResult)
|
||||
if (AppIdentityModeUtils.isDriver(FunctionBuildConfig.appIdentityMode)) {
|
||||
CallerTelematicManager.sendMsgToAllClients(TelematicConstant.SHOW_TRAFFIC_LIGHT, GsonUtils.toJson(trafficLightResult).toByteArray())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -116,6 +124,9 @@ class TrafficLightDispatcher : IMoGoAutopilotIdentifyListener, IMoGoTrafficLight
|
||||
}, 5000)
|
||||
//如果没有OBU灯态则进行隐藏,如果有OBU灯态,则交由OBU管理
|
||||
CallerTrafficLightListenerManager.resetTrafficLightStatus(!hasObuLightStatus)
|
||||
if(!hasObuLightStatus){
|
||||
hide()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -125,6 +136,9 @@ class TrafficLightDispatcher : IMoGoAutopilotIdentifyListener, IMoGoTrafficLight
|
||||
override fun onTrafficRequestError() {
|
||||
hasAiLightStatus = false
|
||||
CallerTrafficLightListenerManager.resetTrafficLightStatus(!hasObuLightStatus)
|
||||
if(!hasObuLightStatus){
|
||||
hide()
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -132,6 +146,14 @@ class TrafficLightDispatcher : IMoGoAutopilotIdentifyListener, IMoGoTrafficLight
|
||||
*/
|
||||
override fun onObuTrafficLightDisapper() {
|
||||
hasObuLightStatus = false
|
||||
hide()
|
||||
}
|
||||
|
||||
private fun hide(){
|
||||
CallerTrafficLightListenerManager.disableTrafficLight()
|
||||
if (AppIdentityModeUtils.isDriver(FunctionBuildConfig.appIdentityMode)) {
|
||||
CallerTelematicManager.sendMsgToAllClients(TelematicConstant.HIDE_TRAFFIC_LIGHT, "0".toByteArray())
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -167,6 +189,9 @@ class TrafficLightDispatcher : IMoGoAutopilotIdentifyListener, IMoGoTrafficLight
|
||||
TrafficLightEnum.BLACK -> {
|
||||
CallerTrafficLightListenerManager.disableTrafficLightCountDown()
|
||||
}
|
||||
else -> {
|
||||
hide()
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -69,6 +69,8 @@ class TraceManager : IMoGoCloudListener, IMoGoAutopilotCarConfigListener {
|
||||
FwBuild(true, -1, pkgName + ChainConstant.CHAIN_LINK_LOG_RECORD_NATIVE_LEAK)
|
||||
fwBuildMap[ChainConstant.CHAIN_LINK_LOG_CLOUD_V2N] =
|
||||
FwBuild(true, -1, pkgName + ChainConstant.CHAIN_LINK_LOG_CLOUD_WEB_SOCKET_V2N)
|
||||
fwBuildMap[ChainConstant.CHAIN_LINK_LOG_HD_MAP] =
|
||||
FwBuild(true, -1, pkgName + ChainConstant.CHAIN_LINK_LOG_HD_MAP_BIZ)
|
||||
|
||||
|
||||
traceInfoCache[ChainConstant.CHAIN_LINK_LOG_CONNECT_STATUS] =
|
||||
@@ -93,6 +95,8 @@ class TraceManager : IMoGoCloudListener, IMoGoAutopilotCarConfigListener {
|
||||
ChainLogParam(true, "Native Leak Record")
|
||||
traceInfoCache[ChainConstant.CHAIN_LINK_LOG_CLOUD_V2N] =
|
||||
ChainLogParam(true, "Cloud WebSocket V2N")
|
||||
traceInfoCache[ChainConstant.CHAIN_LINK_LOG_HD_MAP] =
|
||||
ChainLogParam(true, "HD Map Caller")
|
||||
|
||||
FileWriteManager.getInstance()
|
||||
.init(context, MoGoAiCloudClientConfig.getInstance().sn, pkgName, fwBuildMap)
|
||||
|
||||
@@ -671,18 +671,6 @@ internal class DebugSettingView @JvmOverloads constructor(
|
||||
FunctionBuildConfig.isBeautyMode = isChecked
|
||||
}
|
||||
|
||||
tbDrawAiCloudFusion.isChecked = FunctionBuildConfig.isDrawAiCloudFusion
|
||||
//云端感知绘制
|
||||
tbDrawAiCloudFusion.setOnCheckedChangeListener { _, isChecked ->
|
||||
FunctionBuildConfig.isDrawAiCloudFusion = isChecked
|
||||
}
|
||||
|
||||
tbDrawRomaMode.isChecked = FunctionBuildConfig.isRomaMode
|
||||
//roma
|
||||
tbDrawRomaMode.setOnCheckedChangeListener { _, isChecked ->
|
||||
FunctionBuildConfig.isRomaMode = isChecked
|
||||
}
|
||||
|
||||
tbObuWarningFusionUnion.isChecked = FunctionBuildConfig.isObuWarningFusionUnion
|
||||
//ObuWarningFusionUnion
|
||||
tbObuWarningFusionUnion.setOnCheckedChangeListener { _, isChecked ->
|
||||
|
||||
@@ -48,7 +48,7 @@ class BrakeViewStatus @JvmOverloads constructor(
|
||||
if (brakeLight == 1) { //刹车灯亮
|
||||
if (!isBrake) {
|
||||
isBrake = true
|
||||
CallerMapUIServiceManager.getMapUIController()?.setCarLightsType(0, 500)
|
||||
CallerMapUIServiceManager.getMapUIController()?.setCarLightsType(4, 500)
|
||||
GlobalScope.launch(Dispatchers.Main) {
|
||||
var appearAnimation = AlphaAnimation(0f, 1f)
|
||||
appearAnimation.duration = 300
|
||||
@@ -63,7 +63,7 @@ class BrakeViewStatus @JvmOverloads constructor(
|
||||
} else { //不踩刹车,就消失
|
||||
if (isBrake) {
|
||||
isBrake = false
|
||||
CallerMapUIServiceManager.getMapUIController()?.setCarLightsType(3, 500)
|
||||
CallerMapUIServiceManager.getMapUIController()?.setCarLightsType(0, 500)
|
||||
GlobalScope.launch(Dispatchers.Main) {
|
||||
// scaleImageAndTv()
|
||||
var disappearAnimation = AlphaAnimation(1f, 0f)
|
||||
|
||||
@@ -0,0 +1,59 @@
|
||||
package com.mogo.eagle.core.function.hmi.ui.widget
|
||||
|
||||
import android.content.Context
|
||||
import android.util.AttributeSet
|
||||
import android.view.LayoutInflater
|
||||
import androidx.constraintlayout.widget.ConstraintLayout
|
||||
import com.mogo.eagle.core.data.multidisplay.TelematicConstant
|
||||
import com.mogo.eagle.core.function.api.telematic.IReceivedMsgListener
|
||||
import com.mogo.eagle.core.function.call.map.CallerMapIdentifyManager.romaTrigger
|
||||
import com.mogo.eagle.core.function.call.telematic.CallerTelematicListenerManager
|
||||
import com.mogo.eagle.core.function.hmi.R
|
||||
|
||||
class RomaPassengerView @JvmOverloads constructor(
|
||||
context: Context,
|
||||
attrs: AttributeSet? = null,
|
||||
defStyleAttr: Int = 0
|
||||
) : ConstraintLayout(context, attrs, defStyleAttr), IReceivedMsgListener {
|
||||
|
||||
companion object {
|
||||
private const val TAG = "RomaPassengerView"
|
||||
}
|
||||
|
||||
@Volatile
|
||||
private var romaMode = false
|
||||
|
||||
init {
|
||||
LayoutInflater.from(context).inflate(R.layout.view_roma_passenger_bg, this, true)
|
||||
setOnClickListener {
|
||||
romaMode = !romaMode
|
||||
romaTrigger(romaMode)
|
||||
}
|
||||
}
|
||||
|
||||
override fun onAttachedToWindow() {
|
||||
super.onAttachedToWindow()
|
||||
CallerTelematicListenerManager.addListener(TAG, this)
|
||||
}
|
||||
|
||||
override fun onReceivedMsg(type: Int, byteArray: ByteArray) {
|
||||
when (type) {
|
||||
TelematicConstant.OPEN_ROMA_STATUS -> {
|
||||
when (String(byteArray)) {
|
||||
"0" -> {
|
||||
romaMode = true
|
||||
}
|
||||
"1" -> {
|
||||
romaMode = false
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
override fun onDetachedFromWindow() {
|
||||
super.onDetachedFromWindow()
|
||||
CallerTelematicListenerManager.removeListener(TAG)
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,66 @@
|
||||
package com.mogo.eagle.core.function.hmi.ui.widget
|
||||
|
||||
import android.content.Context
|
||||
import android.util.AttributeSet
|
||||
import android.view.LayoutInflater
|
||||
import androidx.constraintlayout.widget.ConstraintLayout
|
||||
import com.mogo.eagle.core.data.multidisplay.TelematicConstant
|
||||
import com.mogo.eagle.core.function.api.telematic.IReceivedMsgListener
|
||||
import com.mogo.eagle.core.function.call.map.CallerMapIdentifyManager.romaTrigger
|
||||
import com.mogo.eagle.core.function.call.telematic.CallerTelematicListenerManager
|
||||
import com.mogo.eagle.core.function.hmi.R
|
||||
import kotlinx.android.synthetic.main.view_roma_bg.view.*
|
||||
|
||||
class RomaView @JvmOverloads constructor(
|
||||
context: Context,
|
||||
attrs: AttributeSet? = null,
|
||||
defStyleAttr: Int = 0
|
||||
) : ConstraintLayout(context, attrs, defStyleAttr), IReceivedMsgListener {
|
||||
|
||||
companion object{
|
||||
private const val TAG = "RomaView"
|
||||
}
|
||||
|
||||
@Volatile
|
||||
private var romaMode = false
|
||||
|
||||
init {
|
||||
LayoutInflater.from(context).inflate(R.layout.view_roma_bg, this, true)
|
||||
setOnClickListener {
|
||||
romaMode = !romaMode
|
||||
romaTrigger(romaMode)
|
||||
}
|
||||
}
|
||||
|
||||
override fun onAttachedToWindow() {
|
||||
super.onAttachedToWindow()
|
||||
CallerTelematicListenerManager.addListener(TAG,this)
|
||||
}
|
||||
|
||||
override fun onReceivedMsg(type: Int, byteArray: ByteArray) {
|
||||
when(type){
|
||||
TelematicConstant.OPEN_ROMA_STATUS -> {
|
||||
when (String(byteArray)) {
|
||||
// 乘客端开启漫游
|
||||
"3" -> {
|
||||
romaMode = true
|
||||
ll_roma_bg.setBackgroundResource(R.drawable.romabg_press_select_bg)
|
||||
ivRomaView.setBackgroundResource(R.drawable.roma_press_select_bg)
|
||||
}
|
||||
// 乘客端关闭漫游
|
||||
"4" -> {
|
||||
romaMode = false
|
||||
ll_roma_bg.setBackgroundResource(R.drawable.roma_bg_selector)
|
||||
ivRomaView.setBackgroundResource(R.drawable.romafront_select_bg)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
override fun onDetachedFromWindow() {
|
||||
super.onDetachedFromWindow()
|
||||
CallerTelematicListenerManager.removeListener(TAG)
|
||||
}
|
||||
|
||||
}
|
||||
@@ -93,29 +93,25 @@ class SingleTrafficLightView @JvmOverloads constructor(
|
||||
super.disableTrafficLightCountDown()
|
||||
UiThreadHandler.post {
|
||||
// 小巴车的司机端需要展示红绿灯信号来源
|
||||
if (AppIdentityModeUtils.isDriver(FunctionBuildConfig.appIdentityMode)
|
||||
&& AppIdentityModeUtils.isBus(FunctionBuildConfig.appIdentityMode)
|
||||
) {
|
||||
// if(AppIdentityModeUtils.isDriver(FunctionBuildConfig.appIdentityMode)
|
||||
// && AppIdentityModeUtils.isBus(FunctionBuildConfig.appIdentityMode)){
|
||||
val lp = this.layoutParams as MarginLayoutParams
|
||||
lp.width = context.resources.getDimension(R.dimen.dp_325).toInt()
|
||||
this.layoutParams = lp
|
||||
mLightSourceTV!!.visibility = VISIBLE
|
||||
mLightSourceDivider!!.visibility = VISIBLE
|
||||
mLightTimeTV!!.visibility = GONE
|
||||
mLightSourceTV!!.setPadding(0, 0, 75, 0)
|
||||
mLightIconBG!!.layoutParams.width =
|
||||
context.resources.getDimension(R.dimen.dp_310).toInt()
|
||||
} else {
|
||||
val lp = this.layoutParams as MarginLayoutParams
|
||||
lp.width =
|
||||
context.resources.getDimension(R.dimen.hmi_traffic_light_icon_size).toInt()
|
||||
this.layoutParams = lp
|
||||
mLightTimeTV!!.visibility = GONE
|
||||
mLightSourceDivider!!.visibility = View.GONE
|
||||
mLightSourceTV!!.visibility = View.GONE
|
||||
mLightIconBG!!.layoutParams.width =
|
||||
context.resources.getDimension(R.dimen.dp_124).toInt()
|
||||
}
|
||||
mLightSourceTV!!.setPadding(0,0,75,0)
|
||||
mLightIconBG!!.layoutParams.width = context.resources.getDimension(R.dimen.dp_310).toInt()
|
||||
// }else{
|
||||
// val lp = this.layoutParams as MarginLayoutParams
|
||||
// lp.width = context.resources.getDimension(R.dimen.hmi_traffic_light_icon_size).toInt()
|
||||
// this.layoutParams = lp
|
||||
// mLightTimeTV!!.visibility = GONE
|
||||
// mLightSourceDivider!!.visibility = View.GONE
|
||||
// mLightSourceTV!!.visibility = View.GONE
|
||||
// mLightIconBG!!.layoutParams.width = context.resources.getDimension(R.dimen.dp_124).toInt()
|
||||
// }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -201,7 +197,7 @@ class SingleTrafficLightView @JvmOverloads constructor(
|
||||
* 更新红绿灯icon
|
||||
*
|
||||
* @param lightId 0-都是默认,1-红,2-黄,3-绿
|
||||
* @param lightSource 1:云端下发;2:自车感知
|
||||
* @param lightSource 1:云端下发;2:自车感知; 3:OBU
|
||||
*/
|
||||
private fun updateTrafficLightIcon(lightId: TrafficLightEnum, lightSource: DataSourceType) {
|
||||
UiThreadHandler.post {
|
||||
@@ -237,32 +233,27 @@ class SingleTrafficLightView @JvmOverloads constructor(
|
||||
}
|
||||
}
|
||||
|
||||
private fun resetView() {
|
||||
// 小巴车的司机端需要展示红绿灯信号来源
|
||||
if (AppIdentityModeUtils.isDriver(FunctionBuildConfig.appIdentityMode)
|
||||
&& AppIdentityModeUtils.isBus(FunctionBuildConfig.appIdentityMode)
|
||||
) {
|
||||
private fun resetView(){
|
||||
// 小巴车的司机端需要展示红绿灯信号来源 ,由于需要知道来源,这里不在限制
|
||||
// if(AppIdentityModeUtils.isDriver(FunctionBuildConfig.appIdentityMode)
|
||||
// && AppIdentityModeUtils.isBus(FunctionBuildConfig.appIdentityMode)){
|
||||
val lp = this.layoutParams as MarginLayoutParams
|
||||
lp.width =
|
||||
context.resources.getDimension(R.dimen.hmi_traffic_light_bus_layout_width).toInt()
|
||||
lp.width = context.resources.getDimension(R.dimen.hmi_traffic_light_bus_layout_width).toInt()
|
||||
this.layoutParams = lp
|
||||
mLightTimeTV!!.visibility = View.VISIBLE
|
||||
mLightSourceDivider!!.visibility = View.VISIBLE
|
||||
mLightSourceTV!!.visibility = View.VISIBLE
|
||||
mLightSourceTV!!.setPadding(0, 0, 0, 0)
|
||||
mLightIconBG!!.layoutParams.width =
|
||||
context.resources.getDimension(R.dimen.hmi_traffic_light_bus_bg_width).toInt()
|
||||
} else {
|
||||
val lp = this.layoutParams as MarginLayoutParams
|
||||
lp.width =
|
||||
context.resources.getDimension(R.dimen.hmi_traffic_light_layout_width).toInt()
|
||||
this.layoutParams = lp
|
||||
mLightTimeTV!!.visibility = View.VISIBLE
|
||||
mLightSourceDivider!!.visibility = View.GONE
|
||||
mLightSourceTV!!.visibility = View.GONE
|
||||
mLightIconBG!!.layoutParams.width =
|
||||
context.resources.getDimension(R.dimen.hmi_traffic_light_bg_width).toInt()
|
||||
}
|
||||
mLightSourceTV!!.setPadding(0,0,0,0)
|
||||
mLightIconBG!!.layoutParams.width = context.resources.getDimension(R.dimen.hmi_traffic_light_bus_bg_width).toInt()
|
||||
// }else{
|
||||
// val lp = this.layoutParams as MarginLayoutParams
|
||||
// lp.width = context.resources.getDimension(R.dimen.hmi_traffic_light_layout_width).toInt()
|
||||
// this.layoutParams = lp
|
||||
// mLightTimeTV!!.visibility = View.VISIBLE
|
||||
// mLightSourceDivider!!.visibility = View.GONE
|
||||
// mLightSourceTV!!.visibility = View.GONE
|
||||
// mLightIconBG!!.layoutParams.width = context.resources.getDimension(R.dimen.hmi_traffic_light_bg_width).toInt()
|
||||
// }
|
||||
}
|
||||
|
||||
}
|
||||
@@ -207,9 +207,6 @@ public class TrafficDataView extends ConstraintLayout implements
|
||||
if (speedTextView != null) {
|
||||
speedTextView.setText(String.valueOf(newSpeed));
|
||||
}
|
||||
if (speedImage != null) {
|
||||
speedImage.setBackgroundResource(newSpeed > 60 ? R.drawable.traffic_data_speed_warning : R.drawable.traffic_data_speed);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:drawable="@drawable/romabg_press_select_bg" android:state_focused="true" android:state_pressed="true" />
|
||||
<item android:drawable="@drawable/romabg_press_select_bg" android:state_focused="false" android:state_pressed="true" />
|
||||
<item android:drawable="@drawable/romabg_press_select_bg" android:state_selected="true" />
|
||||
<item android:drawable="@drawable/romabg_press_select_bg" android:state_focused="true" />
|
||||
<item android:drawable="@drawable/romabg_normal_select" />
|
||||
</selector>
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 5.4 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 6.1 KiB |
@@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="oval">
|
||||
<gradient
|
||||
android:startColor="#323C6F"
|
||||
android:endColor="#323C6F"
|
||||
android:angle="315"
|
||||
/>
|
||||
<size
|
||||
android:width="120dp"
|
||||
android:height="120dp"
|
||||
/>
|
||||
</shape>
|
||||
@@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="oval">
|
||||
<gradient
|
||||
android:startColor="#029DFF"
|
||||
android:endColor="#0056FF"
|
||||
android:angle="225"
|
||||
/>
|
||||
<size
|
||||
android:width="120dp"
|
||||
android:height="120dp"
|
||||
/>
|
||||
</shape>
|
||||
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:drawable="@drawable/roma_press_select_bg" android:state_focused="true" android:state_pressed="true" />
|
||||
<item android:drawable="@drawable/roma_press_select_bg" android:state_focused="false" android:state_pressed="true" />
|
||||
<item android:drawable="@drawable/roma_press_select_bg" android:state_selected="true" />
|
||||
<item android:drawable="@drawable/roma_press_select_bg" android:state_focused="true" />
|
||||
<item android:drawable="@drawable/roma_normal_select_bg" />
|
||||
</selector>
|
||||
@@ -277,30 +277,6 @@
|
||||
android:textOn="关闭感知优化模式"
|
||||
android:textSize="@dimen/dp_24" />
|
||||
|
||||
<ToggleButton
|
||||
android:id="@+id/tbDrawAiCloudFusion"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="@dimen/dp_10"
|
||||
android:padding="@dimen/dp_20"
|
||||
android:background="@drawable/radio_button_normal_background_right"
|
||||
android:textColor="#000"
|
||||
android:textOff="开启云端感知绘制"
|
||||
android:textOn="关闭云端感知绘制"
|
||||
android:textSize="@dimen/dp_24" />
|
||||
|
||||
<ToggleButton
|
||||
android:id="@+id/tbDrawRomaMode"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="@dimen/dp_10"
|
||||
android:padding="@dimen/dp_20"
|
||||
android:background="@drawable/radio_button_normal_background_right"
|
||||
android:textColor="#000"
|
||||
android:textOff="开启漫游模式"
|
||||
android:textOn="关闭漫游模式"
|
||||
android:textSize="@dimen/dp_24" />
|
||||
|
||||
<ToggleButton
|
||||
android:id="@+id/tbObuWarningFusionUnion"
|
||||
android:layout_width="match_parent"
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
<?xml version="1.0" encoding="utf-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="match_parent">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_roma_bg"
|
||||
android:layout_width="@dimen/dp_102"
|
||||
android:layout_height="@dimen/dp_102"
|
||||
android:layout_marginStart="40dp"
|
||||
android:layout_marginBottom="@dimen/dp_46"
|
||||
android:background="@drawable/roma_bg_selector"
|
||||
android:elevation="@dimen/dp_10"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/ivRomaView"
|
||||
android:layout_width="@dimen/dp_80"
|
||||
android:layout_height="@dimen/dp_80"
|
||||
android:layout_gravity="center"
|
||||
android:background="@drawable/romafront_select_bg" />
|
||||
</LinearLayout>
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="@dimen/dp_121"
|
||||
android:layout_height="@dimen/dp_121"
|
||||
tools:ignore="MissingDefaultResource">
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
@@ -22,7 +22,7 @@ class MapBizProvider :IMoGoFunctionServerProvider{
|
||||
MogoRouteOverlayManager.getInstance().init()
|
||||
MapPointCloudSubscriber.instance
|
||||
SpeedLimitDataManager.getInstance().start()
|
||||
aiCloudIdentifyDataManager.init(AbsMogoApplication.getApp())
|
||||
aiCloudIdentifyDataManager.initServer(AbsMogoApplication.getApp())
|
||||
}
|
||||
|
||||
override fun onDestroy() {
|
||||
|
||||
@@ -1,23 +1,46 @@
|
||||
package com.mogo.eagle.core.function.business.ai
|
||||
|
||||
import android.content.Context
|
||||
import com.alibaba.android.arouter.facade.annotation.Route
|
||||
import com.mogo.aicloud.services.socket.IMogoOnMessageListener
|
||||
import com.mogo.aicloud.services.socket.MogoAiCloudSocketManager
|
||||
import com.mogo.eagle.core.data.config.FunctionBuildConfig
|
||||
import com.mogo.eagle.core.function.business.ai.net.AiCloudIdentifyNetWorkModel
|
||||
import com.mogo.eagle.core.data.constants.MogoServicePaths
|
||||
import com.mogo.eagle.core.data.deva.chain.ChainConstant
|
||||
import com.mogo.eagle.core.data.multidisplay.TelematicConstant
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotStatusListener
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoPlanningRottingListener
|
||||
import com.mogo.eagle.core.function.api.map.roma.IMogoRoma
|
||||
import com.mogo.eagle.core.function.api.telematic.IReceivedMsgListener
|
||||
import com.mogo.eagle.core.function.business.ai.net.AiCloudIdentifyNetWorkModel.Companion.aiCloudIdentifyNetWorkModel
|
||||
import com.mogo.eagle.core.function.business.identify.MapIdentifySubscriber
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_MAP
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager
|
||||
import com.mogo.eagle.core.function.call.map.CallerMapUIServiceManager
|
||||
import com.mogo.eagle.core.function.call.map.CallerVisualAngleManager.updateLongSightLevel
|
||||
import com.mogo.eagle.core.function.call.telematic.CallerTelematicListenerManager
|
||||
import com.mogo.eagle.core.function.call.telematic.CallerTelematicManager
|
||||
import com.mogo.eagle.core.function.call.telematic.CallerTelematicManager.sendMsgToAllClients
|
||||
import com.mogo.eagle.core.function.call.telematic.CallerTelematicManager.sendMsgToServer
|
||||
import com.mogo.eagle.core.function.utils.MapBizTrace
|
||||
import com.mogo.eagle.core.utilcode.mogo.AppIdentityModeUtils
|
||||
import com.mogo.eagle.core.utilcode.util.ToastUtils
|
||||
import com.mogo.map.MogoMapUIController
|
||||
import com.mogo.map.listener.IMogoMapListener
|
||||
import com.mogo.map.listener.MogoMapListenerHandler
|
||||
import com.mogo.map.uicontroller.VisualAngleMode
|
||||
import com.zhjt.service.chain.ChainLog
|
||||
import com.zhjt.service.chain.TracingConstants
|
||||
import mogo.telematics.pad.MessagePad
|
||||
import mogo.yycp.api.proto.SocketDownData
|
||||
|
||||
class AiCloudIdentifyDataManager : IMogoMapListener {
|
||||
@Route(path = MogoServicePaths.PATH_ROMA)
|
||||
class AiCloudIdentifyDataManager : IMogoMapListener, IReceivedMsgListener, IMogoRoma,
|
||||
IMoGoPlanningRottingListener, IMoGoAutopilotStatusListener {
|
||||
|
||||
companion object {
|
||||
private const val TAG = "AiCloudIdentifyData"
|
||||
|
||||
var START_METRE = 200
|
||||
var START_METRE = 1
|
||||
var END_METRE = 2000
|
||||
|
||||
@JvmStatic
|
||||
@@ -26,66 +49,193 @@ class AiCloudIdentifyDataManager : IMogoMapListener {
|
||||
}
|
||||
}
|
||||
|
||||
private val aiCloudIdentifyNetWorkModel = AiCloudIdentifyNetWorkModel()
|
||||
private var showAiCloud = false
|
||||
private var serverSn = ""
|
||||
|
||||
fun init(mContext: Context) {
|
||||
MogoAiCloudSocketManager.getInstance(mContext)
|
||||
.registerOnMessageListener(
|
||||
0x040003, //低频数据
|
||||
object : IMogoOnMessageListener<SocketDownData.SocketDownDataProto> {
|
||||
override fun target(): Class<SocketDownData.SocketDownDataProto> {
|
||||
return SocketDownData.SocketDownDataProto::class.java
|
||||
}
|
||||
override fun init(context: Context?) {
|
||||
|
||||
override fun onMsgReceived(obj: SocketDownData.SocketDownDataProto?) {
|
||||
if (!FunctionBuildConfig.isDrawAiCloudFusion) {
|
||||
MapIdentifySubscriber.instance.clearAiCloudRoma()
|
||||
return
|
||||
}
|
||||
|
||||
fun initServer(mContext: Context) {
|
||||
if (AppIdentityModeUtils.isPassenger(FunctionBuildConfig.appIdentityMode)) {
|
||||
MogoMapListenerHandler.mogoMapListenerHandler.registerHostMapListener(TAG, this)
|
||||
CallerTelematicListenerManager.addListener(TAG, this)
|
||||
CallerAutoPilotStatusListenerManager.addListener(TAG, this)
|
||||
MogoAiCloudSocketManager.getInstance(mContext)
|
||||
.registerOnMessageListener(
|
||||
0x040003, //低频数据
|
||||
object : IMogoOnMessageListener<SocketDownData.SocketDownDataProto> {
|
||||
override fun target(): Class<SocketDownData.SocketDownDataProto> {
|
||||
return SocketDownData.SocketDownDataProto::class.java
|
||||
}
|
||||
obj?.let {
|
||||
obj.data?.let {
|
||||
if (showAiCloud) {
|
||||
if (it.allListList == null || it.allListList.size == 0) {
|
||||
MapIdentifySubscriber.instance.clearAiCloudRoma()
|
||||
return
|
||||
|
||||
@ChainLog(
|
||||
linkChainLog = ChainConstant.CHAIN_LINK_LOG_WEB_SOCKET_DATA_TRACKED,
|
||||
linkCode = ChainConstant.CHAIN_LINK_ADAS,
|
||||
endpoint = TracingConstants.Endpoint.PAD,
|
||||
nodeAliasCode = ChainConstant.CHAIN_ALIAS_CODE_ADAS_MESSAGE_RECT_DATA,
|
||||
paramIndexes = [0],
|
||||
clientPkFileName = "sn"
|
||||
)
|
||||
override fun onMsgReceived(obj: SocketDownData.SocketDownDataProto?) {
|
||||
obj?.let {
|
||||
obj.data?.let {
|
||||
if (showAiCloud) {
|
||||
if (it.allListList == null || it.allListList.size == 0) {
|
||||
MapIdentifySubscriber.instance.clearAiCloudRoma()
|
||||
return
|
||||
}
|
||||
MapIdentifySubscriber.instance.renderAiCloudResult(it.allListList)
|
||||
}
|
||||
MapIdentifySubscriber.instance.renderAiCloudResult(it.allListList)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
requestRangeOfIdentify()
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
fun requestRangeOfIdentify() {
|
||||
aiCloudIdentifyNetWorkModel.requestIdentifyRange({
|
||||
CallerLogger.d(
|
||||
M_MAP + TAG,
|
||||
"requestIdentifyRange ok startRange:$START_METRE, endRange:$END_METRE"
|
||||
override fun trigger(romaStatus: Boolean) {
|
||||
MapBizTrace.log(TAG, "trigger")
|
||||
// 司机屏发送事件给乘客屏
|
||||
if (AppIdentityModeUtils.isDriver(FunctionBuildConfig.appIdentityMode)) {
|
||||
if (romaStatus) {
|
||||
sendMsgToAllClients(TelematicConstant.OPEN_ROMA_STATUS, "0".toByteArray())
|
||||
} else {
|
||||
sendMsgToAllClients(TelematicConstant.OPEN_ROMA_STATUS, "1".toByteArray())
|
||||
}
|
||||
}
|
||||
// 乘客屏单独控制漫游
|
||||
if (AppIdentityModeUtils.isPassenger(FunctionBuildConfig.appIdentityMode)) {
|
||||
if (romaStatus) {
|
||||
// 开启roma,当前非漫游,开启
|
||||
openRoma()
|
||||
} else {
|
||||
closeRoma()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 乘客屏接收开启/关闭 roma
|
||||
override fun onReceivedMsg(type: Int, byteArray: ByteArray) {
|
||||
MapBizTrace.log(TAG, "onReceivedMsg type : $type")
|
||||
when (type) {
|
||||
TelematicConstant.OPEN_ROMA_STATUS -> {
|
||||
when (String(byteArray)) {
|
||||
"0" -> {
|
||||
openRoma()
|
||||
}
|
||||
"1" -> {
|
||||
closeRoma()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private fun openRoma() {
|
||||
if (serverSn.isEmpty()) {
|
||||
serverSn = CallerTelematicManager.getServerToken()
|
||||
if (serverSn.isEmpty()) {
|
||||
ToastUtils.showLong("未获取到司机屏设备信息")
|
||||
return
|
||||
}
|
||||
}
|
||||
if (!MogoMapUIController.getInstance().currentMapVisualAngle.isRoma) {
|
||||
requestRangeOfIdentify(true)
|
||||
updateLongSightLevel(true)
|
||||
}
|
||||
}
|
||||
|
||||
private fun closeRoma(manual: Boolean = true) {
|
||||
if (serverSn.isEmpty()) {
|
||||
serverSn = CallerTelematicManager.getServerToken()
|
||||
if (serverSn.isEmpty()) {
|
||||
ToastUtils.showLong("未获取到司机屏设备信息")
|
||||
return
|
||||
}
|
||||
}
|
||||
requestRangeOfIdentify(false)
|
||||
updateLongSightLevel(false)
|
||||
MapIdentifySubscriber.instance.clearAiCloudRoma()
|
||||
// 主动关闭roma,回到中景视角
|
||||
if (manual) {
|
||||
MogoMapUIController.getInstance()
|
||||
.changeMapVisualAngle(VisualAngleMode.MODE_MEDIUM_SIGHT, null)
|
||||
}
|
||||
}
|
||||
|
||||
fun requestRangeOfIdentify(dataReceive: Boolean) {
|
||||
aiCloudIdentifyNetWorkModel.requestIdentifyRange(dataReceive, serverSn, {
|
||||
MapBizTrace.log(
|
||||
TAG,
|
||||
"requestIdentifyRange ok startRange:$START_METRE, endRange:$END_METRE , dataReceive:$dataReceive"
|
||||
)
|
||||
if (dataReceive) {
|
||||
// 请求地图开始漫游
|
||||
MogoMapUIController.getInstance().setRomaMode(FunctionBuildConfig.romaModeStyle)
|
||||
sendMsgToServer(TelematicConstant.OPEN_ROMA_STATUS, "3".toByteArray())
|
||||
} else {
|
||||
sendMsgToServer(TelematicConstant.OPEN_ROMA_STATUS, "4".toByteArray())
|
||||
}
|
||||
}, {
|
||||
CallerLogger.d(
|
||||
M_MAP + TAG,
|
||||
"requestIdentifyRange error : $it , startRange:$START_METRE, endRange:$END_METRE"
|
||||
MapBizTrace.log(
|
||||
TAG,
|
||||
"requestIdentifyRange error : $it , startRange:$START_METRE, endRange:$END_METRE, dataReceive:$dataReceive"
|
||||
)
|
||||
updateLongSightLevel(false)
|
||||
})
|
||||
}
|
||||
|
||||
override fun onMapVisualAngleChanged(visualAngleMode: VisualAngleMode) {
|
||||
super.onMapVisualAngleChanged(visualAngleMode)
|
||||
when {
|
||||
// 解除漫游限制
|
||||
visualAngleMode.isRoma -> {
|
||||
showAiCloud = true
|
||||
FunctionBuildConfig.isDrawIdentifyData = false
|
||||
}
|
||||
else -> {
|
||||
showAiCloud = false
|
||||
FunctionBuildConfig.isDrawIdentifyData = true
|
||||
MapIdentifySubscriber.instance.clearAiCloudRoma()
|
||||
if (showAiCloud) {
|
||||
showAiCloud = false
|
||||
FunctionBuildConfig.isDrawIdentifyData = true
|
||||
closeRoma(false)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
override fun onAutopilotRouteLineId(lineId: Long) {
|
||||
super.onAutopilotRouteLineId(lineId)
|
||||
if (lineId == 0L) {
|
||||
updateRomaStyle(true)
|
||||
}
|
||||
}
|
||||
|
||||
override fun onAutopilotRotting(globalPathResp: MessagePad.GlobalPathResp?) {
|
||||
globalPathResp?.let {
|
||||
if (it.wayPointsList != null && it.wayPointsList.size > 0) {
|
||||
val builder = StringBuilder()
|
||||
it.wayPointsList.forEach { loc ->
|
||||
builder.append(loc.longitude).append(",").append(loc.latitude).append(",")
|
||||
}
|
||||
val route = builder.toString()
|
||||
if (route.endsWith(",")) {
|
||||
route.substring(0, builder.toString().length - 1)
|
||||
}
|
||||
updateRomaStyle(false, route)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private fun updateRomaStyle(auto: Boolean, route: String? = null) {
|
||||
CallerMapUIServiceManager.getMapUIController()?.setRoamTrajectory(route)
|
||||
if (auto) {
|
||||
FunctionBuildConfig.romaModeStyle = 0
|
||||
MogoMapUIController.getInstance().setRomaMode(FunctionBuildConfig.romaModeStyle)
|
||||
} else {
|
||||
FunctionBuildConfig.romaModeStyle = 1
|
||||
MogoMapUIController.getInstance().setRomaMode(FunctionBuildConfig.romaModeStyle)
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -25,6 +25,6 @@ class AiCloudRangeBroadcastReceiver : BroadcastReceiver() {
|
||||
START_METRE = startRange
|
||||
END_METRE = endRange
|
||||
CallerLogger.d("$M_MAP$TAG", "startRange:$startRange, endRange:$endRange")
|
||||
aiCloudIdentifyDataManager.requestRangeOfIdentify()
|
||||
aiCloudIdentifyDataManager.requestRangeOfIdentify(true)
|
||||
}
|
||||
}
|
||||
@@ -1,7 +1,6 @@
|
||||
package com.mogo.eagle.core.function.business.ai.net
|
||||
|
||||
import com.mogo.cloud.passport.MoGoAiCloudClientConfig
|
||||
import com.mogo.commons.constants.HostConst
|
||||
import com.mogo.commons.debug.DebugConfig
|
||||
import com.mogo.eagle.core.data.BaseResponse
|
||||
import com.mogo.eagle.core.function.business.ai.AiCloudIdentifyDataManager.Companion.END_METRE
|
||||
@@ -9,9 +8,8 @@ import com.mogo.eagle.core.function.business.ai.AiCloudIdentifyDataManager.Compa
|
||||
import com.mogo.eagle.core.network.MoGoRetrofitFactory
|
||||
import com.mogo.eagle.core.network.apiCall
|
||||
import com.mogo.eagle.core.network.request
|
||||
import com.zhjt.service_biz.FuncConfig
|
||||
|
||||
class AiCloudIdentifyNetWorkModel {
|
||||
class AiCloudIdentifyNetWorkModel private constructor(){
|
||||
|
||||
companion object {
|
||||
val aiCloudIdentifyNetWorkModel by lazy(LazyThreadSafetyMode.SYNCHRONIZED) {
|
||||
@@ -24,16 +22,20 @@ class AiCloudIdentifyNetWorkModel {
|
||||
when (DebugConfig.getNetMode()) {
|
||||
DebugConfig.NET_MODE_DEV,
|
||||
DebugConfig.NET_MODE_QA -> host = "http://dzt-qa-city.zhidaozhixing.com"
|
||||
// DebugConfig.NET_MODE_QA -> host = "http://dzt-test.zhidaozhixing.com"
|
||||
}
|
||||
return host
|
||||
}
|
||||
|
||||
private fun getNetWorkApi(baseUrl: String = HostConst.getEagleHost()): IAiCloudIdentifyApiService {
|
||||
return MoGoRetrofitFactory.getInstanceNoCallAdapter(baseUrl)
|
||||
//todo test emArrow
|
||||
private fun getNetWorkApi(baseUrl: String = getHost()): IAiCloudIdentifyApiService {
|
||||
return MoGoRetrofitFactory.getInstanceNoCallAdapter("http://dzt-qa-city.zhidaozhixing.com")
|
||||
.create(IAiCloudIdentifyApiService::class.java)
|
||||
}
|
||||
|
||||
fun requestIdentifyRange(
|
||||
dataReceive: Boolean,
|
||||
serverSn:String,
|
||||
onSuccess: (() -> Unit),
|
||||
onError: ((String) -> Unit)
|
||||
) {
|
||||
@@ -41,10 +43,11 @@ class AiCloudIdentifyNetWorkModel {
|
||||
val map = mutableMapOf<String, Any>()
|
||||
start {
|
||||
map["sn"] = MoGoAiCloudClientConfig.getInstance().sn
|
||||
map["status"] = true
|
||||
map["status"] = dataReceive
|
||||
map["startMetre"] = START_METRE
|
||||
map["endMetre"] = END_METRE
|
||||
map["type"] = 1
|
||||
map["relationSn"] = serverSn
|
||||
}
|
||||
loader {
|
||||
apiCall {
|
||||
|
||||
@@ -9,5 +9,6 @@ interface IAiCloudIdentifyApiService {
|
||||
|
||||
@Headers("Content-type:application/json;charset=UTF-8")
|
||||
@POST("eagle-eye-dns/yycp-c-v2x-service/dataFusion/remoteDrivingSet")
|
||||
// @POST("yycp-data-center-service1/remoteDrivingSet")
|
||||
suspend fun identifyRange(@Body map: MutableMap<String, Any>): BaseResponse<Any>
|
||||
}
|
||||
@@ -30,8 +30,4 @@ interface Identify {
|
||||
fun clearAiMarker() {
|
||||
|
||||
}
|
||||
|
||||
fun getIdentifyObj(uuid: String): TrackedObject? {
|
||||
return null
|
||||
}
|
||||
}
|
||||
@@ -135,10 +135,6 @@ object IdentifyFactory : Identify, IMoGoObuStatusListener {
|
||||
mDrawerHandler.sendMessage(message)
|
||||
}
|
||||
|
||||
override fun getIdentifyObj(uuid: String): TrackedObject? {
|
||||
return identify?.getIdentifyObj(uuid)
|
||||
}
|
||||
|
||||
override fun updateTrackerWarningInfo(trafficData: TrafficData) {
|
||||
super.updateTrackerWarningInfo(trafficData)
|
||||
val message = Message.obtain()
|
||||
|
||||
@@ -1,13 +1,9 @@
|
||||
package com.mogo.eagle.core.function.business.identify
|
||||
|
||||
import android.content.Context
|
||||
import com.alibaba.android.arouter.facade.annotation.Route
|
||||
import com.mogo.eagle.core.data.config.FunctionBuildConfig
|
||||
import com.mogo.eagle.core.data.constants.MogoServicePaths.PATH_IDENTIFY
|
||||
import com.mogo.eagle.core.data.traffic.TrafficData
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotIdentifyListener
|
||||
import com.mogo.eagle.core.function.api.base.IMoGoSubscriber
|
||||
import com.mogo.eagle.core.function.api.map.marker.IMoGoIdentifyListener
|
||||
import com.mogo.eagle.core.function.api.datacenter.obu.IMoGoObuStatusListener
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotIdentifyListenerManager
|
||||
import com.mogo.eagle.core.function.call.obu.CallerObuWarningListenerManager
|
||||
@@ -22,8 +18,7 @@ import mogo.yycp.api.proto.SocketDownData
|
||||
*
|
||||
* @author donghongyu
|
||||
*/
|
||||
@Route(path = PATH_IDENTIFY)
|
||||
class MapIdentifySubscriber private constructor() : IMoGoIdentifyListener, IMoGoSubscriber,
|
||||
class MapIdentifySubscriber private constructor() : IMoGoSubscriber,
|
||||
IMoGoAutopilotIdentifyListener, IMoGoObuStatusListener {
|
||||
|
||||
private val TAG = "MapIdentifySubscriber"
|
||||
@@ -64,12 +59,8 @@ class MapIdentifySubscriber private constructor() : IMoGoIdentifyListener, IMoGo
|
||||
|
||||
fun renderAiCloudResult(cloudData: List<SocketDownData.CloudRoadDataProto>) {
|
||||
try {
|
||||
if (FunctionBuildConfig.isDrawAiCloudFusion) {
|
||||
ThreadUtils.getSinglePool().execute {
|
||||
IdentifyFactory.renderAiCloudResult(cloudData)
|
||||
}
|
||||
} else {
|
||||
clearAiCloudRoma()
|
||||
ThreadUtils.getSinglePool().execute {
|
||||
IdentifyFactory.renderAiCloudResult(cloudData)
|
||||
}
|
||||
} catch (e: Exception) {
|
||||
e.printStackTrace()
|
||||
@@ -120,12 +111,4 @@ class MapIdentifySubscriber private constructor() : IMoGoIdentifyListener, IMoGo
|
||||
}
|
||||
}
|
||||
|
||||
override fun getIdentifyObj(uuid: String): TrackedObject? {
|
||||
return IdentifyFactory.getIdentifyObj(uuid)
|
||||
}
|
||||
|
||||
override fun init(context: Context?) {
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -46,7 +46,7 @@ object WarningHelper {
|
||||
mMarkersCaches[trackId] ?: return@Consumer
|
||||
if (planningObj.type == 0) { //0是leading障碍物,障碍物车身红色提示
|
||||
pncWarningBeautyTrafficData[trackId] = PlanningTrack(
|
||||
"#D65D5AFF",
|
||||
"#FF0000FF",
|
||||
getCurWgs84SatelliteTime()
|
||||
)
|
||||
} else if (planningObj.type == 1) { //1是避障和择机的障碍物,障碍物车身黄色提示
|
||||
|
||||
@@ -144,6 +144,7 @@ class SmallMapView @JvmOverloads constructor(
|
||||
SceneConstant.M_MAP + TAG, "SmallMapView clearPolyline mPolyline -----> ")
|
||||
if (mPolyline != null) {
|
||||
mPolyline!!.remove()
|
||||
mPolyline = null
|
||||
}
|
||||
if (mStartMarker != null) {
|
||||
mStartMarker!!.isVisible = false
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
package com.mogo.eagle.core.function.utils
|
||||
|
||||
import com.mogo.commons.debug.DebugConfig
|
||||
import com.mogo.eagle.core.data.deva.chain.ChainConstant
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_MAP
|
||||
import com.zhjt.service.chain.ChainLog
|
||||
import com.zhjt.service.chain.TracingConstants
|
||||
|
||||
class MapBizTrace {
|
||||
|
||||
companion object {
|
||||
|
||||
@ChainLog(
|
||||
linkChainLog = ChainConstant.CHAIN_LINK_LOG_HD_MAP,
|
||||
linkCode = ChainConstant.CHAIN_LINK_MAP,
|
||||
endpoint = TracingConstants.Endpoint.PAD,
|
||||
nodeAliasCode = ChainConstant.CHAIN_ALIAS_CODE_HD_MAP_BIZ,
|
||||
paramIndexes = [0, 1],
|
||||
clientPkFileName = "sn"
|
||||
)
|
||||
fun log(data: Any, data1: Any) {
|
||||
if (DebugConfig.isDebug()) {
|
||||
CallerLogger.d("$M_MAP${data.toString()}", data1)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -112,8 +112,8 @@ class MapBizView(context: Context?, attrs: AttributeSet?) : MogoMapView(context,
|
||||
private fun turn(lightNum: Int) {
|
||||
if (currentLevel != lightNum) {
|
||||
when (lightNum) {
|
||||
0 -> CallerMapUIServiceManager.getMapUIController()?.setCarLightsType(3, 500)
|
||||
1 -> CallerMapUIServiceManager.getMapUIController()?.setCarLightsType(4, 500)
|
||||
0 -> CallerMapUIServiceManager.getMapUIController()?.setCarLightsType(0, 500)
|
||||
1 -> CallerMapUIServiceManager.getMapUIController()?.setCarLightsType(1, 500)
|
||||
2 -> CallerMapUIServiceManager.getMapUIController()?.setCarLightsType(2, 500)
|
||||
}
|
||||
currentLevel = lightNum
|
||||
|
||||
@@ -61,18 +61,13 @@ object FunctionBuildConfig {
|
||||
var isBeautyMode = true
|
||||
|
||||
/**
|
||||
* 是否绘制云端感知物
|
||||
* 开启roma自由/循迹路线
|
||||
* 0:自由模式
|
||||
* 1:循迹模式
|
||||
*/
|
||||
@Volatile
|
||||
@JvmField
|
||||
var isDrawAiCloudFusion = true
|
||||
|
||||
/**
|
||||
* 是否开启roma
|
||||
*/
|
||||
@Volatile
|
||||
@JvmField
|
||||
var isRomaMode = false
|
||||
var romaModeStyle = 0
|
||||
|
||||
/**
|
||||
* 是否开启感知物替换颜色功能
|
||||
|
||||
@@ -93,15 +93,15 @@ public class MogoServicePaths {
|
||||
@Keep
|
||||
public static final String PATH_DATA_CENTER_MODULE = "/data_center/api";
|
||||
|
||||
@Keep
|
||||
public static final String PATH_IDENTIFY = "/map/identify";
|
||||
|
||||
@Keep
|
||||
public static final String PATH_VISUAL_ANGLE = "/map/angle_change";
|
||||
|
||||
@Keep
|
||||
public static final String PATH_PATCH_UPGRADE = "/patch/api";
|
||||
|
||||
|
||||
@Keep
|
||||
public static final String PATH_UPGRADE_TYPE_API = "/upgrade/type/api";
|
||||
|
||||
@Keep
|
||||
public static final String PATH_ROMA = "/map/roma";
|
||||
}
|
||||
|
||||
@@ -10,6 +10,8 @@ class ChainConstant {
|
||||
const val CHAIN_LINK_ADAS = 1
|
||||
// 鹰眼初始化流程顺序相关
|
||||
const val CHAIN_LINK_INIT = 2
|
||||
// Map交互
|
||||
const val CHAIN_LINK_MAP = 3
|
||||
// Native内存泄漏
|
||||
const val CHAIN_LINK_LEAK = 10
|
||||
|
||||
@@ -24,6 +26,7 @@ class ChainConstant {
|
||||
const val CHAIN_LINK_LOG_WEB_SOCKET_PLANNING_ACTIONS = 8
|
||||
const val CHAIN_LINK_LOG_NATIVE_LEAK = 100
|
||||
const val CHAIN_LINK_LOG_CLOUD_V2N = 200
|
||||
const val CHAIN_LINK_LOG_HD_MAP = 300
|
||||
|
||||
const val CHAIN_LINK_LOG_ADAS_INIT = "-eagleInitStatus"
|
||||
const val CHAIN_LINK_LOG_ADAS_GNSS = "-adasWsGnssInfo"
|
||||
@@ -36,6 +39,7 @@ class ChainConstant {
|
||||
const val CHAIN_LINK_LOG_ADAS_PLANNING_ACTIONS = "-adasWsPlanningActions"
|
||||
const val CHAIN_LINK_LOG_RECORD_NATIVE_LEAK = "-eagleRecordNativeLeak"
|
||||
const val CHAIN_LINK_LOG_CLOUD_WEB_SOCKET_V2N = "-eagleCloudWSV2N"
|
||||
const val CHAIN_LINK_LOG_HD_MAP_BIZ = "-eagleHDMapBiz"
|
||||
|
||||
const val CHAIN_ALIAS_CODE_MULTI_CONNECT = "CHAIN_ALIAS_CODE_MULTI_CONNECT"
|
||||
const val CHAIN_ALIAS_CODE_ADAS_MESSAGE_CAR_CONFIG = "CHAIN_ALIAS_CODE_CAR_CONFIG"
|
||||
@@ -56,6 +60,9 @@ class ChainConstant {
|
||||
|
||||
const val CHAIN_ALIAS_CODE_RECORD_NATIVE_LEAK = "CHAIN_ALIAS_CODE_RECORD_NATIVE_LEAK"
|
||||
|
||||
const val CHAIN_ALIAS_CODE_HD_MAP_CALL = "CHAIN_ALIAS_CODE_HD_MAP_CALL"
|
||||
const val CHAIN_ALIAS_CODE_HD_MAP_BIZ = "CHAIN_ALIAS_CODE_HD_MAP_BIZ"
|
||||
|
||||
const val CHAIN_ALIAS_CODE_INIT_ENV_RESTART = "CHAIN_ALIAS_CODE_INIT_ENV_RESTART"
|
||||
const val CHAIN_ALIAS_CODE_APP_INFO_CONFIG_UPDATE = "CHAIN_ALIAS_CODE_APP_INFO_CONFIG_UPDATE"
|
||||
const val CHAIN_ALIAS_CODE_FUNC_CONFIG_CHANGED = "CHAIN_ALIAS_CODE_FUNC_CONFIG_CHANGED"
|
||||
@@ -64,6 +71,7 @@ class ChainConstant {
|
||||
const val CHAIN_ALIAS_CODE_CLOUD_PASSPORT_ERROR = "CHAIN_ALIAS_CODE_CLOUD_PASSPORT_ERROR"
|
||||
const val CHAIN_ALIAS_CODE_CLOUD_CONNECT_FAIL = "CHAIN_ALIAS_CODE_CLOUD_CONNECT_FAIL"
|
||||
const val CHAIN_ALIAS_CODE_CLOUD_CONNECT_SUCCESS = "CHAIN_ALIAS_CODE_CLOUD_CONNECT_SUCCESS"
|
||||
const val CHAIN_ALIAS_CODE_HTTP_DNS_CITY_CODE = "CHAIN_ALIAS_CODE_HTTP_DNS_CITY_CODE"
|
||||
const val CHAIN_ALIAS_CODE_CLOUD_RECONNECT = "CHAIN_ALIAS_CODE_CLOUD_RECONNECT"
|
||||
const val CHAIN_ALIAS_CODE_CLOUD_CONNECT_LOST = "CHAIN_ALIAS_CODE_CLOUD_CONNECT_LOST"
|
||||
const val CHAIN_ALIAS_CODE_CLOUD_V2N = "CHAIN_ALIAS_CODE_CLOUD_V2N"
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
package com.mogo.eagle.core.data.multidisplay
|
||||
|
||||
/**
|
||||
* @author: wangmingjun
|
||||
* @date: 2023/3/3
|
||||
* 供网约车司乘屏通信使用
|
||||
*/
|
||||
class TelematicConstant {
|
||||
companion object {
|
||||
const val BUSINESS_STRING = 100
|
||||
const val SHOW_TRAFFIC_LIGHT = 101
|
||||
const val HIDE_TRAFFIC_LIGHT = 102
|
||||
const val OPEN_ROMA_STATUS = 103
|
||||
const val ROMA_UPDATE = 104
|
||||
}
|
||||
}
|
||||
@@ -1,10 +0,0 @@
|
||||
package com.mogo.eagle.core.function.api.map.marker
|
||||
|
||||
import com.alibaba.android.arouter.facade.template.IProvider
|
||||
import mogo.telematics.pad.MessagePad
|
||||
|
||||
interface IMoGoIdentifyListener :IProvider{
|
||||
|
||||
fun getIdentifyObj(uuid: String): MessagePad.TrackedObject?
|
||||
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
package com.mogo.eagle.core.function.api.map.roma
|
||||
|
||||
import com.alibaba.android.arouter.facade.template.IProvider
|
||||
|
||||
interface IMogoRoma : IProvider {
|
||||
|
||||
/**
|
||||
* 触发开启/关闭漫游
|
||||
* @param romaStatus 漫游状态
|
||||
*/
|
||||
fun trigger(romaStatus:Boolean)
|
||||
|
||||
}
|
||||
@@ -184,7 +184,7 @@ object CallerAutoPilotStatusListenerManager : CallerBase<IMoGoAutopilotStatusLis
|
||||
*/
|
||||
fun updateAutopilotControlParameters(autopilotControlParameters: AutopilotControlParameters? = null) {
|
||||
mAutopilotStatusInfo.autopilotControlParameters = autopilotControlParameters
|
||||
lineId = autopilotControlParameters?.autoPilotLine?.lineId
|
||||
lineId = autopilotControlParameters?.autoPilotLine?.lineId?:0
|
||||
invokeAutoPilotStatus(mAutopilotStatusInfo)
|
||||
}
|
||||
}
|
||||
@@ -1,19 +1,17 @@
|
||||
package com.mogo.eagle.core.function.call.map
|
||||
|
||||
import com.alibaba.android.arouter.launcher.ARouter
|
||||
import com.mogo.eagle.core.data.constants.MogoServicePaths.PATH_IDENTIFY
|
||||
import com.mogo.eagle.core.function.api.map.marker.IMoGoIdentifyListener
|
||||
import com.mogo.eagle.core.function.call.base.CallerBase
|
||||
import mogo.telematics.pad.MessagePad
|
||||
import com.mogo.eagle.core.data.constants.MogoServicePaths.PATH_ROMA
|
||||
import com.mogo.eagle.core.function.api.map.roma.IMogoRoma
|
||||
|
||||
object CallerMapIdentifyManager : CallerBase<IMoGoIdentifyListener>() {
|
||||
object CallerMapIdentifyManager {
|
||||
|
||||
private val identifyApi: IMoGoIdentifyListener
|
||||
get() = ARouter.getInstance().build(PATH_IDENTIFY)
|
||||
.navigation() as IMoGoIdentifyListener
|
||||
private val romaApi:IMogoRoma
|
||||
get() = ARouter.getInstance().build(PATH_ROMA)
|
||||
.navigation() as IMogoRoma
|
||||
|
||||
fun getIdentifyObj(uuid: String): MessagePad.TrackedObject? {
|
||||
return identifyApi.getIdentifyObj(uuid)
|
||||
fun romaTrigger(romaStatus:Boolean){
|
||||
romaApi.trigger(romaStatus)
|
||||
}
|
||||
|
||||
}
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -85,7 +85,7 @@ MOGO_LOCATION_VERSION=1.4.6.4
|
||||
MOGO_TELEMATIC_VERSION=1.4.6.4
|
||||
######## MogoAiCloudSDK Version ########
|
||||
# 自研地图
|
||||
MAP_SDK_VERSION=2.10.0.9
|
||||
MAP_SDK_VERSION=2.11.0.12
|
||||
MAP_SDK_OPERATION_VERSION=1.1.4.1
|
||||
# websocket
|
||||
WEBSOCKET_VERSION=1.1.7
|
||||
|
||||
@@ -194,7 +194,8 @@ public interface IMogoMapUIController {
|
||||
void setCarCursorOption(@Nullable CarCursorOption option);
|
||||
|
||||
/**
|
||||
* @param type :车尾灯类型 time: 闪烁时间 最小500ms 小于500ms 默认为500ms
|
||||
* @param type :车尾灯类型 0=默认 1=左黄 2=右黄 3=双黄 4=双红
|
||||
* @param time: 闪烁时间 最小500ms 小于500ms 默认为500ms
|
||||
*/
|
||||
void setCarLightsType(int type, int time);
|
||||
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -9,11 +9,15 @@ import com.amap.api.location.AMapLocationClientOption
|
||||
import com.amap.api.location.AMapLocationListener
|
||||
import com.mogo.commons.AbsMogoApplication
|
||||
import com.mogo.commons.constants.SharedPrefsConstants
|
||||
import com.mogo.eagle.core.data.deva.chain.ChainConstant
|
||||
import com.mogo.eagle.core.data.deva.chain.ChainConstant.Companion.CHAIN_ALIAS_CODE_HTTP_DNS_CITY_CODE
|
||||
import com.mogo.eagle.core.data.map.MogoLocation
|
||||
import com.mogo.eagle.core.function.call.map.CallerGaoDeMapLocationListenerManager
|
||||
import com.mogo.eagle.core.utilcode.mogo.storage.SharedPrefsMgr
|
||||
import com.mogo.eagle.core.utilcode.util.CoordinateTransform
|
||||
import com.mogo.eagle.core.utilcode.util.TimeUtils
|
||||
import com.zhjt.service.chain.ChainLog
|
||||
import com.zhjt.service.chain.TracingConstants.Endpoint.Companion.PAD
|
||||
|
||||
/**
|
||||
* 封装高德地图通过设备GPS获取到的位置信息,频率1s一次,坐标系为CJC20
|
||||
@@ -117,9 +121,11 @@ class GDLocationClient private constructor(context: Context) : AMapLocationListe
|
||||
// 本地SP缓存城市Code
|
||||
val cityCode = aMapLocation.cityCode
|
||||
if (cityCode != null && cityCode.isNotEmpty()) {
|
||||
mCityCode = aMapLocation.cityCode
|
||||
SharedPrefsMgr.getInstance(AbsMogoApplication.getApp())
|
||||
.putString(SharedPrefsConstants.LOCATION_CITY_CODE, cityCode)
|
||||
if (mCityCode.isEmpty() || mCityCode != cityCode) {
|
||||
setCityCode(cityCode)
|
||||
SharedPrefsMgr.getInstance(AbsMogoApplication.getApp())
|
||||
.putString(SharedPrefsConstants.LOCATION_CITY_CODE, cityCode)
|
||||
}
|
||||
}
|
||||
|
||||
// 缓存经纬度
|
||||
@@ -141,6 +147,18 @@ class GDLocationClient private constructor(context: Context) : AMapLocationListe
|
||||
}
|
||||
}
|
||||
|
||||
@ChainLog(
|
||||
linkChainLog = ChainConstant.CHAIN_LINK_LOG_CONNECT_STATUS,
|
||||
linkCode = ChainConstant.CHAIN_LINK_CLOUD,
|
||||
endpoint = PAD,
|
||||
nodeAliasCode = CHAIN_ALIAS_CODE_HTTP_DNS_CITY_CODE,
|
||||
paramIndexes = [0],
|
||||
clientPkFileName = "sn"
|
||||
)
|
||||
private fun setCityCode(code: String) {
|
||||
mCityCode = code
|
||||
}
|
||||
|
||||
override fun getLastCityCode(): String {
|
||||
return mCityCode
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user