[6.5.1_exam]Bus考试

This commit is contained in:
xuxinchao
2024-07-31 20:21:53 +08:00
parent 4ee3b991f7
commit 35921a3a4e
6 changed files with 411 additions and 3 deletions

View File

@@ -10,6 +10,7 @@ import android.view.ViewGroup;
import android.view.animation.LinearInterpolator;
import android.widget.FrameLayout;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.RelativeLayout;
import android.widget.TextView;
@@ -25,14 +26,17 @@ import com.mogo.commons.mvp.Presenter;
import com.mogo.eagle.core.data.config.FunctionBuildConfig;
import com.mogo.eagle.core.data.config.HdMapBuildConfig;
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotStatusListener;
import com.mogo.eagle.core.function.api.setting.ISeatPressureEventListener;
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotControlManager;
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager;
import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotRecordListenerManager;
import com.mogo.eagle.core.function.call.devatools.CallerDevaToolsManager;
import com.mogo.eagle.core.function.call.map.CallerMapUIServiceManager;
import com.mogo.eagle.core.function.call.setting.CallerSeatPressureManager;
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.setting.SeatPressureSettingView;
import com.mogo.eagle.core.function.smp.view.SmallMapView;
import com.mogo.eagle.core.utilcode.mogo.AppIdentityModeUtils;
import com.mogo.eagle.core.utilcode.mogo.view.OnPreventFastClickListener;
@@ -55,7 +59,7 @@ import org.greenrobot.eventbus.EventBus;
*
* @author tongchenfei
*/
public abstract class BaseShuttleTabFragment<V extends IView, P extends Presenter<V>> extends MvpFragment<V, P> {
public abstract class BaseShuttleTabFragment<V extends IView, P extends Presenter<V>> extends MvpFragment<V, P> implements ISeatPressureEventListener {
private static final String TAG = "BaseBusTabFragment";
@@ -79,6 +83,12 @@ public abstract class BaseShuttleTabFragment<V extends IView, P extends Presente
public boolean isAnimateRunning = false;
private RelativeLayout moduleMogoOchStop;
private RelativeLayout moduleMogoOchStart;
private RelativeLayout moduleMogoOchOverTake;
private LinearLayout moduleOchBusSeatPressure;
private SeatPressureSettingView mSeatPressureSettingView;
/**
* 滑动按钮触发的事件
*/
@@ -103,9 +113,33 @@ public abstract class BaseShuttleTabFragment<V extends IView, P extends Presente
ctvAutopilotStatusIv = findViewById(R.id.bus_autopilot_btn_iv);
ctvAutopilotStatusTv = findViewById(R.id.bus_autopolot_btn_tv);
flStationPanelContainer = findViewById(R.id.module_mogo_och_station_panel_container);
moduleMogoOchStop = findViewById(R.id.module_mogo_och_stop);
moduleMogoOchStart = findViewById(R.id.module_mogo_och_start);
moduleMogoOchOverTake = findViewById(R.id.module_mogo_och_over_take);
moduleOchBusSeatPressure = findViewById(R.id.module_och_bus_seat_pressure);
mSeatPressureSettingView = findViewById(R.id.seatPressureSettingView);
tvArrived = findViewById(R.id.module_mogo_och_arrived_tv);
moduleMogoOchStop.setOnClickListener(v -> {
CallerAutoPilotControlManager.INSTANCE.sendPlanningCmd(1);
});
moduleMogoOchStart.setOnClickListener(v -> {
CallerAutoPilotControlManager.INSTANCE.sendPlanningCmd(2);
});
moduleMogoOchOverTake.setOnClickListener(v -> {
CallerAutoPilotControlManager.INSTANCE.sendPlanningLineChangeCmd(3);
});
//座椅压力
moduleOchBusSeatPressure.setOnClickListener(v -> {
if(mSeatPressureSettingView.getVisibility() == View.VISIBLE){
mSeatPressureSettingView.setVisibility(View.GONE);
}else{
mSeatPressureSettingView.setVisibility(View.VISIBLE);
}
});
CallerSeatPressureManager.INSTANCE.addListener(TAG, this);
FrameLayout flSpeed = findViewById(R.id.fl_speed);
if (flSpeed != null) {
CallerDevaToolsManager.INSTANCE.attachAutopilotBeforeLaunchView(flSpeed.getContext(), flSpeed);
@@ -240,6 +274,7 @@ public abstract class BaseShuttleTabFragment<V extends IView, P extends Presente
}
super.onDestroyView();
CallerAutopilotRecordListenerManager.INSTANCE.removeListener(TAG);
CallerSeatPressureManager.INSTANCE.removeListener(TAG);
EventBus.getDefault().unregister(this);
}
@@ -503,6 +538,15 @@ public abstract class BaseShuttleTabFragment<V extends IView, P extends Presente
}
}
@Override
public void onUpdateBgEvent(boolean isPress) {
if (isPress) {
moduleOchBusSeatPressure.setBackgroundResource(R.drawable.bus_operation_status_select_bg);
} else {
moduleOchBusSeatPressure.setBackgroundResource(R.drawable.bus_operation_status_bg);
}
}
/**
* Bus调试信息线路、轨迹等信息
* <p>

View File

@@ -269,6 +269,7 @@
android:layout_height="@dimen/dp_142"/>
<com.mogo.och.common.module.wigets.map.drawline.LineView
android:id="@+id/lineView"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toRightOf="@id/reportworkorderview"
android:layout_marginStart="-11dp"
@@ -276,6 +277,98 @@
android:layout_width="@dimen/dp_142"
android:layout_height="@dimen/dp_142"/>
<RelativeLayout
android:id="@+id/module_mogo_och_stop"
android:layout_width="@dimen/dp_172"
android:layout_height="@dimen/dp_172"
android:background="@drawable/bus_operation_status_bg_selector"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toRightOf="@id/lineView">
<TextView
android:layout_width="@dimen/dp_80"
android:layout_height="@dimen/dp_80"
android:layout_centerInParent="true"
android:layout_gravity="center"
android:text="停车"
android:gravity="center"
android:textStyle="bold"
android:textColor="@android:color/white"
android:textSize="@dimen/dp_32"/>
</RelativeLayout>
<RelativeLayout
android:id="@+id/module_mogo_och_start"
android:layout_width="@dimen/dp_172"
android:layout_height="@dimen/dp_172"
android:background="@drawable/bus_operation_status_bg_selector"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toRightOf="@id/module_mogo_och_stop">
<TextView
android:layout_width="@dimen/dp_80"
android:layout_height="@dimen/dp_80"
android:layout_centerInParent="true"
android:layout_gravity="center"
android:text="出发"
android:gravity="center"
android:textStyle="bold"
android:maxLines="1"
android:textColor="@android:color/white"
android:textSize="@dimen/dp_32"/>
</RelativeLayout>
<RelativeLayout
android:id="@+id/module_mogo_och_over_take"
android:layout_width="@dimen/dp_172"
android:layout_height="@dimen/dp_172"
android:background="@drawable/bus_operation_status_bg_selector"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toRightOf="@id/module_mogo_och_start">
<TextView
android:layout_width="@dimen/dp_80"
android:layout_height="@dimen/dp_80"
android:layout_centerInParent="true"
android:layout_gravity="center"
android:text="超车"
android:gravity="center"
android:textStyle="bold"
android:maxLines="1"
android:textColor="@android:color/white"
android:textSize="@dimen/dp_32"/>
</RelativeLayout>
<LinearLayout
android:id="@+id/module_och_bus_seat_pressure"
android:layout_width="@dimen/dp_172"
android:layout_height="@dimen/dp_172"
android:elevation="@dimen/dp_10"
android:gravity="center"
android:background="@drawable/bus_operation_status_bg"
app:layout_constraintBottom_toBottomOf="@id/module_mogo_och_over_take"
app:layout_constraintTop_toTopOf="@id/module_mogo_och_over_take"
app:layout_constraintLeft_toRightOf="@id/module_mogo_och_over_take">
<ImageView
android:layout_width="@dimen/dp_64"
android:layout_height="@dimen/dp_64"
android:layout_gravity="center"
android:src="@drawable/icon_seat_pressure"
/>
</LinearLayout>
<!--座椅压力设置-->
<com.mogo.eagle.core.function.hmi.ui.setting.SeatPressureSettingView
android:id="@+id/seatPressureSettingView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:layout_constraintTop_toTopOf="@id/module_och_bus_seat_pressure"
app:layout_constraintBottom_toBottomOf="@id/module_och_bus_seat_pressure"
app:layout_constraintStart_toEndOf="@id/module_och_bus_seat_pressure"
android:layout_marginStart="@dimen/dp_40"
android:visibility="gone"
/>
<com.mogo.och.shuttle.view.SlidePanelView
android:id="@+id/module_mogo_och_slide_panel"
android:layout_width="wrap_content"