Merge remote-tracking branch 'origin/dev_robobus-d_230413_3.1.0' into dev_robobus-d_230413_3.1.0
This commit is contained in:
@@ -15,4 +15,5 @@ interface DrivingInfoCallback {
|
||||
fun showNoTaskView(isTrue : Boolean)
|
||||
fun updateLineStations(stations: MutableList<BusStationBean>)
|
||||
fun updateStationsInfo(stations: MutableList<BusStationBean>, i: Int, isArrived: Boolean)
|
||||
fun clearCustomPolyline()
|
||||
}
|
||||
@@ -421,6 +421,12 @@ class PM2DrivingModel private constructor() {
|
||||
updateLocalOrder()
|
||||
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")
|
||||
routesResult = result
|
||||
|
||||
|
||||
@@ -116,6 +116,12 @@ class PM2DrivingPresenter(view: PM2DrivingInfoFragment?) :
|
||||
}
|
||||
}
|
||||
|
||||
override fun clearCustomPolyline() {
|
||||
ThreadUtils.runOnUiThread {
|
||||
mView?.clearCustomPolyline()
|
||||
}
|
||||
}
|
||||
|
||||
override fun updateAutoStatus(isOpen: Boolean) {
|
||||
ThreadUtils.runOnUiThread {
|
||||
mView?.updateAutoStatus(isOpen)
|
||||
@@ -125,4 +131,6 @@ class PM2DrivingPresenter(view: PM2DrivingInfoFragment?) :
|
||||
override fun updateAutoStatus(status: Int) {
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -28,8 +28,6 @@ import kotlin.math.roundToInt
|
||||
class PM2DrivingInfoFragment :
|
||||
MvpFragment<PM2DrivingInfoFragment?, PM2DrivingPresenter?>() {
|
||||
|
||||
// private var timeHandler: TimeHandler? = null
|
||||
|
||||
/**
|
||||
* 改变自动驾驶状态
|
||||
*
|
||||
@@ -108,7 +106,6 @@ class PM2DrivingInfoFragment :
|
||||
}
|
||||
|
||||
override fun onDestroy() {
|
||||
// timeHandler?.removeCallbacksAndMessages(null)
|
||||
super.onDestroy()
|
||||
overMapView?.let{
|
||||
it.onDestroy()
|
||||
@@ -142,9 +139,7 @@ class PM2DrivingInfoFragment :
|
||||
}
|
||||
|
||||
private fun setLineInfoView(isShow: Boolean){
|
||||
if (isShow){
|
||||
|
||||
}else{
|
||||
if (!isShow){
|
||||
updateNoOrderUI()
|
||||
}
|
||||
}
|
||||
@@ -155,11 +150,14 @@ class PM2DrivingInfoFragment :
|
||||
overMapView?.let {
|
||||
it.clearSiteMarkers()
|
||||
}
|
||||
clearCustomPolyline()
|
||||
}
|
||||
|
||||
fun clearCustomPolyline(){
|
||||
overMapView?.let {
|
||||
it.clearCustomPolyline()
|
||||
}
|
||||
}
|
||||
|
||||
private fun updateNoStationView(){
|
||||
station_name_tv.setTextColor(resources.getColor(R.color.m2_next_tv_color))
|
||||
station_name_tv.text = resources.getString(R.string.m2_p_empty_tv)
|
||||
@@ -258,7 +256,7 @@ class PM2DrivingInfoFragment :
|
||||
iv_animal_list.visibility = View.GONE
|
||||
}
|
||||
// 有线路到达站点
|
||||
fun haveLineAndArrivedStation(){
|
||||
private fun haveLineAndArrivedStation(){
|
||||
group_not_select_line.visibility = View.GONE
|
||||
group_stationinfo.visibility = View.VISIBLE
|
||||
clg_distance_left_time.visibility = View.GONE
|
||||
@@ -270,6 +268,5 @@ class PM2DrivingInfoFragment :
|
||||
|
||||
companion object {
|
||||
private val TAG = PM2DrivingInfoFragment::class.java.simpleName
|
||||
const val LOOP_TIME_TEXT = 10 * 1000L
|
||||
}
|
||||
}
|
||||
@@ -34,6 +34,8 @@ class TakeOverView @JvmOverloads constructor(
|
||||
}
|
||||
|
||||
private var autopilotStatus: Int = 0 //自动驾驶状态 0代表不可自动驾驶,1代表可自动驾驶,2代表自动驾驶中,7:平行驾驶中
|
||||
private var isParallel: Boolean = false //是否是平行驾驶
|
||||
|
||||
|
||||
init {
|
||||
LayoutInflater.from(context).inflate(R.layout.view_take_over, this, true)
|
||||
@@ -53,6 +55,11 @@ class TakeOverView @JvmOverloads constructor(
|
||||
*/
|
||||
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}")
|
||||
}
|
||||
|
||||
@@ -106,7 +113,7 @@ class TakeOverView @JvmOverloads constructor(
|
||||
MogoReport.Code.Error.EMAP.EPARALLEL_AICLOUD_CONNECTION_ERROR -> {
|
||||
//如果是平行驾驶状态下,提示弱网接管
|
||||
Log.i(TAG,"弱网时自动驾驶状态:${autopilotStatus}")
|
||||
if(autopilotStatus == 7){
|
||||
if(autopilotStatus == 7 || isParallel){
|
||||
CallerHmiManager.warningV2X(
|
||||
EventTypeEnumNew.NETWORK_WEAK_EVENT.poiType,
|
||||
EventTypeEnumNew.NETWORK_WEAK_EVENT.content,
|
||||
|
||||
Reference in New Issue
Block a user