diff --git a/OCH/mogo-och-bus-passenger/src/main/java/com/mogo/och/bus/passenger/model/BusPassengerModel.java b/OCH/mogo-och-bus-passenger/src/main/java/com/mogo/och/bus/passenger/model/BusPassengerModel.java index 7f9811f074..ae69e9f648 100644 --- a/OCH/mogo-och-bus-passenger/src/main/java/com/mogo/och/bus/passenger/model/BusPassengerModel.java +++ b/OCH/mogo-och-bus-passenger/src/main/java/com/mogo/och/bus/passenger/model/BusPassengerModel.java @@ -206,6 +206,7 @@ public class BusPassengerModel { if (i == 0){ startOrStopRouteAndWipe(false); } + mPreRouteIndex = 0; startOrStopCalculateRouteInfo(false); mRouteLineInfoCallback.updateStationsInfo(stations,i,true); return; @@ -414,6 +415,8 @@ public class BusPassengerModel { int nextRouteIndex = CoordinateCalculateRouteUtil.getArrivedPointIndexNew(currentRouteIndex ,mRoutePoints ,stationNext.getGcjLon(),stationNext.getGcjLat()); + CallerLogger.INSTANCE.d(M_BUS_P + TAG, "currentRouteIndex = " + currentRouteIndex + + ", nextRouteIndex = " + nextRouteIndex); if (currentRouteIndex < nextRouteIndex){ //如果找到的next在起点的轨迹前面,直接舍弃这个轨迹,不显示 mTwoStationsRouts.addAll(mRoutePoints.subList(currentRouteIndex,nextRouteIndex)); } @@ -486,17 +489,17 @@ public class BusPassengerModel { } public void loopRouteAndWipe() { - if (mRoutePoints != null && mRoutePoints.size() > 0 && mLocation != null){ + if (mTwoStationsRouts != null && mTwoStationsRouts.size() > 0 && mLocation != null){ int haveArrivedIndex = CoordinateCalculateRouteUtil .getArrivedPointIndexNew(mPreRouteIndex, - mRoutePoints, + mTwoStationsRouts, mLocation.getLongitude(), mLocation.getLatitude()); CallerLogger.INSTANCE.d(M_BUS_P + TAG, "thread = "+ Thread.currentThread().getName()+" haveArrivedIndex== " + haveArrivedIndex); if (mAutopilotPlanningCallback != null){ List routePoints = CoordinateCalculateRouteUtil - .coordinateConverterLocationToLatLng(mContext,mRoutePoints); + .coordinateConverterLocationToLatLng(mContext,mTwoStationsRouts); mAutopilotPlanningCallback.routeResult(routePoints,haveArrivedIndex); } } diff --git a/OCH/mogo-och-bus-passenger/src/main/java/com/mogo/och/bus/passenger/ui/BusPassengerMapDirectionView.java b/OCH/mogo-och-bus-passenger/src/main/java/com/mogo/och/bus/passenger/ui/BusPassengerMapDirectionView.java index 509f908434..5213372938 100644 --- a/OCH/mogo-och-bus-passenger/src/main/java/com/mogo/och/bus/passenger/ui/BusPassengerMapDirectionView.java +++ b/OCH/mogo-och-bus-passenger/src/main/java/com/mogo/och/bus/passenger/ui/BusPassengerMapDirectionView.java @@ -56,9 +56,8 @@ public class BusPassengerMapDirectionView private int mCurrentIndex = -1; - private int zoomLevel = 13; - private List mCoordinatesLatLng = new ArrayList<>(); //站点坐标数据 - private List mLinePointsLatLng = new ArrayList<>(); //轨迹坐标数据 + private List mCoordinatesLatLng = new ArrayList<>(); //轨迹坐标数据 + private List mLineStationLatLng = new ArrayList<>();//站点坐标数据 private Polyline mPolyline; private CameraUpdate mCameraUpdate; private Context mContext; @@ -200,24 +199,23 @@ public class BusPassengerMapDirectionView //圈定地图显示范围 LatLngBounds.Builder boundsBuilder = new LatLngBounds.Builder(); - if (mLinePointsLatLng.size() > 0){ + if (mLineStationLatLng.size() > 0){ //存放经纬度 - for (int i = 0; i < mLinePointsLatLng.size(); i++) { - boundsBuilder.include(mLinePointsLatLng.get(i)); + for (int i = 0; i < mLineStationLatLng.size(); i++) { + boundsBuilder.include(mLineStationLatLng.get(i)); } - boundsBuilder.include(currentLatLng); //第二个参数为四周留空宽度 - mAMap.moveCamera(CameraUpdateFactory.newLatLngBoundsRect(boundsBuilder.build(),100,100,100,100)); - } else { - boundsBuilder.include(currentLatLng); + } +// else { //第二个参数为四周留空宽度 - mAMap.moveCamera(CameraUpdateFactory.newLatLngBoundsRect(boundsBuilder.build(),100,100,100,100)); //设置希望展示的地图缩放级别 // CameraPosition cameraPosition = new CameraPosition.Builder() // .target(mCarMarker.getPosition()).tilt(0).bearing(location.getBearing()).zoom(zoomLevel).build(); // mAMap.moveCamera(CameraUpdateFactory.newCameraPosition(cameraPosition)); - } +// } + boundsBuilder.include(currentLatLng); + mAMap.moveCamera(CameraUpdateFactory.newLatLngBoundsRect(boundsBuilder.build(),100,100,100,100)); } @@ -230,9 +228,9 @@ public class BusPassengerMapDirectionView if (mAMap != null) { addRouteColorList(); - CallerLogger.INSTANCE.d(M_BUS_P + TAG, "mLinePointsLatLng.size() = " +mLinePointsLatLng.size()); - if (mLinePointsLatLng.size() >= 2 && mCoordinatesLatLng.size() > 2) { - + CallerLogger.INSTANCE.d(M_BUS_P + TAG, "mLinePointsLatLng.size() = " +mLineStationLatLng.size() + +" mCoordinatesLatLng.size()= " + mCoordinatesLatLng.size()); + if (mLineStationLatLng.size() >= 2 && mCoordinatesLatLng.size() > 2) { //设置线段纹理 PolylineOptions polylineOptions = new PolylineOptions(); polylineOptions.addAll(mCoordinatesLatLng); @@ -305,7 +303,7 @@ public class BusPassengerMapDirectionView textureList.clear(); texIndexList.clear(); mCoordinatesLatLng.clear(); - mLinePointsLatLng.clear(); + mLineStationLatLng.clear(); CallerLogger.INSTANCE.d(M_BUS_P + TAG, " mCoordinatesLatLng.clear " ); } @@ -353,16 +351,16 @@ public class BusPassengerMapDirectionView mLineMarkers.clear(); } - public void setLineMarkersAndDraw(List lineineLatLngs){ + public void setLineMarkersAndDraw(List stationLatLngs){ clearLineMarkers(); - for (int i = 0; i < lineineLatLngs.size(); i++) { + for (int i = 0; i < stationLatLngs.size(); i++) { Marker mWayPointMarker = mAMap.addMarker(new MarkerOptions() .icon(BitmapDescriptorFactory.fromResource(R.drawable.bus_p_map_view_dir_way_point))); mLineMarkers.add(mWayPointMarker); } if (mCoordinatesLatLng.size() == 0) { for (int i = 0; i < mLineMarkers.size(); i++) { - mLineMarkers.get(i).setPosition(lineineLatLngs.get(i)); + mLineMarkers.get(i).setPosition(stationLatLngs.get(i)); mLineMarkers.get(i).setVisible(true); } mCurrentIndex = -1; @@ -370,15 +368,15 @@ public class BusPassengerMapDirectionView } public void setLinePointMarkerAndDraw(List routeLineLatLngs, int currentIndex) { - mLinePointsLatLng.clear(); - mLinePointsLatLng.addAll(routeLineLatLngs); + mLineStationLatLng.clear(); + mLineStationLatLng.addAll(routeLineLatLngs); - if (mLinePointsLatLng.size() > 0 && mCurrentIndex != currentIndex) { + if (mLineStationLatLng.size() > 0 && mCurrentIndex != currentIndex) { if (mAMap != null && mLineMarkers.size() > 0) { mCurrentIndex = currentIndex; for (int i = 0; i < mLineMarkers.size(); i++) { if (i != currentIndex && i + 1 != currentIndex) { - mLineMarkers.get(i).setPosition(mLinePointsLatLng.get(i)); + mLineMarkers.get(i).setPosition(mLineStationLatLng.get(i)); mLineMarkers.get(i).setVisible(true); } else { mLineMarkers.get(i).setVisible(false); diff --git a/OCH/mogo-och-bus-passenger/src/main/java/com/mogo/och/bus/passenger/ui/BusPassengerRouteFragment.java b/OCH/mogo-och-bus-passenger/src/main/java/com/mogo/och/bus/passenger/ui/BusPassengerRouteFragment.java index 19be9fe6ef..5e345ae9a5 100644 --- a/OCH/mogo-och-bus-passenger/src/main/java/com/mogo/och/bus/passenger/ui/BusPassengerRouteFragment.java +++ b/OCH/mogo-och-bus-passenger/src/main/java/com/mogo/och/bus/passenger/ui/BusPassengerRouteFragment.java @@ -1,6 +1,5 @@ package com.mogo.och.bus.passenger.ui; -import android.location.Location; import android.os.Bundle; import android.view.View; import android.view.animation.Animation; @@ -47,7 +46,7 @@ public class BusPassengerRouteFragment extends private BusPassengerTrafficLightView mTrafficLightView; private List mStationsList = new ArrayList<>(); - private List mLinePointsList = new ArrayList<>(); + private List mLineStationsList = new ArrayList<>(); private TextView mSpeedTv; private ConstraintLayout mNoLineInfoView; @@ -299,19 +298,19 @@ public class BusPassengerRouteFragment extends } private void updateWayPointList(List stations,int currentStationIndex) { - mLinePointsList.clear(); + mLineStationsList.clear(); for (int i = 0; i< stations.size(); i++) {//站点集合 LatLng latLng = CoordinateCalculateRouteUtil.coordinateConverterWgsToGcj(getContext() ,stations.get(i).getLon(),stations.get(i).getLat());// lat,lon - mLinePointsList.add(latLng); + mLineStationsList.add(latLng); } - setLineMarkers(mLinePointsList); + setLineMarkers(mLineStationsList); if (mMapDirectionView != null) { UiThreadHandler.post(new Runnable() { @Override public void run() { - mMapDirectionView.setLinePointMarkerAndDraw(mLinePointsList,currentStationIndex); + mMapDirectionView.setLinePointMarkerAndDraw(mLineStationsList,currentStationIndex); } }); } diff --git a/OCH/mogo-och-common-module/src/main/java/com/mogo/och/common/module/utils/CoordinateCalculateRouteUtil.java b/OCH/mogo-och-common-module/src/main/java/com/mogo/och/common/module/utils/CoordinateCalculateRouteUtil.java index acd799461a..431c41b004 100644 --- a/OCH/mogo-och-common-module/src/main/java/com/mogo/och/common/module/utils/CoordinateCalculateRouteUtil.java +++ b/OCH/mogo-och-common-module/src/main/java/com/mogo/och/common/module/utils/CoordinateCalculateRouteUtil.java @@ -245,7 +245,8 @@ public class CoordinateCalculateRouteUtil { for (int i= preIndex; i < mRoutePoints.size(); i++){ MogoLocation latLng = mRoutePoints.get(i); //todo 先看index对应点的方向和realLocation方向是否一致, 方向角度不能过90度 - if (Math.abs(realLocation.getBearing() - latLng.getBearing()) <= 90){ + if (latLng.getBearing() == realLocation.getBearing() - latLng.getBearing() || + Math.abs(realLocation.getBearing() - latLng.getBearing()) <= 90){ float diff = CoordinateUtils.calculateLineDistance(realLocation.getLongitude(), realLocation.getLatitude(), latLng.getLongitude(),latLng.getLatitude()); diff --git a/core/function-impl/mogo-core-function-autopilot/src/main/java/com/mogo/eagle/core/function/autopilot/adapter/MoGoAdasListenerImpl.kt b/core/function-impl/mogo-core-function-autopilot/src/main/java/com/mogo/eagle/core/function/autopilot/adapter/MoGoAdasListenerImpl.kt index 32ab95019c..e2be4c4680 100644 --- a/core/function-impl/mogo-core-function-autopilot/src/main/java/com/mogo/eagle/core/function/autopilot/adapter/MoGoAdasListenerImpl.kt +++ b/core/function-impl/mogo-core-function-autopilot/src/main/java/com/mogo/eagle/core/function/autopilot/adapter/MoGoAdasListenerImpl.kt @@ -317,7 +317,6 @@ class MoGoAdasListenerImpl : OnAdasListener { carConfigResp: MessagePad.CarConfigResp? ) { if (carConfigResp != null) { - //todo emArrow startUp时确认数据完整性 AppConfigInfo.dockerVersion = carConfigResp.dockVersion AppConfigInfo.plateNumber = carConfigResp.plateNumber//车牌号 AppConfigInfo.iPCMacAddress = carConfigResp.macAddress//工控机MAC地址 diff --git a/core/function-impl/mogo-core-function-devatools/src/main/java/com/zhjt/mogo_core_function_devatools/badcase/biz/AIDataCollectWindow.kt b/core/function-impl/mogo-core-function-devatools/src/main/java/com/zhjt/mogo_core_function_devatools/badcase/biz/AIDataCollectWindow.kt index f692c0d90a..499e30d784 100644 --- a/core/function-impl/mogo-core-function-devatools/src/main/java/com/zhjt/mogo_core_function_devatools/badcase/biz/AIDataCollectWindow.kt +++ b/core/function-impl/mogo-core-function-devatools/src/main/java/com/zhjt/mogo_core_function_devatools/badcase/biz/AIDataCollectWindow.kt @@ -300,14 +300,14 @@ class AIDataCollectWindow constructor(activity: Activity) : View.OnTouchListener mInViewY = motionEvent.y // 获取相对屏幕的坐标,即以屏幕左上角为原点 mDownInScreenX = motionEvent.rawX - mDownInScreenY = motionEvent.rawY - BarUtils.getStatusBarHeight() + mDownInScreenY = motionEvent.rawY mInScreenX = motionEvent.rawX - mInScreenY = motionEvent.rawY - BarUtils.getStatusBarHeight() + mInScreenY = motionEvent.rawY } MotionEvent.ACTION_MOVE -> { // 更新浮动窗口位置参数 mInScreenX = motionEvent.rawX - mInScreenY = motionEvent.rawY - BarUtils.getStatusBarHeight() + mInScreenY = motionEvent.rawY mWindowParams!!.x = (mInScreenX - mInViewX).toInt() mWindowParams!!.y = (mInScreenY - mInViewY).toInt() // 手指移动的时候更新小悬浮窗的位置 diff --git a/core/function-impl/mogo-core-function-devatools/src/main/java/com/zhjt/mogo_core_function_devatools/badcase/biz/InitiativeBadCaseWindow.kt b/core/function-impl/mogo-core-function-devatools/src/main/java/com/zhjt/mogo_core_function_devatools/badcase/biz/InitiativeBadCaseWindow.kt index 6518eb66ac..8f2f8cdda3 100644 --- a/core/function-impl/mogo-core-function-devatools/src/main/java/com/zhjt/mogo_core_function_devatools/badcase/biz/InitiativeBadCaseWindow.kt +++ b/core/function-impl/mogo-core-function-devatools/src/main/java/com/zhjt/mogo_core_function_devatools/badcase/biz/InitiativeBadCaseWindow.kt @@ -315,14 +315,14 @@ class InitiativeBadCaseWindow constructor(activity: Activity) : View.OnTouchList mInViewY = motionEvent.y // 获取相对屏幕的坐标,即以屏幕左上角为原点 mDownInScreenX = motionEvent.rawX - mDownInScreenY = motionEvent.rawY - BarUtils.getStatusBarHeight() + mDownInScreenY = motionEvent.rawY mInScreenX = motionEvent.rawX - mInScreenY = motionEvent.rawY - BarUtils.getStatusBarHeight() + mInScreenY = motionEvent.rawY } MotionEvent.ACTION_MOVE -> { // 更新浮动窗口位置参数 mInScreenX = motionEvent.rawX - mInScreenY = motionEvent.rawY - BarUtils.getStatusBarHeight() + mInScreenY = motionEvent.rawY mWindowParams!!.x = (mInScreenX - mInViewX).toInt() mWindowParams!!.y = (mInScreenY - mInViewY).toInt() // 手指移动的时候更新小悬浮窗的位置 @@ -338,7 +338,7 @@ class InitiativeBadCaseWindow constructor(activity: Activity) : View.OnTouchList // 默认固定位置,靠屏幕右边缘的中间 mWindowManager!!.defaultDisplay.getMetrics(metrics) mWindowParams!!.x = metrics.widthPixels - mWindowParams!!.y = metrics.heightPixels / 2 - BarUtils.getStatusBarHeight()-350 + mWindowParams!!.y = metrics.heightPixels / 2 - BarUtils.getStatusBarHeight()-950 mWindowManager!!.addView(mFloatLayout, mWindowParams) //开启录包 if(recordCaseEntity!=null){ diff --git a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/MoGoHmiFragment.kt b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/MoGoHmiFragment.kt index b7d7139a43..984e95b476 100644 --- a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/MoGoHmiFragment.kt +++ b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/MoGoHmiFragment.kt @@ -270,7 +270,6 @@ class MoGoHmiFragment : MvpFragment(), if(isChecked){ viewPassengerMsgBoxList.visibility = View.VISIBLE viewPassengerMsgBoxBubble.visibility = View.GONE - viewPassengerMsgBoxList.notifyData() viewPassengerMsgBoxBubble.isShowData(false) CallerHmiManager.updatePassengerMsgBoxTipView(false) }else{ diff --git a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/msgbox/DriverMsgBoxListView.kt b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/msgbox/DriverMsgBoxListView.kt index a4606ebcd6..554403778b 100644 --- a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/msgbox/DriverMsgBoxListView.kt +++ b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/msgbox/DriverMsgBoxListView.kt @@ -3,15 +3,24 @@ package com.mogo.eagle.core.function.hmi.ui.msgbox import android.app.Activity import android.content.Context import android.util.AttributeSet +import android.util.Log import android.view.LayoutInflater import android.view.View import androidx.constraintlayout.widget.ConstraintLayout import androidx.recyclerview.widget.LinearLayoutManager +import com.mogo.eagle.core.data.config.FunctionBuildConfig import com.mogo.eagle.core.data.msgbox.MsgBoxBean +import com.mogo.eagle.core.data.msgbox.MsgCategory +import com.mogo.eagle.core.data.msgbox.OperationMsg +import com.mogo.eagle.core.function.api.msgbox.IMsgBoxListener +import com.mogo.eagle.core.function.call.msgbox.CallerMsgBoxListenerManager import com.mogo.eagle.core.function.call.msgbox.CallerMsgBoxManager import com.mogo.eagle.core.function.hmi.R import com.mogo.eagle.core.function.hmi.ui.msgbox.adapter.DriverMsgBoxListAdapter import com.mogo.eagle.core.function.msgbox.MsgBoxConfig +import com.mogo.eagle.core.utilcode.mogo.AppIdentityModeUtils +import com.mogo.eagle.core.utilcode.util.TimeUtils +import com.mogo.eagle.core.utilcode.util.UiThreadHandler import kotlinx.android.synthetic.main.layout_driver_msg_box_list.view.* /** @@ -23,13 +32,13 @@ class DriverMsgBoxListView @JvmOverloads constructor( context: Context, attrs: AttributeSet? = null, defStyleAttr: Int = 0 -) : ConstraintLayout(context, attrs, defStyleAttr){ +) : ConstraintLayout(context, attrs, defStyleAttr) , IMsgBoxListener { init { LayoutInflater.from(context).inflate(R.layout.layout_driver_msg_box_list, this, true) initView() } - + private val TAG = "DriverMsgBoxListView" private var noticeList: ArrayList ?= null private var ipcReportList: ArrayList ?= null private var badCaseList: ArrayList ?= null @@ -42,10 +51,13 @@ class DriverMsgBoxListView @JvmOverloads constructor( //获取通知消息列表 noticeList= CallerMsgBoxManager.getCachedNotifyData() as ArrayList? + noticeList = noticeList?.let { ArrayList(it.reversed()) } //获取车辆系统信息列表 ipcReportList = CallerMsgBoxManager.getCachedSysInfoData() as ArrayList? + ipcReportList = ipcReportList?.let { ArrayList(it.reversed()) } //获取录包信息列表 badCaseList = CallerMsgBoxManager.getCachedRecordBagData() as ArrayList? + badCaseList = badCaseList?.let { ArrayList(it.reversed()) } //通知 tvMsgNotice.setOnClickListener { tvMsgNotice.setTextColor(resources.getColor(R.color.msg_box_title_color)) @@ -103,14 +115,6 @@ class DriverMsgBoxListView @JvmOverloads constructor( } fun notifyData(){ - val localNoticeList = MsgBoxConfig.noticeList.reversed() - noticeList?.addAll(0,localNoticeList) - val localSysInfoList = MsgBoxConfig.systemInfoList.reversed() - ipcReportList?.addAll(0,localSysInfoList) - val localRecordList = MsgBoxConfig.recordBagList.reversed() - - badCaseList?.addAll(0,localRecordList) - //获取当前Tab选择 when(MsgBoxConfig.getUserRecord()){ 0 ->{ @@ -162,6 +166,35 @@ class DriverMsgBoxListView @JvmOverloads constructor( } + override fun onDataChanged(category: MsgCategory, msgBoxList: MsgBoxBean) { + UiThreadHandler.post{ + when (category) { + MsgCategory.NOTICE -> { + noticeList?.add(0,msgBoxList) + } + MsgCategory.SYS_INFO -> { + ipcReportList?.add(0,msgBoxList) + } + MsgCategory.RECORD_BAG -> { + badCaseList?.add(0,msgBoxList) + } + } + } + } + + override fun onAttachedToWindow() { + super.onAttachedToWindow() + if(AppIdentityModeUtils.isDriver(FunctionBuildConfig.appIdentityMode)){ + CallerMsgBoxListenerManager.addListener(TAG,this) + } + } + + override fun onDetachedFromWindow() { + super.onDetachedFromWindow() + if(AppIdentityModeUtils.isDriver(FunctionBuildConfig.appIdentityMode)){ + CallerMsgBoxListenerManager.removeListener(TAG) + } + } } \ No newline at end of file diff --git a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/msgbox/PassengerMsgBoxListView.kt b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/msgbox/PassengerMsgBoxListView.kt index 9b231d917b..f0720f387c 100644 --- a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/msgbox/PassengerMsgBoxListView.kt +++ b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/msgbox/PassengerMsgBoxListView.kt @@ -7,14 +7,18 @@ import android.view.LayoutInflater import androidx.constraintlayout.widget.ConstraintLayout import androidx.recyclerview.widget.DividerItemDecoration import androidx.recyclerview.widget.LinearLayoutManager +import com.mogo.eagle.core.data.config.FunctionBuildConfig import com.mogo.eagle.core.data.msgbox.MsgBoxBean import com.mogo.eagle.core.data.msgbox.MsgBoxType -import com.mogo.eagle.core.data.msgbox.V2XMsg +import com.mogo.eagle.core.data.msgbox.MsgCategory +import com.mogo.eagle.core.function.api.msgbox.IMsgBoxListener +import com.mogo.eagle.core.function.call.msgbox.CallerMsgBoxListenerManager import com.mogo.eagle.core.function.call.msgbox.CallerMsgBoxManager import com.mogo.eagle.core.function.hmi.R import com.mogo.eagle.core.function.hmi.ui.msgbox.adapter.PassengerMsgBoxListAdapter -import com.mogo.eagle.core.function.msgbox.MsgBoxConfig +import com.mogo.eagle.core.utilcode.mogo.AppIdentityModeUtils import com.mogo.eagle.core.utilcode.util.ResourceUtils.getDrawable +import com.mogo.eagle.core.utilcode.util.UiThreadHandler import kotlinx.android.synthetic.main.layout_passenger_msg_box_list.view.* /** @@ -26,8 +30,9 @@ class PassengerMsgBoxListView @JvmOverloads constructor( context: Context, attrs: AttributeSet? = null, defStyleAttr: Int = 0 -) : ConstraintLayout(context, attrs, defStyleAttr){ +) : ConstraintLayout(context, attrs, defStyleAttr), IMsgBoxListener { + private val TAG = "PassengerMsgBoxListView" var passengerMsgBoxListAdapter: PassengerMsgBoxListAdapter ?= null private var noticeList: ArrayList ?= null @@ -47,18 +52,40 @@ class PassengerMsgBoxListView @JvmOverloads constructor( rvPassengerList.addItemDecoration(divider) //获取通知消息列表 noticeList= CallerMsgBoxManager.getCachedNotifyData() as ArrayList? - noticeList?.reversed() + noticeList = noticeList?.let { ArrayList(it.reversed()) } noticeList?.let { passengerMsgBoxListAdapter?.setData(it) } } - fun notifyData(){ - val localNoticeList = MsgBoxConfig.noticeList.reversed() - noticeList?.addAll(0,localNoticeList) - noticeList?.let { - passengerMsgBoxListAdapter?.setData(it) + override fun onDataChanged(category: MsgCategory, msgBoxList: MsgBoxBean) { + UiThreadHandler.post{ + if(category == MsgCategory.NOTICE){ + if(msgBoxList.type == MsgBoxType.NOTICE || msgBoxList.type == MsgBoxType.V2X + || msgBoxList.type == MsgBoxType.OBU){ + noticeList?.add(0,msgBoxList) + noticeList?.let { + passengerMsgBoxListAdapter?.setData(it) + } + } + } + } + } + + override fun onAttachedToWindow() { + super.onAttachedToWindow() + if(AppIdentityModeUtils.isPassenger(FunctionBuildConfig.appIdentityMode) && + AppIdentityModeUtils.isTaxi(FunctionBuildConfig.appIdentityMode)){ + CallerMsgBoxListenerManager.addListener(TAG,this) + } + } + + override fun onDetachedFromWindow() { + super.onDetachedFromWindow() + if(AppIdentityModeUtils.isPassenger(FunctionBuildConfig.appIdentityMode) && + AppIdentityModeUtils.isTaxi(FunctionBuildConfig.appIdentityMode)){ + CallerMsgBoxListenerManager.removeListener(TAG) } } diff --git a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/main/MainActivity.java b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/main/MainActivity.java index a7748622dc..bf1fc63be2 100644 --- a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/main/MainActivity.java +++ b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/main/MainActivity.java @@ -106,11 +106,6 @@ public class MainActivity extends MvpActivity implement return R.layout.module_main_activity_main; } - @Override - protected void beforeSetContentView(Bundle savedInstanceState) { - init(); - } - @Override protected void initViews() { injectStatusBar(); @@ -152,16 +147,6 @@ public class MainActivity extends MvpActivity implement decorView.addView(statusBarView, statusBarLP); } - // 隐藏布局 - protected void hideLayout() { - mFloatingLayout.setVisibility(View.GONE); - } - - // 显示布局 - protected void showLayout() { - mFloatingLayout.setVisibility(View.VISIBLE); - } - @Override protected void onCreate(@Nullable Bundle savedInstanceState) { super.onCreate(savedInstanceState); @@ -187,7 +172,6 @@ public class MainActivity extends MvpActivity implement AppLaunchTimeUtils.beginTimeCalculate(AppLaunchTimeUtils.HOT_START); } - @Override public void onWindowFocusChanged(boolean hasFocus) { super.onWindowFocusChanged(hasFocus); @@ -216,10 +200,6 @@ public class MainActivity extends MvpActivity implement } } - private void init() { - MogoStatusManager.getInstance().setMainPageLaunchedStatus(TAG, true); - } - private void initConnectInfoRV() { mConnAdapter = new ConnInfoAdapter(this, dataList); mConnectInfoRV.setLayoutManager(new LinearLayoutManager(this)); @@ -464,7 +444,6 @@ public class MainActivity extends MvpActivity implement if (mapUIController != null) { mapUIController.destroy(); } - MogoStatusManager.getInstance().setMainPageLaunchedStatus(TAG, false); MogoStatusManager.getInstance().setMainPageIsBackgroundStatus(TAG, false); CallerLogger.INSTANCE.d(M_HMI + TAG, "destroy."); diff --git a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/main/MainPresenter.java b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/main/MainPresenter.java index c679dcc4e2..ee82744042 100644 --- a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/main/MainPresenter.java +++ b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/main/MainPresenter.java @@ -23,7 +23,7 @@ import com.mogo.eagle.core.function.main.constants.MainConstants; */ public class MainPresenter extends Presenter { - private Handler mMsgHandler = new Handler(Looper.getMainLooper()) { + private final Handler mMsgHandler = new Handler(Looper.getMainLooper()) { @Override public void handleMessage(Message msg) { super.handleMessage(msg); diff --git a/core/function-impl/mogo-core-function-obu-mogo/src/main/java/com/mogo/eagle/core/function/obu/mogo/MogoPrivateObuNewManager.kt b/core/function-impl/mogo-core-function-obu-mogo/src/main/java/com/mogo/eagle/core/function/obu/mogo/MogoPrivateObuNewManager.kt index 0a3be5cb96..058d3ec7ad 100644 --- a/core/function-impl/mogo-core-function-obu-mogo/src/main/java/com/mogo/eagle/core/function/obu/mogo/MogoPrivateObuNewManager.kt +++ b/core/function-impl/mogo-core-function-obu-mogo/src/main/java/com/mogo/eagle/core/function/obu/mogo/MogoPrivateObuNewManager.kt @@ -4,24 +4,19 @@ import android.content.Context import com.mogo.eagle.core.data.config.FunctionBuildConfig import com.mogo.eagle.core.data.config.HmiBuildConfig import com.mogo.eagle.core.data.config.HmiBuildConfig.isShowObuLimitSpeedView -import com.mogo.eagle.core.data.enums.EventTypeEnumNew -import com.mogo.eagle.core.data.enums.EventTypeEnumWeaknessTraffic -import com.mogo.eagle.core.data.enums.V2iEventTypeEnum -import com.mogo.eagle.core.data.enums.WarningDirectionEnum +import com.mogo.eagle.core.data.enums.* import com.mogo.eagle.core.data.msgbox.MsgBoxBean import com.mogo.eagle.core.data.msgbox.MsgBoxType import com.mogo.eagle.core.data.msgbox.V2XMsg import com.mogo.eagle.core.function.api.hmi.warning.IMoGoWarningStatusListener import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager import com.mogo.eagle.core.function.call.hmi.CallerHmiManager -import com.mogo.eagle.core.function.call.hmi.CallerHmiManager.showLimitingVelocity import com.mogo.eagle.core.function.call.map.CallerMapUIServiceManager import com.mogo.eagle.core.function.call.map.CallerVisualAngleManager import com.mogo.eagle.core.function.call.map.CallerVisualAngleManager.Scene.Default import com.mogo.eagle.core.function.call.map.CallerVisualAngleManager.Scene.TooClose import com.mogo.eagle.core.function.call.msgbox.CallerMsgBoxManager import com.mogo.eagle.core.function.call.obu.CallerObuListenerManager -import com.mogo.eagle.core.function.call.v2x.CallLimitingVelocityListenerManager.invokeOnLimitingVelocityChange import com.mogo.eagle.core.function.obu.mogo.MogoObuConst.TAG_MOGO_OBU import com.mogo.eagle.core.function.obu.mogo.utils.TrafficDataConvertUtilsNew import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger @@ -577,7 +572,7 @@ class MogoPrivateObuNewManager private constructor() { } /** - * 地图匹配 是OBU算法输出地图匹配结果,主车匹配道路哪条路或者哪条车道 TODO + * 地图匹配 是OBU算法输出地图匹配结果,主车匹配道路哪条路或者哪条车道 */ override fun onMogoObuMapMath(data: MogoObuMapMathData?) { super.onMogoObuMapMath(data) @@ -615,7 +610,7 @@ class MogoPrivateObuNewManager private constructor() { * 获取消息的方位 车辆相关 */ private fun getMessageDirection(targetClassification: Int): WarningDirectionEnum { - // CallerLogger.d("$M_OBU${MogoObuConst.TAG_MOGO_OBU}", "预警红边:预警方向->$targetClassification") +// CallerLogger.d("$M_OBU${TAG_MOGO_OBU}", "预警红边:预警方向->$targetClassification") return when (targetClassification) { MogoObuConstants.VEH_TARGET_POSITION.AHEAD_IN_LANE, MogoObuConstants.VEH_TARGET_POSITION.ONCOMING_IN_LANE -> WarningDirectionEnum.ALERT_WARNING_TOP //正前方 @@ -844,75 +839,68 @@ class MogoPrivateObuNewManager private constructor() { //这里需要根据真实数据确定 index 取值方式 val currentLight = lights[0] CallerLogger.d( - "$M_OBU${MogoObuConst.TAG_MOGO_OBU}", + "$M_OBU${TAG_MOGO_OBU}", "currentLight = $currentLight ---currentLight.phase = ${currentLight.phaseId} ---appId = $appId" ) - // 闯红灯预警 + // 闯红灯预警,绿波通行和闯红灯是互斥的 when (appId) { 0x0 -> {//不可用 V2I_RLVW_VIOLATION_TYPE_UNAVAILABLE 无效 } 0x1 -> {//闯红灯 V2I_RLVW_VIOLATION_TYPE_RUNNING_RED_LIGHT TODO 需要约束一个红灯周期只显示一次 - // CallerHmiManager.disableWarningV2X(appId.toString()) -// CallerLogger.d("$M_OBU${MogoObuConst.TAG_MOGO_OBU}","changeTrafficLightStatus 闯红灯 --------> ") - // ttsContent = EventTypeEnumNew.getWarningTts(appId.toString()) - // alertContent = EventTypeEnumNew.getWarningContent(appId.toString()) - // CallerHmiManager.warningV2X( - // appId.toString(), alertContent, ttsContent,// 只有第一次才tts,防止更新的时候不断的提醒 - // appId.toString(), null, true, 5000L, MsgBoxType.OBU - // ) +// CallerHmiManager.disableWarningV2X(0x2.toString()) +// CallerLogger.d("$M_OBU${TAG_MOGO_OBU}","changeTrafficLightStatus 闯红灯 --------> ") +// ttsContent = EventTypeEnumTrafficLight.getWarningTts(appId.toString()) +// alertContent = EventTypeEnumTrafficLight.getWarningContent(appId.toString()) +// CallerHmiManager.warningV2X( +// appId.toString(), alertContent, ttsContent,// 只有第一次才tts,防止更新的时候不断的提醒 +// appId.toString(), null, true, 5000L) } - 0x2 -> {//绿波通行引导 V2I_RLVW_VIOLATION_TYPE_NO_VIOLATION TODO 需要约束一个绿灯周期只显示一次 - ttsContent = EventTypeEnumNew.getWarningTts(appId.toString()) - alertContent = EventTypeEnumNew.getWarningContent(appId.toString()) - CallerMsgBoxManager.saveMsgBox( - MsgBoxBean( - MsgBoxType.OBU, - V2XMsg( - appId.toString(), - alertContent, - ttsContent - ) - ) - ) - CallerHmiManager.warningV2X( - appId.toString(), alertContent, ttsContent,// 只有第一次才tts,防止更新的时候不断的提醒 - appId.toString(), null, true, 3000L - ) - - // 拼接建议速度 - // CallerLogger.d( - // "$M_OBU${MogoObuConst.TAG_MOGO_OBU}", - // "绿波通行引导 --------> speed_min = ${currentLight.suggestMinSpeed} --speed_max = ${currentLight.suggestMaxSpeed}" - // ) - // val adviceSpeed = - // "${currentLight.suggestMinSpeed*3.6} - ${currentLight.suggestMaxSpeed*3.6}" - // val adviceSpeedTts = - // "${currentLight.suggestMinSpeed*3.6}到${currentLight.suggestMaxSpeed*3.6}" - // ttsContent = - // String.format( - // EventTypeEnumNew.getWarningTts(EventTypeEnumNew.TYPE_USECASE_ID_IVP_GREEN.poiType), - // adviceSpeedTts - // ) - // alertContent = - // String.format( - // EventTypeEnumNew.getWarningContent(EventTypeEnumNew.TYPE_USECASE_ID_IVP_GREEN.poiType), - // adviceSpeed - // ) - // val maxSpeed = currentLight.suggestMaxSpeed*3.6 - // if (maxSpeed > 0) { - // CallerHmiManager.warningV2X( - // EventTypeEnumNew.TYPE_USECASE_ID_IVP_GREEN.poiType, - // alertContent, - // ttsContent,// 只有第一次才tts,防止更新的时候不断的提醒 - // appId.toString(), - // null, - // true, - // 5000L, - // MsgBoxType.OBU - // ) - // } + 0x2 -> { //绿波通行引导 V2I_RLVW_VIOLATION_TYPE_NO_VIOLATION TODO 需要约束一个绿灯周期只显示一次 +// CallerHmiManager.disableWarningV2X(0x1.toString()) +// CallerLogger.d( +// "$M_OBU${TAG_MOGO_OBU}", +// "speed_min = ${currentLight.suggestMinSpeed} --speed_max = ${currentLight.suggestMaxSpeed}" +// ) +// val adviceSpeed = +// "${currentLight.suggestMinSpeed} - ${currentLight.suggestMaxSpeed}" +// val adviceSpeedTts = +// "${currentLight.suggestMinSpeed}到${currentLight.suggestMaxSpeed}" +// ttsContent = +// String.format( +// EventTypeEnumTrafficLight.getWarningTts(appId.toString()), +// adviceSpeedTts +// ) +// alertContent = +// String.format( +// EventTypeEnumTrafficLight.getWarningContent(appId.toString()), +// adviceSpeed +// ) +// +// val maxSpeed = currentLight.suggestMaxSpeed +// if (maxSpeed > 0) { +// CallerMsgBoxManager.saveMsgBox( +// MsgBoxBean( +// MsgBoxType.OBU, +// V2XMsg( +// EventTypeEnumNew.TYPE_USECASE_ID_IVP_GREEN.poiType, +// alertContent, +// ttsContent +// ) +// ) +// ) +// +// CallerHmiManager.warningV2X( +// EventTypeEnumNew.TYPE_USECASE_ID_IVP_GREEN.poiType, +// alertContent, +// ttsContent,// 只有第一次才tts,防止更新的时候不断的提醒 +// appId.toString(), +// null, +// true, +// 5000L +// ) +// } } } @@ -933,6 +921,7 @@ class MogoPrivateObuNewManager private constructor() { val red = currentLight.countDown.toInt() CallerHmiManager.changeCountdownRed(red) } + // 绿灯 4, 5, 6 -> { if (!isGreenLight) { @@ -943,52 +932,8 @@ class MogoPrivateObuNewManager private constructor() { CallerHmiManager.showWarningTrafficLight(3, 2) val green = currentLight.countDown.toInt() CallerHmiManager.changeCountdownGreen(green) - //防止数据出现问题的容错 - CallerHmiManager.changeCountdownRed(0) - CallerHmiManager.changeCountdownYellow(0) - // 拼接建议速度 - CallerLogger.d( - "$M_OBU${MogoObuConst.TAG_MOGO_OBU}", - "speed_min = ${currentLight.suggestMinSpeed} --speed_max = ${currentLight.suggestMaxSpeed}" - ) - val adviceSpeed = - "${currentLight.suggestMinSpeed} - ${currentLight.suggestMaxSpeed}" - val adviceSpeedTts = - "${currentLight.suggestMinSpeed}到${currentLight.suggestMaxSpeed}" - ttsContent = - String.format( - EventTypeEnumNew.getWarningTts(EventTypeEnumNew.TYPE_USECASE_ID_IVP_GREEN.poiType), - adviceSpeedTts - ) - alertContent = - String.format( - EventTypeEnumNew.getWarningContent(EventTypeEnumNew.TYPE_USECASE_ID_IVP_GREEN.poiType), - adviceSpeed - ) - - val maxSpeed = currentLight.suggestMaxSpeed - if (maxSpeed > 0) { - CallerMsgBoxManager.saveMsgBox( - MsgBoxBean( - MsgBoxType.OBU, - V2XMsg( - EventTypeEnumNew.TYPE_USECASE_ID_IVP_GREEN.poiType, - alertContent, - ttsContent - ) - ) - ) - CallerHmiManager.warningV2X( - EventTypeEnumNew.TYPE_USECASE_ID_IVP_GREEN.poiType, - alertContent, - ttsContent,// 只有第一次才tts,防止更新的时候不断的提醒 - appId.toString(), - null, - true, - 3000L - ) - } } + // 黄灯 7, 8 -> { CallerHmiManager.disableWarningV2X(appId.toString()) diff --git a/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/vip/VipCarManager.kt b/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/vip/VipCarManager.kt index 018853805a..598a3b7ba9 100644 --- a/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/vip/VipCarManager.kt +++ b/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/vip/VipCarManager.kt @@ -18,6 +18,7 @@ import com.mogo.eagle.core.data.trafficlight.currentRoadTrafficLight import com.mogo.eagle.core.data.trafficlight.isGreen import com.mogo.eagle.core.data.trafficlight.isRed import com.mogo.eagle.core.data.v2x.VipMessage +import com.mogo.eagle.core.function.api.hmi.warning.IMoGoWarningStatusListener import com.mogo.eagle.core.function.api.trafficlight.IMoGoTrafficLightListener import com.mogo.eagle.core.function.call.hmi.CallerHmiManager import com.mogo.eagle.core.function.call.map.CallerMapUIServiceManager @@ -270,6 +271,15 @@ class VipCarManager : IMogoOnMessageListener, IMoGoTrafficLightListe CallerMsgBoxManager.saveMsgBox( MsgBoxBean(MsgBoxType.V2X, V2XMsg(v2xType, alertContent.toString(), ttsContent)) ) + CallerHmiManager.warningV2X( + v2xType, alertContent, ttsContent, tag, + object : IMoGoWarningStatusListener { + override fun onShow() {} + override fun onDismiss() {} + }, + true, + 5000L + ) } fun destroy() { diff --git a/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/enums/EventTypeEnumTrafficLight.kt b/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/enums/EventTypeEnumTrafficLight.kt new file mode 100644 index 0000000000..4b3af24b5d --- /dev/null +++ b/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/enums/EventTypeEnumTrafficLight.kt @@ -0,0 +1,71 @@ +package com.mogo.eagle.core.data.enums + +import com.mogo.eagle.core.data.R + + +/** + * 交通信号灯 + */ +enum class EventTypeEnumTrafficLight( + val poiType: String, val poiTypeStr: String = "", + val poiTypeStrVr: String = "", + val poiTypeSrcVr: Int = R.drawable.v2x_icon_live_logo, + val content: String = "", val tts: String = "" +) { + + TYPE_USECASE_ID_IVP_RED( + 0x1.toString(), + "闯红灯预警", + poiTypeSrcVr = R.drawable.icon_warning_v2x_traffic_lights_red, + content = "路口红灯,禁止通行", + tts = "路口红灯,禁止通行" + ), + TYPE_USECASE_ID_IVP_GREEN( + 0x2.toString(), + "绿波通行", + poiTypeSrcVr = R.drawable.icon_warning_v2x_traffic_lights_green, + content = "建议车速 %s KM/H", + tts = "建议车速 %s KM/H" + ), + + TYPE_ERROR( + 0.toString(), + "未知/错误/异常", + poiTypeSrcVr = R.drawable.icon_warning_v2x_abnormal_vehicle, + content = "", + tts = "" + ); + + + companion object { + @JvmStatic + fun getWarningIcon(poiType: String?): Int { + return when (poiType) { + TYPE_USECASE_ID_IVP_RED.poiType -> TYPE_USECASE_ID_IVP_RED.poiTypeSrcVr + TYPE_USECASE_ID_IVP_GREEN.poiType -> TYPE_USECASE_ID_IVP_GREEN.poiTypeSrcVr + + else -> TYPE_ERROR.poiTypeSrcVr + } + } + + @JvmStatic + fun getWarningContent(poiType: String?): String { + return when (poiType) { + TYPE_USECASE_ID_IVP_RED.poiType -> TYPE_USECASE_ID_IVP_RED.content + TYPE_USECASE_ID_IVP_GREEN.poiType -> TYPE_USECASE_ID_IVP_GREEN.content + + else -> TYPE_ERROR.content + } + } + + @JvmStatic + fun getWarningTts(poiType: String?): String { + return when (poiType) { + TYPE_USECASE_ID_IVP_RED.poiType -> TYPE_USECASE_ID_IVP_RED.tts + TYPE_USECASE_ID_IVP_GREEN.poiType -> TYPE_USECASE_ID_IVP_GREEN.tts + else -> TYPE_ERROR.tts + } + } + } + +} \ No newline at end of file diff --git a/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/enums/EventTypeEnumWeaknessTraffic.kt b/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/enums/EventTypeEnumWeaknessTraffic.kt index 177160dbb9..8ca4806dc1 100644 --- a/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/enums/EventTypeEnumWeaknessTraffic.kt +++ b/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/enums/EventTypeEnumWeaknessTraffic.kt @@ -20,10 +20,10 @@ enum class EventTypeEnumWeaknessTraffic( content = "注意机动车", tts = "注意机动车" ), - TYPE_USECASE_ID_VRUCW_NOT_MOTOR_VEHICLES( //TODO 图标需要换 + TYPE_USECASE_ID_VRUCW_NOT_MOTOR_VEHICLES( 2.toString(), "弱势交通参与者碰撞预警", - poiTypeSrcVr = R.drawable.icon_warning_v2x_motorcycle_collision, + poiTypeSrcVr = R.drawable.icon_warning_v2x_motobike, content = "注意非机动车", tts = "注意非机动车" ), diff --git a/core/mogo-core-function-call/src/main/java/com/mogo/eagle/core/function/call/autopilot/CallerAutopilotCarConfigListenerManager.kt b/core/mogo-core-function-call/src/main/java/com/mogo/eagle/core/function/call/autopilot/CallerAutopilotCarConfigListenerManager.kt index c36746ed14..b66eebe287 100644 --- a/core/mogo-core-function-call/src/main/java/com/mogo/eagle/core/function/call/autopilot/CallerAutopilotCarConfigListenerManager.kt +++ b/core/mogo-core-function-call/src/main/java/com/mogo/eagle/core/function/call/autopilot/CallerAutopilotCarConfigListenerManager.kt @@ -7,7 +7,7 @@ import mogo.telematics.pad.MessagePad import java.util.concurrent.ConcurrentHashMap /** - * 车辆地盘数据 回调监听 + * 车辆配置信息 回调监听 */ object CallerAutopilotCarConfigListenerManager : CallerBase() { @@ -18,7 +18,7 @@ object CallerAutopilotCarConfigListenerManager : CallerBase() { ConcurrentHashMap() /** - * 添加 ADAS车辆状态&定位 监听 + * 添加 配置信息 监听 * @param tag 标记,用来注销监听使用 * @param listener 监听回调 */ @@ -48,7 +48,7 @@ object CallerAutopilotCarConfigListenerManager : CallerBase() { } /** - * 删除自动驾驶按钮选中监听 + * 删除配置信息监听 * @param listener 要删除的监听对象 */ fun removeListener(@Nullable listener: IMoGoAutopilotCarConfigListener) { diff --git a/core/mogo-core-res/src/main/function-hmi-res/drawable-xhdpi/icon_warning_v2x_motobike.png b/core/mogo-core-res/src/main/function-hmi-res/drawable-xhdpi/icon_warning_v2x_motobike.png new file mode 100644 index 0000000000..1ae7992c08 Binary files /dev/null and b/core/mogo-core-res/src/main/function-hmi-res/drawable-xhdpi/icon_warning_v2x_motobike.png differ diff --git a/foudations/mogo-commons/src/main/java/com/mogo/commons/module/status/IMogoStatusManager.java b/foudations/mogo-commons/src/main/java/com/mogo/commons/module/status/IMogoStatusManager.java index 7b8b02c6c8..b7d4e29ab0 100644 --- a/foudations/mogo-commons/src/main/java/com/mogo/commons/module/status/IMogoStatusManager.java +++ b/foudations/mogo-commons/src/main/java/com/mogo/commons/module/status/IMogoStatusManager.java @@ -51,13 +51,6 @@ public interface IMogoStatusManager extends IProvider { */ boolean isMainPageIsBackground(); - /** - * 主页是否已启动 - * - * @return - */ - boolean isMainPageLaunched(); - /** * 长链是否在线 * @return @@ -135,14 +128,6 @@ public interface IMogoStatusManager extends IProvider { */ void setSeekHelping( String tag, boolean seekHelping ); - /** - * 设置主页是否启动 - * - * @param tag - * @param launched - */ - void setMainPageLaunchedStatus( String tag, boolean launched ); - /** * 注册监听 * diff --git a/foudations/mogo-commons/src/main/java/com/mogo/commons/module/status/MogoStatusManager.java b/foudations/mogo-commons/src/main/java/com/mogo/commons/module/status/MogoStatusManager.java index 55e7b1825c..e94f92eec3 100644 --- a/foudations/mogo-commons/src/main/java/com/mogo/commons/module/status/MogoStatusManager.java +++ b/foudations/mogo-commons/src/main/java/com/mogo/commons/module/status/MogoStatusManager.java @@ -78,11 +78,6 @@ public class MogoStatusManager implements IMogoStatusManager { return get_bool_val(StatusDescriptor.MAIN_PAGE_IS_BACKGROUND); } - @Override - public boolean isMainPageLaunched() { - return get_bool_val(StatusDescriptor.MAIN_PAGE_CREATED); - } - @Override public boolean isSocketOnLine() { return get_bool_val(StatusDescriptor.CLOUD_SOCKET); @@ -138,11 +133,6 @@ public class MogoStatusManager implements IMogoStatusManager { doSetStatus(tag, StatusDescriptor.SEEK_HELPING, seekHelping); } - @Override - public void setMainPageLaunchedStatus(String tag, boolean launched) { - doSetStatus(tag, StatusDescriptor.MAIN_PAGE_CREATED, launched); - } - private void doSetStatus(String tag, StatusDescriptor target, boolean value) { mStatus.put(target, value); invokeStatusChangedListener(target, value); diff --git a/foudations/mogo-commons/src/main/java/com/mogo/commons/module/status/StatusDescriptor.java b/foudations/mogo-commons/src/main/java/com/mogo/commons/module/status/StatusDescriptor.java index a3c5141c87..f4e4a9b462 100644 --- a/foudations/mogo-commons/src/main/java/com/mogo/commons/module/status/StatusDescriptor.java +++ b/foudations/mogo-commons/src/main/java/com/mogo/commons/module/status/StatusDescriptor.java @@ -43,10 +43,6 @@ public enum StatusDescriptor { */ SEEK_HELPING, - /** - * 是否已经进入过主页 - */ - MAIN_PAGE_CREATED, /** * 是否已经进入vr模式 diff --git a/foudations/mogo-commons/src/main/java/com/mogo/commons/mvp/MvpActivity.java b/foudations/mogo-commons/src/main/java/com/mogo/commons/mvp/MvpActivity.java index 7cc179c5fe..4b47d32573 100644 --- a/foudations/mogo-commons/src/main/java/com/mogo/commons/mvp/MvpActivity.java +++ b/foudations/mogo-commons/src/main/java/com/mogo/commons/mvp/MvpActivity.java @@ -33,7 +33,6 @@ public abstract class MvpActivity> exten protected void onCreate(@Nullable Bundle savedInstanceState) { BarUtils.hideStatusBarAndSticky(this.getWindow()); super.onCreate(savedInstanceState); - beforeSetContentView(savedInstanceState); setContentView(getLayoutId()); initViews(); mPresenter = createPresenter(); @@ -45,11 +44,6 @@ public abstract class MvpActivity> exten super.onResume(); } - - protected void beforeSetContentView(Bundle savedInstanceState) { - - } - /** * 布局资源 * diff --git a/gradle.properties b/gradle.properties index 2c1edf9df8..6521715fbe 100644 --- a/gradle.properties +++ b/gradle.properties @@ -66,23 +66,23 @@ SERVICE_BIZ_VERSION=1.2.4 LOGLIB_VERSION=1.5.8 ######## MogoAiCloudSDK Version ######## # 网络请求LOGLIB_VERSION -MOGO_NETWORK_VERSION=1.4.3.26 +MOGO_NETWORK_VERSION=1.4.3.27 # 鉴权 -MOGO_PASSPORT_VERSION=1.4.3.26 +MOGO_PASSPORT_VERSION=1.4.3.27 # 常链接 -MOGO_SOCKET_VERSION=1.4.3.26 +MOGO_SOCKET_VERSION=1.4.3.27 # 数据采集 -MOGO_REALTIME_VERSION=1.4.3.26 +MOGO_REALTIME_VERSION=1.4.3.27 # 探路,道路事件发布,获取 -MOGO_TANLU_VERSION=1.4.3.26 +MOGO_TANLU_VERSION=1.4.3.27 # 直播推流 -MOGO_LIVE_VERSION=1.4.3.26 +MOGO_LIVE_VERSION=1.4.3.27 # 直播拉流 -MOGO_TRAFFICLIVE_VERSION=1.4.3.26 +MOGO_TRAFFICLIVE_VERSION=1.4.3.27 # 定位服务 -MOGO_LOCATION_VERSION=1.4.3.26 +MOGO_LOCATION_VERSION=1.4.3.27 # 远程通讯模块 -MOGO_TELEMATIC_VERSION=1.4.3.26 +MOGO_TELEMATIC_VERSION=1.4.3.27 ######## MogoAiCloudSDK Version ######## # 自研地图 MAP_SDK_VERSION=2.8.0.1