Merge branch 'dev_robobus-d_230413_3.1.0' into dev_robobus_d_3.2.0_4.14_local
This commit is contained in:
@@ -15,4 +15,5 @@ interface DrivingInfoCallback {
|
|||||||
fun showNoTaskView(isTrue : Boolean)
|
fun showNoTaskView(isTrue : Boolean)
|
||||||
fun updateLineStations(stations: MutableList<BusStationBean>)
|
fun updateLineStations(stations: MutableList<BusStationBean>)
|
||||||
fun updateStationsInfo(stations: MutableList<BusStationBean>, i: Int, isArrived: Boolean)
|
fun updateStationsInfo(stations: MutableList<BusStationBean>, i: Int, isArrived: Boolean)
|
||||||
|
fun clearCustomPolyline()
|
||||||
}
|
}
|
||||||
@@ -421,6 +421,12 @@ class PM2DrivingModel private constructor() {
|
|||||||
updateLocalOrder()
|
updateLocalOrder()
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (routesResult != null && routesResult!!.lineId != result.lineId){
|
||||||
|
d(SceneConstant.M_BUS_P+TAG, "lineId change= clearCustomPolyline")
|
||||||
|
mDrivingInfoCallback?.clearCustomPolyline()
|
||||||
|
}
|
||||||
|
|
||||||
d(SceneConstant.M_BUS_P+TAG, "queryDriverSiteByCoordinate= update")
|
d(SceneConstant.M_BUS_P+TAG, "queryDriverSiteByCoordinate= update")
|
||||||
routesResult = result
|
routesResult = result
|
||||||
|
|
||||||
|
|||||||
@@ -116,6 +116,12 @@ class PM2DrivingPresenter(view: PM2DrivingInfoFragment?) :
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
override fun clearCustomPolyline() {
|
||||||
|
ThreadUtils.runOnUiThread {
|
||||||
|
mView?.clearCustomPolyline()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
override fun updateAutoStatus(isOpen: Boolean) {
|
override fun updateAutoStatus(isOpen: Boolean) {
|
||||||
ThreadUtils.runOnUiThread {
|
ThreadUtils.runOnUiThread {
|
||||||
mView?.updateAutoStatus(isOpen)
|
mView?.updateAutoStatus(isOpen)
|
||||||
@@ -125,4 +131,6 @@ class PM2DrivingPresenter(view: PM2DrivingInfoFragment?) :
|
|||||||
override fun updateAutoStatus(status: Int) {
|
override fun updateAutoStatus(status: Int) {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -28,8 +28,6 @@ import kotlin.math.roundToInt
|
|||||||
class PM2DrivingInfoFragment :
|
class PM2DrivingInfoFragment :
|
||||||
MvpFragment<PM2DrivingInfoFragment?, PM2DrivingPresenter?>() {
|
MvpFragment<PM2DrivingInfoFragment?, PM2DrivingPresenter?>() {
|
||||||
|
|
||||||
// private var timeHandler: TimeHandler? = null
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 改变自动驾驶状态
|
* 改变自动驾驶状态
|
||||||
*
|
*
|
||||||
@@ -108,7 +106,6 @@ class PM2DrivingInfoFragment :
|
|||||||
}
|
}
|
||||||
|
|
||||||
override fun onDestroy() {
|
override fun onDestroy() {
|
||||||
// timeHandler?.removeCallbacksAndMessages(null)
|
|
||||||
super.onDestroy()
|
super.onDestroy()
|
||||||
overMapView?.let{
|
overMapView?.let{
|
||||||
it.onDestroy()
|
it.onDestroy()
|
||||||
@@ -142,9 +139,7 @@ class PM2DrivingInfoFragment :
|
|||||||
}
|
}
|
||||||
|
|
||||||
private fun setLineInfoView(isShow: Boolean){
|
private fun setLineInfoView(isShow: Boolean){
|
||||||
if (isShow){
|
if (!isShow){
|
||||||
|
|
||||||
}else{
|
|
||||||
updateNoOrderUI()
|
updateNoOrderUI()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -155,11 +150,14 @@ class PM2DrivingInfoFragment :
|
|||||||
overMapView?.let {
|
overMapView?.let {
|
||||||
it.clearSiteMarkers()
|
it.clearSiteMarkers()
|
||||||
}
|
}
|
||||||
|
clearCustomPolyline()
|
||||||
|
}
|
||||||
|
|
||||||
|
fun clearCustomPolyline(){
|
||||||
overMapView?.let {
|
overMapView?.let {
|
||||||
it.clearCustomPolyline()
|
it.clearCustomPolyline()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun updateNoStationView(){
|
private fun updateNoStationView(){
|
||||||
station_name_tv.setTextColor(resources.getColor(R.color.m2_next_tv_color))
|
station_name_tv.setTextColor(resources.getColor(R.color.m2_next_tv_color))
|
||||||
station_name_tv.text = resources.getString(R.string.m2_p_empty_tv)
|
station_name_tv.text = resources.getString(R.string.m2_p_empty_tv)
|
||||||
@@ -207,13 +205,9 @@ class PM2DrivingInfoFragment :
|
|||||||
tv_distance.text = resources.getString(R.string.m2_p_empty_remain_km)
|
tv_distance.text = resources.getString(R.string.m2_p_empty_remain_km)
|
||||||
tv_left_time.text = resources.getString(R.string.m2_p_empty_remain_minute)
|
tv_left_time.text = resources.getString(R.string.m2_p_empty_remain_minute)
|
||||||
tv_next_station_title.text = resources.getString(R.string.m2_p_station_title_arrived_tv)
|
tv_next_station_title.text = resources.getString(R.string.m2_p_station_title_arrived_tv)
|
||||||
iv_animal_list.visibility = View.VISIBLE
|
|
||||||
val animationDrawable = iv_animal_list.drawable as AnimationDrawable
|
|
||||||
animationDrawable.start()
|
|
||||||
haveLineAndArrivedStation()
|
haveLineAndArrivedStation()
|
||||||
}else{ //前往目的地中
|
}else{ //前往目的地中
|
||||||
tv_next_station_title.text = resources.getString(R.string.shuttle_p_next_station_title)
|
tv_next_station_title.text = resources.getString(R.string.shuttle_p_next_station_title)
|
||||||
iv_animal_list.visibility = View.GONE
|
|
||||||
haveLineAndArriveingStation()
|
haveLineAndArriveingStation()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -250,6 +244,8 @@ class PM2DrivingInfoFragment :
|
|||||||
clg_distance_left_time.visibility = View.GONE
|
clg_distance_left_time.visibility = View.GONE
|
||||||
// 到达站点
|
// 到达站点
|
||||||
tv_arrived_notice.visibility = View.GONE
|
tv_arrived_notice.visibility = View.GONE
|
||||||
|
|
||||||
|
iv_animal_list.visibility = View.GONE
|
||||||
}
|
}
|
||||||
// 有线路正在到站点
|
// 有线路正在到站点
|
||||||
fun haveLineAndArriveingStation(){
|
fun haveLineAndArriveingStation(){
|
||||||
@@ -257,17 +253,20 @@ class PM2DrivingInfoFragment :
|
|||||||
group_stationinfo.visibility = View.VISIBLE
|
group_stationinfo.visibility = View.VISIBLE
|
||||||
clg_distance_left_time.visibility = View.VISIBLE
|
clg_distance_left_time.visibility = View.VISIBLE
|
||||||
tv_arrived_notice.visibility = View.GONE
|
tv_arrived_notice.visibility = View.GONE
|
||||||
|
iv_animal_list.visibility = View.GONE
|
||||||
}
|
}
|
||||||
// 有线路到达站点
|
// 有线路到达站点
|
||||||
fun haveLineAndArrivedStation(){
|
private fun haveLineAndArrivedStation(){
|
||||||
group_not_select_line.visibility = View.GONE
|
group_not_select_line.visibility = View.GONE
|
||||||
group_stationinfo.visibility = View.VISIBLE
|
group_stationinfo.visibility = View.VISIBLE
|
||||||
clg_distance_left_time.visibility = View.GONE
|
clg_distance_left_time.visibility = View.GONE
|
||||||
tv_arrived_notice.visibility = View.VISIBLE
|
tv_arrived_notice.visibility = View.VISIBLE
|
||||||
|
iv_animal_list.visibility = View.VISIBLE
|
||||||
|
val animationDrawable = iv_animal_list.drawable as AnimationDrawable
|
||||||
|
animationDrawable.start()
|
||||||
}
|
}
|
||||||
|
|
||||||
companion object {
|
companion object {
|
||||||
private val TAG = PM2DrivingInfoFragment::class.java.simpleName
|
private val TAG = PM2DrivingInfoFragment::class.java.simpleName
|
||||||
const val LOOP_TIME_TEXT = 10 * 1000L
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Binary file not shown.
|
Before Width: | Height: | Size: 284 KiB After Width: | Height: | Size: 193 KiB |
@@ -12,7 +12,7 @@
|
|||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
app:carDrawable="@drawable/m2_map_car_icon"
|
app:carDrawable="@drawable/m2_map_car_icon"
|
||||||
app:endPointDrawable="@drawable/m2_map_end_icon"
|
app:endPointDrawable="@drawable/m2_map_end_icon"
|
||||||
app:isClearArrived="true"
|
app:isClearArrived="false"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintWidth_percent="0.6"
|
app:layout_constraintWidth_percent="0.6"
|
||||||
app:mapStyleExtraPath="@string/m2_over_map_style_extra_path"
|
app:mapStyleExtraPath="@string/m2_over_map_style_extra_path"
|
||||||
@@ -24,6 +24,8 @@
|
|||||||
app:unArrivedDrawable="@drawable/m2_amap_arriving_road"
|
app:unArrivedDrawable="@drawable/m2_amap_arriving_road"
|
||||||
app:mapTilt="0"
|
app:mapTilt="0"
|
||||||
app:leftPadding="200"
|
app:leftPadding="200"
|
||||||
|
app:topPadding="150"
|
||||||
|
app:bottomPadding="50"
|
||||||
app:startPointDrawable="@drawable/m2_map_start_icon" />
|
app:startPointDrawable="@drawable/m2_map_start_icon" />
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
@@ -286,15 +288,15 @@
|
|||||||
app:layout_constraintBottom_toBottomOf="parent" />
|
app:layout_constraintBottom_toBottomOf="parent" />
|
||||||
|
|
||||||
<!-- 转向灯 IMoGoChassisLamplightListener-->
|
<!-- 转向灯 IMoGoChassisLamplightListener-->
|
||||||
<!-- <com.mogo.och.bus.passenger.ui.widget.M2TurnLightView-->
|
<com.mogo.och.bus.passenger.ui.widget.M2TurnLightView
|
||||||
<!-- android:id="@+id/turn_light_view"-->
|
android:id="@+id/turn_light_view"
|
||||||
<!-- android:layout_width="wrap_content"-->
|
android:layout_width="wrap_content"
|
||||||
<!-- android:layout_height="wrap_content"-->
|
android:layout_height="wrap_content"
|
||||||
<!-- android:layout_marginLeft="@dimen/dp_12"-->
|
android:layout_marginLeft="@dimen/dp_12"
|
||||||
<!-- app:day_light_mode="true"-->
|
app:day_light_mode="true"
|
||||||
<!-- app:layout_constraintLeft_toRightOf="@+id/auto_tv"-->
|
app:layout_constraintLeft_toRightOf="@+id/auto_tv"
|
||||||
<!-- app:layout_constraintTop_toTopOf="@+id/auto_tv"-->
|
app:layout_constraintTop_toTopOf="@+id/auto_tv"
|
||||||
<!-- app:visible="false" />-->
|
app:visible="false" />
|
||||||
|
|
||||||
<!-- 红绿灯-->
|
<!-- 红绿灯-->
|
||||||
<!-- <com.mogo.och.bus.passenger.ui.widget.M2PTrafficLightView-->
|
<!-- <com.mogo.och.bus.passenger.ui.widget.M2PTrafficLightView-->
|
||||||
|
|||||||
@@ -2,9 +2,11 @@ package com.mogo.eagle.core.function.hmi.ui.vehicle
|
|||||||
|
|
||||||
import android.content.Context
|
import android.content.Context
|
||||||
import android.util.AttributeSet
|
import android.util.AttributeSet
|
||||||
|
import android.util.Log
|
||||||
import android.view.LayoutInflater
|
import android.view.LayoutInflater
|
||||||
import android.view.View
|
import android.view.View
|
||||||
import androidx.constraintlayout.widget.ConstraintLayout
|
import androidx.constraintlayout.widget.ConstraintLayout
|
||||||
|
import com.mogo.eagle.core.data.autopilot.AutopilotStatusInfo
|
||||||
import com.mogo.eagle.core.data.config.FunctionBuildConfig
|
import com.mogo.eagle.core.data.config.FunctionBuildConfig
|
||||||
import com.mogo.eagle.core.data.enums.EventTypeEnumNew
|
import com.mogo.eagle.core.data.enums.EventTypeEnumNew
|
||||||
import com.mogo.eagle.core.data.msgbox.MsgBoxBean
|
import com.mogo.eagle.core.data.msgbox.MsgBoxBean
|
||||||
@@ -31,6 +33,10 @@ class TakeOverView @JvmOverloads constructor(
|
|||||||
const val TAG = "TakeOverView"
|
const val TAG = "TakeOverView"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private var autopilotStatus: Int = 0 //自动驾驶状态 0代表不可自动驾驶,1代表可自动驾驶,2代表自动驾驶中,7:平行驾驶中
|
||||||
|
private var isParallel: Boolean = false //是否是平行驾驶
|
||||||
|
|
||||||
|
|
||||||
init {
|
init {
|
||||||
LayoutInflater.from(context).inflate(R.layout.view_take_over, this, true)
|
LayoutInflater.from(context).inflate(R.layout.view_take_over, this, true)
|
||||||
}
|
}
|
||||||
@@ -42,6 +48,21 @@ class TakeOverView @JvmOverloads constructor(
|
|||||||
CallerAutoPilotStatusListenerManager.addListener(TAG, this)
|
CallerAutoPilotStatusListenerManager.addListener(TAG, this)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 自动驾驶状态信息
|
||||||
|
*
|
||||||
|
* @param autoPilotStatusInfo 状态信息
|
||||||
|
*/
|
||||||
|
override fun onAutopilotStatusResponse(autoPilotStatusInfo: AutopilotStatusInfo) {
|
||||||
|
autopilotStatus = autoPilotStatusInfo.state
|
||||||
|
if(autoPilotStatusInfo.state == 7){
|
||||||
|
isParallel = true
|
||||||
|
}else if(autoPilotStatusInfo.state == 2){
|
||||||
|
isParallel = false
|
||||||
|
}
|
||||||
|
Log.i(TAG,"自动驾驶状态${autopilotStatus}")
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 工控机监控节点上报
|
* 工控机监控节点上报
|
||||||
*/
|
*/
|
||||||
@@ -90,32 +111,37 @@ class TakeOverView @JvmOverloads constructor(
|
|||||||
//弱网
|
//弱网
|
||||||
MogoReport.Code.Error.EMAP.EPARALLEL_AICLOUD_NETWORK_WEAK,
|
MogoReport.Code.Error.EMAP.EPARALLEL_AICLOUD_NETWORK_WEAK,
|
||||||
MogoReport.Code.Error.EMAP.EPARALLEL_AICLOUD_CONNECTION_ERROR -> {
|
MogoReport.Code.Error.EMAP.EPARALLEL_AICLOUD_CONNECTION_ERROR -> {
|
||||||
CallerHmiManager.warningV2X(
|
//如果是平行驾驶状态下,提示弱网接管
|
||||||
EventTypeEnumNew.NETWORK_WEAK_EVENT.poiType,
|
Log.i(TAG,"弱网时自动驾驶状态:${autopilotStatus}")
|
||||||
EventTypeEnumNew.NETWORK_WEAK_EVENT.content,
|
if(autopilotStatus == 7 || isParallel){
|
||||||
EventTypeEnumNew.NETWORK_WEAK_EVENT.tts,
|
CallerHmiManager.warningV2X(
|
||||||
object : IMoGoWarningStatusListener {
|
EventTypeEnumNew.NETWORK_WEAK_EVENT.poiType,
|
||||||
override fun onShow() {
|
EventTypeEnumNew.NETWORK_WEAK_EVENT.content,
|
||||||
takeOver = true
|
EventTypeEnumNew.NETWORK_WEAK_EVENT.tts,
|
||||||
visibility = View.VISIBLE
|
object : IMoGoWarningStatusListener {
|
||||||
//加入消息盒子
|
override fun onShow() {
|
||||||
saveMsgBox(
|
takeOver = true
|
||||||
MsgBoxBean(
|
visibility = View.VISIBLE
|
||||||
MsgBoxType.V2X, V2XMsg(
|
//加入消息盒子
|
||||||
EventTypeEnumNew.NETWORK_WEAK_EVENT.poiType,
|
Log.i(TAG,"弱网时加入消息盒子${EventTypeEnumNew.NETWORK_WEAK_EVENT.content}")
|
||||||
EventTypeEnumNew.NETWORK_WEAK_EVENT.content,
|
saveMsgBox(
|
||||||
EventTypeEnumNew.NETWORK_WEAK_EVENT.tts
|
MsgBoxBean(
|
||||||
|
MsgBoxType.V2X, V2XMsg(
|
||||||
|
EventTypeEnumNew.NETWORK_WEAK_EVENT.poiType,
|
||||||
|
EventTypeEnumNew.NETWORK_WEAK_EVENT.content,
|
||||||
|
EventTypeEnumNew.NETWORK_WEAK_EVENT.tts
|
||||||
|
)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
)
|
}
|
||||||
}
|
|
||||||
|
|
||||||
override fun onDismiss() {
|
override fun onDismiss() {
|
||||||
takeOver = false
|
takeOver = false
|
||||||
visibility = View.GONE
|
visibility = View.GONE
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
)
|
||||||
)
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -47,7 +47,7 @@ open class AutopilotStatusInfo : Serializable, Cloneable {
|
|||||||
var satelliteTime = 0.0
|
var satelliteTime = 0.0
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 自动驾驶状态 0是不可用 1是ready 2是自动驾驶start
|
* 自动驾驶状态 0是不可用 1是ready 2是自动驾驶start 7:平行驾驶中
|
||||||
*/
|
*/
|
||||||
var state = 0
|
var state = 0
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user