Merge remote-tracking branch 'origin/demo/shunyi_vr_map' into demo/shunyi_vr_map

This commit is contained in:
wangcongtao
2020-10-27 11:57:42 +08:00
14 changed files with 347 additions and 54 deletions

2
.idea/misc.xml generated
View File

@@ -4,7 +4,7 @@
<asm skipDebug="false" skipFrames="false" skipCode="false" expandFrames="false" />
<groovy codeStyle="LEGACY" />
</component>
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" project-jdk-name="JDK" project-jdk-type="JavaSDK">
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" project-jdk-name="1.8" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/build/classes" />
</component>
<component name="SuppressionsComponent">

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 13 KiB

View File

@@ -202,6 +202,7 @@ public class EntranceFragment extends MvpFragment<EntranceView, EntrancePresente
mApis = MogoApisHandler.getInstance().getApis();
adasNoticeHelper.init(getContext());
adasNoticeHelper.initView(getView());
mEntrancePresenter = new EntrancePresenter(getContext(), this);
mMogoFragmentManager = mApis.getFragmentManagerApi();
@@ -413,6 +414,11 @@ public class EntranceFragment extends MvpFragment<EntranceView, EntrancePresente
debugTopView();
debugCrashWarn();
// 检查是否在vr模式
if (mStatusManager.isVrMode()) {
enterVrMode();
}
}
private void enterVrMode(){
@@ -703,6 +709,7 @@ public class EntranceFragment extends MvpFragment<EntranceView, EntrancePresente
mStatusManager.registerStatusChangedListener(TAG, StatusDescriptor.UPLOADING, this);
mStatusManager.registerStatusChangedListener(TAG, StatusDescriptor.DISPLAY_OVERVIEW, this);
mStatusManager.registerStatusChangedListener(TAG, StatusDescriptor.VR_MODE, this);
TopViewAnimHelper.getInstance().setIMogoMapUIController(mMApUIController);
@@ -856,6 +863,12 @@ public class EntranceFragment extends MvpFragment<EntranceView, EntrancePresente
mCameraMode.setVisibility(View.VISIBLE);
}
}
} else if (descriptor == StatusDescriptor.VR_MODE) {
if (isTrue) {
enterVrMode();
}else{
exitVrMode();
}
}
}
@@ -1013,6 +1026,7 @@ public class EntranceFragment extends MvpFragment<EntranceView, EntrancePresente
mStatusManager.unregisterStatusChangedListener(TAG, StatusDescriptor.UPLOADING, this);
mStatusManager.unregisterStatusChangedListener(TAG, StatusDescriptor.DISPLAY_OVERVIEW
, this);
mStatusManager.unregisterStatusChangedListener(TAG, StatusDescriptor.VR_MODE, this);
}
if (mApis != null) {
if (mApis.getIntentManagerApi() != null) {

View File

@@ -4,48 +4,149 @@ import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
import android.os.Handler;
import android.os.Message;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;
import com.mogo.map.location.IMogoLocationListener;
import com.mogo.map.location.MogoLocation;
import com.mogo.module.common.MogoApisHandler;
import com.mogo.module.extensions.R;
import com.mogo.service.adas.IMogoAdasWarnMessageCallback;
import com.mogo.service.adas.MogoADASWarnType;
import com.mogo.service.adas.entity.ADASWarnMessage;
import com.mogo.service.entrance.IMogoEntranceButtonController;
import com.mogo.utils.logger.Logger;
import org.json.JSONObject;
/**
* vr模式下adas左侧提示框帮助类
*
* @author tongchenfei
*/
public class AdasNoticeHelper implements IMogoAdasWarnMessageCallback {
public class AdasNoticeHelper implements IMogoAdasWarnMessageCallback, IMogoLocationListener,
Handler.Callback {
private static final String TAG = "AdasNoticeHelper";
private static final int MSG_HIDE_TRAFFIC_LIGHT_BY_OBU = 1001;
private static final int MSG_HIDE_TRAFFIC_LIGHT_BY_CLOUD = 1002;
private static final int MSG_HIDE_LIMIT_SPEED = 1003;
private static final long HIDE_TRAFFIC_LIGHT_DELAY = 2_000L;
private static final long HIDE_LIMIT_SPEED_DELAY = 10_000L;
private Context context;
private AdasNoticeReceiver adasReceiver = new AdasNoticeReceiver();
private boolean isVrMode = false;
private TextView tvSelfSpeed, tvTrafficLight, tvLimitSpeed;
private int limitSpeed;
private Handler handler = new Handler(this);
public void init(Context context) {
this.context = context;
}
public void enterVrMode(){
public void initView(View root) {
tvSelfSpeed = root.findViewById(R.id.tvSelfSpeed);
tvTrafficLight = root.findViewById(R.id.tvTrafficLight);
tvLimitSpeed = root.findViewById(R.id.tvLimitSpeed);
}
public void enterVrMode() {
isVrMode = true;
IntentFilter filter = new IntentFilter("com.mogo.launcher.adas.app.biz");
context.registerReceiver(adasReceiver, filter);
MogoApisHandler.getInstance().getApis().getAdasControllerApi().addAdasWarnMessageCallback(this);
MogoApisHandler.getInstance().getApis().getRegisterCenterApi().registerMogoLocationListener(TAG, this);
// debug code
tvSelfSpeed.setVisibility(View.VISIBLE);
tvTrafficLight.setVisibility(View.VISIBLE);
tvLimitSpeed.setVisibility(View.VISIBLE);
}
public void exitVrMode(){
public void exitVrMode() {
isVrMode = false;
tvSelfSpeed.setVisibility(View.GONE);
tvTrafficLight.setVisibility(View.GONE);
tvLimitSpeed.setVisibility(View.GONE);
context.unregisterReceiver(adasReceiver);
MogoApisHandler.getInstance().getApis().getAdasControllerApi().removeAdasWarnMessageCallback(this);
MogoApisHandler.getInstance().getApis().getRegisterCenterApi().unregisterMogoLocationListener(TAG);
}
@Override
public void onReceiveData(ADASWarnMessage msg) {
Logger.d(TAG, "收到adas warn message, isVrMode: "+isVrMode+" msg: " + msg);
if (!isVrMode) {
return;
}
// 处理adas识别的时间主要是行人碰撞预警
if (msg.type == MogoADASWarnType.ADAS_WARNING_PERSON) {
MogoApisHandler.getInstance().getApis().getEntranceButtonController().showLeftNoticeByType(IMogoEntranceButtonController.NOTICE_TYPE_PEOPLE_WARN, R.drawable.module_ext_people_warn, "前方注意行人");
}
if (msg.type == MogoADASWarnType.ADAS_WARNING_LIMIT_SPEED) {
// 收到限速信息,更新界面
if (tvLimitSpeed != null) {
tvLimitSpeed.post(() -> {
handler.removeMessages(MSG_HIDE_LIMIT_SPEED);
if (tvLimitSpeed.getVisibility() == View.GONE) {
tvLimitSpeed.setVisibility(View.VISIBLE);
}
tvLimitSpeed.setText(msg.value);
limitSpeed = Integer.parseInt(msg.value);
handler.sendEmptyMessageDelayed(MSG_HIDE_LIMIT_SPEED, HIDE_LIMIT_SPEED_DELAY);
});
}
}
}
@Override
public void onLocationChanged(MogoLocation location) {
if (!isVrMode) {
return;
}
int speed = (int) (location.getSpeed() * 3.6F);
if (tvSelfSpeed != null) {
tvSelfSpeed.post(() -> {
if (tvSelfSpeed.getVisibility() == View.GONE) {
tvSelfSpeed.setVisibility(View.VISIBLE);
}
tvSelfSpeed.setText("" + speed);
});
}
}
@Override
public boolean handleMessage(Message msg) {
switch (msg.what) {
case MSG_HIDE_LIMIT_SPEED:
tvLimitSpeed.setVisibility(View.GONE);
return true;
case MSG_HIDE_TRAFFIC_LIGHT_BY_CLOUD:
if (!handler.hasMessages(MSG_HIDE_TRAFFIC_LIGHT_BY_OBU)) {
tvTrafficLight.setVisibility(View.GONE);
}
return true;
case MSG_HIDE_TRAFFIC_LIGHT_BY_OBU:
if (!handler.hasMessages(MSG_HIDE_TRAFFIC_LIGHT_BY_CLOUD)) {
tvTrafficLight.setVisibility(View.GONE);
}
return true;
default:
return false;
}
}
/**
@@ -53,9 +154,12 @@ public class AdasNoticeHelper implements IMogoAdasWarnMessageCallback {
*
* @author tongchenfei
*/
private class AdasNoticeReceiver extends BroadcastReceiver{
private class AdasNoticeReceiver extends BroadcastReceiver {
@Override
public void onReceive(Context context, Intent intent) {
if (!isVrMode) {
return;
}
// todo 处理发给adas的事件, 主要处理逆向超车和obu行人碰撞
String id = intent.getStringExtra("v2x_warning_type");
if (id != null) {
@@ -63,15 +167,67 @@ public class AdasNoticeHelper implements IMogoAdasWarnMessageCallback {
MogoApisHandler.getInstance().getApis().getEntranceButtonController().showLeftNoticeByType(IMogoEntranceButtonController.NOTICE_TYPE_PEOPLE_WARN, R.drawable.module_ext_people_warn, "前方注意行人");
}
}
int type = intent.getIntExtra("type", -1);
if (type == 2) {
// 红绿灯处理
String data = intent.getStringExtra("data");
if (data != null && !data.isEmpty()) {
try {
JSONObject jsonObject = new JSONObject(data);
String lightStatus = jsonObject.optString("lightStatus");
String surplusTime = jsonObject.optString("surplusTime");
if (!lightStatus.isEmpty() && !surplusTime.isEmpty()) {
handleObuTrafficLightInfo(lightStatus, surplusTime);
} else {
Logger.d(TAG, "红绿灯必要信息都为空,不做展示");
}
} catch (Exception e) {
Logger.e(TAG, e, "解析adas数据异常");
e.printStackTrace();
}
}
}
}
}
private View generateNoticeView(int iconRes, String content) {
View view = LayoutInflater.from(context).inflate(R.layout.item_vr_left_notice, null);
ImageView icon = view.findViewById(R.id.module_ext_iv_left_notice_icon);
icon.setImageResource(iconRes);
TextView tvContent = view.findViewById(R.id.module_ext_vr_mode_left_notice_container);
tvContent.setText(content);
return view;
private void handleObuTrafficLightInfo(String lightStatus, String surplusTime) {
if (tvTrafficLight != null) {
handler.removeMessages(MSG_HIDE_TRAFFIC_LIGHT_BY_OBU);
handler.removeMessages(MSG_HIDE_TRAFFIC_LIGHT_BY_CLOUD);
drawTrafficLight(lightStatus, surplusTime);
handler.sendEmptyMessageDelayed(MSG_HIDE_TRAFFIC_LIGHT_BY_OBU, HIDE_TRAFFIC_LIGHT_DELAY);
}
}
private void handleCloudTrafficLight(){
if (tvTrafficLight != null && !handler.hasMessages(MSG_HIDE_TRAFFIC_LIGHT_BY_OBU)) {
handler.removeMessages(MSG_HIDE_TRAFFIC_LIGHT_BY_CLOUD);
// todo drawTrafficLight
handler.sendEmptyMessageDelayed(MSG_HIDE_TRAFFIC_LIGHT_BY_CLOUD,
HIDE_TRAFFIC_LIGHT_DELAY);
}
}
private void drawTrafficLight(String lightStatus, String surplusTime) {
tvTrafficLight.post(() -> {
if (tvTrafficLight.getVisibility() == View.GONE) {
tvTrafficLight.setVisibility(View.VISIBLE);
}
// todo 设置字体颜色、背景颜色、leftDrawable
switch (lightStatus) {
case "Y":
// 黄灯
break;
case "R":
// 红灯
break;
default:
// 默认绿灯
break;
}
tvTrafficLight.setText(surplusTime + "S");
Logger.d(TAG, "展示红绿灯信息: " + lightStatus + " time: " + surplusTime);
});
}
}

View File

@@ -0,0 +1,20 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="oval">
<size
android:width="65px"
android:height="65px" />
<padding
android:bottom="12px"
android:top="12px"
android:left="14px"
android:right="14px" />
<solid android:color="#7f000000" />
<stroke
android:width="2px"
android:color="#99FF3B2B" />
</shape>

View File

@@ -0,0 +1,20 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="oval">
<size
android:width="65px"
android:height="65px" />
<padding
android:bottom="12px"
android:top="12px"
android:left="14px"
android:right="14px" />
<solid android:color="#7f000000" />
<stroke
android:width="2px"
android:color="#99FFFFFF" />
</shape>

View File

@@ -0,0 +1,19 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<padding
android:bottom="12px"
android:left="30px"
android:right="30px"
android:top="12px" />
<corners android:radius="32.5px" />
<solid android:color="#7f000000" />
<stroke
android:width="2px"
android:color="#997DE261" />
</shape>

View File

@@ -14,8 +14,7 @@
<include
layout="@layout/include_navi_info_panle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
/>
android:layout_height="wrap_content" />
<TextView
android:id="@+id/module_ext_id_north"
@@ -41,19 +40,19 @@
android:id="@+id/module_ext_id_destination_online_car"
android:layout_width="wrap_content"
android:layout_height="@dimen/module_ext_button_height"
android:layout_marginLeft="@dimen/module_common_shadow_width_pos"
android:layout_marginTop="@dimen/module_ext_camera_button_marginTop"
android:background="@drawable/module_ext_dw_navi_info_panel_bkg"
android:drawableLeft="@drawable/module_ext_destination_online_car_dw"
android:drawablePadding="@dimen/module_ext_destination_online_car_drawablePadding"
android:gravity="center_vertical"
android:paddingLeft="@dimen/module_ext_destination_online_car_paddingLeft"
android:paddingRight="@dimen/module_ext_destination_online_car_paddingRight"
android:text="@string/module_ext_destination_online_car_text"
android:visibility="gone"
android:textColor="@color/module_ext_color_voice_text"
android:textSize="@dimen/module_ext_north_textSize"
android:textStyle="bold"
android:paddingRight="@dimen/module_ext_destination_online_car_paddingRight"
android:layout_marginLeft="@dimen/module_common_shadow_width_pos"
android:paddingLeft="@dimen/module_ext_destination_online_car_paddingLeft"
android:visibility="gone"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintTop_toBottomOf="@+id/module_map_id_navi_bg"
app:layout_goneMarginTop="@dimen/module_ext_north_goneMarginTop"
@@ -72,12 +71,12 @@
android:id="@+id/module_ext_id_display_overview"
android:layout_width="@dimen/module_ext_button_width"
android:layout_height="@dimen/module_ext_button_height"
android:layout_marginLeft="@dimen/module_common_shadow_width_pos"
android:layout_marginTop="@dimen/module_ext_camera_button_marginTop"
android:background="@drawable/module_ext_dw_common_corner_bkg"
android:gravity="center_horizontal"
android:orientation="vertical"
android:visibility="gone"
android:layout_marginLeft="@dimen/module_common_shadow_width_pos"
app:layout_constraintLeft_toLeftOf="@+id/module_map_id_navi_bg"
app:layout_constraintTop_toBottomOf="@+id/module_map_id_navi_bg"
tools:visibility="gone">
@@ -102,17 +101,17 @@
<TextView
android:id="@+id/module_ext_enter_vr_mode"
android:layout_marginRight="@dimen/module_common_shadow_width_pos"
android:layout_width="@dimen/module_ext_operation_panel_share_width"
android:layout_height="@dimen/module_ext_operation_panel_share_height"
android:background="@drawable/module_ext_dw_upload_road_condition_bkg"
android:text="VR"
android:textSize="@dimen/module_ext_enter_vr_mode_text_size"
android:textColor="#fff"
app:layout_constraintRight_toRightOf="@+id/module_entrance_id_move2_current_location"
app:layout_constraintBottom_toTopOf="@+id/module_entrance_id_move2_current_location"
android:layout_marginRight="@dimen/module_common_shadow_width_pos"
android:layout_marginBottom="@dimen/module_ext_enter_vr_mode_margin_bottom"
android:gravity="center"/>
android:background="@drawable/module_ext_dw_upload_road_condition_bkg"
android:gravity="center"
android:text="VR"
android:textColor="#fff"
android:textSize="@dimen/module_ext_enter_vr_mode_text_size"
app:layout_constraintBottom_toTopOf="@+id/module_entrance_id_move2_current_location"
app:layout_constraintRight_toRightOf="@+id/module_entrance_id_move2_current_location" />
<ImageButton
android:id="@+id/module_entrance_id_move2_current_location"
@@ -128,32 +127,33 @@
android:id="@+id/module_ext_exit_vr_mode"
android:layout_width="@dimen/module_ext_operation_panel_width"
android:layout_height="@dimen/module_ext_operation_panel_move2_height"
android:text="退出"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
android:visibility="gone"
android:background="@drawable/module_ext_shadow_bkg"
android:textSize="@dimen/module_ext_exit_vr_mode_text_size"
android:gravity="center"
android:text="退出"
android:textColor="#fff"
android:gravity="center" />
android:textSize="@dimen/module_ext_exit_vr_mode_text_size"
android:visibility="gone"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintRight_toRightOf="parent" />
<FrameLayout
android:id="@+id/module_ext_vr_mode_left_notice_container"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/module_ext_vr_mode_left_notice_container"
app:layout_constraintLeft_toLeftOf="parent"
android:visibility="gone"
app:layout_constraintBottom_toBottomOf="parent"
android:visibility="gone"/>
app:layout_constraintLeft_toLeftOf="parent" />
<LinearLayout
android:id="@+id/module_entrance_id_buttons_container"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical"
android:layout_marginLeft="@dimen/module_ext_vr_mode_left_feature_margin_left"
app:layout_goneMarginLeft="@dimen/module_common_shadow_width_pos"
android:layout_marginBottom="@dimen/module_common_shadow_width_pos"
android:orientation="vertical"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toRightOf="@+id/module_ext_vr_mode_left_notice_container">
app:layout_constraintLeft_toRightOf="@+id/module_ext_vr_mode_left_notice_container"
app:layout_goneMarginLeft="@dimen/module_common_shadow_width_pos">
<TextView
android:id="@+id/module_entrance_id_button1"
@@ -198,10 +198,11 @@
<FrameLayout
android:id="@+id/module_entrance_id_upload_road_condition"
android:layout_marginTop="@dimen/module_entrance_id_button_marginTop"
android:layout_width="@dimen/module_ext_operation_panel_share_width"
android:layout_height="@dimen/module_ext_operation_panel_share_height"
android:layout_marginTop="@dimen/module_entrance_id_button_marginTop"
android:background="@drawable/module_ext_dw_upload_road_condition_bkg">
<TextView
android:id="@+id/module_entrance_id_upload"
android:layout_width="match_parent"
@@ -227,6 +228,43 @@
</FrameLayout>
</LinearLayout>
<TextView
android:id="@+id/tvSelfSpeed"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="@dimen/module_ext_vr_mode_self_speed_margin_end"
android:background="@drawable/module_ext_vr_mode_speed_red_bg"
android:text="72"
android:textColor="@color/module_ext_vr_mode_left_traffic_light_red"
android:textSize="@dimen/module_ext_vr_mode_traffic_light_text_size"
android:visibility="gone"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/tvTrafficLight"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/module_ext_vr_mode_traffic_light_green_bg"
android:text="26S"
android:textColor="@color/module_ext_vr_mode_left_traffic_light_green"
android:textSize="@dimen/module_ext_vr_mode_traffic_light_text_size"
android:visibility="gone"
app:layout_constraintLeft_toRightOf="@+id/tvSelfSpeed"
app:layout_constraintTop_toTopOf="@+id/tvSelfSpeed" />
<TextView
android:id="@+id/tvLimitSpeed"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/module_ext_vr_mode_self_speed_margin_end"
android:background="@drawable/module_ext_vr_mode_speed_white_bg"
android:text="160"
android:textColor="@color/module_ext_vr_mode_left_traffic_light_white"
android:textSize="@dimen/module_ext_vr_mode_traffic_light_text_size"
android:visibility="gone"
app:layout_constraintLeft_toRightOf="@+id/tvTrafficLight"
app:layout_constraintTop_toTopOf="@+id/tvTrafficLight" />
<Button
android:id="@+id/btnDebugCtrlTopView"
@@ -281,6 +319,7 @@
android:textSize="20sp"
app:layout_constraintBottom_toTopOf="@id/btnShowTextTip"
app:layout_constraintLeft_toLeftOf="parent" />
<Button
android:id="@+id/btnShowDrawableTipNoSize"
android:layout_width="wrap_content"
@@ -297,7 +336,8 @@
android:visibility="gone"
app:constraint_referenced_ids="btnShowDrawableTipNoSize,btnShowDrawableTip,btnShowTextTip,btnDebugCtrlNaviView,btnDebugCtrlSubView,btnDebugCtrlTopView,btnDebugAddBottomLayerView" />
<include layout="@layout/module_ext_layout_crash_threshold_set"
android:visibility="gone"/>
<include
layout="@layout/module_ext_layout_crash_threshold_set"
android:visibility="gone" />
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@@ -5,4 +5,10 @@
<color name="module_ext_weather_text_color">#fff</color>
<color name="module_ext_vr_mode_left_notice_content_text_color">#f1f1f1</color>
<color name="module_ext_vr_mode_left_traffic_light_green">#7DE261</color>
<color name="module_ext_vr_mode_left_traffic_light_red">#FF2B2B</color>
<color name="module_ext_vr_mode_left_traffic_light_yellow">#FFF</color>
<color name="module_ext_vr_mode_left_traffic_light_white">#FFF</color>
</resources>

View File

@@ -176,4 +176,8 @@
<dimen name="module_ext_vr_mode_left_notice_content_padding_top">32px</dimen>
<dimen name="module_ext_vr_mode_left_notice_content_padding_left">40px</dimen>
<dimen name="module_ext_vr_mode_left_feature_margin_left">50px</dimen>
<dimen name="module_ext_vr_mode_traffic_light_text_size">36px</dimen>
<dimen name="module_ext_vr_mode_self_speed_margin_end">15px</dimen>
</resources>

View File

@@ -19,4 +19,14 @@ class ADASWarnMessage {
*/
public int type;
public String value;
@Override
public String toString() {
return "ADASWarnMessage{" +
"content='" + content + '\'' +
", level='" + level + '\'' +
", type=" + type +
", value='" + value + '\'' +
'}';
}
}

View File

@@ -5,9 +5,13 @@ package com.mogo.service.connection;
*/
public interface IMogoOnWebSocketMessageListener< T > {
WebSocketMsgType getDownLinkType();
default WebSocketMsgType getDownLinkType(){
return null;
}
WebSocketMsgType getUpLinkType();
default WebSocketMsgType getUpLinkType(){
return null;
}
default void onMsgReceived(T obj){

View File

@@ -16,45 +16,45 @@ public interface IMogoEntranceButtonController extends IProvider {
/**
* 前车急刹
*/
public static final int NOTICE_TYPE_SUDDENLY_BREAK = 1001;
int NOTICE_TYPE_SUDDENLY_BREAK = 1001;
/**
* vip变灯通行
*/
public static final int NOTICE_TYPE_VIP = 1002;
int NOTICE_TYPE_VIP = 1002;
/**
* 行人碰撞预警
*/
public static final int NOTICE_TYPE_PEOPLE_WARN = 1003;
int NOTICE_TYPE_PEOPLE_WARN = 1003;
/**
* 逆向超车
*/
public static final int NOTICE_TYPE_ILLEGAL_OVERTAKE = 1004;
int NOTICE_TYPE_ILLEGAL_OVERTAKE = 1004;
/**
* 后方危险车辆提醒
*/
public static final int NOTICE_TYPE_DANGEROUS_CAR_WARN = 1005;
int NOTICE_TYPE_DANGEROUS_CAR_WARN = 1005;
/**
* 特殊车辆快速通过
*/
public static final int NOTICE_TYPE_SPECIAL_CAR_WARN = 1006;
int NOTICE_TYPE_SPECIAL_CAR_WARN = 1006;
/**
* 自车求助
*/
public static final int NOTICE_TYPE_SEEK_HELP = 1007;
int NOTICE_TYPE_SEEK_HELP = 1007;
/**
* 交通事故识别
*/
public static final int NOTICE_TYPE_ACCIDENT_WARN = 1008;
int NOTICE_TYPE_ACCIDENT_WARN = 1008;
/**
* 障碍物体绕行
*/
public static final int NOTICE_TYPE_OBSTACLE_WARN = 1009;
int NOTICE_TYPE_OBSTACLE_WARN = 1009;
/**
* 障碍车辆绕行
*/
public static final int NOTICE_TYPE_OBSTACLE_CAR_WARN = 1010;
int NOTICE_TYPE_OBSTACLE_CAR_WARN = 1010;
/**
* 获取入口按钮实例