diff --git a/OCH/mogo-och-bus-passenger/src/m2/java/com/mogo/och/bus/passenger/callback/DrivingInfoCallback.kt b/OCH/mogo-och-bus-passenger/src/m2/java/com/mogo/och/bus/passenger/callback/DrivingInfoCallback.kt index aaff2963b6..452ffb685a 100644 --- a/OCH/mogo-och-bus-passenger/src/m2/java/com/mogo/och/bus/passenger/callback/DrivingInfoCallback.kt +++ b/OCH/mogo-och-bus-passenger/src/m2/java/com/mogo/och/bus/passenger/callback/DrivingInfoCallback.kt @@ -14,4 +14,5 @@ interface DrivingInfoCallback { fun changeOperationStatus(loginStatus : Boolean) fun showNoTaskView(isTrue : Boolean) fun updateLineStations(stations: MutableList) + fun updateStationsInfo(stations: MutableList, i: Int, isArrived: Boolean) } \ No newline at end of file diff --git a/OCH/mogo-och-bus-passenger/src/m2/java/com/mogo/och/bus/passenger/model/PM2DrivingModel.kt b/OCH/mogo-och-bus-passenger/src/m2/java/com/mogo/och/bus/passenger/model/PM2DrivingModel.kt index a5bf32a3f2..0daac0e268 100644 --- a/OCH/mogo-och-bus-passenger/src/m2/java/com/mogo/och/bus/passenger/model/PM2DrivingModel.kt +++ b/OCH/mogo-och-bus-passenger/src/m2/java/com/mogo/och/bus/passenger/model/PM2DrivingModel.kt @@ -179,7 +179,6 @@ class PM2DrivingModel private constructor() { override fun onAutopilotArriveAtStation(arrivalNotification: MessagePad.ArrivalNotification?) { super.onAutopilotArriveAtStation(arrivalNotification) - //todo 自动驾驶到站接口 } override fun onAutopilotStatusResponse(autoPilotStatusInfo: AutopilotStatusInfo) { @@ -292,7 +291,7 @@ class PM2DrivingModel private constructor() { val station: PM2Station = stations[i] if (station.drivingStatus == BusPassengerConst.STATION_STATUS_STOPPED && station.isLeaving && i + 1 < stations.size) { -// mRouteLineInfoCallback.updateStationsInfo(stations, i + 1, false) + mDrivingInfoCallback?.updateStationsInfo(stations as MutableList, i + 1, false) if (mNextStationIndex != i + 1) { mTwoStationsRouts.clear() startRemainRouteInfo() @@ -307,7 +306,7 @@ class PM2DrivingModel private constructor() { mPreRouteIndex = 0 isGoingToNextStation = false startOrStopCalculateRouteInfo(false) -// mRouteLineInfoCallback.updateStationsInfo(stations, i, true) + mDrivingInfoCallback?.updateStationsInfo(stations as MutableList, i, true) return } } diff --git a/OCH/mogo-och-bus-passenger/src/m2/java/com/mogo/och/bus/passenger/presenter/PM2DrivingPresenter.kt b/OCH/mogo-och-bus-passenger/src/m2/java/com/mogo/och/bus/passenger/presenter/PM2DrivingPresenter.kt index 9f05f422cc..12fac454bd 100644 --- a/OCH/mogo-och-bus-passenger/src/m2/java/com/mogo/och/bus/passenger/presenter/PM2DrivingPresenter.kt +++ b/OCH/mogo-och-bus-passenger/src/m2/java/com/mogo/och/bus/passenger/presenter/PM2DrivingPresenter.kt @@ -82,6 +82,12 @@ class PM2DrivingPresenter(view: PM2DrivingInfoFragment?) : PM2ADASModel.INSTANCE.updateHDMapStations(stations) } + override fun updateStationsInfo(stations: MutableList, i: Int, isArrived: Boolean) { + UiThreadHandler.post { + mView?.updateStationsInfo(stations,i,isArrived) + } + } + override fun updateAutoStatus(isOpen: Boolean) { UiThreadHandler.post { mView?.updateAutoStatus(isOpen) diff --git a/OCH/mogo-och-bus-passenger/src/m2/java/com/mogo/och/bus/passenger/ui/PM2DrivingInfoFragment.kt b/OCH/mogo-och-bus-passenger/src/m2/java/com/mogo/och/bus/passenger/ui/PM2DrivingInfoFragment.kt index 8f7dd0fdcf..111a83ad40 100644 --- a/OCH/mogo-och-bus-passenger/src/m2/java/com/mogo/och/bus/passenger/ui/PM2DrivingInfoFragment.kt +++ b/OCH/mogo-och-bus-passenger/src/m2/java/com/mogo/och/bus/passenger/ui/PM2DrivingInfoFragment.kt @@ -19,7 +19,10 @@ import com.mogo.och.bus.passenger.R import com.mogo.och.bus.passenger.bean.PM2Station import com.mogo.och.bus.passenger.presenter.PM2DrivingPresenter import com.mogo.och.common.module.utils.DateTimeUtil.* +import com.mogo.och.common.module.utils.NumberFormatUtil import kotlinx.android.synthetic.m2.p_m2_driving_info_fragment.* +import kotlin.math.ceil +import kotlin.math.roundToInt /** * @author: wangmingjun @@ -111,9 +114,7 @@ class PM2DrivingInfoFragment : val date = formatCalendarToString( DateTimeUtils.getCurrentDateTime(), yy_MM_dd) val weekDay = DateTimeUtils.getWeekDayFromCalendar1(DateTimeUtils.getCurrentDateTime()) - current_weekday_tv.text = "$date $weekDay" - - + "$date $weekDay".also { current_weekday_tv.text = it } } fun changeOperationStatus(status:Boolean){ @@ -133,11 +134,19 @@ class PM2DrivingInfoFragment : line_name_tv.visibility = View.GONE line_during_tv.visibility = View.GONE no_line_tv.visibility = View.VISIBLE + updateNoStationView() overMapView.clearSiteMarkers() overMapView.clearCustomPolyline() } } + private fun updateNoStationView(){ + station_name_tv.setTextColor(resources.getColor(R.color.m2_no_line_tv_color)) + station_name_title_tv.text = resources.getString(R.string.m2_p_station_title_tv) + station_name_tv.text = resources.getString(R.string.m2_p_empty_tv) + remain_mt.text = resources.getString(R.string.m2_p_empty_remain_km_minute) + } + override fun createPresenter(): PM2DrivingPresenter { return PM2DrivingPresenter(this) } @@ -163,12 +172,40 @@ class PM2DrivingInfoFragment : BitmapFactory.decodeResource(resources,R.drawable.m2_map_staton_icon),0.5f,0.9f) } + fun updateStationsInfo(stations: MutableList, i: Int, isArrived: Boolean){ + if (stations.size == 0) return + if (0<= i && i 0) { + if (meters / 1000 < 1) { + disUnit = "米" + remainDis = meters.toFloat().roundToInt().toString() + } else { + disUnit = "公里" + remainDis = NumberFormatUtil.formatLong(meters.toDouble() / 1000) + } + } + val time = ceil(timeInSecond as Double / 60f).toInt() + + "$remainDis$disUnit | $time 分钟".also { remain_mt.text = it } } companion object { diff --git a/OCH/mogo-och-bus-passenger/src/m2/java/com/mogo/och/bus/passenger/ui/widget/video/AdvanceVideoView.kt b/OCH/mogo-och-bus-passenger/src/m2/java/com/mogo/och/bus/passenger/ui/widget/video/AdvanceVideoView.kt index 2bd2f9d761..ceffd532b9 100644 --- a/OCH/mogo-och-bus-passenger/src/m2/java/com/mogo/och/bus/passenger/ui/widget/video/AdvanceVideoView.kt +++ b/OCH/mogo-och-bus-passenger/src/m2/java/com/mogo/och/bus/passenger/ui/widget/video/AdvanceVideoView.kt @@ -181,7 +181,7 @@ class AdvanceVideoView @JvmOverloads constructor( } override fun onProgress(url: String?, length: Int) { - Logger.d(ImageAndVideoRotation.TAG, "download-onProgress") +// Logger.d(ImageAndVideoRotation.TAG, "download-onProgress") } override fun onFinished(url: String?, threadBean: ThreadBean?) { diff --git a/OCH/mogo-och-bus-passenger/src/m2/res/drawable-nodpi/m2_line_location_bg.png b/OCH/mogo-och-bus-passenger/src/m2/res/drawable-nodpi/m2_line_location_bg.png index bac6030216..db841623af 100644 Binary files a/OCH/mogo-och-bus-passenger/src/m2/res/drawable-nodpi/m2_line_location_bg.png and b/OCH/mogo-och-bus-passenger/src/m2/res/drawable-nodpi/m2_line_location_bg.png differ diff --git a/OCH/mogo-och-bus-passenger/src/m2/res/drawable/bg_dashed_line.xml b/OCH/mogo-och-bus-passenger/src/m2/res/drawable/bg_dashed_line.xml new file mode 100644 index 0000000000..f6917017e5 --- /dev/null +++ b/OCH/mogo-och-bus-passenger/src/m2/res/drawable/bg_dashed_line.xml @@ -0,0 +1,7 @@ + + + + + \ No newline at end of file diff --git a/OCH/mogo-och-bus-passenger/src/m2/res/layout/p_m2_driving_info_fragment.xml b/OCH/mogo-och-bus-passenger/src/m2/res/layout/p_m2_driving_info_fragment.xml index aac1080abe..849ecb1e0f 100644 --- a/OCH/mogo-och-bus-passenger/src/m2/res/layout/p_m2_driving_info_fragment.xml +++ b/OCH/mogo-och-bus-passenger/src/m2/res/layout/p_m2_driving_info_fragment.xml @@ -79,7 +79,8 @@ app:day_light_mode="true"/> - + android:textColor="@color/m2_line_during_tv_color"/> + android:text="@string/m2_p_empty_remain_km_minute" + android:textSize="@dimen/dp_16" + android:layout_marginTop="@dimen/dp_8" + app:layout_constraintBottom_toBottomOf="@+id/img_line_location_bg" + app:layout_constraintLeft_toLeftOf="@+id/speed_tv" + android:textColor="@color/m2_no_line_tv_color"/> - + app:layout_constraintStart_toStartOf="@+id/speed_tv" + app:layout_constraintEnd_toEndOf="@+id/img_line_location_bg"/> + + + + + + @@ -175,9 +207,11 @@ android:id="@+id/current_weekday_tv" android:layout_width="wrap_content" android:layout_height="wrap_content" - app:layout_constraintLeft_toLeftOf="@+id/current_time_tv" - app:layout_constraintTop_toBottomOf="@+id/current_time_tv" - android:textSize="@dimen/dp_18" + android:layout_marginLeft="@dimen/dp_10" + app:layout_constraintLeft_toRightOf="@+id/current_time_tv" + app:layout_constraintBottom_toBottomOf="@+id/current_time_tv" + android:layout_marginBottom="@dimen/dp_6" + android:textSize="@dimen/dp_16" android:text="--" android:textColor="@color/m2_line_during_tv_color"/> diff --git a/OCH/mogo-och-bus-passenger/src/m2/res/values/colors.xml b/OCH/mogo-och-bus-passenger/src/m2/res/values/colors.xml index 13bd4aff12..c93cb6c3aa 100644 --- a/OCH/mogo-och-bus-passenger/src/m2/res/values/colors.xml +++ b/OCH/mogo-och-bus-passenger/src/m2/res/values/colors.xml @@ -19,4 +19,5 @@ #FFFFE198 #FFFF9B00 #59FFFFFF + #979797 \ No newline at end of file diff --git a/OCH/mogo-och-bus-passenger/src/m2/res/values/strings.xml b/OCH/mogo-och-bus-passenger/src/m2/res/values/strings.xml index a90bd2ee4e..e113235a28 100644 --- a/OCH/mogo-och-bus-passenger/src/m2/res/values/strings.xml +++ b/OCH/mogo-och-bus-passenger/src/m2/res/values/strings.xml @@ -14,5 +14,10 @@ m2_map_style.data m2_map_style_extra.data Auto + 下一站: + 已到站: + 暂无站点 + —公里 | —分钟 + \ No newline at end of file diff --git a/OCH/mogo-och-bus/src/main/java/com/mogo/och/bus/fragment/BaseBusTabFragment.java b/OCH/mogo-och-bus/src/main/java/com/mogo/och/bus/fragment/BaseBusTabFragment.java index 7acfdfc948..fc996468af 100644 --- a/OCH/mogo-och-bus/src/main/java/com/mogo/och/bus/fragment/BaseBusTabFragment.java +++ b/OCH/mogo-och-bus/src/main/java/com/mogo/och/bus/fragment/BaseBusTabFragment.java @@ -428,8 +428,6 @@ public abstract class BaseBusTabFragment } private void changeAutopilotBtnView(int autopilotStatus, boolean isAnimateRunning) { - CallerLogger.INSTANCE.d(M_BUS + TAG, "onStateChangeChangeAutopilotBtnView: " - + autopilotStatus + "isAnimateRunning = " + isAnimateRunning); if (isAnimateRunning && IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_RUNNING != autopilotStatus) { // 主动开启自动驾驶中,不为2(为0、1)则继续loading diff --git a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/msgbox/DriverMsgBoxBubbleView.kt b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/msgbox/DriverMsgBoxBubbleView.kt index 93ae969800..dc08cb75f7 100644 --- a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/msgbox/DriverMsgBoxBubbleView.kt +++ b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/msgbox/DriverMsgBoxBubbleView.kt @@ -7,6 +7,7 @@ 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.function.api.datacenter.msgbox.IMsgBoxListener @@ -83,9 +84,13 @@ class DriverMsgBoxBubbleView @JvmOverloads constructor( if(isShowData){ CallerMsgBoxEventListenerManager.invokeUpdateTipListener(true) if(category == MsgCategory.RECORD_BAG){ - //弹出被动录包弹窗 - CallerDevaToolsManager.onReceiveBadCaseRecord(msgBoxBean,context as Activity,true) - }else{ + if(!FunctionBuildConfig.isDemoMode){ + //弹出被动录包弹窗 + CallerDevaToolsManager.onReceiveBadCaseRecord(msgBoxBean,context as Activity,true) + } + } else if(category == MsgCategory.SYS_INFO){ + //todo 过滤MAP系统异常报警 + } else{ clMsgBubbleLayout.visibility = View.VISIBLE dataList.add(msgBoxBean) driverMsgBoxBubbleAdapter?.setData(dataList) 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 0a24a50f88..75e5e6f583 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 @@ -7,6 +7,7 @@ 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.function.api.datacenter.msgbox.IMsgBoxEventListener @@ -17,6 +18,7 @@ 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.UiThreadHandler import kotlinx.android.synthetic.main.layout_driver_msg_box_list.view.* import org.greenrobot.eventbus.EventBus @@ -244,6 +246,7 @@ class DriverMsgBoxListView @JvmOverloads constructor( notifyData() ipcReportList?.let { linearLayoutManager?.scrollToPositionWithOffset(it.indexOf(msgBoxBean),0) + driverMsgBoxListAdapter?.setReportShowData(msgBoxBean) } } } \ 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/adapter/DriverMsgBoxListAdapter.kt b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/msgbox/adapter/DriverMsgBoxListAdapter.kt index 1968a19cfc..95ea8caef9 100644 --- a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/msgbox/adapter/DriverMsgBoxListAdapter.kt +++ b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/msgbox/adapter/DriverMsgBoxListAdapter.kt @@ -32,6 +32,7 @@ class DriverMsgBoxListAdapter(private val activity: Activity) : RecyclerView.Adapter() { private var data: List? = null + private var reportBean: MsgBoxBean ?= null private val operation: Int = 1 private val notice: Int = 2 @@ -50,6 +51,10 @@ class DriverMsgBoxListAdapter(private val activity: Activity) : notifyDataSetChanged() } + fun setReportShowData(reportClickBean: MsgBoxBean){ + reportBean = reportClickBean + } + override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): RecyclerView.ViewHolder { when (viewType) { record -> { @@ -103,6 +108,7 @@ class DriverMsgBoxListAdapter(private val activity: Activity) : } is MsgBoxIpcReportHolder -> { data?.let { it -> + val reportMsgBox = it[position] holder.tvReportTimeNormal.text = "时间:${TimeUtils.millis2String(it[position].timestamp)}" holder.tvReportTimeOpen.text = @@ -138,6 +144,7 @@ class DriverMsgBoxListAdapter(private val activity: Activity) : holder.tvReportTypeNormal.text = resultStr holder.tvReportTypeOpen.text = resultStr holder.tvReportReasonOpen.text = "原因:${reportEntity.msg}" + holder.tvReportSrcOpen.text = "消息来源:${reportEntity.src}" var actionStr = "" for (action in reportEntity.actionsList) { actionStr = @@ -152,6 +159,7 @@ class DriverMsgBoxListAdapter(private val activity: Activity) : null, null ) + holder.tvStatusSelect.text = "折叠" holder.ivReportImageNormal.visibility = View.GONE holder.tvReportLevelNormal.visibility = View.GONE holder.tvReportTimeNormal.visibility = View.GONE @@ -162,6 +170,7 @@ class DriverMsgBoxListAdapter(private val activity: Activity) : holder.tvReportTimeOpen.visibility = View.VISIBLE holder.tvReportTypeOpen.visibility = View.VISIBLE holder.tvReportReasonOpen.visibility = View.VISIBLE + holder.tvReportSrcOpen.visibility = View.VISIBLE holder.tvReportActionOpen.visibility = View.VISIBLE } else { holder.tvStatusSelect.setCompoundDrawablesWithIntrinsicBounds( @@ -170,6 +179,7 @@ class DriverMsgBoxListAdapter(private val activity: Activity) : null, null ) + holder.tvStatusSelect.text = "展开" holder.ivReportImageNormal.visibility = View.VISIBLE holder.tvReportLevelNormal.visibility = View.VISIBLE holder.tvReportTimeNormal.visibility = View.VISIBLE @@ -180,9 +190,16 @@ class DriverMsgBoxListAdapter(private val activity: Activity) : holder.tvReportTimeOpen.visibility = View.GONE holder.tvReportTypeOpen.visibility = View.GONE holder.tvReportReasonOpen.visibility = View.GONE + holder.tvReportSrcOpen.visibility = View.GONE holder.tvReportActionOpen.visibility = View.GONE } } + reportBean?.let { + if(reportMsgBox.timestamp == it.timestamp){ + holder.tvStatusSelect.performClick() + } + } + } } is MsgBoxOperation -> { @@ -200,6 +217,7 @@ class DriverMsgBoxListAdapter(private val activity: Activity) : null, null ) + holder.tvOperationStatusSelect.text = "折叠" holder.ivOperationImageNormal.visibility = View.GONE holder.tvOperationTitleNormal.visibility = View.GONE holder.tvOperationContentNormal.visibility = View.GONE @@ -214,6 +232,7 @@ class DriverMsgBoxListAdapter(private val activity: Activity) : null, null ) + holder.tvOperationStatusSelect.text = "展开" holder.ivOperationImageNormal.visibility = View.VISIBLE holder.tvOperationTitleNormal.visibility = View.VISIBLE holder.tvOperationContentNormal.visibility = View.VISIBLE @@ -329,6 +348,7 @@ class DriverMsgBoxListAdapter(private val activity: Activity) : var tvReportTimeOpen: TextView = itemView.findViewById(R.id.tvReportTimeOpen) var tvReportTypeOpen: TextView = itemView.findViewById(R.id.tvReportTypeOpen) var tvReportReasonOpen: TextView = itemView.findViewById(R.id.tvReportReasonOpen) + var tvReportSrcOpen: TextView = itemView.findViewById(R.id.tvReportSrcOpen) var tvReportActionOpen: TextView = itemView.findViewById(R.id.tvReportActionOpen) } diff --git a/core/function-impl/mogo-core-function-hmi/src/main/res/layout/item_msg_box_ipc_report.xml b/core/function-impl/mogo-core-function-hmi/src/main/res/layout/item_msg_box_ipc_report.xml index 5911e16c42..29e1165bfb 100644 --- a/core/function-impl/mogo-core-function-hmi/src/main/res/layout/item_msg_box_ipc_report.xml +++ b/core/function-impl/mogo-core-function-hmi/src/main/res/layout/item_msg_box_ipc_report.xml @@ -70,7 +70,7 @@ android:id="@+id/tvStatusSelect" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:text="折叠" + android:text="展开" android:textColor="#FFFFFFFF" android:textSize="24dp" app:layout_constraintTop_toTopOf="parent" @@ -163,12 +163,26 @@ /> + + () { clientConfig.isUseOriginSocket = true // 设置是否输出网络日志 clientConfig.isShowNetDebugLog = false -// clientConfig.passportUrl //todo 亚坤 -// clientConfig.socketBaseUrl -// clientConfig.socketTechUrl + + clientConfig.passportUrl = FunctionBuildConfig.urlJson.passportUrl + clientConfig.socketBaseUrl = FunctionBuildConfig.urlJson.socketBaseUrl + clientConfig.socketTechUrl = FunctionBuildConfig.urlJson.socketTechUrl + // 设置是否是直播推流的主播 clientConfig.isAnchor = true when (DebugConfig.getCarMachineType()) {