Merge branch 'dev_robobus-d_230322_3.0.0' into 'dev_robobus_network_weak_230323'

Dev robobus d 230322 3.0.0

See merge request SCA/L4HA/AndroidApp/MoGoEagleEye!746
This commit is contained in:
wangmingjun
2023-04-07 09:01:24 +00:00
45 changed files with 836 additions and 183 deletions

View File

@@ -82,7 +82,6 @@
android:layout_width="650dp"
android:layout_height="wrap_content"
android:layout_marginBottom="20dp"
android:visibility="gone"
app:layout_constraintBottom_toTopOf="@id/viewPassengerMsgBoxButton"
app:layout_constraintLeft_toLeftOf="@id/viewPassengerMsgBoxButton"
app:layout_constraintRight_toRightOf="@id/viewPassengerMsgBoxButton" />

View File

@@ -49,6 +49,7 @@ class TaxiConst {
const val EVENT_PARAM_TIME = "time"
const val EVENT_PARAM_START_NAME = "start_name"
const val EVENT_PARAM_END_NAME = "end_name"
const val EVENT_PARAM_LINE_ID = "line_id"
const val EVENT_PARAM_ORDER_NUMBER = "order_num"
const val EVENT_PARAM_START_RESULT = "start_autopilot" // true/false
const val EVENT_PARAM_START_FAILURE_CODE = "start_autopilot_failure_code" // 启动自驾失败code

View File

@@ -1,10 +1,5 @@
package com.mogo.och.taxi.model;
import static com.mogo.eagle.core.data.deva.chain.ChainConstant.CHAIN_ALIAS_CODE_OCH_TAXI_START_AUTOPILOT;
import static com.mogo.eagle.core.data.deva.chain.ChainConstant.CHAIN_LINK_ADAS;
import static com.mogo.eagle.core.data.deva.chain.ChainConstant.CHAIN_LINK_LOG_WEB_SOCKET_AUTOPILOT;
import static com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.M_TAXI;
import android.content.Context;
import android.content.Intent;
import android.net.ConnectivityManager;
@@ -96,6 +91,11 @@ import mogo.telematics.pad.MessagePad;
import mogo_msg.MogoReportMsg;
import system_master.SystemStatusInfo;
import static com.mogo.eagle.core.data.deva.chain.ChainConstant.CHAIN_ALIAS_CODE_OCH_TAXI_START_AUTOPILOT;
import static com.mogo.eagle.core.data.deva.chain.ChainConstant.CHAIN_LINK_ADAS;
import static com.mogo.eagle.core.data.deva.chain.ChainConstant.CHAIN_LINK_LOG_WEB_SOCKET_AUTOPILOT;
import static com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.M_TAXI;
/**
* Created by pangfan on 2021/8/19
* <p>
@@ -942,7 +942,7 @@ public class TaxiModel {
+ "isRestartAutopilot = "+isRestartAutopilot);
TaxiAnalyticsManager.getInstance().triggerStartAutopilotEvent(isRestartAutopilot, false,
mCurrentOCHOrder.startSiteAddr, mCurrentOCHOrder.endSiteAddr, mCurrentOCHOrder.orderNo);
mCurrentOCHOrder.startSiteAddr, mCurrentOCHOrder.endSiteAddr, mCurrentOCHOrder.lineId, mCurrentOCHOrder.orderNo);
if (mControllerStatusCallback != null) {
mControllerStatusCallback.startOpenAutopilot();
@@ -1173,7 +1173,7 @@ public class TaxiModel {
mPrevAPStatus = state; // 每个状态单独赋值解决无订单时已经是2的状态导致的新订单来时无法进入此逻辑更新状态
TaxiAnalyticsManager.getInstance().triggerStartAutopilotEvent(isRestartAutopilot, true,
mCurrentOCHOrder.startSiteAddr, mCurrentOCHOrder.endSiteAddr, mCurrentOCHOrder.orderNo);
mCurrentOCHOrder.startSiteAddr, mCurrentOCHOrder.endSiteAddr, mCurrentOCHOrder.lineId, mCurrentOCHOrder.orderNo);
if (FunctionBuildConfig.isDemoMode) {
// 当美化模式(演示模式)开启时: 订单对应自动驾驶开启后置true
FunctionBuildConfig.isIgnoreConditionsDrawAutopilotTrajectoryData = true;

View File

@@ -86,7 +86,7 @@ public class TaxiAnalyticsManager {
* @param send 是否直接发送埋点15s内开启成功则直接发送成功埋点
*/
public void triggerStartAutopilotEvent(
boolean restart, boolean send, String startName, String endName, String orderNo) {
boolean restart, boolean send, String startName, String endName, long lineId, String orderNo) {
mStartAutopilotKey = restart ?
TaxiConst.EVENT_KEY_RESTART_AUTOPILOT : TaxiConst.EVENT_KEY_START_SERVICE;
String sn = MoGoAiCloudClientConfig.getInstance().getSn();
@@ -101,6 +101,7 @@ public class TaxiAnalyticsManager {
mStartAutopilotParams.put(TaxiConst.EVENT_PARAM_TIME, dateTime);
mStartAutopilotParams.put(TaxiConst.EVENT_PARAM_START_NAME, startName);
mStartAutopilotParams.put(TaxiConst.EVENT_PARAM_END_NAME, endName);
mStartAutopilotParams.put(TaxiConst.EVENT_PARAM_LINE_ID, lineId);
mStartAutopilotParams.put(TaxiConst.EVENT_PARAM_ORDER_NUMBER, orderNo);
// CallerLogger.INSTANCE.d(M_TAXI + "埋点==","restart = "+restart+", send= "+send);

View File

@@ -8,7 +8,8 @@
"socket_tech_url": "",
"eagle_mis_url": "",
"eagle_dns_url": "",
"bind_driver_qr_url": ""
"bind_driver_qr_url": "",
"chart_socket_url":""
},
"online": {
"och_url": "https://tech.zhidaohulian.com",
@@ -18,7 +19,8 @@
"socket_tech_url": "",
"eagle_mis_url": "",
"eagle_dns_url": "",
"bind_driver_qr_url": ""
"bind_driver_qr_url": "",
"chart_socket_url":""
},
"demo": {
"och_url": "http://tech-dev.zhidaohulian.com",
@@ -28,7 +30,8 @@
"socket_tech_url": "",
"eagle_mis_url": "",
"eagle_dns_url": "",
"bind_driver_qr_url": ""
"bind_driver_qr_url": "",
"chart_socket_url":""
}
},
"dali": {
@@ -40,17 +43,19 @@
"socket_tech_url": "https://och-a.zhidaozhixing.com/arch/",
"eagle_mis_url": "http://eagle-mis-a.zhidaozhixing.com/",
"eagle_dns_url": "http://eagle-dns-a.zhidaozhixing.com/",
"bind_driver_qr_url": "https://tech.zhidaohulian.com?pipe=asafety&sn=%1$s"
"bind_driver_qr_url": "https://tech.zhidaohulian.com?pipe=asafety&sn=%1$s",
"chart_socket_url":"wss://acp-eh.zhidaozhixing.com/ws"
},
"online": {
"och_url": "https://och-driver-eh.zhidaozhixing.com:18182",
"shuttle_url": "https://och-driver-eh.zhidaozhixing.com:18182",
"passport_url": "https://och-driver-eh.zhidaozhixing.com:18182/arch/passport/",
"socket_base_url": "https://och-driver-eh.zhidaozhixing.com:18182/arch/push/",
"socket_tech_url": "https://och-driver-eh.zhidaozhixing.com:18182/arch/",
"eagle_mis_url": "https://och-hailing-eh.zhidaozhixing.com:18182/",
"eagle_dns_url": "https://och-hailing-eh.zhidaozhixing.com:18182/",
"bind_driver_qr_url": "https://tech.zhidaohulian.com?pipe=ehsafety&sn=%1$s"
"och_url": "https://och-driver-eh.zhidaozhixing.com",
"shuttle_url": "https://och-driver-eh.zhidaozhixing.com",
"passport_url": "https://och-driver-eh.zhidaozhixing.com/arch/passport/",
"socket_base_url": "https://och-driver-eh.zhidaozhixing.com/arch/push/",
"socket_tech_url": "https://och-driver-eh.zhidaozhixing.com/arch/",
"eagle_mis_url": "https://och-hailing-eh.zhidaozhixing.com/",
"eagle_dns_url": "https://och-hailing-eh.zhidaozhixing.com/",
"bind_driver_qr_url": "https://tech.zhidaohulian.com?pipe=ehsafety&sn=%1$s",
"chart_socket_url":"wss://acp-eh.zhidaozhixing.com/ws"
},
"demo": {
"och_url": "https://och-a.zhidaozhixing.com",
@@ -58,9 +63,10 @@
"passport_url": "https://och-a.zhidaozhixing.com/arch/passport/",
"socket_base_url": "https://och-a.zhidaozhixing.com/arch/push/",
"socket_tech_url": "https://och-a.zhidaozhixing.com/arch/",
"eagle_mis_url": "http://och-hailing-eh.zhidaozhixing.com:18181/",
"eagle_dns_url": "http://och-hailing-eh.zhidaozhixing.com:18181/",
"bind_driver_qr_url": "https://tech.zhidaohulian.com?pipe=ehsafety&sn=%1$s"
"eagle_mis_url": "http://och-hailing-eh.zhidaozhixing.com/",
"eagle_dns_url": "http://och-hailing-eh.zhidaozhixing.com/",
"bind_driver_qr_url": "https://tech.zhidaohulian.com?pipe=ehsafety&sn=%1$s",
"chart_socket_url":"wss://acp-eh.zhidaozhixing.com/ws"
}
},
"yantai": {
@@ -72,7 +78,8 @@
"socket_tech_url": "https://och-a.zhidaozhixing.com/arch/",
"eagle_mis_url": "http://eagle-mis-a.zhidaozhixing.com/",
"eagle_dns_url": "http://eagle-dns-a.zhidaozhixing.com/",
"bind_driver_qr_url": "https://tech.zhidaohulian.com?pipe=asafety&sn=%1$s"
"bind_driver_qr_url": "https://tech.zhidaohulian.com?pipe=asafety&sn=%1$s",
"chart_socket_url":""
},
"online": {
"och_url": "https://och-driver-yt.zhidaozhixing.com",
@@ -82,7 +89,8 @@
"socket_tech_url": "https://och-driver-yt.zhidaozhixing.com/arch/",
"eagle_mis_url": "https://och-hailing-yt.zhidaozhixing.com/",
"eagle_dns_url": "https://och-hailing-yt.zhidaozhixing.com/",
"bind_driver_qr_url": "https://tech.zhidaohulian.com?pipe=ytsafety&sn=%1$s"
"bind_driver_qr_url": "https://tech.zhidaohulian.com?pipe=ytsafety&sn=%1$s",
"chart_socket_url":""
},
"demo": {
"och_url": "https://och-a.zhidaozhixing.com",
@@ -92,7 +100,8 @@
"socket_tech_url": "https://och-a.zhidaozhixing.com/arch/",
"eagle_mis_url": "http://eagle-mis-a.zhidaozhixing.com/",
"eagle_dns_url": "http://eagle-dns-a.zhidaozhixing.com/",
"bind_driver_qr_url": "https://tech.zhidaohulian.com?pipe=ytsafety&sn=%1$s"
"bind_driver_qr_url": "https://tech.zhidaohulian.com?pipe=ytsafety&sn=%1$s",
"chart_socket_url":""
}
}
}

View File

@@ -74,6 +74,10 @@ class FuncBizProvider : IMoGoFuncBizProvider {
dispatchAutoPilotManager.stopCancel(manualTrigger)
}
override fun restartDispatchAffirm() {
dispatchAutoPilotManager.restartDispatch()
}
override fun testDispatch(sceneType: Int) {
dispatchAutoPilotManager.testDispatch(sceneType)
}

View File

@@ -32,6 +32,7 @@ import com.mogo.eagle.function.biz.dispatch.network.DispatchServiceModel.Compani
import com.mogo.eagle.function.biz.dispatch.network.DispatchServiceModel.Companion.DISPATCH_STOP_MANUAL_CANCEL
import com.mogo.eagle.function.biz.dispatch.network.DispatchServiceModel.Companion.DISPATCH_STOP_TIMER_CANCEL
import com.mogo.eagle.function.biz.dispatch.network.DispatchServiceModel.Companion.dispatchServiceModel
import com.zhjt.mogo.adas.data.bean.MogoReport
import mogo.telematics.pad.MessagePad
import mogo_msg.MogoReportMsg
@@ -251,6 +252,15 @@ class DispatchAutoPilotManager private constructor() :
}
}
/**
* 重启自驾
*/
fun restartDispatch(){
CallerHmiManager.dismissDispatchDialog()
//启动自动驾驶
startAutoPilot()
}
override fun onCheck(isChecked: Boolean) {
if (isChecked) {
// 确保到达终点后,再次点击,不会有回馈,并且在下次调开始时,才会重置
@@ -329,18 +339,40 @@ class DispatchAutoPilotManager private constructor() :
*/
override fun onAutopilotGuardian(guardianInfo: MogoReportMsg.MogoReportMessage?) {
if (guardianInfo == null || !guardianInfo.hasCode()) return
if ("ISYS_INIT_TRAJECTORY_START".equals(guardianInfo.getCode())){
Log.i(TAG,"onAutopilotGuardian "+guardianInfo.code)
//掉自驾
when(guardianInfo.code){
MogoReport.Code.Error.EMAP.EXIT_AUTOPILOT_FOR_PLANNING,
MogoReport.Code.Error.EMAP.EXIT_AUTOPILOT_FOR_LOCATION,
MogoReport.Code.Error.EMAP.EXIT_AUTOPILOT_FOR_CHASSIS,
MogoReport.Code.Error.EMAP.EXIT_AUTOPILOT_FOR_DISTANCE,
MogoReport.Code.Error.EMAP.EXIT_AUTOPILOT_FOR_BRAKE,
MogoReport.Code.Error.EMAP.EXIT_AUTOPILOT_FOR_ACCEL,
MogoReport.Code.Error.EMAP.EXIT_AUTOPILOT_FOR_STEER,
MogoReport.Code.Error.EMAP.EXIT_AUTOPILOT_FOR_GEAR_SWITCH,
MogoReport.Code.Error.EMAP.EXIT_AUTOPILOT_FOR_CHASSIS_NO_RESPONSE,
MogoReport.Code.Error.EMAP.EXIT_AUTOPILOT_FOR_CHASSIS_UNKNOWN->{
//如果到达终点,则不处理
if(isArriveEnd){
return
}
//处于云调度任务中且调度实体类不为空,弹出重启自驾弹窗
if(isDispatch){
receiverBean?.let { CallerHmiManager.showDispatchRestartDialog(it) }
}
}
}
if ("ISYS_INIT_TRAJECTORY_START".equals(guardianInfo.code)){
Log.i(TAG,"onAutopilotGuardian ISYS_INIT_TRAJECTORY_START 轨迹管理_轨迹开始下载本地已有对应轨迹也触发")
}else if ("ISYS_INIT_TRAJECTORY_SUCCESS".equals(guardianInfo.getCode())){
}else if ("ISYS_INIT_TRAJECTORY_SUCCESS".equals(guardianInfo.code)){
Log.i(TAG,"onAutopilotGuardian ISYS_INIT_TRAJECTORY_SUCCESS 轨迹管理_轨迹下载成功本地已有对应轨迹也触发")
}else if ("ISYS_INIT_TRAJECTORY_FAILURE".equals(guardianInfo.getCode())){
}else if ("ISYS_INIT_TRAJECTORY_FAILURE".equals(guardianInfo.code)){
Log.i(TAG,"onAutopilotGuardian ISYS_INIT_TRAJECTORY_FAILURE 轨迹管理_轨迹下载失败本地无对应轨迹")
}else if ("ISYS_INIT_TRAJECTORY_WARNING".equals(guardianInfo.getCode())){
}else if ("ISYS_INIT_TRAJECTORY_WARNING".equals(guardianInfo.code)){
Log.i(TAG,"onAutopilotGuardian ISYS_INIT_TRAJECTORY_WARNING 轨迹管理_轨迹下载失败本地有对应轨迹认为成功")
}else if ("ISYS_INIT_TRAJECTORY_TIMEOUT".equals(guardianInfo.getCode())){
}else if ("ISYS_INIT_TRAJECTORY_TIMEOUT".equals(guardianInfo.code)){
Log.i(TAG,"onAutopilotGuardian ISYS_INIT_TRAJECTORY_TIMEOUT 轨迹管理_轨迹下载超时")
}
}
fun testDispatch(sceneType: Int) {

View File

@@ -1,6 +1,7 @@
package com.mogo.eagle.core.function.chat.facade.consts
import com.mogo.commons.debug.DebugConfig
import com.mogo.eagle.core.data.config.FunctionBuildConfig
//WebSocket发送数据相关
const val SOCKET_HAND_SHAKE = 0
@@ -60,10 +61,14 @@ class ChatHttp {
}
fun getSocketServer(): String {
return when (DebugConfig.getNetMode()) {
DebugConfig.NET_MODE_DEV, DebugConfig.NET_MODE_QA, DebugConfig.NET_MODE_DEMO -> DEV_SOCKET_SERVER
DebugConfig.NET_MODE_RELEASE -> SOCKET_SERVER
else -> SOCKET_SERVER
if(FunctionBuildConfig.urlJson.chartSocketUrl.isEmpty()){
return when (DebugConfig.getNetMode()) {
DebugConfig.NET_MODE_DEV, DebugConfig.NET_MODE_QA, DebugConfig.NET_MODE_DEMO -> DEV_SOCKET_SERVER
DebugConfig.NET_MODE_RELEASE -> SOCKET_SERVER
else -> SOCKET_SERVER
}
}else{
return FunctionBuildConfig.urlJson.chartSocketUrl
}
}

View File

@@ -226,6 +226,14 @@ class MoGoHmiProvider : IMoGoHmiProvider {
}
}
override fun showDispatchRestartDialog(msgData: DispatchAdasAutoPilotLocReceiverBean) {
ThreadUtils.runOnUiThread {
context?.let{
DispatchDialogManager.getInstance(it).showRestartDialog(msgData)
}
}
}
override fun showNoticeForTrafficWithData(pushData: NoticeTrafficStylePushData?) {
pushData?.let {
ThreadUtils.runOnUiThread {

View File

@@ -19,6 +19,9 @@ import com.mogo.eagle.core.function.msgbox.MsgBoxConfig
import com.mogo.eagle.core.utilcode.util.UiThreadHandler
import kotlinx.android.synthetic.main.layout_m_box_bubble.view.*
/**
* M2气泡态消息盒子
*/
class MBoxBubbleView @JvmOverloads constructor(
context: Context,
attrs: AttributeSet? = null,

View File

@@ -80,6 +80,7 @@ class BusPassengerMsgBoxBubbleAdapter(private val activity: Activity): RecyclerV
holder.tvBusPV2XContent.text = v2XMsg.content
holder.ivBusPV2XImage.setImageDrawable(activity.resources.getDrawable(
EventTypeEnumNew.getUpdateIconRes(v2XMsg.type)))
holder.tvBusPV2XTitle.text = EventTypeEnumNew.getEventTitle(v2XMsg.type)
}
}
}
@@ -125,6 +126,7 @@ class BusPassengerMsgBoxBubbleAdapter(private val activity: Activity): RecyclerV
var ivBusPV2XImage: ImageView = itemView.findViewById(R.id.ivBusPV2XImage)
var tvBusPV2XTime: TextView = itemView.findViewById(R.id.tvBusPV2XTime)
var tvBusPV2XContent: TextView = itemView.findViewById(R.id.tvBusPV2XContent)
var tvBusPV2XTitle: TextView = itemView.findViewById(R.id.tvBusPV2XTitle)
}
//运营消息

View File

@@ -181,6 +181,7 @@ class DriverMsgBoxBubbleAdapter(private val activity: Activity) : RecyclerView.A
holder.clV2XLayout.setOnClickListener {
CallerMsgBoxEventListenerManager.invokeBubbleV2XListener(msgBoxBean)
}
holder.tvV2XTitle.text = EventTypeEnumNew.getEventTitle(v2XMsg.type)
}
}
is BubbleSummaryHolder -> {
@@ -275,6 +276,7 @@ class DriverMsgBoxBubbleAdapter(private val activity: Activity) : RecyclerView.A
var tvV2XTime: TextView = itemView.findViewById(R.id.tvV2XTime)
var tvV2XContent: TextView = itemView.findViewById(R.id.tvV2XContent)
var clV2XLayout: RoundCanClickConstraintLayout = itemView.findViewById(R.id.clV2XLayout)
var tvV2XTitle: TextView = itemView.findViewById(R.id.tvV2XTitle)
}
//汇总消息

View File

@@ -369,6 +369,7 @@ class DriverMsgBoxListAdapter(private val activity: Activity) :
holder.ivV2XImage.setImageDrawable(activity.resources.getDrawable(
EventTypeEnumNew.getUpdateIconRes(v2XMsg.type))
)
holder.tvV2XTitle.text = EventTypeEnumNew.getEventTitle(v2XMsg.type)
}
}
is MsgBoxSummary -> {
@@ -472,6 +473,7 @@ class DriverMsgBoxListAdapter(private val activity: Activity) :
var ivV2XImage: ImageView = itemView.findViewById(R.id.ivV2XImage)
var tvV2XTime: TextView = itemView.findViewById(R.id.tvV2XTime)
var tvV2XContent: TextView = itemView.findViewById(R.id.tvV2XContent)
var tvV2XTitle: TextView = itemView.findViewById(R.id.tvV2XTitle)
}
//汇总消息

View File

@@ -82,6 +82,7 @@ class MBoxBubbleAdapter(private val activity: Activity): RecyclerView.Adapter<Re
holder.tvMV2XContent.text = v2XMsg.content
holder.ivMV2XImage.setImageDrawable(activity.resources.getDrawable(
EventTypeEnumNew.getUpdateIconRes(v2XMsg.type)))
holder.tvMV2XTitle.text = EventTypeEnumNew.getEventTitle(v2XMsg.type)
}
}
}
@@ -128,6 +129,7 @@ class MBoxBubbleAdapter(private val activity: Activity): RecyclerView.Adapter<Re
var ivMV2XImage: ImageView = itemView.findViewById(R.id.ivMV2XImage)
var tvMV2XTime: TextView = itemView.findViewById(R.id.tvMV2XTime)
var tvMV2XContent: TextView = itemView.findViewById(R.id.tvMV2XContent)
var tvMV2XTitle: TextView = itemView.findViewById(R.id.tvMV2XTitle)
}
//运营消息

View File

@@ -110,6 +110,7 @@ class MMsgBoxBubbleAdapter(private val activity: Activity): RecyclerView.Adapter
holder.clMVeXLayout.setOnClickListener {
CallerMsgBoxEventListenerManager.invokeBubbleV2XListener(msgBoxBean)
}
holder.tvMV2XTitle.text = EventTypeEnumNew.getEventTitle(v2XMsg.type)
}
}
is BubbleSummaryHolder -> {
@@ -179,6 +180,7 @@ class MMsgBoxBubbleAdapter(private val activity: Activity): RecyclerView.Adapter
var tvMV2XTime: TextView = itemView.findViewById(R.id.tvMV2XTime)
var tvMV2XContent: TextView = itemView.findViewById(R.id.tvMV2XContent)
var clMVeXLayout: RoundCanClickConstraintLayout = itemView.findViewById(R.id.clMVeXLayout)
var tvMV2XTitle: TextView = itemView.findViewById(R.id.tvMV2XTitle)
}
//汇总消息

View File

@@ -100,6 +100,7 @@ class MMsgBoxListAdapter(private val activity: Activity): RecyclerView.Adapter<R
holder.tvMV2XContent.text = v2XMsg.content
holder.ivMV2XImage.setImageDrawable(activity.resources.getDrawable(
EventTypeEnumNew.getUpdateIconRes(v2XMsg.type)))
holder.tvMV2XTitle.text = EventTypeEnumNew.getEventTitle(v2XMsg.type)
}
}
is ListSummaryHolder -> {
@@ -155,6 +156,7 @@ class MMsgBoxListAdapter(private val activity: Activity): RecyclerView.Adapter<R
var ivMV2XImage: ImageView = itemView.findViewById(R.id.ivMV2XImage)
var tvMV2XTime: TextView = itemView.findViewById(R.id.tvMV2XTime)
var tvMV2XContent: TextView = itemView.findViewById(R.id.tvMV2XContent)
var tvMV2XTitle: TextView = itemView.findViewById(R.id.tvMV2XTitle)
}
//汇总消息

View File

@@ -107,6 +107,7 @@ class PassengerMsgBoxBubbleAdapter(private val activity: Activity): RecyclerView
holder.clPassengerVeXLayout.setOnClickListener {
CallerMsgBoxEventListenerManager.invokeBubbleV2XListener(msgBoxBean)
}
holder.tvPassengerV2XTitle.text = EventTypeEnumNew.getEventTitle(v2XMsg.type)
}
}
is BubbleSummaryHolder -> {
@@ -167,6 +168,7 @@ class PassengerMsgBoxBubbleAdapter(private val activity: Activity): RecyclerView
var tvPassengerV2XTime: TextView = itemView.findViewById(R.id.tvPassengerV2XTime)
var tvPassengerV2XContent: TextView = itemView.findViewById(R.id.tvPassengerV2XContent)
var clPassengerVeXLayout: RoundCanClickConstraintLayout = itemView.findViewById(R.id.clPassengerVeXLayout)
var tvPassengerV2XTitle: TextView = itemView.findViewById(R.id.tvPassengerV2XTitle)
}
//汇总消息

View File

@@ -97,6 +97,7 @@ class PassengerMsgBoxListAdapter(private val activity: Activity): RecyclerView.A
holder.tvPassengerV2XContent.text = v2XMsg.content
holder.ivPassengerV2XImage.setImageDrawable(activity.resources.getDrawable(
EventTypeEnumNew.getUpdateIconRes(v2XMsg.type)))
holder.tvPassengerV2XTitle.text = EventTypeEnumNew.getEventTitle(v2XMsg.type)
}
}
is ListSummaryHolder -> {
@@ -140,6 +141,7 @@ class PassengerMsgBoxListAdapter(private val activity: Activity): RecyclerView.A
var ivPassengerV2XImage: ImageView = itemView.findViewById(R.id.ivPassengerV2XImage)
var tvPassengerV2XTime: TextView = itemView.findViewById(R.id.tvPassengerV2XTime)
var tvPassengerV2XContent: TextView = itemView.findViewById(R.id.tvPassengerV2XContent)
var tvPassengerV2XTitle: TextView = itemView.findViewById(R.id.tvPassengerV2XTitle)
}
//汇总消息

View File

@@ -53,6 +53,26 @@ public class DispatchDialogManager {
}
}
/**
* 云调度重启自驾
* @param msgData 长链下发实体
*/
public void showRestartDialog(DispatchAdasAutoPilotLocReceiverBean msgData){
if(isShowing()){
return;
}
if (msgData == null) {
return;
}
if (dialog != null && dialog.isShowing()) { //避免下发两次
return;
}
if(dialog == null){
dialog = new DispatchRestartDialog(mContext);
}
dialog.showDialog(msgData);
}
private void dispatchHengYang(DispatchAdasAutoPilotLocReceiverBean msgData) {
// if (msgData.getType() == DISPATCH_TYPE_START) { //衡阳只有开始调度
// }

View File

@@ -0,0 +1,29 @@
package com.mogo.eagle.core.function.hmi.ui.notice;
import android.content.Context;
import android.widget.TextView;
import androidx.annotation.NonNull;
import com.mogo.eagle.core.data.biz.dispatch.DispatchAdasAutoPilotLocReceiverBean;
import com.mogo.eagle.core.function.call.biz.CallerFuncBizManager;
import com.mogo.eagle.core.function.hmi.R;
public class DispatchRestartDialog extends DispatchBaseDialog{
public DispatchRestartDialog(@NonNull Context context) {
super(context);
setContentView(R.layout.dialog_adas_dispatch_restart);
setCanceledOnTouchOutside(false);
TextView dispatchRestartEnter = findViewById(R.id.tv_dispatch_restart_enter);
dispatchRestartEnter.setOnClickListener(v -> {
//启动自动驾驶
CallerFuncBizManager.getBizProvider().restartDispatchAffirm();
});
}
@Override
public void showDialog(DispatchAdasAutoPilotLocReceiverBean dispatchContent) {
show();
}
}

View File

@@ -9,8 +9,8 @@ import android.os.Process
import android.util.AttributeSet
import android.view.LayoutInflater
import android.view.View
import android.view.View.OnTouchListener
import android.widget.FrameLayout
import com.mogo.commons.debug.DebugConfig
import com.mogo.eagle.core.data.app.AppConfigInfo
import com.mogo.eagle.core.data.autopilot.AutopilotStatusInfo
import com.mogo.eagle.core.data.deva.bindingcar.IPCUpgradeStateInfo
@@ -31,6 +31,7 @@ import mogo.telematics.pad.MessagePad
import org.greenrobot.eventbus.EventBus
import kotlin.system.exitProcess
/**
* @author ChenFufeng
* 设置自动驾驶速度和检测页入口
@@ -69,29 +70,44 @@ internal class AutoPilotAndCheckView @JvmOverloads constructor(
@SuppressLint("ClickableViewAccessibility")
private fun initView() {
background = ColorDrawable(Color.parseColor("#F0151D41"))
keyBoardUtil?.setActionListener { inputContent ->
inputContent.toIntOrNull()?.let { speed ->
when {
speed > 60 -> {
// 设置失败键盘不消失,让用户直接修改
ToastUtils.showShort("超过最大限速值60设置失败")
}
else -> {
// 设置自动驾驶速度
val isSuccess = CallerAutoPilotControlManager.setAutoPilotSpeed(speed)
when {
isSuccess -> {
ToastUtils.showShort("车速设置成功,立即生效")
}
else -> {
ToastUtils.showShort("设置车速失败,请启动域控制器")
if (keyBoardUtil == null) {
keyBoardUtil = KeyBoardUtil(sKeyBoardView, etInputSpeed)
}
keyBoardUtil?.setActionListener(object: KeyBoardUtil.ActionListener{
override fun onComplete(inputContent: String?) {
inputContent?.toIntOrNull()?.let { speed ->
when {
speed > 60 -> {
// 设置失败键盘不消失,让用户直接修改
ToastUtils.showShort("超过最大限速值60设置失败")
}
else -> {
keyBoardUtil?.hideKeyboard()
etInputSpeed.clearFocus()
// 设置自动驾驶速度
val isSuccess = CallerAutoPilotControlManager.setAutoPilotSpeed(speed)
when {
isSuccess -> {
ToastUtils.showShort("车速设置成功,立即生效")
}
else -> {
ToastUtils.showShort("设置车速失败,请启动域控制器")
}
}
}
}
}
}
}
override fun onUpdate(inputContent: String?) {
if (inputContent != null) {
speedLimit = inputContent.toInt()
}
}
})
KeyBoardUtil.hideSystemSoftKeyboard(context, etInputSpeed)
ivCloseIcon.setOnClickListener {
clickListener?.onClose(it)
}
@@ -123,15 +139,37 @@ internal class AutoPilotAndCheckView @JvmOverloads constructor(
// }
tvAcceleration.text = "每次调整车速±5km/h,点击确定生效"
if (speedLimit > 0) {
tvSpeed.text = speedLimit.toString()
etInputSpeed.setText(speedLimit.toString())
}else{
tvSpeed.text = "0"
etInputSpeed.setText("0")
}
etInputSpeed.setOnTouchListener { _, _ ->
val curTime = System.currentTimeMillis()
if (curTime - lastTime < 1000) {
return@setOnTouchListener true
}
etInputSpeed.isFocusableInTouchMode = true
if (keyBoardUtil == null) {
keyBoardUtil = KeyBoardUtil(sKeyBoardView, etInputSpeed)
}
keyBoardUtil?.showKeyboard()
//滑动滚动条
svLayout.post {
svLayout.fullScroll(View.FOCUS_DOWN)
}
if (!connectStatus) {
ToastUtils.showShort("设置车速失败,请启动域控制器")
keyBoardUtil?.hideKeyboard()
return@setOnTouchListener true
} else {
return@setOnTouchListener false
}
}
ivSpeedReduce.setOnClickListener {
if(speedLimit>=5){
speedLimit -= 5
tvSpeed.text = speedLimit.toString()
etInputSpeed.setText(speedLimit.toString())
}else{
ToastUtils.showShort("车速不能再减了")
}
@@ -140,7 +178,7 @@ internal class AutoPilotAndCheckView @JvmOverloads constructor(
ivSpeedAdd.setOnClickListener {
if(speedLimit<=55){
speedLimit += 5
tvSpeed.text = speedLimit.toString()
etInputSpeed.setText(speedLimit.toString())
}else{
ToastUtils.showShort("车速不能再加了")
}
@@ -148,11 +186,16 @@ internal class AutoPilotAndCheckView @JvmOverloads constructor(
//速度确认
tvSureModify.setOnClickListener {
if(speedLimit>60){
// 设置失败键盘不消失,让用户直接修改
ToastUtils.showShort("超过最大限速值60设置失败")
return@setOnClickListener
}
val isSuccess = CallerAutoPilotControlManager.setAutoPilotSpeed(speedLimit)
when {
isSuccess -> {
//速度显示
tvSpeed.text = speedLimit.toString()
etInputSpeed.setText(speedLimit.toString())
ToastUtils.showShort("车速设置成功,立即生效")
}
else -> {
@@ -230,7 +273,7 @@ internal class AutoPilotAndCheckView @JvmOverloads constructor(
// }
maxAcceleration = carConfigResp.maxAcceleration
speedLimit = (carConfigResp.speedLimit * 3.6).toInt()
tvSpeed.text = speedLimit.toString()
etInputSpeed.setText(speedLimit.toString())
}
}
}

View File

@@ -6,6 +6,7 @@ import android.inputmethodservice.KeyboardView;
import android.os.Build;
import android.text.Editable;
import android.text.InputType;
import android.util.Log;
import android.view.View;
import android.view.inputmethod.InputMethodManager;
import android.widget.EditText;
@@ -78,6 +79,9 @@ public class KeyBoardUtil {
editable.delete(start - 1, start);
}
}
if(actionListener != null){
actionListener.onUpdate(editText.getText().toString());
}
break;
case Keyboard.KEYCODE_DONE:
if (actionListener != null) {
@@ -86,6 +90,9 @@ public class KeyBoardUtil {
break;
default:
editable.insert(start, Character.toString((char) primaryCode));
if(actionListener != null){
actionListener.onUpdate(editText.getText().toString());
}
break;
}
}
@@ -133,5 +140,6 @@ public class KeyBoardUtil {
public interface ActionListener {
void onComplete(String inputContent);
void onUpdate(String inputContent);
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

View File

@@ -0,0 +1,55 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="@dimen/module_services_dispatch_cars_dialog_width"
android:layout_height="@dimen/module_services_dispatch_cars_dialog_height"
android:background="@drawable/bg_dispatch_cars">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent"
android:text="@string/dispatch_dialog_restart_title"
android:textColor="@android:color/white"
android:textSize="@dimen/dp_48"
android:layout_marginTop="@dimen/module_services_dispatch_cars_dialog_title_margin_top"
/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent"
android:layout_marginTop="@dimen/dp_200"
android:gravity="center_horizontal"
android:text="@string/dispatch_dialog_restart_content"
android:textColor="@android:color/white"
android:textSize="@dimen/dp_40"
/>
<TextView
android:id="@+id/tv_dispatch_restart_enter"
android:layout_width="0dp"
android:layout_height="@dimen/module_services_dispatch_cars_dialog_line_margin_bottom"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
android:text="@string/dispatch_dialog_restart_enter"
android:textColor="@color/color_1F9BFE"
android:textSize="@dimen/module_services_dispatch_cars_dialog_title_size"
android:gravity="center"
/>
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="@color/color_66B8BFE8"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintBottom_toTopOf="@+id/tv_dispatch_restart_enter"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@@ -19,14 +19,26 @@
android:layout_marginStart="@dimen/dp_26"
/>
<TextView
android:id="@+id/tvBusPV2XTitle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/dp_26"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toTopOf="@id/tvBusPV2XContent"
app:layout_constraintLeft_toRightOf="@id/ivBusPV2XImage"
android:textColor="#FF203555"
android:textSize="@dimen/dp_36"
/>
<TextView
android:id="@+id/tvBusPV2XTime"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="#991A273F"
android:textSize="@dimen/dp_36"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintTop_toTopOf="@id/tvBusPV2XTitle"
app:layout_constraintBottom_toBottomOf="@id/tvBusPV2XTitle"
app:layout_constraintRight_toRightOf="parent"
android:layout_marginEnd="@dimen/dp_26"
/>
@@ -35,16 +47,14 @@
android:id="@+id/tvBusPV2XContent"
android:layout_width="0dp"
android:layout_height="wrap_content"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintLeft_toLeftOf="@id/tvBusPV2XTitle"
app:layout_constraintRight_toRightOf="@id/tvBusPV2XTime"
app:layout_constraintTop_toBottomOf="@id/tvBusPV2XTitle"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toRightOf="@id/ivBusPV2XImage"
app:layout_constraintRight_toLeftOf="@id/tvBusPV2XTime"
android:layout_marginStart="@dimen/dp_26"
android:layout_marginEnd="@dimen/dp_16"
android:textColor="#FF203555"
android:textSize="@dimen/dp_36"
android:textColor="#CC203555"
android:textSize="@dimen/dp_28"
android:gravity="start"
android:maxLines="1"
android:maxLines="2"
android:ellipsize="end"
/>

View File

@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<com.mogo.eagle.core.widget.RoundConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="@dimen/dp_291"
android:layout_width="@dimen/dp_393"
android:layout_height="@dimen/dp_80"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:background="#CCFFFFFF"

View File

@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<com.mogo.eagle.core.widget.RoundConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="@dimen/dp_291"
android:layout_width="@dimen/dp_393"
android:layout_height="@dimen/dp_80"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:background="#CCFFFFFF"

View File

@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<com.mogo.eagle.core.widget.RoundCanClickConstraintLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="@dimen/dp_291"
android:layout_width="@dimen/dp_393"
android:layout_height="@dimen/dp_80"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:background="#CCFFFFFF"
@@ -19,13 +19,25 @@
android:layout_marginStart="@dimen/dp_13"
/>
<TextView
android:id="@+id/tvMV2XTitle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="#FF203555"
android:textSize="@dimen/dp_24"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toTopOf="@id/tvMV2XContent"
app:layout_constraintLeft_toRightOf="@id/ivMV2XImage"
android:layout_marginStart="@dimen/dp_10"
/>
<TextView
android:id="@+id/tvMV2XTime"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="@id/tvMV2XTitle"
app:layout_constraintBottom_toBottomOf="@id/tvMV2XTitle"
android:textColor="#991A273F"
android:textSize="@dimen/dp_18"
android:layout_marginEnd="@dimen/dp_13"
@@ -35,17 +47,15 @@
android:id="@+id/tvMV2XContent"
android:layout_width="0dp"
android:layout_height="wrap_content"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintTop_toBottomOf="@id/tvMV2XTitle"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toRightOf="@id/ivMV2XImage"
app:layout_constraintRight_toLeftOf="@id/tvMV2XTime"
app:layout_constraintLeft_toLeftOf="@id/tvMV2XTitle"
app:layout_constraintRight_toRightOf="@id/tvMV2XTime"
android:gravity="start"
android:maxLines="1"
android:maxLines="2"
android:ellipsize="end"
android:textColor="#FF203555"
android:textColor="#CC203555"
android:textSize="@dimen/dp_18"
android:layout_marginStart="@dimen/dp_18"
android:layout_marginEnd="@dimen/dp_18"
/>
</com.mogo.eagle.core.widget.RoundCanClickConstraintLayout>

View File

@@ -19,12 +19,25 @@
android:layout_marginStart="@dimen/dp_13"
/>
<TextView
android:id="@+id/tvMV2XTitle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="#FF203555"
android:textSize="@dimen/dp_25"
android:textStyle="bold"
android:layout_marginStart="@dimen/dp_10"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toTopOf="@id/tvMV2XContent"
app:layout_constraintLeft_toRightOf="@id/ivMV2XImage"
/>
<TextView
android:id="@+id/tvMV2XTime"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintTop_toTopOf="@id/tvMV2XTitle"
app:layout_constraintBottom_toBottomOf="@id/tvMV2XTitle"
app:layout_constraintRight_toRightOf="parent"
android:textColor="#99203555"
android:textSize="18dp"
@@ -35,18 +48,15 @@
android:id="@+id/tvMV2XContent"
android:layout_width="0dp"
android:layout_height="wrap_content"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toRightOf="@id/ivMV2XImage"
app:layout_constraintRight_toLeftOf="@id/tvMV2XTime"
app:layout_constraintTop_toBottomOf="@id/tvMV2XTitle"
app:layout_constraintLeft_toLeftOf="@id/tvMV2XTitle"
app:layout_constraintRight_toRightOf="@id/tvMV2XTime"
android:gravity="start"
android:maxLines="1"
android:maxLines="2"
android:ellipsize="end"
android:textColor="#FF203555"
android:textSize="25dp"
android:textStyle="bold"
android:layout_marginStart="@dimen/dp_13"
android:layout_marginEnd="@dimen/dp_13"
android:textColor="#CC203555"
android:textSize="@dimen/dp_20"
/>
</com.mogo.eagle.core.widget.RoundCanClickConstraintLayout>

View File

@@ -14,12 +14,25 @@
android:layout_marginStart="@dimen/dp_16"
/>
<TextView
android:id="@+id/tvMV2XTitle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="#FF203555"
android:textSize="@dimen/dp_25"
android:layout_marginStart="@dimen/dp_16"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toTopOf="@id/tvMV2XContent"
app:layout_constraintLeft_toRightOf="@id/ivMV2XImage"
android:textStyle="bold"
/>
<TextView
android:id="@+id/tvMV2XTime"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintTop_toTopOf="@id/tvMV2XTitle"
app:layout_constraintBottom_toBottomOf="@id/tvMV2XTitle"
app:layout_constraintRight_toRightOf="parent"
android:textColor="#FF4A5B76"
android:textSize="@dimen/dp_18"
@@ -30,18 +43,15 @@
android:id="@+id/tvMV2XContent"
android:layout_width="0dp"
android:layout_height="wrap_content"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintTop_toBottomOf="@id/tvMV2XTitle"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toRightOf="@id/ivMV2XImage"
app:layout_constraintRight_toLeftOf="@id/tvMV2XTime"
android:textStyle="bold"
app:layout_constraintLeft_toLeftOf="@id/tvMV2XTitle"
app:layout_constraintRight_toRightOf="@id/tvMV2XTime"
android:gravity="start"
android:maxLines="1"
android:maxLines="2"
android:ellipsize="end"
android:textColor="#FF203555"
android:textSize="@dimen/dp_25"
android:layout_marginStart="@dimen/dp_16"
android:layout_marginEnd="@dimen/dp_16"
android:textColor="#CC203555"
android:textSize="@dimen/dp_20"
/>
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@@ -3,8 +3,7 @@
android:layout_width="804dp"
android:layout_height="160dp"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:background="#53000000"
app:roundLayoutRadius="24dp"
android:background="@drawable/bg_msg_box_v2x"
android:layout_gravity="center_horizontal"
android:layout_marginStart="30dp"
android:layout_marginEnd="30dp"
@@ -20,11 +19,24 @@
app:layout_constraintLeft_toLeftOf="parent"
android:layout_margin="25dp"/>
<TextView
android:id="@+id/tvV2XTitle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toTopOf="@id/tvV2XContent"
app:layout_constraintLeft_toRightOf="@id/ivV2XImage"
android:layout_marginStart="@dimen/dp_15"
android:textColor="#FFFFFFFF"
android:textSize="@dimen/dp_32"
/>
<TextView
android:id="@+id/tvV2XTime"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:layout_constraintTop_toTopOf="@id/ivV2XImage"
app:layout_constraintTop_toTopOf="@id/tvV2XTitle"
app:layout_constraintBottom_toBottomOf="@id/tvV2XTitle"
app:layout_constraintRight_toRightOf="parent"
android:layout_marginEnd="25dp"
android:textColor="#80FFFFFF"
@@ -35,14 +47,13 @@
android:id="@+id/tvV2XContent"
android:layout_width="0dp"
android:layout_height="wrap_content"
app:layout_constraintLeft_toRightOf="@id/ivV2XImage"
app:layout_constraintRight_toRightOf="@id/tvV2XTime"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintTop_toBottomOf="@id/tvV2XTitle"
app:layout_constraintBottom_toBottomOf="parent"
android:layout_marginStart="25dp"
android:textColor="#FFFFFFFF"
android:textSize="32dp"
android:maxLines="1"
app:layout_constraintLeft_toLeftOf="@id/tvV2XTitle"
app:layout_constraintRight_toRightOf="@id/tvV2XTime"
android:textColor="#B3FFFFFF"
android:textSize="@dimen/dp_28"
android:maxLines="2"
android:ellipsize="end"
/>

View File

@@ -1,14 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<com.mogo.eagle.core.widget.RoundCanClickConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/clV2XLayout"
android:layout_width="804dp"
android:layout_width="@dimen/dp_804"
android:layout_height="160dp"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:background="#53000000"
app:roundLayoutRadius="24dp"
android:background="@drawable/bg_msg_box_v2x"
android:layout_gravity="center_horizontal"
android:layout_marginTop="7dp"
android:layout_marginBottom="7dp">
android:layout_marginBottom="7dp"
>
<ImageView
android:id="@+id/ivV2XImage"
@@ -19,11 +19,24 @@
app:layout_constraintLeft_toLeftOf="parent"
android:layout_margin="25dp"/>
<TextView
android:id="@+id/tvV2XTitle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toTopOf="@id/tvV2XContent"
app:layout_constraintLeft_toRightOf="@id/ivV2XImage"
android:layout_marginStart="@dimen/dp_15"
android:textColor="#FFFFFFFF"
android:textSize="@dimen/dp_32"
/>
<TextView
android:id="@+id/tvV2XTime"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:layout_constraintTop_toTopOf="@id/ivV2XImage"
app:layout_constraintTop_toTopOf="@id/tvV2XTitle"
app:layout_constraintBottom_toBottomOf="@id/tvV2XTitle"
app:layout_constraintRight_toRightOf="parent"
android:layout_marginEnd="25dp"
android:textColor="#80FFFFFF"
@@ -34,14 +47,13 @@
android:id="@+id/tvV2XContent"
android:layout_width="0dp"
android:layout_height="wrap_content"
app:layout_constraintLeft_toRightOf="@id/ivV2XImage"
app:layout_constraintRight_toRightOf="@id/tvV2XTime"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintTop_toBottomOf="@id/tvV2XTitle"
app:layout_constraintBottom_toBottomOf="parent"
android:layout_marginStart="25dp"
android:textColor="#FFFFFFFF"
android:textSize="32dp"
android:maxLines="1"
app:layout_constraintLeft_toLeftOf="@id/tvV2XTitle"
app:layout_constraintRight_toRightOf="@id/tvV2XTime"
android:textColor="#B3FFFFFF"
android:textSize="@dimen/dp_28"
android:maxLines="2"
android:ellipsize="end"
/>

View File

@@ -20,32 +20,42 @@
/>
<TextView
android:id="@+id/tvPassengerV2XTime"
android:id="@+id/tvPassengerV2XTitle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintBottom_toTopOf="@id/tvPassengerV2XContent"
app:layout_constraintLeft_toRightOf="@id/ivPassengerV2XImage"
android:layout_marginStart="@dimen/dp_20"
android:textColor="#FFFFFFFF"
android:textSize="@dimen/dp_36"
/>
<TextView
android:id="@+id/tvPassengerV2XTime"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:layout_constraintTop_toTopOf="@id/tvPassengerV2XTitle"
app:layout_constraintBottom_toBottomOf="@id/tvPassengerV2XTitle"
app:layout_constraintRight_toRightOf="parent"
android:textColor="#FFFFFFFF"
android:textSize="26dp"
android:layout_marginEnd="20dp"
android:textSize="@dimen/dp_26"
android:layout_marginEnd="@dimen/dp_20"
/>
<TextView
android:id="@+id/tvPassengerV2XContent"
android:layout_width="0dp"
android:layout_height="wrap_content"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintTop_toBottomOf="@id/tvPassengerV2XTitle"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toRightOf="@id/ivPassengerV2XImage"
app:layout_constraintRight_toLeftOf="@id/tvPassengerV2XTime"
app:layout_constraintLeft_toLeftOf="@id/tvPassengerV2XTitle"
app:layout_constraintRight_toRightOf="@id/tvPassengerV2XTime"
android:gravity="start"
android:maxLines="1"
android:maxLines="2"
android:ellipsize="end"
android:textColor="#FFFFFFFF"
android:textSize="36dp"
android:layout_marginStart="25dp"
android:layout_marginEnd="25dp"
android:textSize="@dimen/dp_28"
/>
</com.mogo.eagle.core.widget.RoundCanClickConstraintLayout>

View File

@@ -14,31 +14,41 @@
/>
<TextView
android:id="@+id/tvPassengerV2XTime"
android:id="@+id/tvPassengerV2XTitle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintBottom_toTopOf="@id/tvPassengerV2XContent"
app:layout_constraintLeft_toRightOf="@id/ivPassengerV2XImage"
android:textColor="#FFFFFFFF"
android:textSize="@dimen/dp_36"
android:layout_marginStart="@dimen/dp_20"
/>
<TextView
android:id="@+id/tvPassengerV2XTime"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:layout_constraintTop_toTopOf="@id/tvPassengerV2XTitle"
app:layout_constraintBottom_toBottomOf="@id/tvPassengerV2XTitle"
app:layout_constraintRight_toRightOf="parent"
android:textColor="#99FFFFFF"
android:textSize="26dp"
android:textSize="@dimen/dp_26"
/>
<TextView
android:id="@+id/tvPassengerV2XContent"
android:layout_width="0dp"
android:layout_height="wrap_content"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintTop_toBottomOf="@id/tvPassengerV2XTitle"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toRightOf="@id/ivPassengerV2XImage"
app:layout_constraintRight_toLeftOf="@id/tvPassengerV2XTime"
app:layout_constraintLeft_toLeftOf="@id/tvPassengerV2XTitle"
app:layout_constraintRight_toRightOf="@id/tvPassengerV2XTime"
android:gravity="start"
android:maxLines="1"
android:maxLines="2"
android:ellipsize="end"
android:textColor="#FFFFFFFF"
android:textSize="36dp"
android:layout_marginStart="25dp"
android:layout_marginEnd="25dp"
android:textSize="@dimen/dp_28"
/>
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.recyclerview.widget.RecyclerView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/rvMBoxBubbleList"
android:layout_width="@dimen/dp_291"
android:layout_width="@dimen/dp_393"
android:layout_height="wrap_content"
>

View File

@@ -6,6 +6,7 @@
android:layout_height="match_parent">
<ScrollView
android:id="@+id/svLayout"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:layout_constraintBottom_toBottomOf="parent"
@@ -223,8 +224,8 @@
app:layout_constraintTop_toBottomOf="@id/tvSpeedTitle"
/>
<TextView
android:id="@+id/tvSpeed"
<androidx.appcompat.widget.AppCompatEditText
android:id="@+id/etInputSpeed"
android:layout_width="189dp"
android:layout_height="140dp"
app:layout_constraintTop_toTopOf="@id/ivSpeedReduce"
@@ -234,15 +235,17 @@
android:textColor="#FFFFFFFF"
android:textSize="80dp"
android:gravity="center"
tools:ignore="SpeakableTextPresentCheck"
android:focusableInTouchMode="false"
/>
<ImageView
android:id="@+id/ivSpeedAdd"
android:layout_width="105dp"
android:layout_height="140dp"
app:layout_constraintTop_toTopOf="@id/tvSpeed"
app:layout_constraintBottom_toBottomOf="@id/tvSpeed"
app:layout_constraintLeft_toRightOf="@id/tvSpeed"
app:layout_constraintTop_toTopOf="@id/etInputSpeed"
app:layout_constraintBottom_toBottomOf="@id/etInputSpeed"
app:layout_constraintLeft_toRightOf="@id/etInputSpeed"
android:src="@drawable/icon_speed_add"
/>
@@ -268,8 +271,8 @@
android:textColor="@android:color/white"
android:textSize="42dp"
android:layout_marginLeft="50dp"
app:layout_constraintTop_toTopOf="@id/tvSpeed"
app:layout_constraintBottom_toBottomOf="@id/tvSpeed"
app:layout_constraintTop_toTopOf="@id/etInputSpeed"
app:layout_constraintBottom_toBottomOf="@id/etInputSpeed"
app:layout_constraintLeft_toRightOf="@id/tvUnit"
tools:visibility="visible" />

View File

@@ -63,6 +63,9 @@
<string name="dispatch_dialog_flight_info">航班信息:</string>
<string name="dispatch_dialog_affirm">接受任务</string>
<string name="dispatch_cars_remind_title">调度确认</string>
<string name="dispatch_dialog_restart_title">提示</string>
<string name="dispatch_dialog_restart_content">当前车辆已退出自动驾驶,请点击下方按钮恢复</string>
<string name="dispatch_dialog_restart_enter">进入自动驾驶</string>
<string name="dispatch_cars_remind_content">车辆将开启自动驾驶,并行驶至:</string>
<string name="dispatch_cars_affirm">确认</string>
<string name="dispatch_cars_cancel">取消</string>

View File

@@ -18,5 +18,7 @@ data class UrlConfig(
@SerializedName("eagle_dns_url")
val eagleDnsUrl: String,
@SerializedName("bind_driver_qr_url")
val bindDriverQRUrl: String
val bindDriverQRUrl: String,
@SerializedName("chart_socket_url")
val chartSocketUrl: String
)

View File

@@ -108,24 +108,24 @@ enum class EventTypeEnumNew(
//接管
TAKE_OVER_EVENT(
"20000", "注意周围、立即接管", "注意周围、立即接管", R.drawable.icon_warning_take_over,
"20000", "接管", "注意周围、立即接管", R.drawable.icon_warning_take_over,
"注意周围、立即接管", "自动驾驶退出请立即接管"
),
// 前方静止or慢速车辆报警
ALERT_FRONT_CAR("99999"),
ALERT_FRONT_CAR("99999","前方预警"),
// 限行管理
ALERT_TRAFFIC_CONTROL("99998"),
// 红绿灯事件、是建议以多少速度驶过
ALERT_TRAFFIC_LIGHT_SUGGEST("99997"),
ALERT_TRAFFIC_LIGHT_SUGGEST("99997","红绿灯"),
// 红绿灯事件、一种是绿灯不足3秒
ALERT_TRAFFIC_LIGHT_WARNING("99996"),
ALERT_TRAFFIC_LIGHT_WARNING("99996","红绿灯"),
// 故障车辆
ALERT_CAR_TROUBLE_WARNING("20007"),
ALERT_CAR_TROUBLE_WARNING("20007","故障车辆"),
// 疲劳驾驶
ALERT_FATIGUE_DRIVING("99993"),
@@ -219,28 +219,28 @@ enum class EventTypeEnumNew(
//---------弱势交通参与者 obu and cloud start ------>
TYPE_USECASE_ID_VRUCW_MOTOR_VEHICLES(
1001.toString(),
"弱势交通参与者碰撞预警",
"碰撞预警",
poiTypeSrcVr = R.drawable.icon_warning_v2x_motorcycle_collision,
content = "注意摩托车",
tts = "注意摩托车"
),
TYPE_USECASE_ID_VRUCW_NOT_MOTOR_VEHICLES(
1002.toString(),
"弱势交通参与者碰撞预警",
"碰撞预警",
poiTypeSrcVr = R.drawable.icon_warning_v2x_motobike,
content = "注意非机动车",
tts = "注意非机动车"
),
TYPE_USECASE_ID_VRUCW_PERSON(
1003.toString(),
"弱势交通参与者碰撞预警",
"碰撞预警",
poiTypeSrcVr = R.drawable.icon_warning_v2x_pedestrian_crossing,
content = "注意行人",
tts = "注意行人"
),
TYPE_ERROR_WEAKNESS(
1006.toString(),
"未知/错误/异常",
"未知障碍物",
poiTypeSrcVr = R.drawable.icon_warning_v2x_abnormal_vehicle,
content = "前方有未知障碍物",
tts = "前方有未知障碍物"
@@ -397,7 +397,7 @@ enum class EventTypeEnumNew(
),
TYPE_NO_PASSING(
51.toString(),
"不通",
"道路不通",
poiTypeSrcVr = R.drawable.v2x_icon_fenglu_vr,
content = "前方%s米不通",
tts = "前方%s米不通"
@@ -470,7 +470,7 @@ enum class EventTypeEnumNew(
TYPE_SOCKET_ROAD_JINGZHI(
"100251",
"前方%s米静止障碍物占道",
"静止障碍物占道",
poiTypeSrcVr = R.drawable.v2x_icon_jingzhi_zhangai,
content = "前方%s米静止障碍物占道",
tts = "前方%s米静止障碍物占道"
@@ -478,7 +478,7 @@ enum class EventTypeEnumNew(
TYPE_SOCKET_ROAD_SHIGU(
"100321",
"前方%s米道路事故",
"道路事故",
poiTypeSrcVr = R.drawable.v2x_icon_shigu_sanjiaopai,
content = "前方%s米道路事故",
tts = "前方%s米道路事故"
@@ -486,7 +486,7 @@ enum class EventTypeEnumNew(
TYPE_SOCKET_ROAD_SHIGONG(
"100061",
"前方%s米道路施工",
"道路施工",
poiTypeSrcVr = R.drawable.v2x_icon_shigong_zhandao,
content = "前方%s米道路施工",
tts = "前方%s米道路施工"
@@ -500,10 +500,10 @@ enum class EventTypeEnumNew(
tts = ""
),
TYPE_VIP_IDENTIFICATION_PASS("20022", "", "", R.drawable.icon_warning_v2x_vip_turn_light, "VIP车辆优先通行已为您变为绿灯", "VIP车辆优先通行已为您变为绿灯"),
TYPE_VIP_IDENTIFICATION_EXTEND("20023", "", "", R.drawable.icon_warning_v2x_vip_turn_light, "VIP车辆优先通行已为您延长绿灯", "VIP车辆优先通行已为您延长绿灯"),
TYPE_VIP_ERROR_IDENTIFICATION("20024", "", "", R.drawable.icon_warning_v2x_vip_turn_light, "请求失败,", "请求失败,稍后重试"),
TYPE_OPTIMAL_ROUTE_RECOMMEND("2000", "", "", R.drawable.icon_warning_v2x_optimal_route, "为您推荐最优路线", "已为您选择最优路线");
TYPE_VIP_IDENTIFICATION_PASS("20022", "VIP通行", "", R.drawable.icon_warning_v2x_vip_turn_light, "VIP车辆优先通行已为您变为绿灯", "VIP车辆优先通行已为您变为绿灯"),
TYPE_VIP_IDENTIFICATION_EXTEND("20023", "VIP通行", "", R.drawable.icon_warning_v2x_vip_turn_light, "VIP车辆优先通行已为您延长绿灯", "VIP车辆优先通行已为您延长绿灯"),
TYPE_VIP_ERROR_IDENTIFICATION("20024", "VIP通行", "", R.drawable.icon_warning_v2x_vip_turn_light, "请求失败,", "请求失败,稍后重试"),
TYPE_OPTIMAL_ROUTE_RECOMMEND("2000", "路线推荐", "", R.drawable.icon_warning_v2x_optimal_route, "为您推荐最优路线", "已为您选择最优路线");
companion object {
@@ -706,6 +706,307 @@ enum class EventTypeEnumNew(
}
}
@JvmStatic
fun getEventTitle(poiType: String?): String{
return when(poiType){
//交通检查
TRAFFIC_CHECK.poiType ->{
TRAFFIC_CHECK.poiTypeStr
}
//封路
ROAD_CLOSED.poiType ->{
ROAD_CLOSED.poiTypeStr
}
//施工
FOURS_ROAD_WORK.poiType ->{
FOURS_ROAD_WORK.poiTypeStr
}
//道路施工
TYPE_SOCKET_ROAD_SHIGONG.poiType ->{
TYPE_SOCKET_ROAD_SHIGONG.poiTypeStr
}
//静止障碍物占道
TYPE_SOCKET_ROAD_JINGZHI.poiType ->{
TYPE_SOCKET_ROAD_JINGZHI.poiTypeStr
}
//道路事故
TYPE_SOCKET_ROAD_SHIGU.poiType ->{
TYPE_SOCKET_ROAD_SHIGU.poiTypeStr
}
//交通拥堵
TYPE_SOCKET_ROAD_CONGESTION.poiType ->{
TYPE_SOCKET_ROAD_CONGESTION.poiTypeStr
}
//道路拥堵
FOURS_BLOCK_UP.poiType ->{
FOURS_BLOCK_UP.poiTypeStr
}
//道路积水
FOURS_PONDING.poiType ->{
FOURS_PONDING.poiTypeStr
}
//浓雾
FOURS_FOG.poiType ->{
FOURS_FOG.poiTypeStr
}
//结冰
FOURS_ICE.poiType ->{
FOURS_ICE.poiTypeStr
}
//事故
FOURS_ACCIDENT.poiType ->{
FOURS_ACCIDENT.poiTypeStr
}
//重大事故
FOURS_ACCIDENT_01.poiType ->{
FOURS_ACCIDENT_01.poiTypeStr
}
//特大事故
FOURS_ACCIDENT_02.poiType ->{
FOURS_ACCIDENT_02.poiTypeStr
}
//较大事故
FOURS_ACCIDENT_03.poiType ->{
FOURS_ACCIDENT_03.poiTypeStr
}
//一般事故
FOURS_ACCIDENT_04.poiType ->{
FOURS_ACCIDENT_04.poiTypeStr
}
//轻微事故
FOURS_ACCIDENT_05.poiType ->{
FOURS_ACCIDENT_05.poiTypeStr
}
//事故
FOURS_LIVING.poiType ->{
FOURS_LIVING.poiTypeStr
}
//红绿灯数据
ALERT_TRAFFIC_LIGHT_SUGGEST.poiType ->{
ALERT_TRAFFIC_LIGHT_SUGGEST.poiTypeStr
}
//红绿灯数据
ALERT_TRAFFIC_LIGHT_WARNING.poiType ->{
ALERT_TRAFFIC_LIGHT_WARNING.poiTypeStr
}
//前方静止or慢速车辆报警
ALERT_FRONT_CAR.poiType ->{
ALERT_FRONT_CAR.poiTypeStr
}
// 故障车辆
ALERT_CAR_TROUBLE_WARNING.poiType ->{
ALERT_CAR_TROUBLE_WARNING.poiTypeStr
}
//VIP车辆优先通行已为您变为绿灯
TYPE_VIP_IDENTIFICATION_PASS.poiType ->{
TYPE_VIP_IDENTIFICATION_PASS.poiTypeStr
}
//VIP车辆优先通行已为您延长绿灯
TYPE_VIP_IDENTIFICATION_EXTEND.poiType ->{
TYPE_VIP_IDENTIFICATION_EXTEND.poiTypeStr
}
//VIP变灯请求失败
TYPE_VIP_ERROR_IDENTIFICATION.poiType ->{
TYPE_VIP_ERROR_IDENTIFICATION.poiTypeStr
}
//最优路线
TYPE_OPTIMAL_ROUTE_RECOMMEND.poiType ->{
TYPE_OPTIMAL_ROUTE_RECOMMEND.poiTypeStr
}
//绿波通行
TYPE_USECASE_ID_IVP_GREEN.poiType ->{
TYPE_USECASE_ID_IVP_GREEN.poiTypeStr
}
//闯红灯预警
TYPE_USECASE_ID_IVP_RED.poiType ->{
TYPE_USECASE_ID_IVP_RED.poiTypeStr
}
//鬼探头类型
GHOST_PROBE.poiType ->{
GHOST_PROBE.poiTypeStr
}
//接管
TAKE_OVER_EVENT.poiType ->{
TAKE_OVER_EVENT.poiTypeStr
}
//机动车
TYPE_USECASE_ID_VRUCW_MOTOR_VEHICLES.poiType ->{
TYPE_USECASE_ID_VRUCW_MOTOR_VEHICLES.poiTypeStr
}
//碰撞预警
TYPE_USECASE_ID_VRUCW_NOT_MOTOR_VEHICLES.poiType ->{
TYPE_USECASE_ID_VRUCW_NOT_MOTOR_VEHICLES.poiTypeStr
}
//碰撞预警
TYPE_USECASE_ID_VRUCW_PERSON.poiType ->{
TYPE_USECASE_ID_VRUCW_PERSON.poiTypeStr
}
//未知障碍物
TYPE_ERROR_WEAKNESS.poiType ->{
TYPE_ERROR_WEAKNESS.poiTypeStr
}
//学校
TYPE_USECASE_ID_ROAD_PEDESTRIAN_SCHOOL.poiType ->{
TYPE_USECASE_ID_ROAD_PEDESTRIAN_SCHOOL.poiTypeStr
}
//禁止停车
TYPE_USECASE_ID_ROAD_NO_PARKING.poiType ->{
TYPE_USECASE_ID_ROAD_NO_PARKING.poiTypeStr
}
//超速行驶
TYPE_USECASE_ID_SLW.poiType ->{
TYPE_USECASE_ID_SLW.poiTypeStr
}
//拥堵
TYPE_USECASE_ID_TJW.poiType ->{
TYPE_USECASE_ID_TJW.poiTypeStr
}
//车辆故障
TYPE_USECASE_ID_BREAKDOWN_WARNING.poiType ->{
TYPE_USECASE_ID_BREAKDOWN_WARNING.poiTypeStr
}
//道路积水
FOURS_PONDING.poiType ->{
FOURS_PONDING.poiTypeStr
}
//异常停车
TYPE_USECASE_ID_ROAD_PARKING.poiType ->{
TYPE_USECASE_ID_ROAD_PARKING.poiTypeStr
}
//逆行车辆
TYPE_USECASE_ID_ROAD_VEHICLE_RETROGRADE.poiType ->{
TYPE_USECASE_ID_ROAD_VEHICLE_RETROGRADE.poiTypeStr
}
//急转弯
TYPE_ID_SHAPR_TURNS.poiType ->{
TYPE_ID_SHAPR_TURNS.poiTypeStr
}
//桥梁
TYPE_ID_BRIDGE.poiType ->{
TYPE_ID_BRIDGE.poiTypeStr
}
//行人
TYPE_ID_PEDESTRIAN.poiType ->{
TYPE_ID_PEDESTRIAN.poiTypeStr
}
//路滑
TYPE_ID_SLIPPERY_ROAD.poiType ->{
TYPE_ID_SLIPPERY_ROAD.poiTypeStr
}
//隧道
TYPE_ID_TUNNEL.poiType ->{
TYPE_ID_TUNNEL.poiTypeStr
}
//渡轮
TYPE_ID_FERRY.poiType ->{
TYPE_ID_FERRY.poiTypeStr
}
//路面不平
TYPE_ID_UNEVEN_ROAD.poiType ->{
TYPE_ID_UNEVEN_ROAD.poiTypeStr
}
//非机动车
TYPE_ID_NON_MOTOR_VEHICLE.poiType ->{
TYPE_ID_NON_MOTOR_VEHICLE.poiTypeStr
}
//障碍
TYPE_ID_OBSTACLE.poiType ->{
TYPE_ID_OBSTACLE.poiTypeStr
}
//施工
TYPE_FOURS_ROAD_WORK.poiType ->{
TYPE_FOURS_ROAD_WORK.poiTypeStr
}
//车队
TYPE_VEHICLE_QUEUE.poiType ->{
TYPE_VEHICLE_QUEUE.poiTypeStr
}
//道路不通
TYPE_NO_PASSING.poiType ->{
TYPE_NO_PASSING.poiTypeStr
}
//禁止掉头
TYPE_NO_TURNING_AROUND.poiType ->{
TYPE_NO_TURNING_AROUND.poiTypeStr
}
//禁止停车
TYPE_USECASE_ID_ROAD_NO_PARKING.poiType ->{
TYPE_USECASE_ID_ROAD_NO_PARKING.poiTypeStr
}
//禁止鸣笛
TYPE_USECASE_ID_ROAD_NO_TOOTING.poiType ->{
TYPE_USECASE_ID_ROAD_NO_TOOTING.poiTypeStr
}
//超速
TYPE_USECASE_ID_ROAD_SPEED_LIMIT.poiType ->{
TYPE_USECASE_ID_ROAD_SPEED_LIMIT.poiTypeStr
}
//公交提醒
TYPE_USECASE_ID_BUS_WARNING.poiType ->{
TYPE_USECASE_ID_BUS_WARNING.poiTypeStr
}
//右侧变窄/车道数减少
TYPE_USECASE_ID_NARROW_RIGHT.poiType ->{
TYPE_USECASE_ID_NARROW_RIGHT.poiTypeStr
}
//加油站
TYPE_USECASE_ID_GAS_STATION.poiType ->{
TYPE_USECASE_ID_GAS_STATION.poiTypeStr
}
//学校
TYPE_USECASE_ID_ROAD_PEDESTRIAN_SCHOOL.poiType ->{
TYPE_USECASE_ID_ROAD_PEDESTRIAN_SCHOOL.poiTypeStr
}
//交通事故
TYPE_USECASE_ID_ACCIDENT.poiType ->{
TYPE_USECASE_ID_ACCIDENT.poiTypeStr
}
//紧急制动预警
TYPE_USECASE_ID_EBW.poiType ->{
TYPE_USECASE_ID_EBW.poiTypeStr
}
//前向碰撞预警
TYPE_USECASE_ID_FCW.poiType ->{
TYPE_USECASE_ID_FCW.poiTypeStr
}
//交叉路口碰撞预警
TYPE_USECASE_ID_ICW.poiType ->{
TYPE_USECASE_ID_ICW.poiTypeStr
}
//车辆失控预警
TYPE_USECASE_ID_CLW.poiType ->{
TYPE_USECASE_ID_CLW.poiTypeStr
}
//逆向超车预警
TYPE_USECASE_ID_DNPW.poiType ->{
TYPE_USECASE_ID_DNPW.poiTypeStr
}
//异常车辆提醒
TYPE_USECASE_ID_AVW.poiType ->{
TYPE_USECASE_ID_AVW.poiTypeStr
}
//盲区预警
TYPE_USECASE_ID_BSW.poiType ->{
TYPE_USECASE_ID_BSW.poiTypeStr
}
//变道预警
TYPE_USECASE_ID_LCW.poiType ->{
TYPE_USECASE_ID_LCW.poiTypeStr
}
//紧急车辆提醒
TYPE_USECASE_ID_EVW.poiType ->{
TYPE_USECASE_ID_EVW.poiTypeStr
}
//左转辅助
TYPE_USECASE_ID_LTA.poiType ->{
TYPE_USECASE_ID_LTA.poiTypeStr
}
else ->{
"事件通知"
}
}
}
@JvmStatic
fun getUpdateIconRes(poiType: String?): Int {
return when (poiType) {

View File

@@ -46,6 +46,11 @@ interface IMoGoFuncBizProvider : IMoGoFunctionServerProvider {
*/
fun stopDispatchCancel(manualTrigger: Boolean)
/**
* 调度重启自驾确认
*/
fun restartDispatchAffirm()
/**
* 调度测试
*/

View File

@@ -107,6 +107,11 @@ interface IMoGoHmiProvider :IProvider{
*/
fun dismissDispatchDialog()
/**
* 调度重启自驾弹窗展示
*/
fun showDispatchRestartDialog(msgData: DispatchAdasAutoPilotLocReceiverBean)
/**
* 设置状态栏暗夜或明亮模式
* 默认 light

View File

@@ -165,6 +165,12 @@ object CallerHmiManager {
hmiProviderApi?.dismissDispatchDialog()
}
/**
* 云调度重启自驾弹窗
*/
fun showDispatchRestartDialog(msgData: DispatchAdasAutoPilotLocReceiverBean){
hmiProviderApi?.showDispatchRestartDialog(msgData)
}
fun showVideoDialog(infList: List<Infrastructure>) {
hmiProviderApi?.showVideoDialog(infList)

View File

@@ -2,10 +2,19 @@ package com.mogo.eagle.core.utilcode.mogo
fun AppIdentityModeUtils.getMisChannelCode(appIdentityMode: String): Int {
return when {
isTaxi(appIdentityMode) && isPassenger(appIdentityMode) -> 1
isTaxi(appIdentityMode) && isDriver(appIdentityMode) -> 2
isBus(appIdentityMode) && isPassenger(appIdentityMode) -> 3
isBus(appIdentityMode) && isDriver(appIdentityMode) -> 4
isTaxi(appIdentityMode) && isPassenger(appIdentityMode) -> 1 // 出租乘客端
isTaxi(appIdentityMode) && isDriver(appIdentityMode) -> 2 // 出租司机端
isBus(appIdentityMode) && isPassenger(appIdentityMode) -> 3 // 公交乘客端
isBus(appIdentityMode) && isDriver(appIdentityMode) -> 4 // 公交司机端
isCharter(appIdentityMode) && isPassenger(appIdentityMode) -> 8 // 包车乘客端
isCharter(appIdentityMode) && isDriver(appIdentityMode) -> 9 // 包车司机端
isShuttle(appIdentityMode) && isPassenger(appIdentityMode) -> 10 // 接驳乘客端
isShuttle(appIdentityMode) && isDriver(appIdentityMode) -> 11 // 接驳司机端
isSweeper(appIdentityMode) && isDriver(appIdentityMode) -> 12 // 清扫车司机端
else -> 0
}
}

View File

@@ -79,6 +79,7 @@ public class AutopilotAbility250 {
}
} else {
SystemStatusInfo.SystemState systemState = statusInfo.getSysState();
// 目前已知可以下发启动自驾命令的状态: SystemState.SYS_RUNNING、SystemState.PILOT_READY、SystemState.AUTO_PILOT_STARTING、SystemState.AUTO_PILOT_RUNNING
if (systemState != SystemStatusInfo.SystemState.SYS_RUNNING && systemState != SystemStatusInfo.SystemState.PILOT_READY) {
isAutopilotAbility = false;
if (systemState == SystemStatusInfo.SystemState.SYS_STARTING) {
@@ -88,11 +89,13 @@ public class AutopilotAbility250 {
} else if (systemState == SystemStatusInfo.SystemState.SYS_FAULT) {
unableAutopilotReason = "系统异常";
} else if (systemState == SystemStatusInfo.SystemState.AUTO_PILOT_STARTING) {
//如果第一次下发了启动自动驾驶,没起来或者存在干预 此时systemState是AUTO_PILOT_STARTING 需要二次下发启动自驾命令 所以需要排除此状态
//TODO 如果第一次下发了启动自动驾驶,没起来或者存在干预 此时systemState是AUTO_PILOT_STARTING 需要二次下发启动自驾命令 所以需要排除此状态
isAutopilotAbility = true;
//unableAutopilotReason = "正在开始自动驾驶";
} else if (systemState == SystemStatusInfo.SystemState.AUTO_PILOT_RUNNING) {
unableAutopilotReason = "自动驾驶运行中";
//TODO 车辆进站属于未退自驾状态,此状态不进行限制,否则无法再次发下启动自驾命令
isAutopilotAbility = true;
// unableAutopilotReason = "自动驾驶运行中";
} else if (systemState == SystemStatusInfo.SystemState.REMOTE_PILOT_STARTING) {
unableAutopilotReason = "平行驾驶启动中";
} else if (systemState == SystemStatusInfo.SystemState.REMOTE_PILOT_RUNNING) {

View File

@@ -200,9 +200,8 @@ public class AMapViewWrapper implements IMogoMapView,
@Override
public void onRoadIdInfo(@androidx.annotation.Nullable String roadId) {
if (roadId != null && !TextUtils.isEmpty(roadId)) {
// CallerLogger.INSTANCE.d(M_MAP + TAG, "onRoadIdInfo::" + roadId);
// CallerLogger.INSTANCE.d(M_MAP + TAG, "onRoadIdInfo::" + roadId);
CallerMapRoadListenerManager.INSTANCE.invokeListenersOnRoadIdGet(roadId);
} else {
//CallerLogger.INSTANCE.d(M_MAP + TAG, "onRoadIdInfo::null");
@@ -1105,4 +1104,5 @@ public class AMapViewWrapper implements IMogoMapView,
mMapView.getMapAutoViewHelper().cancelCacheHDData();
}
}
}