[dev_robobus-d_230322_3.0.0]云调度增加重启自驾功能
This commit is contained in:
@@ -226,6 +226,14 @@ class MoGoHmiProvider : IMoGoHmiProvider {
|
||||
}
|
||||
}
|
||||
|
||||
override fun showDispatchRestartDialog(msgData: DispatchAdasAutoPilotLocReceiverBean) {
|
||||
ThreadUtils.runOnUiThread {
|
||||
context?.let{
|
||||
DispatchDialogManager.getInstance(it).showRestartDialog(msgData)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
override fun showNoticeForTrafficWithData(pushData: NoticeTrafficStylePushData?) {
|
||||
pushData?.let {
|
||||
ThreadUtils.runOnUiThread {
|
||||
|
||||
@@ -53,6 +53,26 @@ public class DispatchDialogManager {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 云调度重启自驾
|
||||
* @param msgData 长链下发实体
|
||||
*/
|
||||
public void showRestartDialog(DispatchAdasAutoPilotLocReceiverBean msgData){
|
||||
if(isShowing()){
|
||||
return;
|
||||
}
|
||||
if (msgData == null) {
|
||||
return;
|
||||
}
|
||||
if (dialog != null && dialog.isShowing()) { //避免下发两次
|
||||
return;
|
||||
}
|
||||
if(dialog == null){
|
||||
dialog = new DispatchRestartDialog(mContext);
|
||||
}
|
||||
dialog.showDialog(msgData);
|
||||
}
|
||||
|
||||
private void dispatchHengYang(DispatchAdasAutoPilotLocReceiverBean msgData) {
|
||||
// if (msgData.getType() == DISPATCH_TYPE_START) { //衡阳只有开始调度
|
||||
// }
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
package com.mogo.eagle.core.function.hmi.ui.notice;
|
||||
|
||||
import android.content.Context;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
|
||||
import com.mogo.eagle.core.data.biz.dispatch.DispatchAdasAutoPilotLocReceiverBean;
|
||||
import com.mogo.eagle.core.function.call.biz.CallerFuncBizManager;
|
||||
import com.mogo.eagle.core.function.hmi.R;
|
||||
|
||||
public class DispatchRestartDialog extends DispatchBaseDialog{
|
||||
|
||||
public DispatchRestartDialog(@NonNull Context context) {
|
||||
super(context);
|
||||
setContentView(R.layout.dialog_adas_dispatch_restart);
|
||||
setCanceledOnTouchOutside(false);
|
||||
TextView dispatchRestartEnter = findViewById(R.id.tv_dispatch_restart_enter);
|
||||
dispatchRestartEnter.setOnClickListener(v -> {
|
||||
//启动自动驾驶
|
||||
CallerFuncBizManager.getBizProvider().restartDispatchAffirm();
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void showDialog(DispatchAdasAutoPilotLocReceiverBean dispatchContent) {
|
||||
show();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,55 @@
|
||||
<?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="@dimen/module_services_dispatch_cars_dialog_width"
|
||||
android:layout_height="@dimen/module_services_dispatch_cars_dialog_height"
|
||||
android:background="@drawable/bg_dispatch_cars">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
android:text="@string/dispatch_dialog_restart_title"
|
||||
android:textColor="@android:color/white"
|
||||
android:textSize="@dimen/dp_48"
|
||||
android:layout_marginTop="@dimen/module_services_dispatch_cars_dialog_title_margin_top"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
android:layout_marginTop="@dimen/dp_200"
|
||||
android:gravity="center_horizontal"
|
||||
android:text="@string/dispatch_dialog_restart_content"
|
||||
android:textColor="@android:color/white"
|
||||
android:textSize="@dimen/dp_40"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_dispatch_restart_enter"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="@dimen/module_services_dispatch_cars_dialog_line_margin_bottom"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
android:text="@string/dispatch_dialog_restart_enter"
|
||||
android:textColor="@color/color_1F9BFE"
|
||||
android:textSize="@dimen/module_services_dispatch_cars_dialog_title_size"
|
||||
android:gravity="center"
|
||||
/>
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:background="@color/color_66B8BFE8"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintBottom_toTopOf="@+id/tv_dispatch_restart_enter"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
@@ -63,6 +63,9 @@
|
||||
<string name="dispatch_dialog_flight_info">航班信息:</string>
|
||||
<string name="dispatch_dialog_affirm">接受任务</string>
|
||||
<string name="dispatch_cars_remind_title">调度确认</string>
|
||||
<string name="dispatch_dialog_restart_title">提示</string>
|
||||
<string name="dispatch_dialog_restart_content">当前车辆已退出自动驾驶,请点击下方按钮恢复</string>
|
||||
<string name="dispatch_dialog_restart_enter">进入自动驾驶</string>
|
||||
<string name="dispatch_cars_remind_content">车辆将开启自动驾驶,并行驶至:</string>
|
||||
<string name="dispatch_cars_affirm">确认</string>
|
||||
<string name="dispatch_cars_cancel">取消</string>
|
||||
|
||||
Reference in New Issue
Block a user