Merge branch 'release_robobus-d_230413_3.1.0.1'
# Conflicts: # OCH/mogo-och-bus/src/main/java/com/mogo/och/bus/fragment/BusFragment.java # OCH/mogo-och-sweeper/src/main/java/com/mogo/och/sweeper/SweeperProvider.java # OCH/mogo-och-sweeper/src/main/java/com/mogo/och/sweeper/fragment/SweeperFragment.java # core/mogo-core-utils/src/main/java/com/mogo/eagle/core/utilcode/mogo/AppIdentityModeUtils.kt # gradle.properties
This commit is contained in:
@@ -42,6 +42,10 @@ android {
|
||||
targetCompatibility JavaVersion.VERSION_1_8
|
||||
}
|
||||
|
||||
lintOptions {
|
||||
abortOnError false
|
||||
}
|
||||
|
||||
kotlinOptions {
|
||||
jvmTarget = '1.8'
|
||||
}
|
||||
|
||||
@@ -62,10 +62,22 @@ class FuncBizProvider : IMoGoFuncBizProvider {
|
||||
dispatchAutoPilotManager.affirm()
|
||||
}
|
||||
|
||||
override fun stopDispatchAffirm() {
|
||||
dispatchAutoPilotManager.stopAffirm()
|
||||
}
|
||||
|
||||
override fun dispatchCancel(manualTrigger: Boolean) {
|
||||
dispatchAutoPilotManager.cancel(manualTrigger)
|
||||
}
|
||||
|
||||
override fun stopDispatchCancel(manualTrigger: Boolean) {
|
||||
dispatchAutoPilotManager.stopCancel(manualTrigger)
|
||||
}
|
||||
|
||||
override fun restartDispatchAffirm() {
|
||||
dispatchAutoPilotManager.restartDispatch()
|
||||
}
|
||||
|
||||
override fun testDispatch(sceneType: Int) {
|
||||
dispatchAutoPilotManager.testDispatch(sceneType)
|
||||
}
|
||||
|
||||
@@ -3,8 +3,10 @@ package com.mogo.eagle.function.biz.dispatch
|
||||
import android.content.Context
|
||||
import android.os.Handler
|
||||
import android.os.Message
|
||||
import android.util.Log
|
||||
import com.mogo.aicloud.services.socket.IMogoOnMessageListener
|
||||
import com.mogo.aicloud.services.socket.MogoAiCloudSocketManager
|
||||
import com.mogo.commons.voice.AIAssist
|
||||
import com.mogo.eagle.core.data.autopilot.AutopilotControlParameters
|
||||
import com.mogo.eagle.core.data.autopilot.AutopilotRouteInfo
|
||||
import com.mogo.eagle.core.data.biz.dispatch.DispatchAdasAutoPilotLocReceiverBean
|
||||
@@ -21,19 +23,26 @@ import com.mogo.eagle.core.function.call.hmi.CallerHmiManager
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant
|
||||
import com.mogo.eagle.core.utilcode.util.CoordinateUtils
|
||||
import com.mogo.eagle.core.utilcode.util.ToastUtils
|
||||
import com.mogo.eagle.function.biz.dispatch.network.DispatchServiceModel.Companion.DISPATCH_COMPLETED
|
||||
import com.mogo.eagle.function.biz.dispatch.network.DispatchServiceModel.Companion.DISPATCH_RESULT_AFFIRM
|
||||
import com.mogo.eagle.function.biz.dispatch.network.DispatchServiceModel.Companion.DISPATCH_RESULT_MANUAL_CANCEL
|
||||
import com.mogo.eagle.function.biz.dispatch.network.DispatchServiceModel.Companion.DISPATCH_RESULT_TIMER_CANCEL
|
||||
import com.mogo.eagle.function.biz.dispatch.network.DispatchServiceModel.Companion.DISPATCH_STOP_AFFIRM
|
||||
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
|
||||
|
||||
|
||||
//负责监听自动驾驶状态并进行状态上报,自动驾驶路线上报,接收调度指令展示指令弹窗
|
||||
class DispatchAutoPilotManager private constructor() :
|
||||
IMogoOnMessageListener<DispatchAdasAutoPilotLocReceiverBean>,
|
||||
IMoGoCheckAutoPilotBtnListener,
|
||||
IMoGoPlanningRottingListener,
|
||||
IMoGoAutopilotStatusListener {
|
||||
IMogoOnMessageListener<DispatchAdasAutoPilotLocReceiverBean>,
|
||||
IMoGoCheckAutoPilotBtnListener,
|
||||
IMoGoPlanningRottingListener,
|
||||
IMoGoAutopilotStatusListener {
|
||||
|
||||
companion object {
|
||||
private const val TAG = "DispatchAutoPilotManager"
|
||||
@@ -110,6 +119,7 @@ class DispatchAutoPilotManager private constructor() :
|
||||
}
|
||||
|
||||
override fun onMsgReceived(adasAutoPilotLocReceiverBean: DispatchAdasAutoPilotLocReceiverBean?) {
|
||||
Log.i(TAG,"onMsgReceived 收到云调度长链接")
|
||||
if (adasAutoPilotLocReceiverBean != null && adasAutoPilotLocReceiverBean.startLat != 0.0 && adasAutoPilotLocReceiverBean.startLon != 0.0) {
|
||||
receiverBean = adasAutoPilotLocReceiverBean
|
||||
val message = Message()
|
||||
@@ -117,11 +127,52 @@ class DispatchAutoPilotManager private constructor() :
|
||||
message.obj = adasAutoPilotLocReceiverBean
|
||||
handler.sendMessage(message)
|
||||
}
|
||||
//同步调用路线下载逻辑
|
||||
adasAutoPilotLocReceiverBean?.let {
|
||||
if(it.type == 1){
|
||||
val mAutoPilotLine = AutopilotControlParameters.AutoPilotLine(it.lineId.toLong(),it.trajUrl,it.trajMd5,it.stopUrl,it.stopMd5,it.timestamp,
|
||||
it.vehicleModel,it.trajUrl_dpqp,it.trajMd5_dpqp,it.stopUrl_dpqp,it.stopMd5_dpqp,it.timestamp_dpqp)
|
||||
CallerAutoPilotControlManager.sendTrajectoryDownloadReq(mAutoPilotLine)
|
||||
Log.i(TAG,"调用路线下载逻辑")
|
||||
}
|
||||
}
|
||||
|
||||
adasAutoPilotLocReceiverBean?.let {
|
||||
Log.i(TAG,"taskId="+it.taskId)
|
||||
Log.i(TAG,"type="+it.type)
|
||||
Log.i(TAG,"source="+it.source)
|
||||
Log.i(TAG,"lineName="+it.lineName)
|
||||
Log.i(TAG,"stopMd5_dpqp="+it.stopMd5_dpqp)
|
||||
Log.i(TAG,"stopUrl_dpqp="+it.stopUrl_dpqp)
|
||||
Log.i(TAG,"trajMd5_dpqp="+it.trajMd5_dpqp)
|
||||
Log.i(TAG,"trajUrl_dpqp="+it.trajUrl_dpqp)
|
||||
Log.i(TAG,"stopMd5_dpqp="+it.stopMd5_dpqp)
|
||||
Log.i(TAG,"stopMd5="+it.stopMd5)
|
||||
Log.i(TAG,"stopUrl="+it.stopUrl)
|
||||
Log.i(TAG,"trajUrl="+it.trajUrl)
|
||||
Log.i(TAG,"trajMd5="+it.trajMd5)
|
||||
Log.i(TAG,"endLocAddress="+it.endLocAddress)
|
||||
Log.i(TAG,"flightInfo="+it.flightInfo)
|
||||
Log.i(TAG,"poiId="+it.poiId)
|
||||
Log.i(TAG,"startLocAddress="+it.startLocAddress)
|
||||
Log.i(TAG,"taskInfo="+it.taskInfo)
|
||||
Log.i(TAG,"taskTime="+it.taskTime)
|
||||
Log.i(TAG,"vehicleModel="+it.vehicleModel)
|
||||
Log.i(TAG,"endLat="+it.endLat)
|
||||
Log.i(TAG,"endLon="+it.endLon)
|
||||
Log.i(TAG,"lineId="+it.lineId)
|
||||
Log.i(TAG,"startLat="+it.startLat)
|
||||
Log.i(TAG,"startLon="+it.startLon)
|
||||
Log.i(TAG,"stopsList="+it.stopsList)
|
||||
Log.i(TAG,"timestamp="+it.timestamp)
|
||||
Log.i(TAG,"systemTime="+it.systemTime)
|
||||
Log.i(TAG,"timestamp_dpqp="+it.timestamp_dpqp)
|
||||
}
|
||||
}
|
||||
|
||||
private fun startAutoPilot() {
|
||||
val currentAutopilot = AutopilotControlParameters()
|
||||
currentAutopilot.isSpeakVoice = false
|
||||
// currentAutopilot.isSpeakVoice = false
|
||||
val wayLatLon: MutableList<AutopilotControlParameters.AutoPilotLonLat> = ArrayList()
|
||||
receiverBean?.let {
|
||||
if (it.stopsList != null) {
|
||||
@@ -134,6 +185,14 @@ class DispatchAutoPilotManager private constructor() :
|
||||
)
|
||||
}
|
||||
}
|
||||
val currentAutoPilotLine = AutopilotControlParameters.AutoPilotLine(it.lineId.toLong(),it.trajUrl,it.trajMd5,
|
||||
it.stopUrl,it.stopMd5,it.timestamp,it.vehicleModel,it.trajUrl_dpqp,it.trajMd5_dpqp,it.stopUrl_dpqp,
|
||||
it.stopMd5_dpqp,it.timestamp_dpqp)
|
||||
currentAutopilot.autoPilotLine = currentAutoPilotLine
|
||||
currentAutopilot.routeID = it.lineId
|
||||
currentAutopilot.routeName = it.lineName
|
||||
currentAutopilot.startName = it.startLocAddress
|
||||
currentAutopilot.endName = it.endLocAddress
|
||||
currentAutopilot.wayLatLons = wayLatLon
|
||||
currentAutopilot.startLatLon =
|
||||
AutopilotControlParameters.AutoPilotLonLat(it.startLat, it.startLon)
|
||||
@@ -141,20 +200,65 @@ class DispatchAutoPilotManager private constructor() :
|
||||
AutopilotControlParameters.AutoPilotLonLat(it.endLat, it.endLon)
|
||||
currentAutopilot.vehicleType = 10
|
||||
CallerLogger.d(SceneConstant.Companion.M_DISPATCH + TAG, "开启自动驾驶====$currentAutopilot")
|
||||
Log.i(TAG,"开启自动驾驶====$currentAutopilot")
|
||||
CallerAutoPilotControlManager.startAutoPilot(currentAutopilot)
|
||||
}
|
||||
}
|
||||
|
||||
fun affirm() {
|
||||
CallerHmiManager.dismissDispatchDialog()
|
||||
dispatchServiceModel.dispatchResultUpload(DISPATCH_RESULT_AFFIRM)
|
||||
receiverBean?.taskId?.let { it ->
|
||||
dispatchServiceModel.dispatchResultUpload(DISPATCH_RESULT_AFFIRM, it,
|
||||
onSuccess = {
|
||||
//调用工控机开启自动驾驶
|
||||
startAutoPilot()
|
||||
},onError = { error->
|
||||
ToastUtils.showShort("上报调度失败${error}")
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 停止调度确认
|
||||
*/
|
||||
fun stopAffirm(){
|
||||
CallerHmiManager.dismissDispatchDialog()
|
||||
receiverBean?.taskId?.let{
|
||||
dispatchServiceModel.dispatchResultUpload(DISPATCH_STOP_AFFIRM, it,
|
||||
onSuccess = {
|
||||
//取消自动驾驶
|
||||
CallerAutoPilotControlManager.cancelAutoPilot()
|
||||
Log.i(TAG,"stopAffirm 取消自动驾驶")
|
||||
}, onError = {})
|
||||
}
|
||||
}
|
||||
|
||||
fun cancel(manualTrigger: Boolean) {
|
||||
CallerHmiManager.dismissDispatchDialog()
|
||||
dispatchServiceModel.dispatchResultUpload(
|
||||
if (manualTrigger) DISPATCH_RESULT_MANUAL_CANCEL else DISPATCH_RESULT_TIMER_CANCEL
|
||||
)
|
||||
receiverBean?.taskId?.let {
|
||||
dispatchServiceModel.dispatchResultUpload(
|
||||
if (manualTrigger) DISPATCH_RESULT_MANUAL_CANCEL else DISPATCH_RESULT_TIMER_CANCEL, it)
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 停止调度取消
|
||||
*/
|
||||
fun stopCancel(manualTrigger: Boolean){
|
||||
CallerHmiManager.dismissDispatchDialog()
|
||||
receiverBean?.taskId?.let{
|
||||
dispatchServiceModel.dispatchResultUpload(
|
||||
if (manualTrigger) DISPATCH_STOP_MANUAL_CANCEL else DISPATCH_STOP_TIMER_CANCEL, it)
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 重启自驾
|
||||
*/
|
||||
fun restartDispatch(){
|
||||
CallerHmiManager.dismissDispatchDialog()
|
||||
//启动自动驾驶
|
||||
startAutoPilot()
|
||||
}
|
||||
|
||||
override fun onCheck(isChecked: Boolean) {
|
||||
@@ -197,7 +301,7 @@ class DispatchAutoPilotManager private constructor() :
|
||||
SceneConstant.Companion.M_DISPATCH + TAG,
|
||||
"onArriveAt data : $arrivalNotification"
|
||||
)
|
||||
|
||||
Log.i(TAG,"onArriveAt data : $arrivalNotification")
|
||||
if (arrivalNotification.endLocation == null) {
|
||||
return
|
||||
}
|
||||
@@ -211,10 +315,65 @@ class DispatchAutoPilotManager private constructor() :
|
||||
SceneConstant.Companion.M_DISPATCH + TAG,
|
||||
"onArriveAt cal distance : $distanceFromSelf"
|
||||
)
|
||||
Log.i(TAG,"onArriveAt cal distance : $distanceFromSelf")
|
||||
if (distanceFromSelf < 10) {
|
||||
CallerLogger.d(SceneConstant.Companion.M_DISPATCH + TAG, "onArriveAt end location")
|
||||
isDispatch = false
|
||||
isArriveEnd = true
|
||||
//到站,调度完成
|
||||
receiverBean?.let {
|
||||
//调度完成,同步云端,并且吐司提示
|
||||
dispatchServiceModel.dispatchResultUpload(DISPATCH_COMPLETED, it.taskId)
|
||||
ToastUtils.showLong("云调度完成,车辆已到达${it.endLocAddress}")
|
||||
//取消自动驾驶
|
||||
CallerAutoPilotControlManager.cancelAutoPilot()
|
||||
//语音提示到站
|
||||
AIAssist.getInstance(mContext).speakTTSVoice("云调度完成,车辆已到达${it.endLocAddress}")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 接口MEC反馈的常规信息(MAP v2.5.0新增轨迹相关信息)
|
||||
* @param guardianInfo
|
||||
*/
|
||||
override fun onAutopilotGuardian(guardianInfo: MogoReportMsg.MogoReportMessage?) {
|
||||
if (guardianInfo == null || !guardianInfo.hasCode()) return
|
||||
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,
|
||||
"IRECORDER_TASK_AUTO"//自动录包任务创建
|
||||
->{
|
||||
//如果到达终点,则不处理
|
||||
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.code)){
|
||||
Log.i(TAG,"onAutopilotGuardian ISYS_INIT_TRAJECTORY_SUCCESS 轨迹管理_轨迹下载成功(本地已有对应轨迹也触发)")
|
||||
}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.code)){
|
||||
Log.i(TAG,"onAutopilotGuardian ISYS_INIT_TRAJECTORY_WARNING 轨迹管理_轨迹下载失败,本地有对应轨迹,认为成功")
|
||||
}else if ("ISYS_INIT_TRAJECTORY_TIMEOUT".equals(guardianInfo.code)){
|
||||
Log.i(TAG,"onAutopilotGuardian ISYS_INIT_TRAJECTORY_TIMEOUT 轨迹管理_轨迹下载超时")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -243,7 +402,10 @@ class DispatchAutoPilotManager private constructor() :
|
||||
"AR453航班",
|
||||
"你车需执行编号ca1098次航班的引导任务,从A区A1到B区B1",
|
||||
System.currentTimeMillis(),
|
||||
ArrayList<MogoLatLng>()
|
||||
ArrayList<MogoLatLng>(),
|
||||
10,
|
||||
1,
|
||||
""
|
||||
)
|
||||
receiverBean = adasAutoPilotLocReceiverBean
|
||||
CallerHmiManager.showDispatchDialog(adasAutoPilotLocReceiverBean)
|
||||
@@ -265,7 +427,10 @@ class DispatchAutoPilotManager private constructor() :
|
||||
"",
|
||||
"",
|
||||
System.currentTimeMillis(),
|
||||
ArrayList<MogoLatLng>()
|
||||
ArrayList<MogoLatLng>(),
|
||||
10,
|
||||
1,
|
||||
""
|
||||
)
|
||||
receiverBean = adasAutoPilotLocReceiverBean
|
||||
CallerHmiManager.showDispatchDialog(adasAutoPilotLocReceiverBean)
|
||||
@@ -287,14 +452,19 @@ class DispatchAutoPilotManager private constructor() :
|
||||
"",
|
||||
"",
|
||||
System.currentTimeMillis(),
|
||||
ArrayList<MogoLatLng>()
|
||||
ArrayList<MogoLatLng>(),
|
||||
10,
|
||||
1,
|
||||
""
|
||||
)
|
||||
receiverBean = adasAutoPilotLocReceiverBean
|
||||
CallerHmiManager.showDispatchDialog(adasAutoPilotLocReceiverBean)
|
||||
}
|
||||
|
||||
private fun testDispatchResultUpload() {
|
||||
dispatchServiceModel.dispatchResultUpload(DISPATCH_RESULT_AFFIRM)
|
||||
receiverBean?.taskId?.let {
|
||||
dispatchServiceModel.dispatchResultUpload(DISPATCH_RESULT_AFFIRM, it)
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -23,6 +23,10 @@ class DispatchServiceModel private constructor() {
|
||||
const val DISPATCH_RESULT_AFFIRM = 0
|
||||
const val DISPATCH_RESULT_MANUAL_CANCEL = 1
|
||||
const val DISPATCH_RESULT_TIMER_CANCEL = 2
|
||||
const val DISPATCH_STOP_AFFIRM = 3 //云端终止指令-确认
|
||||
const val DISPATCH_STOP_TIMER_CANCEL = 4 //云端终止指令-超时拒绝
|
||||
const val DISPATCH_STOP_MANUAL_CANCEL = 5 //云端终止指令-手动拒绝
|
||||
const val DISPATCH_COMPLETED = 6 //调度完成
|
||||
|
||||
val dispatchServiceModel by lazy(LazyThreadSafetyMode.SYNCHRONIZED) {
|
||||
DispatchServiceModel()
|
||||
@@ -111,6 +115,7 @@ class DispatchServiceModel private constructor() {
|
||||
*/
|
||||
fun dispatchResultUpload(
|
||||
dispatchResultType: Int,
|
||||
taskId: Long,
|
||||
onSuccess: ((BaseData) -> Unit)? = null,
|
||||
onError: ((String) -> Unit)? = null
|
||||
) {
|
||||
@@ -118,7 +123,8 @@ class DispatchServiceModel private constructor() {
|
||||
val reportDispatchResult =
|
||||
ReportDispatchResult(
|
||||
sn,
|
||||
dispatchResultType
|
||||
dispatchResultType,
|
||||
taskId
|
||||
)
|
||||
val map: MutableMap<String, Any> = HashMap()
|
||||
map["sn"] = sn
|
||||
|
||||
@@ -45,6 +45,11 @@ android {
|
||||
sourceCompatibility JavaVersion.VERSION_1_8
|
||||
targetCompatibility JavaVersion.VERSION_1_8
|
||||
}
|
||||
|
||||
lintOptions {
|
||||
abortOnError false
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
dependencies {
|
||||
|
||||
@@ -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
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -41,6 +41,10 @@ android {
|
||||
targetCompatibility JavaVersion.VERSION_1_8
|
||||
}
|
||||
|
||||
lintOptions {
|
||||
abortOnError false
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
dependencies {
|
||||
|
||||
@@ -12,7 +12,6 @@ class AiCloudSocketBizProvider : IMoGoFunctionServerProvider {
|
||||
get() = "AiCloudSocketBizProvider"
|
||||
|
||||
override fun init(context: Context?) {
|
||||
//todo bus加载
|
||||
context?.let {
|
||||
SocketManager.getInstance().init(it, 0.0, 0.0)
|
||||
SocketManager.getInstance().registerOnMessageListener(401012, V2XMessageListener401012())
|
||||
|
||||
@@ -569,7 +569,7 @@ class MogoObuDcCombineManager private constructor() : IMoGoObuWarningRsiListener
|
||||
CallerTrafficLightListenerManager.invokeTrafficLightPlusSource(
|
||||
TrafficLightEnum.BLACK,
|
||||
-1,
|
||||
DataSourceType.TELEMATIC
|
||||
DataSourceType.OBU
|
||||
)
|
||||
}
|
||||
// 红灯
|
||||
@@ -578,7 +578,7 @@ class MogoObuDcCombineManager private constructor() : IMoGoObuWarningRsiListener
|
||||
CallerTrafficLightListenerManager.invokeTrafficLightPlusSource(
|
||||
TrafficLightEnum.RED,
|
||||
red,
|
||||
DataSourceType.TELEMATIC
|
||||
DataSourceType.OBU
|
||||
)
|
||||
}
|
||||
// 绿灯
|
||||
@@ -587,7 +587,7 @@ class MogoObuDcCombineManager private constructor() : IMoGoObuWarningRsiListener
|
||||
CallerTrafficLightListenerManager.invokeTrafficLightPlusSource(
|
||||
TrafficLightEnum.GREEN,
|
||||
green,
|
||||
DataSourceType.TELEMATIC
|
||||
DataSourceType.OBU
|
||||
)
|
||||
}
|
||||
// 黄灯
|
||||
@@ -596,7 +596,7 @@ class MogoObuDcCombineManager private constructor() : IMoGoObuWarningRsiListener
|
||||
CallerTrafficLightListenerManager.invokeTrafficLightPlusSource(
|
||||
TrafficLightEnum.YELLOW,
|
||||
yellow,
|
||||
DataSourceType.TELEMATIC
|
||||
DataSourceType.OBU
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -46,6 +46,10 @@ android {
|
||||
targetCompatibility JavaVersion.VERSION_1_8
|
||||
}
|
||||
|
||||
lintOptions {
|
||||
abortOnError false
|
||||
}
|
||||
|
||||
kotlinOptions {
|
||||
jvmTarget = "1.8"
|
||||
freeCompilerArgs += [
|
||||
|
||||
@@ -43,6 +43,10 @@ android {
|
||||
jvmTarget = "1.8"
|
||||
}
|
||||
|
||||
lintOptions {
|
||||
abortOnError false
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
dependencies {
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -8,6 +8,7 @@ import android.widget.ProgressBar
|
||||
import android.widget.TextView
|
||||
import androidx.constraintlayout.widget.ConstraintLayout
|
||||
import androidx.core.content.ContextCompat
|
||||
import com.mogo.eagle.core.data.map.MogoLocation
|
||||
import com.mogo.eagle.core.function.call.hmi.CallerHmiListenerManager
|
||||
import com.mogo.eagle.core.function.call.map.CallerMapUIServiceManager
|
||||
import com.mogo.eagle.core.function.hmi.R
|
||||
@@ -37,6 +38,8 @@ class OfflineMapDialog(context: Context): BaseFloatDialog(context) {
|
||||
private var isConfirm = true
|
||||
private var isRetry = false
|
||||
|
||||
var location: MogoLocation? = null
|
||||
|
||||
init {
|
||||
setContentView(R.layout.dialog_offline_map)
|
||||
setCanceledOnTouchOutside(true)
|
||||
@@ -89,8 +92,8 @@ class OfflineMapDialog(context: Context): BaseFloatDialog(context) {
|
||||
}
|
||||
}
|
||||
|
||||
private fun cacheHDOfflineData() {
|
||||
CallerMapUIServiceManager.cacheHDDataByCity(object : IHdCacheListener {
|
||||
private fun cacheHDDataByCityByLonLat() {
|
||||
CallerMapUIServiceManager.cacheHDDataByCityByLonLat(object : IHdCacheListener {
|
||||
override fun onMapHdCacheProgress(cityId: Int, progress: Double) {
|
||||
updateProgress(progress.toInt())
|
||||
}
|
||||
@@ -100,7 +103,25 @@ class OfflineMapDialog(context: Context): BaseFloatDialog(context) {
|
||||
showNewContent(isLoading = false, false)
|
||||
}
|
||||
}
|
||||
})
|
||||
}, location!!)
|
||||
}
|
||||
|
||||
private fun cacheHDOfflineData() {
|
||||
if (location == null) {// 拿到了高德地图的cityCode
|
||||
CallerMapUIServiceManager.cacheHDDataByCity(object : IHdCacheListener {
|
||||
override fun onMapHdCacheProgress(cityId: Int, progress: Double) {
|
||||
updateProgress(progress.toInt())
|
||||
}
|
||||
|
||||
override fun onMapHdCacheResult(cityId: Int, state: Int) {
|
||||
if (state == 0) {// 失败
|
||||
showNewContent(isLoading = false, false)
|
||||
}
|
||||
}
|
||||
})
|
||||
} else {// 只拿到了高精的经纬度
|
||||
cacheHDDataByCityByLonLat()
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressLint("SetTextI18n")
|
||||
|
||||
@@ -0,0 +1,81 @@
|
||||
package com.mogo.eagle.core.function.hmi.ui.msgbox
|
||||
|
||||
import android.app.Activity
|
||||
import android.content.Context
|
||||
import android.util.AttributeSet
|
||||
import android.view.LayoutInflater
|
||||
import androidx.constraintlayout.widget.ConstraintLayout
|
||||
import androidx.recyclerview.widget.LinearLayoutManager
|
||||
import com.mogo.eagle.core.data.msgbox.MsgBoxBean
|
||||
import com.mogo.eagle.core.data.msgbox.MsgBoxCountDownBean
|
||||
import com.mogo.eagle.core.data.msgbox.MsgBoxType
|
||||
import com.mogo.eagle.core.data.msgbox.MsgCategory
|
||||
import com.mogo.eagle.core.function.api.datacenter.msgbox.IMsgBoxListener
|
||||
import com.mogo.eagle.core.function.call.msgbox.CallerMsgBoxEventListenerManager
|
||||
import com.mogo.eagle.core.function.call.msgbox.CallerMsgBoxListenerManager
|
||||
import com.mogo.eagle.core.function.hmi.R
|
||||
import com.mogo.eagle.core.function.hmi.ui.msgbox.adapter.BusPassengerMsgBoxBubbleAdapter
|
||||
import com.mogo.eagle.core.function.msgbox.MsgBoxConfig
|
||||
import com.mogo.eagle.core.utilcode.util.UiThreadHandler
|
||||
import kotlinx.android.synthetic.main.layout_bus_passenegr_msg_box_bubble.view.*
|
||||
|
||||
class BusPassengerMsgBoxBubbleView @JvmOverloads constructor(
|
||||
context: Context,
|
||||
attrs: AttributeSet? = null,
|
||||
defStyleAttr: Int = 0
|
||||
) : ConstraintLayout(context, attrs, defStyleAttr), IMsgBoxListener {
|
||||
|
||||
private val TAG = "BusPassengerMsgBoxBubbleView"
|
||||
private val dataList :ArrayList<MsgBoxCountDownBean> = ArrayList()
|
||||
private var busPassengerMsgBoxBubbleAdapter: BusPassengerMsgBoxBubbleAdapter?= null
|
||||
private var isShowData = true
|
||||
|
||||
init {
|
||||
LayoutInflater.from(context).inflate(R.layout.layout_bus_passenegr_msg_box_bubble, this, true)
|
||||
initView()
|
||||
}
|
||||
|
||||
private fun initView(){
|
||||
val linearLayoutManager = LinearLayoutManager(context)
|
||||
linearLayoutManager.orientation = LinearLayoutManager.VERTICAL
|
||||
busPassengerMsgBoxBubbleAdapter = BusPassengerMsgBoxBubbleAdapter(context as Activity)
|
||||
rvBusBoxBubbleList.adapter =busPassengerMsgBoxBubbleAdapter
|
||||
rvBusBoxBubbleList.layoutManager = linearLayoutManager
|
||||
}
|
||||
|
||||
/**
|
||||
* 是否展示接收消息,消息盒子打开状态下不再展示气泡消息
|
||||
* @param show true 展示;false 不展示
|
||||
*/
|
||||
fun isShowData(show: Boolean){
|
||||
isShowData = show
|
||||
}
|
||||
|
||||
override fun onDataChanged(category: MsgCategory, msgBoxList: MsgBoxBean){
|
||||
UiThreadHandler.post({
|
||||
if(category == MsgCategory.NOTICE){
|
||||
if(msgBoxList.type == MsgBoxType.NOTICE || msgBoxList.type == MsgBoxType.V2X
|
||||
|| msgBoxList.type == MsgBoxType.OBU || msgBoxList.type == MsgBoxType.OPERATION){
|
||||
MsgBoxConfig.noticeList.add(msgBoxList)
|
||||
if(isShowData){
|
||||
CallerMsgBoxEventListenerManager.invokeUpdateTipListener(true)
|
||||
val msgBoxCountDownBean = MsgBoxCountDownBean(msgBoxList)
|
||||
dataList.add(msgBoxCountDownBean)
|
||||
busPassengerMsgBoxBubbleAdapter?.setData(dataList)
|
||||
}
|
||||
}
|
||||
}
|
||||
},UiThreadHandler.MODE.QUEUE)
|
||||
}
|
||||
|
||||
override fun onAttachedToWindow() {
|
||||
super.onAttachedToWindow()
|
||||
CallerMsgBoxListenerManager.addListener(TAG,this)
|
||||
}
|
||||
|
||||
override fun onDetachedFromWindow() {
|
||||
super.onDetachedFromWindow()
|
||||
CallerMsgBoxListenerManager.removeListener(TAG)
|
||||
}
|
||||
|
||||
}
|
||||
@@ -70,7 +70,7 @@ class DriverMsgBoxBubbleView @JvmOverloads constructor(
|
||||
}
|
||||
|
||||
override fun onDataChanged(category: MsgCategory, msgBoxBean: MsgBoxBean) {
|
||||
UiThreadHandler.post {
|
||||
UiThreadHandler.post({
|
||||
when (category) {
|
||||
MsgCategory.NOTICE -> {
|
||||
MsgBoxConfig.noticeList.add(msgBoxBean)
|
||||
@@ -98,7 +98,7 @@ class DriverMsgBoxBubbleView @JvmOverloads constructor(
|
||||
driverMsgBoxBubbleAdapter?.setData(dataList)
|
||||
}
|
||||
}
|
||||
}
|
||||
}, UiThreadHandler.MODE.QUEUE)
|
||||
}
|
||||
|
||||
override fun onAttachedToWindow() {
|
||||
|
||||
@@ -171,7 +171,7 @@ class DriverMsgBoxListView @JvmOverloads constructor(
|
||||
}
|
||||
|
||||
override fun onDataChanged(category: MsgCategory, msgBoxList: MsgBoxBean) {
|
||||
UiThreadHandler.post{
|
||||
UiThreadHandler.post({
|
||||
when (category) {
|
||||
MsgCategory.NOTICE -> {
|
||||
noticeList?.add(0,msgBoxList)
|
||||
@@ -192,7 +192,7 @@ class DriverMsgBoxListView @JvmOverloads constructor(
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},UiThreadHandler.MODE.QUEUE)
|
||||
}
|
||||
|
||||
override fun onAttachedToWindow() {
|
||||
|
||||
@@ -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,
|
||||
@@ -52,7 +55,7 @@ class MBoxBubbleView @JvmOverloads constructor(
|
||||
}
|
||||
|
||||
override fun onDataChanged(category: MsgCategory, msgBoxList: MsgBoxBean) {
|
||||
UiThreadHandler.post {
|
||||
UiThreadHandler.post({
|
||||
if(category == MsgCategory.NOTICE){
|
||||
if(msgBoxList.type == MsgBoxType.NOTICE || msgBoxList.type == MsgBoxType.V2X
|
||||
|| msgBoxList.type == MsgBoxType.OBU || msgBoxList.type == MsgBoxType.OPERATION){
|
||||
@@ -65,7 +68,7 @@ class MBoxBubbleView @JvmOverloads constructor(
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},UiThreadHandler.MODE.QUEUE)
|
||||
}
|
||||
|
||||
override fun onAttachedToWindow() {
|
||||
|
||||
@@ -49,14 +49,14 @@ class MMsgBoxBubbleView @JvmOverloads constructor(
|
||||
}
|
||||
|
||||
override fun onDataChanged(category: MsgCategory, msgBoxList: MsgBoxBean) {
|
||||
UiThreadHandler.post {
|
||||
UiThreadHandler.post({
|
||||
if(category == MsgCategory.NOTICE){
|
||||
if(msgBoxList.type == MsgBoxType.NOTICE || msgBoxList.type == MsgBoxType.V2X
|
||||
|| msgBoxList.type == MsgBoxType.OBU || msgBoxList.type == MsgBoxType.OPERATION){
|
||||
update(msgBoxList)
|
||||
}
|
||||
}
|
||||
}
|
||||
},UiThreadHandler.MODE.QUEUE)
|
||||
}
|
||||
|
||||
private fun update(msgBoxList: MsgBoxBean){
|
||||
|
||||
@@ -56,7 +56,7 @@ class MMsgBoxListView @JvmOverloads constructor(
|
||||
}
|
||||
|
||||
override fun onDataChanged(category: MsgCategory, msgBoxList: MsgBoxBean) {
|
||||
UiThreadHandler.post{
|
||||
UiThreadHandler.post({
|
||||
if(category == MsgCategory.NOTICE){
|
||||
if(msgBoxList.type == MsgBoxType.NOTICE || msgBoxList.type == MsgBoxType.V2X
|
||||
|| msgBoxList.type == MsgBoxType.OBU || msgBoxList.type == MsgBoxType.OPERATION){
|
||||
@@ -66,7 +66,7 @@ class MMsgBoxListView @JvmOverloads constructor(
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},UiThreadHandler.MODE.QUEUE)
|
||||
}
|
||||
|
||||
override fun onAttachedToWindow() {
|
||||
|
||||
@@ -57,7 +57,7 @@ class PassengerMsgBoxBubbleView @JvmOverloads constructor(
|
||||
}
|
||||
|
||||
override fun onDataChanged(category: MsgCategory, msgBoxList: MsgBoxBean) {
|
||||
UiThreadHandler.post {
|
||||
UiThreadHandler.post({
|
||||
if(category == MsgCategory.NOTICE){
|
||||
if(msgBoxList.type == MsgBoxType.NOTICE || msgBoxList.type == MsgBoxType.V2X
|
||||
|| msgBoxList.type == MsgBoxType.OBU){
|
||||
@@ -70,7 +70,7 @@ class PassengerMsgBoxBubbleView @JvmOverloads constructor(
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},UiThreadHandler.MODE.QUEUE)
|
||||
}
|
||||
|
||||
override fun onAttachedToWindow() {
|
||||
|
||||
@@ -60,7 +60,7 @@ class PassengerMsgBoxListView @JvmOverloads constructor(
|
||||
}
|
||||
|
||||
override fun onDataChanged(category: MsgCategory, msgBoxList: MsgBoxBean) {
|
||||
UiThreadHandler.post{
|
||||
UiThreadHandler.post({
|
||||
if(category == MsgCategory.NOTICE){
|
||||
if(msgBoxList.type == MsgBoxType.NOTICE || msgBoxList.type == MsgBoxType.V2X
|
||||
|| msgBoxList.type == MsgBoxType.OBU){
|
||||
@@ -70,7 +70,7 @@ class PassengerMsgBoxListView @JvmOverloads constructor(
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},UiThreadHandler.MODE.QUEUE)
|
||||
}
|
||||
|
||||
override fun onAttachedToWindow() {
|
||||
|
||||
@@ -0,0 +1,138 @@
|
||||
package com.mogo.eagle.core.function.hmi.ui.msgbox.adapter
|
||||
|
||||
import android.app.Activity
|
||||
import android.os.CountDownTimer
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import android.widget.ImageView
|
||||
import android.widget.TextView
|
||||
import androidx.recyclerview.widget.RecyclerView
|
||||
import com.mogo.eagle.core.data.enums.EventTypeEnumNew
|
||||
import com.mogo.eagle.core.data.msgbox.*
|
||||
import com.mogo.eagle.core.function.call.msgbox.CallerMsgBoxManager
|
||||
import com.mogo.eagle.core.function.hmi.R
|
||||
import com.mogo.eagle.core.utilcode.util.TimeUtils
|
||||
import com.mogo.eagle.core.utilcode.util.TimeUtils.getHourMinFormat
|
||||
|
||||
class BusPassengerMsgBoxBubbleAdapter(private val activity: Activity): RecyclerView.Adapter<RecyclerView.ViewHolder>() {
|
||||
|
||||
private var data: ArrayList<MsgBoxCountDownBean> ?= null
|
||||
|
||||
private val notice: Int = 1
|
||||
private val v2x: Int = 2
|
||||
private val operation: Int = 3
|
||||
|
||||
fun setData(data: ArrayList<MsgBoxCountDownBean>){
|
||||
this.data = data
|
||||
if(data.size>3){
|
||||
data.removeAt(0)
|
||||
}
|
||||
notifyDataSetChanged()
|
||||
}
|
||||
|
||||
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): RecyclerView.ViewHolder{
|
||||
return when (viewType){
|
||||
notice ->{
|
||||
val view = LayoutInflater.from(parent.context).inflate(R.layout.item_bus_box_notice,parent,false)
|
||||
BusBubbleNoticeHolder(view)
|
||||
}
|
||||
operation ->{
|
||||
val view = LayoutInflater.from(parent.context).inflate(R.layout.item_bus_box_operation,parent,false)
|
||||
BusBubbleOperationHolder(view)
|
||||
}
|
||||
else ->{
|
||||
val view = LayoutInflater.from(parent.context).inflate(R.layout.item_bus_box_v2x,parent,false)
|
||||
BusBubbleV2XHolder(view)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
override fun onBindViewHolder(holder: RecyclerView.ViewHolder, position: Int){
|
||||
when (holder){
|
||||
is BusBubbleNoticeHolder -> {
|
||||
data?.let{
|
||||
val noticeFrCloudMsg = it[position].msgBoxBean.bean as NoticeFrCloudMsg
|
||||
if(noticeFrCloudMsg.type == 0){
|
||||
val noticeNormalData = noticeFrCloudMsg.noticeNormalData
|
||||
holder.tvBusPNoticeTime.text = TimeUtils.millis2String(it[position].msgBoxBean.timestamp,getHourMinFormat())
|
||||
holder.tvBusPNoticeContent.text = noticeNormalData?.content
|
||||
}else{
|
||||
val noticeTrafficStylePushData = noticeFrCloudMsg.trafficPushData
|
||||
holder.tvBusPNoticeTime.text = TimeUtils.millis2String(it[position].msgBoxBean.timestamp,getHourMinFormat())
|
||||
holder.tvBusPNoticeContent.text = noticeTrafficStylePushData?.content
|
||||
}
|
||||
}
|
||||
}
|
||||
is BusBubbleOperationHolder -> {
|
||||
//运营消息
|
||||
data?.let{
|
||||
val operationMsg = it[position].msgBoxBean.bean as OperationMsg
|
||||
holder.tvBusPOperationTime.text = TimeUtils.millis2String(it[position].msgBoxBean.timestamp,getHourMinFormat())
|
||||
holder.tvBusPOperationContent.text = operationMsg.content
|
||||
}
|
||||
}
|
||||
is BusBubbleV2XHolder -> {
|
||||
data?.let{
|
||||
val msgBoxBean = it[position]
|
||||
val v2XMsg = msgBoxBean.msgBoxBean.bean as V2XMsg
|
||||
holder.tvBusPV2XTime.text = TimeUtils.millis2String(it[position].msgBoxBean.timestamp,getHourMinFormat())
|
||||
holder.tvBusPV2XContent.text = v2XMsg.content
|
||||
holder.ivBusPV2XImage.setImageDrawable(activity.resources.getDrawable(
|
||||
EventTypeEnumNew.getUpdateIconRes(v2XMsg.type)))
|
||||
holder.tvBusPV2XTitle.text = EventTypeEnumNew.getEventTitle(v2XMsg.type)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
val msgBoxBean: MsgBoxCountDownBean = data!![position]
|
||||
msgBoxBean.countDownTimer =object: CountDownTimer(CallerMsgBoxManager.getDismissTime(),CallerMsgBoxManager.getDismissTime()){
|
||||
override fun onTick(p0: Long) {
|
||||
|
||||
}
|
||||
|
||||
override fun onFinish() {
|
||||
data?.remove(msgBoxBean)
|
||||
notifyDataSetChanged()
|
||||
// notifyItemRemoved(index)
|
||||
// notifyItemRangeChanged(index,recordTypeEntity.size-index)
|
||||
}
|
||||
|
||||
}
|
||||
msgBoxBean.countDownTimer?.start()
|
||||
|
||||
}
|
||||
|
||||
override fun getItemCount() = data?.size ?: 0
|
||||
|
||||
override fun getItemViewType(position: Int): Int{
|
||||
return if(data!![position].msgBoxBean.type == MsgBoxType.NOTICE){
|
||||
notice
|
||||
}else if(data!![position].msgBoxBean.type == MsgBoxType.OPERATION){
|
||||
operation
|
||||
} else{
|
||||
v2x
|
||||
}
|
||||
}
|
||||
|
||||
//Notice
|
||||
class BusBubbleNoticeHolder(itemView: View): RecyclerView.ViewHolder(itemView){
|
||||
var tvBusPNoticeTime: TextView = itemView.findViewById(R.id.tvBusPNoticeTime)
|
||||
var tvBusPNoticeContent: TextView = itemView.findViewById(R.id.tvBusPNoticeContent)
|
||||
}
|
||||
|
||||
//OBU、V2X
|
||||
class BusBubbleV2XHolder(itemView: View): RecyclerView.ViewHolder(itemView){
|
||||
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)
|
||||
}
|
||||
|
||||
//运营消息
|
||||
class BusBubbleOperationHolder(itemView: View): RecyclerView.ViewHolder(itemView){
|
||||
var tvBusPOperationTime: TextView = itemView.findViewById(R.id.tvBusPOperationTime)
|
||||
var tvBusPOperationContent: TextView = itemView.findViewById(R.id.tvBusPOperationContent)
|
||||
}
|
||||
|
||||
}
|
||||
@@ -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)
|
||||
}
|
||||
|
||||
//汇总消息
|
||||
|
||||
@@ -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)
|
||||
}
|
||||
|
||||
//汇总消息
|
||||
|
||||
@@ -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)
|
||||
}
|
||||
|
||||
//运营消息
|
||||
|
||||
@@ -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)
|
||||
}
|
||||
|
||||
//汇总消息
|
||||
|
||||
@@ -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)
|
||||
}
|
||||
|
||||
//汇总消息
|
||||
|
||||
@@ -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)
|
||||
}
|
||||
|
||||
//汇总消息
|
||||
|
||||
@@ -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)
|
||||
}
|
||||
|
||||
//汇总消息
|
||||
|
||||
@@ -21,6 +21,10 @@ public class DispatchCarsDialog extends DispatchBaseDialog {
|
||||
|
||||
private final TextView tvTimer;
|
||||
private final TextView tvLoc;
|
||||
private final TextView tvAdasDispatchTitle;
|
||||
private final TextView tvAdasDispatchRemindContent;
|
||||
|
||||
private int dispatchType = 1;//调度类型:1:启动 2:停止
|
||||
|
||||
private final Handler handler = new Handler() {
|
||||
@Override
|
||||
@@ -44,21 +48,40 @@ public class DispatchCarsDialog extends DispatchBaseDialog {
|
||||
setCanceledOnTouchOutside(false);
|
||||
tvTimer = findViewById(R.id.module_adas_dispatch_remind_timer);
|
||||
tvLoc = findViewById(R.id.module_adas_dispatch_remind_loc);
|
||||
Button btnAffirm = (Button) findViewById(R.id.module_adas_dispatch_remind_affirm);
|
||||
Button btnCancel = (Button) findViewById(R.id.module_adas_dispatch_remind_cancel);
|
||||
tvAdasDispatchTitle = findViewById(R.id.tv_adas_dispatch_title);
|
||||
tvAdasDispatchRemindContent = findViewById(R.id.tv_adas_dispatch_remind_content);
|
||||
Button btnAffirm = findViewById(R.id.module_adas_dispatch_remind_affirm);
|
||||
Button btnCancel = findViewById(R.id.module_adas_dispatch_remind_cancel);
|
||||
tvTimer.setText(String.valueOf(TIMER));
|
||||
btnAffirm.setOnClickListener(v -> {
|
||||
CallerFuncBizManager.getBizProvider().dispatchAffirm();
|
||||
if(dispatchType == 1){
|
||||
//开始调度确认
|
||||
CallerFuncBizManager.getBizProvider().dispatchAffirm();
|
||||
}else if(dispatchType == 2){
|
||||
//停止调度确认
|
||||
CallerFuncBizManager.getBizProvider().stopDispatchAffirm();
|
||||
}
|
||||
dismissDialog();
|
||||
});
|
||||
btnCancel.setOnClickListener(v -> {
|
||||
CallerFuncBizManager.getBizProvider().dispatchCancel(true);
|
||||
if(dispatchType == 1){
|
||||
//开始调度手动取消
|
||||
CallerFuncBizManager.getBizProvider().dispatchCancel(true);
|
||||
}else if(dispatchType == 2){
|
||||
//停止调度手动取消
|
||||
CallerFuncBizManager.getBizProvider().stopDispatchCancel(true);
|
||||
}
|
||||
dismissDialog();
|
||||
});
|
||||
}
|
||||
|
||||
private void hideDialog() {
|
||||
CallerFuncBizManager.getBizProvider().dispatchCancel(false);
|
||||
if(dispatchType == 1){
|
||||
//开始调度自动取消
|
||||
CallerFuncBizManager.getBizProvider().dispatchCancel(false);
|
||||
}else if(dispatchType == 2){
|
||||
CallerFuncBizManager.getBizProvider().stopDispatchCancel(false);
|
||||
}
|
||||
dismissDialog();
|
||||
}
|
||||
|
||||
@@ -74,6 +97,12 @@ public class DispatchCarsDialog extends DispatchBaseDialog {
|
||||
return;
|
||||
}
|
||||
show();
|
||||
if(dispatchContent.getType() == 2){
|
||||
//取消调度
|
||||
tvAdasDispatchTitle.setText("调度取消确认");
|
||||
tvAdasDispatchRemindContent.setText("车辆将取消到以下位置的自动驾驶");
|
||||
}
|
||||
dispatchType = dispatchContent.getType();
|
||||
handler.sendEmptyMessage(MSG_TYPE_TIMER);
|
||||
tvLoc.setText(dispatchContent.getEndLocAddress());
|
||||
}
|
||||
|
||||
@@ -53,16 +53,38 @@ public class DispatchDialogManager {
|
||||
}
|
||||
}
|
||||
|
||||
private void dispatchHengYang(DispatchAdasAutoPilotLocReceiverBean msgData) {
|
||||
if (msgData.getType() == DISPATCH_TYPE_START) { //衡阳只有开始调度
|
||||
if (dialog != null && dialog.isShowing()) { //避免下发两次
|
||||
return;
|
||||
}
|
||||
if (dialog == null) {
|
||||
dialog = new DispatchCarsDialog(mContext);
|
||||
}
|
||||
dialog.showDialog(msgData);
|
||||
/**
|
||||
* 云调度重启自驾
|
||||
* @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) { //衡阳只有开始调度
|
||||
// }
|
||||
//开始、取消调度
|
||||
if (dialog != null && dialog.isShowing()) { //避免下发两次
|
||||
return;
|
||||
}
|
||||
if (dialog == null) {
|
||||
dialog = new DispatchCarsDialog(mContext);
|
||||
}
|
||||
dialog.showDialog(msgData);
|
||||
|
||||
}
|
||||
|
||||
private void dispatchEZhou(DispatchAdasAutoPilotLocReceiverBean msgData) {
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
}
|
||||
@@ -2069,11 +2069,11 @@ internal class DebugSettingView @JvmOverloads constructor(
|
||||
}
|
||||
|
||||
override fun onLogCatch(lineLog: String) {
|
||||
logInfoView?.let {
|
||||
if (logViewAttach) {
|
||||
it.onLogCatch(lineLog)
|
||||
}
|
||||
}
|
||||
// logInfoView?.let {
|
||||
// if (logViewAttach) {
|
||||
// it.onLogCatch(lineLog)
|
||||
// }
|
||||
// }
|
||||
}
|
||||
|
||||
private fun restartApp() {
|
||||
|
||||
@@ -10,7 +10,6 @@ import android.util.AttributeSet
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
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 +30,7 @@ import mogo.telematics.pad.MessagePad
|
||||
import org.greenrobot.eventbus.EventBus
|
||||
import kotlin.system.exitProcess
|
||||
|
||||
|
||||
/**
|
||||
* @author ChenFufeng
|
||||
* 设置自动驾驶速度和检测页入口
|
||||
@@ -69,29 +69,60 @@ 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) {
|
||||
try {
|
||||
if(inputContent.isEmpty()){
|
||||
speedLimit = 0
|
||||
}else{
|
||||
speedLimit = inputContent.toInt()
|
||||
if(speedLimit>60){
|
||||
speedLimit = 60
|
||||
ToastUtils.showShort("最大限速60")
|
||||
}
|
||||
}
|
||||
}catch (t: Exception){
|
||||
ToastUtils.showShort("最大限速60")
|
||||
speedLimit = 60
|
||||
|
||||
}
|
||||
etInputSpeed.setText(speedLimit.toString())
|
||||
etInputSpeed.setSelection(speedLimit.toString().length)
|
||||
}
|
||||
}
|
||||
|
||||
})
|
||||
|
||||
KeyBoardUtil.hideSystemSoftKeyboard(context, etInputSpeed)
|
||||
ivCloseIcon.setOnClickListener {
|
||||
clickListener?.onClose(it)
|
||||
}
|
||||
@@ -123,42 +154,79 @@ 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
|
||||
etInputSpeed.setSelection(speedLimit.toString().length)
|
||||
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()
|
||||
}else{
|
||||
etInputSpeed.setText(speedLimit.toString())
|
||||
}else if(speedLimit in 1..4){
|
||||
speedLimit = 0
|
||||
etInputSpeed.setText(speedLimit.toString())
|
||||
} else{
|
||||
ToastUtils.showShort("车速不能再减了")
|
||||
}
|
||||
etInputSpeed.setSelection(speedLimit.toString().length)
|
||||
}
|
||||
|
||||
ivSpeedAdd.setOnClickListener {
|
||||
if(speedLimit<=55){
|
||||
speedLimit += 5
|
||||
tvSpeed.text = speedLimit.toString()
|
||||
}else{
|
||||
etInputSpeed.setText(speedLimit.toString())
|
||||
}else if(speedLimit in 56..59){
|
||||
speedLimit = 60
|
||||
etInputSpeed.setText(speedLimit.toString())
|
||||
} else{
|
||||
ToastUtils.showShort("车速不能再加了")
|
||||
}
|
||||
etInputSpeed.setSelection(speedLimit.toString().length)
|
||||
}
|
||||
|
||||
//速度确认
|
||||
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 -> {
|
||||
ToastUtils.showShort("设置车速失败,请启动域控制器")
|
||||
}
|
||||
}
|
||||
etInputSpeed.setSelection(speedLimit.toString().length)
|
||||
}
|
||||
|
||||
initOchView()
|
||||
@@ -230,7 +298,7 @@ internal class AutoPilotAndCheckView @JvmOverloads constructor(
|
||||
// }
|
||||
maxAcceleration = carConfigResp.maxAcceleration
|
||||
speedLimit = (carConfigResp.speedLimit * 3.6).toInt()
|
||||
tvSpeed.text = speedLimit.toString()
|
||||
etInputSpeed.setText(speedLimit.toString())
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -31,14 +31,27 @@ class BusOperationView @JvmOverloads constructor(
|
||||
actvAccountPhone.text = phoneMask(SharedPrefs.getInstance(it).getString("och_account",""))
|
||||
}
|
||||
clickPersonalRightView()
|
||||
clickQRBtn()
|
||||
}
|
||||
|
||||
private fun clickQRBtn() {
|
||||
actvAccountQR.onClick {
|
||||
EventBus.getDefault().post(EventLogout(EventLogout.SHOW_QR_TYPE))
|
||||
}
|
||||
}
|
||||
|
||||
private fun initPersonalIcon() {
|
||||
if(AppIdentityModeUtils.isTaxi(FunctionBuildConfig.appIdentityMode)){
|
||||
ivGotoPersonalInfo.visibility = VISIBLE
|
||||
}else{
|
||||
ivGotoPersonalInfo.visibility = GONE
|
||||
}
|
||||
|
||||
if (AppIdentityModeUtils.isShuttle(FunctionBuildConfig.appIdentityMode)) {
|
||||
actvAccountQR.visibility = VISIBLE
|
||||
}else{
|
||||
actvAccountQR.visibility = GONE
|
||||
}
|
||||
}
|
||||
|
||||
private fun clickPersonalRightView() {
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -48,7 +48,7 @@ class BrakeViewStatus @JvmOverloads constructor(
|
||||
if (brakeLight == 1) { //刹车灯亮
|
||||
if (!isBrake) {
|
||||
isBrake = true
|
||||
CallerMapUIServiceManager.getMapUIController()?.setCarLightsType(0, 500)
|
||||
CallerMapUIServiceManager.getMapUIController()?.setCarLightsType(4, 500)
|
||||
GlobalScope.launch(Dispatchers.Main) {
|
||||
var appearAnimation = AlphaAnimation(0f, 1f)
|
||||
appearAnimation.duration = 300
|
||||
@@ -63,7 +63,7 @@ class BrakeViewStatus @JvmOverloads constructor(
|
||||
} else { //不踩刹车,就消失
|
||||
if (isBrake) {
|
||||
isBrake = false
|
||||
CallerMapUIServiceManager.getMapUIController()?.setCarLightsType(3, 500)
|
||||
CallerMapUIServiceManager.getMapUIController()?.setCarLightsType(0, 500)
|
||||
GlobalScope.launch(Dispatchers.Main) {
|
||||
// scaleImageAndTv()
|
||||
var disappearAnimation = AlphaAnimation(1f, 0f)
|
||||
|
||||
@@ -44,8 +44,8 @@ class PncActionsView @JvmOverloads constructor(
|
||||
private var mAutoPilotStatusInfo: AutopilotStatusInfo? = null
|
||||
|
||||
private val bgResources: Int
|
||||
private val topMargin: Int
|
||||
private val txtSize: Int
|
||||
private val topMargin: Float
|
||||
private val txtSize: Float
|
||||
|
||||
init {
|
||||
LayoutInflater.from(context).inflate(R.layout.view_pnc_actions, this, true)
|
||||
@@ -54,20 +54,20 @@ class PncActionsView @JvmOverloads constructor(
|
||||
R.styleable.PncActionsView_background_resource,
|
||||
R.drawable.pnc_actions_bg
|
||||
)
|
||||
topMargin = a.getResourceId(
|
||||
topMargin = a.getDimension(
|
||||
R.styleable.PncActionsView_pnc_top_margin,
|
||||
resources.getDimension(R.dimen.dp_30).toInt()
|
||||
resources.getDimension(R.dimen.dp_30)
|
||||
)
|
||||
txtSize = a.getResourceId(
|
||||
txtSize = a.getDimension(
|
||||
R.styleable.PncActionsView_pnc_size,
|
||||
resources.getDimension(R.dimen.dp_34).toInt()
|
||||
resources.getDimension(R.dimen.dp_34)
|
||||
)
|
||||
a.recycle()
|
||||
}
|
||||
|
||||
override fun onAttachedToWindow() {
|
||||
super.onAttachedToWindow()
|
||||
(tvHmiPncActions.layoutParams as MarginLayoutParams).topMargin = topMargin
|
||||
(tvHmiPncActions.layoutParams as MarginLayoutParams).topMargin = topMargin.toInt()
|
||||
tvHmiPncActions.setTextSize(COMPLEX_UNIT_PX, txtSize.toFloat())
|
||||
|
||||
CallerAutoPilotStatusListenerManager.addListener(TAG, this)
|
||||
|
||||
@@ -2,15 +2,22 @@ package com.mogo.eagle.core.function.hmi.ui.vehicle
|
||||
|
||||
import android.content.Context
|
||||
import android.util.AttributeSet
|
||||
import android.util.Log
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import androidx.constraintlayout.widget.ConstraintLayout
|
||||
import com.mogo.eagle.core.data.autopilot.AutopilotStatusInfo
|
||||
import com.mogo.eagle.core.data.config.FunctionBuildConfig
|
||||
import com.mogo.eagle.core.data.enums.EventTypeEnumNew
|
||||
import com.mogo.eagle.core.data.msgbox.MsgBoxBean
|
||||
import com.mogo.eagle.core.data.msgbox.MsgBoxType
|
||||
import com.mogo.eagle.core.data.msgbox.V2XMsg
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotStatusListener
|
||||
import com.mogo.eagle.core.function.api.hmi.warning.IMoGoWarningStatusListener
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager
|
||||
import com.mogo.eagle.core.function.call.hmi.CallerHmiManager
|
||||
import com.mogo.eagle.core.function.call.msgbox.CallerMsgBoxManager
|
||||
import com.mogo.eagle.core.function.call.msgbox.CallerMsgBoxManager.saveMsgBox
|
||||
import com.mogo.eagle.core.function.hmi.R
|
||||
import com.mogo.eagle.core.utilcode.util.ThreadUtils
|
||||
import com.zhjt.mogo.adas.data.bean.MogoReport
|
||||
@@ -26,6 +33,10 @@ class TakeOverView @JvmOverloads constructor(
|
||||
const val TAG = "TakeOverView"
|
||||
}
|
||||
|
||||
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)
|
||||
}
|
||||
@@ -37,6 +48,21 @@ class TakeOverView @JvmOverloads constructor(
|
||||
CallerAutoPilotStatusListenerManager.addListener(TAG, this)
|
||||
}
|
||||
|
||||
/**
|
||||
* 自动驾驶状态信息
|
||||
*
|
||||
* @param autoPilotStatusInfo 状态信息
|
||||
*/
|
||||
override fun onAutopilotStatusResponse(autoPilotStatusInfo: AutopilotStatusInfo) {
|
||||
autopilotStatus = autoPilotStatusInfo.state
|
||||
if(autoPilotStatusInfo.state == 7){
|
||||
isParallel = true
|
||||
}else if(autoPilotStatusInfo.state == 0 || autoPilotStatusInfo.state == 1){
|
||||
isParallel = false
|
||||
}
|
||||
Log.i(TAG,"自动驾驶状态${autopilotStatus}")
|
||||
}
|
||||
|
||||
/**
|
||||
* 工控机监控节点上报
|
||||
*/
|
||||
@@ -54,7 +80,7 @@ class TakeOverView @JvmOverloads constructor(
|
||||
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_DISTANCE ->{
|
||||
CallerHmiManager.warningV2X(
|
||||
EventTypeEnumNew.TAKE_OVER_EVENT.poiType,
|
||||
EventTypeEnumNew.TAKE_OVER_EVENT.content,
|
||||
@@ -63,6 +89,16 @@ class TakeOverView @JvmOverloads constructor(
|
||||
override fun onShow() {
|
||||
takeOver = true
|
||||
visibility = View.VISIBLE
|
||||
//加入消息盒子
|
||||
saveMsgBox(
|
||||
MsgBoxBean(
|
||||
MsgBoxType.V2X, V2XMsg(
|
||||
EventTypeEnumNew.TAKE_OVER_EVENT.poiType,
|
||||
EventTypeEnumNew.TAKE_OVER_EVENT.content,
|
||||
EventTypeEnumNew.TAKE_OVER_EVENT.tts
|
||||
)
|
||||
)
|
||||
)
|
||||
}
|
||||
|
||||
override fun onDismiss() {
|
||||
@@ -72,6 +108,41 @@ class TakeOverView @JvmOverloads constructor(
|
||||
}
|
||||
)
|
||||
}
|
||||
//弱网
|
||||
MogoReport.Code.Error.EMAP.EPARALLEL_AICLOUD_NETWORK_WEAK,
|
||||
MogoReport.Code.Error.EMAP.EPARALLEL_AICLOUD_CONNECTION_ERROR -> {
|
||||
//如果是平行驾驶状态下,提示弱网接管
|
||||
Log.i(TAG,"弱网时自动驾驶状态:${autopilotStatus}")
|
||||
if(isParallel){
|
||||
CallerHmiManager.warningV2X(
|
||||
EventTypeEnumNew.NETWORK_WEAK_EVENT.poiType,
|
||||
EventTypeEnumNew.NETWORK_WEAK_EVENT.content,
|
||||
EventTypeEnumNew.NETWORK_WEAK_EVENT.tts,
|
||||
object : IMoGoWarningStatusListener {
|
||||
override fun onShow() {
|
||||
takeOver = true
|
||||
visibility = View.VISIBLE
|
||||
//加入消息盒子
|
||||
Log.i(TAG,"弱网时加入消息盒子${EventTypeEnumNew.NETWORK_WEAK_EVENT.content}")
|
||||
saveMsgBox(
|
||||
MsgBoxBean(
|
||||
MsgBoxType.V2X, V2XMsg(
|
||||
EventTypeEnumNew.NETWORK_WEAK_EVENT.poiType,
|
||||
EventTypeEnumNew.NETWORK_WEAK_EVENT.content,
|
||||
EventTypeEnumNew.NETWORK_WEAK_EVENT.tts
|
||||
)
|
||||
)
|
||||
)
|
||||
}
|
||||
|
||||
override fun onDismiss() {
|
||||
takeOver = false
|
||||
visibility = View.GONE
|
||||
}
|
||||
}
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,10 +8,13 @@ import androidx.constraintlayout.widget.ConstraintLayout
|
||||
import com.mogo.eagle.core.data.autopilot.AutopilotStatusInfo
|
||||
import com.mogo.eagle.core.data.deva.bindingcar.AdUpgradeStateHelper
|
||||
import com.mogo.eagle.core.data.deva.bindingcar.IPCUpgradeStateInfo
|
||||
import com.mogo.eagle.core.data.map.MogoLocation
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotStatusListener
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoChassisLocationWGS84Listener
|
||||
import com.mogo.eagle.core.function.api.devatools.IMoGoDevaToolsListener
|
||||
import com.mogo.eagle.core.function.api.hmi.autopilot.IMoGoCheckAutoPilotBtnListener
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationWGS84ListenerManager
|
||||
import com.mogo.eagle.core.function.call.devatools.CallerDevaToolsListenerManager
|
||||
import com.mogo.eagle.core.function.call.devatools.CallerDevaToolsManager
|
||||
import com.mogo.eagle.core.function.call.hmi.CallerHmiListenerManager
|
||||
@@ -37,7 +40,7 @@ class SystemVersionView @JvmOverloads constructor(
|
||||
attrs: AttributeSet? = null,
|
||||
defStyleAttr: Int = 0
|
||||
) : ConstraintLayout(context, attrs, defStyleAttr), IMoGoAutopilotStatusListener,
|
||||
IMoGoDevaToolsListener, IMoGoCheckAutoPilotBtnListener {
|
||||
IMoGoDevaToolsListener, IMoGoCheckAutoPilotBtnListener, IMoGoChassisLocationWGS84Listener {
|
||||
|
||||
companion object {
|
||||
const val TAG = "SystemVersionView"
|
||||
@@ -55,6 +58,7 @@ class SystemVersionView @JvmOverloads constructor(
|
||||
private var currentProgress: Int = -1 //当前已下载包体大小
|
||||
|
||||
private var isHDCached = false
|
||||
private var location: MogoLocation? = null
|
||||
|
||||
init {
|
||||
LayoutInflater.from(context).inflate(R.layout.view_system_version, this, true)
|
||||
@@ -137,7 +141,17 @@ class SystemVersionView @JvmOverloads constructor(
|
||||
if (isHDCached) {// 已缓存
|
||||
ToastUtils.showShort(resources.getString(R.string.offline_had_downloaded))
|
||||
} else {// 未缓存
|
||||
OfflineMapDialog(context).show()
|
||||
if (CallerMapUIServiceManager.getCityCode().isNullOrEmpty()) {// 未拿到高德的cityCode
|
||||
if (location == null || (location!!.longitude <= 0.0 && location!!.latitude <= 0.0)) {// 未拿到高精的经纬度
|
||||
ToastUtils.showShort(resources.getString(R.string.location_try_again))
|
||||
} else {// 拿到了高精的经纬度
|
||||
val dialog = OfflineMapDialog(context)
|
||||
dialog.location = location
|
||||
dialog.show()
|
||||
}
|
||||
} else {// 拿到高德的cityCode
|
||||
OfflineMapDialog(context).show()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -292,6 +306,7 @@ class SystemVersionView @JvmOverloads constructor(
|
||||
CallerHmiListenerManager.addListener(TAG, this)
|
||||
CallerAutoPilotStatusListenerManager.addListener(TAG, this)
|
||||
CallerDevaToolsListenerManager.addListener(TAG,this)
|
||||
CallerChassisLocationWGS84ListenerManager.addListener(TAG, this)
|
||||
needQueryContainers = true
|
||||
}
|
||||
|
||||
@@ -303,6 +318,7 @@ class SystemVersionView @JvmOverloads constructor(
|
||||
CallerHmiListenerManager.removeListener(TAG)
|
||||
CallerAutoPilotStatusListenerManager.removeListener(TAG)
|
||||
CallerDevaToolsListenerManager.removeListener(TAG)
|
||||
CallerChassisLocationWGS84ListenerManager.removeListener(TAG)
|
||||
needQueryContainers = false
|
||||
}
|
||||
|
||||
@@ -361,4 +377,7 @@ class SystemVersionView @JvmOverloads constructor(
|
||||
adCircularProgressView?.visibility = View.GONE
|
||||
}
|
||||
|
||||
override fun onChassisLocationWGS84(gnssInfo: MogoLocation) {
|
||||
location = gnssInfo
|
||||
}
|
||||
}
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 29 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 6.3 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 9.3 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 143 KiB After Width: | Height: | Size: 143 KiB |
@@ -19,6 +19,7 @@
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_adas_dispatch_title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/module_services_dispatch_cars_dialog_title_margin_top"
|
||||
@@ -30,6 +31,7 @@
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_adas_dispatch_remind_content"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/module_services_dispatch_cars_dialog_content_margin_top"
|
||||
|
||||
@@ -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>
|
||||
@@ -0,0 +1,52 @@
|
||||
<?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_637"
|
||||
android:layout_height="@dimen/dp_160"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:background="#E3ECFE"
|
||||
app:roundLayoutRadius="@dimen/dp_30"
|
||||
android:layout_marginTop="@dimen/dp_12"
|
||||
android:layout_marginBottom="@dimen/dp_12"
|
||||
>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/ivBusPNoticeImage"
|
||||
android:layout_width="@dimen/dp_107"
|
||||
android:layout_height="@dimen/dp_107"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
android:src="@drawable/icon_bus_passenger_logo"
|
||||
android:layout_marginStart="@dimen/dp_26"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvBusPNoticeTime"
|
||||
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_constraintRight_toRightOf="parent"
|
||||
android:layout_marginEnd="@dimen/dp_26"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvBusPNoticeContent"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toRightOf="@id/ivBusPNoticeImage"
|
||||
app:layout_constraintRight_toLeftOf="@id/tvBusPNoticeTime"
|
||||
android:layout_marginStart="@dimen/dp_26"
|
||||
android:layout_marginEnd="@dimen/dp_16"
|
||||
android:textColor="#FF203555"
|
||||
android:textSize="@dimen/dp_36"
|
||||
android:gravity="start"
|
||||
android:maxLines="3"
|
||||
android:ellipsize="end"
|
||||
/>
|
||||
|
||||
</com.mogo.eagle.core.widget.RoundConstraintLayout>
|
||||
@@ -0,0 +1,52 @@
|
||||
<?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_637"
|
||||
android:layout_height="@dimen/dp_160"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:background="#E3ECFE"
|
||||
app:roundLayoutRadius="@dimen/dp_30"
|
||||
android:layout_marginTop="@dimen/dp_12"
|
||||
android:layout_marginBottom="@dimen/dp_12"
|
||||
>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/ivBusPOperationImage"
|
||||
android:layout_width="@dimen/dp_107"
|
||||
android:layout_height="@dimen/dp_107"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
android:src="@drawable/icon_bus_passenger_logo"
|
||||
android:layout_marginStart="@dimen/dp_26"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvBusPOperationTime"
|
||||
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_constraintRight_toRightOf="parent"
|
||||
android:layout_marginEnd="@dimen/dp_26"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvBusPOperationContent"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toRightOf="@id/ivBusPOperationImage"
|
||||
app:layout_constraintRight_toLeftOf="@id/tvBusPOperationTime"
|
||||
android:layout_marginStart="@dimen/dp_26"
|
||||
android:layout_marginEnd="@dimen/dp_16"
|
||||
android:textColor="#FF203555"
|
||||
android:textSize="@dimen/dp_36"
|
||||
android:gravity="start"
|
||||
android:maxLines="3"
|
||||
android:ellipsize="end"
|
||||
/>
|
||||
|
||||
</com.mogo.eagle.core.widget.RoundConstraintLayout>
|
||||
@@ -0,0 +1,62 @@
|
||||
<?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_637"
|
||||
android:layout_height="@dimen/dp_160"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:background="#E3ECFE"
|
||||
app:roundLayoutRadius="@dimen/dp_30"
|
||||
android:layout_marginTop="@dimen/dp_12"
|
||||
android:layout_marginBottom="@dimen/dp_12"
|
||||
>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/ivBusPV2XImage"
|
||||
android:layout_width="@dimen/dp_107"
|
||||
android:layout_height="@dimen/dp_107"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
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="@id/tvBusPV2XTitle"
|
||||
app:layout_constraintBottom_toBottomOf="@id/tvBusPV2XTitle"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
android:layout_marginEnd="@dimen/dp_26"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvBusPV2XContent"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintLeft_toLeftOf="@id/tvBusPV2XTitle"
|
||||
app:layout_constraintRight_toRightOf="@id/tvBusPV2XTime"
|
||||
app:layout_constraintTop_toBottomOf="@id/tvBusPV2XTitle"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
android:textColor="#CC203555"
|
||||
android:textSize="@dimen/dp_28"
|
||||
android:gravity="start"
|
||||
android:maxLines="2"
|
||||
android:ellipsize="end"
|
||||
/>
|
||||
|
||||
|
||||
</com.mogo.eagle.core.widget.RoundConstraintLayout>
|
||||
@@ -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_400"
|
||||
android:layout_height="@dimen/dp_80"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:background="#CCFFFFFF"
|
||||
|
||||
@@ -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_400"
|
||||
android:layout_height="@dimen/dp_80"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:background="#CCFFFFFF"
|
||||
|
||||
@@ -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_400"
|
||||
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>
|
||||
@@ -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>
|
||||
@@ -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>
|
||||
@@ -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"
|
||||
/>
|
||||
|
||||
|
||||
@@ -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"
|
||||
/>
|
||||
|
||||
|
||||
@@ -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>
|
||||
@@ -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>
|
||||
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.recyclerview.widget.RecyclerView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/rvBusBoxBubbleList"
|
||||
android:layout_width="@dimen/dp_637"
|
||||
android:layout_height="wrap_content"
|
||||
>
|
||||
|
||||
</androidx.recyclerview.widget.RecyclerView>
|
||||
@@ -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_400"
|
||||
android:layout_height="wrap_content"
|
||||
>
|
||||
|
||||
|
||||
@@ -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" />
|
||||
|
||||
|
||||
@@ -1968,6 +1968,7 @@
|
||||
android:layout_margin="2dp"
|
||||
android:padding="@dimen/dp_20"
|
||||
android:gravity="center"
|
||||
android:visibility="gone"
|
||||
android:textOff="展示日志过滤面板"
|
||||
android:textOn="关闭日志过滤面板"
|
||||
android:textSize="@dimen/dp_24" />
|
||||
|
||||
@@ -60,6 +60,16 @@
|
||||
android:textColor="@android:color/white"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"/>
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/actvAccountQR"
|
||||
android:layout_width="@dimen/dp_84"
|
||||
android:layout_height="@dimen/dp_84"
|
||||
android:src="@drawable/icon_bind_driver_qrcode"
|
||||
android:layout_marginLeft="@dimen/dp_32"
|
||||
app:layout_constraintLeft_toRightOf="@+id/actvAccountPhone"
|
||||
app:layout_constraintTop_toTopOf="@+id/actvAccountPhone"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/actvAccountPhone"/>
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/ivGotoPersonalInfo"
|
||||
|
||||
@@ -76,8 +76,8 @@
|
||||
|
||||
<declare-styleable name="PncActionsView">
|
||||
<attr name="background_resource" format="reference"/>
|
||||
<attr name="pnc_top_margin" format="reference"/>
|
||||
<attr name="pnc_size" format="reference"/>
|
||||
<attr name="pnc_top_margin" format="dimension"/>
|
||||
<attr name="pnc_size" format="dimension"/>
|
||||
</declare-styleable>
|
||||
|
||||
<declare-styleable name="DriverMsgBoxButtonView">
|
||||
|
||||
@@ -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>
|
||||
@@ -72,6 +75,7 @@
|
||||
<string name="offline_download_success">离线地图下载成功</string>
|
||||
<string name="offline_download_failure">离线地图下载失败</string>
|
||||
<string name="offline_had_downloaded">当前已为最新版本</string>
|
||||
<string name="location_try_again">请检查定位是否正常</string>
|
||||
<string name="ok_tip">确定</string>
|
||||
<string name="retry">重试</string>
|
||||
</resources>
|
||||
|
||||
@@ -41,6 +41,11 @@ android {
|
||||
sourceCompatibility JavaVersion.VERSION_1_8
|
||||
targetCompatibility JavaVersion.VERSION_1_8
|
||||
}
|
||||
|
||||
lintOptions {
|
||||
abortOnError false
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
dependencies {
|
||||
|
||||
@@ -65,10 +65,10 @@ object TrackerSourceColorHelper {
|
||||
|
||||
//僵尸车
|
||||
if(data.addAttribute == AdditionalAttribute.ATTR_ZOMBIE){
|
||||
color = "#AD7488FF"
|
||||
color = "#7A8499FF"
|
||||
CallerMapUIServiceManager.getMapUIController()?.let {
|
||||
if(it.isDayMode){
|
||||
color = "#AE7887FF"
|
||||
color = "#9BA8BCFF"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -112,8 +112,8 @@ class MapBizView(context: Context?, attrs: AttributeSet?) : MogoMapView(context,
|
||||
private fun turn(lightNum: Int) {
|
||||
if (currentLevel != lightNum) {
|
||||
when (lightNum) {
|
||||
0 -> CallerMapUIServiceManager.getMapUIController()?.setCarLightsType(3, 500)
|
||||
1 -> CallerMapUIServiceManager.getMapUIController()?.setCarLightsType(4, 500)
|
||||
0 -> CallerMapUIServiceManager.getMapUIController()?.setCarLightsType(0, 500)
|
||||
1 -> CallerMapUIServiceManager.getMapUIController()?.setCarLightsType(1, 500)
|
||||
2 -> CallerMapUIServiceManager.getMapUIController()?.setCarLightsType(2, 500)
|
||||
}
|
||||
currentLevel = lightNum
|
||||
|
||||
@@ -145,6 +145,7 @@ class OverMapView @JvmOverloads constructor(
|
||||
topPadding = typedArray.getInt(R.styleable.OverMapView_topPadding, 100)
|
||||
rightPadding = typedArray.getInt(R.styleable.OverMapView_rightPadding, 100)
|
||||
bottomPadding = typedArray.getInt(R.styleable.OverMapView_bottomPadding, 100)
|
||||
mTilt = typedArray.getFloat(R.styleable.OverMapView_mapTilt, 30f)
|
||||
typedArray.recycle()
|
||||
initView(context)
|
||||
} catch (e: Exception) {
|
||||
@@ -215,6 +216,25 @@ class OverMapView @JvmOverloads constructor(
|
||||
siteMarkerList = mAMap!!.addMarkers(markerOptionsList, false)
|
||||
}
|
||||
|
||||
@MainThread
|
||||
fun drawSiteMarkers(
|
||||
siteMarkers: List<SiteMarkerBean>?,
|
||||
) {
|
||||
if (siteMarkers.isNullOrEmpty()) return
|
||||
clearSiteMarkers()
|
||||
val markerOptionsList = ArrayList<MarkerOptions>()
|
||||
for (siteMarkerBean in siteMarkers) {
|
||||
val markerOption = MarkerOptions()
|
||||
markerOption.position(siteMarkerBean.latLng)
|
||||
markerOption.anchor(siteMarkerBean.anchorX, siteMarkerBean.anchorY)
|
||||
markerOption.icon(
|
||||
BitmapDescriptorFactory.fromBitmap(siteMarkerBean.bitmap)
|
||||
)
|
||||
markerOptionsList.add(markerOption)
|
||||
}
|
||||
siteMarkerList = mAMap!!.addMarkers(markerOptionsList, false)
|
||||
}
|
||||
|
||||
@MainThread
|
||||
fun clearSiteMarkers() {
|
||||
if (siteMarkerList != null) {
|
||||
@@ -277,7 +297,6 @@ class OverMapView @JvmOverloads constructor(
|
||||
|
||||
private fun initAMapView(context: Context) {
|
||||
Log.d(TAG, "initAMapView")
|
||||
mTilt = 30f
|
||||
mCameraUpdate = CameraUpdateFactory.zoomTo(zoomLevel.toFloat())
|
||||
mAMap = mMapView!!.map
|
||||
mCustomMapStyleOptions = CustomMapStyleOptions()
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
package com.mogo.eagle.core.function.view
|
||||
|
||||
import android.graphics.Bitmap
|
||||
import com.amap.api.maps.model.LatLng
|
||||
|
||||
data class SiteMarkerBean(var latLng: LatLng, var bitmap: Bitmap, var anchorX: Float, var anchorY: Float)
|
||||
@@ -29,5 +29,7 @@
|
||||
<attr name="topPadding" format="integer" />
|
||||
<attr name="rightPadding" format="integer" />
|
||||
<attr name="bottomPadding" format="integer" />
|
||||
<!-- 倾斜角 -->
|
||||
<attr name="mapTilt" format="float" />
|
||||
</declare-styleable>
|
||||
</resources>
|
||||
@@ -35,6 +35,10 @@ android {
|
||||
targetCompatibility JavaVersion.VERSION_1_8
|
||||
}
|
||||
|
||||
lintOptions {
|
||||
abortOnError false
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
dependencies {
|
||||
|
||||
@@ -52,10 +52,11 @@ class HttpDnsStartUp : AndroidStartup<Boolean>() {
|
||||
|
||||
private var context: Context? = null
|
||||
|
||||
@Volatile
|
||||
private var gotToken = false
|
||||
|
||||
private var httpDnsSimpleLocation by Delegates.observable(getDefaultSimpleLocation()) { _, oldValue, newValue ->
|
||||
if (oldValue.cityCode != newValue.cityCode) {
|
||||
if (gotToken && oldValue.cityCode != newValue.cityCode) {
|
||||
reConnectSocket(oldValue.cityCode, newValue.cityCode)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -47,6 +47,10 @@ android {
|
||||
targetCompatibility JavaVersion.VERSION_1_8
|
||||
}
|
||||
|
||||
lintOptions {
|
||||
abortOnError false
|
||||
}
|
||||
|
||||
protobuf {
|
||||
protoc {
|
||||
artifact = rootProject.ext.dependencies.protoc
|
||||
|
||||
@@ -16,5 +16,9 @@ data class UrlConfig(
|
||||
@SerializedName("eagle_mis_url")
|
||||
val eagleMisUrl: String,
|
||||
@SerializedName("eagle_dns_url")
|
||||
val eagleDnsUrl: String
|
||||
val eagleDnsUrl: String,
|
||||
@SerializedName("bind_driver_qr_url")
|
||||
val bindDriverQRUrl: String,
|
||||
@SerializedName("chart_socket_url")
|
||||
val chartSocketUrl: String
|
||||
)
|
||||
@@ -47,7 +47,7 @@ open class AutopilotStatusInfo : Serializable, Cloneable {
|
||||
var satelliteTime = 0.0
|
||||
|
||||
/**
|
||||
* 自动驾驶状态 0是不可用 1是ready 2是自动驾驶start
|
||||
* 自动驾驶状态 0是不可用 1是ready 2是自动驾驶start 7:平行驾驶中
|
||||
*/
|
||||
var state = 0
|
||||
|
||||
|
||||
@@ -29,7 +29,31 @@ public class DispatchAdasAutoPilotLocReceiverBean {
|
||||
private long systemTime;
|
||||
private List<MogoLatLng> stopsList;
|
||||
|
||||
public DispatchAdasAutoPilotLocReceiverBean(int source, int type, String poiId, double startLat, double startLon, String startLocAddress, double endLat, double endLon, String endLocAddress, String taskTime, String flightInfo, String taskInfo, long systemTime, List<MogoLatLng> stopsList) {
|
||||
private long taskId; //任务调度记录的ID
|
||||
private int lineId; //路线Id
|
||||
private String lineName; //路线名称
|
||||
|
||||
private String trajUrl;
|
||||
private String trajMd5;
|
||||
private String stopUrl;
|
||||
private String stopMd5;
|
||||
private long timestamp;
|
||||
private String vehicleModel;
|
||||
private String trajUrl_dpqp;//轨迹文件下载的cos url,默认“”
|
||||
private String trajMd5_dpqp;//轨迹文件md5,默认“”
|
||||
private String stopUrl_dpqp;//打点文件下载的cos url,默认“”
|
||||
private String stopMd5_dpqp;//轨迹文件md5,默认“”
|
||||
private long timestamp_dpqp;//上传轨迹完成时间戳(ms):用于MEC本地手动导入轨迹验证时不会被云端轨迹覆盖
|
||||
|
||||
public DispatchAdasAutoPilotLocReceiverBean(int source, int type, String poiId, double startLat,
|
||||
double startLon, String startLocAddress, double endLat,
|
||||
double endLon, String endLocAddress, String taskTime,
|
||||
String flightInfo, String taskInfo, long systemTime,
|
||||
List<MogoLatLng> stopsList, long taskId, int lineId,
|
||||
String lineName, String trajUrl, String trajMd5,
|
||||
String stopUrl, String stopMd5, long timestamp,
|
||||
String vehicleModel, String trajUrl_dpqp, String trajMd5_dpqp,
|
||||
String stopUrl_dpqp, String stopMd5_dpqp, long timestamp_dpqp) {
|
||||
this.source = source;
|
||||
this.type = type;
|
||||
this.poiId = poiId;
|
||||
@@ -44,6 +68,43 @@ public class DispatchAdasAutoPilotLocReceiverBean {
|
||||
this.taskInfo = taskInfo;
|
||||
this.systemTime = systemTime;
|
||||
this.stopsList = stopsList;
|
||||
this.taskId = taskId;
|
||||
this.lineId = lineId;
|
||||
this.lineName = lineName;
|
||||
this.trajUrl = trajUrl;
|
||||
this.trajMd5 = trajMd5;
|
||||
this.stopUrl = stopUrl;
|
||||
this.stopMd5 = stopMd5;
|
||||
this.timestamp = timestamp;
|
||||
this.vehicleModel = vehicleModel;
|
||||
this.trajUrl_dpqp = trajUrl_dpqp;
|
||||
this.trajMd5_dpqp = trajMd5_dpqp;
|
||||
this.stopUrl_dpqp = stopUrl_dpqp;
|
||||
this.stopMd5_dpqp = stopMd5_dpqp;
|
||||
this.timestamp_dpqp = timestamp_dpqp;
|
||||
}
|
||||
|
||||
public DispatchAdasAutoPilotLocReceiverBean(int source, int type, String poiId, double startLat, double startLon, String startLocAddress,
|
||||
double endLat, double endLon, String endLocAddress, String taskTime, String flightInfo,
|
||||
String taskInfo, long systemTime, List<MogoLatLng> stopsList,
|
||||
long taskId, int lineId, String lineName) {
|
||||
this.source = source;
|
||||
this.type = type;
|
||||
this.poiId = poiId;
|
||||
this.startLat = startLat;
|
||||
this.startLon = startLon;
|
||||
this.startLocAddress = startLocAddress;
|
||||
this.endLat = endLat;
|
||||
this.endLon = endLon;
|
||||
this.endLocAddress = endLocAddress;
|
||||
this.taskTime = taskTime;
|
||||
this.flightInfo = flightInfo;
|
||||
this.taskInfo = taskInfo;
|
||||
this.systemTime = systemTime;
|
||||
this.stopsList = stopsList;
|
||||
this.taskId = taskId;
|
||||
this.lineId = lineId;
|
||||
this.lineName = lineName;
|
||||
}
|
||||
|
||||
public int getSource() {
|
||||
@@ -158,6 +219,118 @@ public class DispatchAdasAutoPilotLocReceiverBean {
|
||||
this.stopsList = stopsList;
|
||||
}
|
||||
|
||||
public long getTaskId(){
|
||||
return taskId;
|
||||
}
|
||||
|
||||
public void setTaskId(long taskId){
|
||||
this.taskId = taskId;
|
||||
}
|
||||
|
||||
public int getLineId(){
|
||||
return lineId;
|
||||
}
|
||||
|
||||
public void setLineId(int lineId){
|
||||
this.lineId =lineId;
|
||||
}
|
||||
|
||||
public String getLineName(){
|
||||
return lineName;
|
||||
}
|
||||
|
||||
public void setLineName(String lineName){
|
||||
this.lineName = lineName;
|
||||
}
|
||||
|
||||
public String getTrajUrl() {
|
||||
return trajUrl;
|
||||
}
|
||||
|
||||
public void setTrajUrl(String trajUrl) {
|
||||
this.trajUrl = trajUrl;
|
||||
}
|
||||
|
||||
public String getTrajMd5() {
|
||||
return trajMd5;
|
||||
}
|
||||
|
||||
public void setTrajMd5(String trajMd5) {
|
||||
this.trajMd5 = trajMd5;
|
||||
}
|
||||
|
||||
public String getStopUrl() {
|
||||
return stopUrl;
|
||||
}
|
||||
|
||||
public void setStopUrl(String stopUrl) {
|
||||
this.stopUrl = stopUrl;
|
||||
}
|
||||
|
||||
public String getStopMd5() {
|
||||
return stopMd5;
|
||||
}
|
||||
|
||||
public void setStopMd5(String stopMd5) {
|
||||
this.stopMd5 = stopMd5;
|
||||
}
|
||||
|
||||
public long getTimestamp() {
|
||||
return timestamp;
|
||||
}
|
||||
|
||||
public void setTimestamp(long timestamp) {
|
||||
this.timestamp = timestamp;
|
||||
}
|
||||
|
||||
public String getVehicleModel() {
|
||||
return vehicleModel;
|
||||
}
|
||||
|
||||
public void setVehicleModel(String vehicleModel) {
|
||||
this.vehicleModel = vehicleModel;
|
||||
}
|
||||
|
||||
public String getTrajUrl_dpqp() {
|
||||
return trajUrl_dpqp;
|
||||
}
|
||||
|
||||
public void setTrajUrl_dpqp(String trajUrl_dpqp) {
|
||||
this.trajUrl_dpqp = trajUrl_dpqp;
|
||||
}
|
||||
|
||||
public String getTrajMd5_dpqp() {
|
||||
return trajMd5_dpqp;
|
||||
}
|
||||
|
||||
public void setTrajMd5_dpqp(String trajMd5_dpqp) {
|
||||
this.trajMd5_dpqp = trajMd5_dpqp;
|
||||
}
|
||||
|
||||
public String getStopUrl_dpqp() {
|
||||
return stopUrl_dpqp;
|
||||
}
|
||||
|
||||
public void setStopUrl_dpqp(String stopUrl_dpqp) {
|
||||
this.stopUrl_dpqp = stopUrl_dpqp;
|
||||
}
|
||||
|
||||
public String getStopMd5_dpqp() {
|
||||
return stopMd5_dpqp;
|
||||
}
|
||||
|
||||
public void setStopMd5_dpqp(String stopMd5_dpqp) {
|
||||
this.stopMd5_dpqp = stopMd5_dpqp;
|
||||
}
|
||||
|
||||
public long getTimestamp_dpqp() {
|
||||
return timestamp_dpqp;
|
||||
}
|
||||
|
||||
public void setTimestamp_dpqp(long timestamp_dpqp) {
|
||||
this.timestamp_dpqp = timestamp_dpqp;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "DispatchAdasAutoPilotLocReceiverBean{" +
|
||||
@@ -175,6 +348,20 @@ public class DispatchAdasAutoPilotLocReceiverBean {
|
||||
", taskInfo='" + taskInfo + '\'' +
|
||||
", systemTime=" + systemTime +
|
||||
", stopsList=" + stopsList +
|
||||
", taskId=" + taskId +
|
||||
", lineId=" + lineId +
|
||||
", lineName='" + lineName + '\'' +
|
||||
", trajUrl='" + trajUrl + '\'' +
|
||||
", trajMd5='" + trajMd5 + '\'' +
|
||||
", stopUrl='" + stopUrl + '\'' +
|
||||
", stopMd5='" + stopMd5 + '\'' +
|
||||
", timestamp=" + timestamp +
|
||||
", vehicleModel='" + vehicleModel + '\'' +
|
||||
", trajUrl_dpqp='" + trajUrl_dpqp + '\'' +
|
||||
", trajMd5_dpqp='" + trajMd5_dpqp + '\'' +
|
||||
", stopUrl_dpqp='" + stopUrl_dpqp + '\'' +
|
||||
", stopMd5_dpqp='" + stopMd5_dpqp + '\'' +
|
||||
", timestamp_dpqp=" + timestamp_dpqp +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,10 +4,12 @@ public class ReportDispatchResult {
|
||||
|
||||
private String sn;
|
||||
private int dispatchResult;
|
||||
private long taskId;
|
||||
|
||||
public ReportDispatchResult(String sn, int dispatchResult) {
|
||||
public ReportDispatchResult(String sn, int dispatchResult,long taskId) {
|
||||
this.sn = sn;
|
||||
this.dispatchResult = dispatchResult;
|
||||
this.taskId = taskId;
|
||||
}
|
||||
|
||||
public String getSn() {
|
||||
@@ -26,11 +28,20 @@ public class ReportDispatchResult {
|
||||
this.dispatchResult = dispatchResult;
|
||||
}
|
||||
|
||||
public long getTaskId() {
|
||||
return taskId;
|
||||
}
|
||||
|
||||
public void setTaskId(long taskId) {
|
||||
this.taskId = taskId;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "ReportDispatchResult{" +
|
||||
"sn='" + sn + '\'' +
|
||||
", dispatchResult=" + dispatchResult +
|
||||
", dispatchResult=" + dispatchResult + '\''+
|
||||
", taskId=" + taskId +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
|
||||
@@ -105,6 +105,16 @@ object FunctionBuildConfig {
|
||||
@JvmField
|
||||
var appIdentityMode = "Taxi_Driver_Base"
|
||||
|
||||
/**
|
||||
* 临时配置json
|
||||
* 广告json
|
||||
*
|
||||
*/
|
||||
@Volatile
|
||||
@JvmField
|
||||
var tempConfig = ""
|
||||
|
||||
|
||||
/**
|
||||
* 配置连接工控机的IP地址
|
||||
* 小巴车 192.168.8.102
|
||||
|
||||
@@ -108,24 +108,28 @@ enum class EventTypeEnumNew(
|
||||
|
||||
//接管
|
||||
TAKE_OVER_EVENT(
|
||||
"20000", "注意周围、立即接管", "注意周围、立即接管", R.drawable.icon_warning_take_over,
|
||||
"20000", "接管", "注意周围、立即接管", R.drawable.icon_warning_take_over,
|
||||
"注意周围、立即接管", "自动驾驶退出请立即接管"
|
||||
),
|
||||
|
||||
//弱网接管
|
||||
NETWORK_WEAK_EVENT("20001", "接管", "注意周围、立即接管", 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 +223,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 +401,7 @@ enum class EventTypeEnumNew(
|
||||
),
|
||||
TYPE_NO_PASSING(
|
||||
51.toString(),
|
||||
"不通",
|
||||
"道路不通",
|
||||
poiTypeSrcVr = R.drawable.v2x_icon_fenglu_vr,
|
||||
content = "前方%s米不通",
|
||||
tts = "前方%s米不通"
|
||||
@@ -470,7 +474,7 @@ enum class EventTypeEnumNew(
|
||||
|
||||
TYPE_SOCKET_ROAD_JINGZHI(
|
||||
"100251",
|
||||
"前方%s米静止障碍物占道",
|
||||
"静止障碍物占道",
|
||||
poiTypeSrcVr = R.drawable.v2x_icon_jingzhi_zhangai,
|
||||
content = "前方%s米静止障碍物占道",
|
||||
tts = "前方%s米静止障碍物占道"
|
||||
@@ -478,7 +482,7 @@ enum class EventTypeEnumNew(
|
||||
|
||||
TYPE_SOCKET_ROAD_SHIGU(
|
||||
"100321",
|
||||
"前方%s米道路事故",
|
||||
"道路事故",
|
||||
poiTypeSrcVr = R.drawable.v2x_icon_shigu_sanjiaopai,
|
||||
content = "前方%s米道路事故",
|
||||
tts = "前方%s米道路事故"
|
||||
@@ -486,7 +490,7 @@ enum class EventTypeEnumNew(
|
||||
|
||||
TYPE_SOCKET_ROAD_SHIGONG(
|
||||
"100061",
|
||||
"前方%s米道路施工",
|
||||
"道路施工",
|
||||
poiTypeSrcVr = R.drawable.v2x_icon_shigong_zhandao,
|
||||
content = "前方%s米道路施工",
|
||||
tts = "前方%s米道路施工"
|
||||
@@ -500,10 +504,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 +710,311 @@ 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
|
||||
}
|
||||
//弱网接管
|
||||
NETWORK_WEAK_EVENT.poiType ->{
|
||||
NETWORK_WEAK_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) {
|
||||
@@ -818,6 +1127,10 @@ enum class EventTypeEnumNew(
|
||||
TAKE_OVER_EVENT.poiType -> {
|
||||
R.drawable.icon_warning_take_over
|
||||
}
|
||||
//弱网接管
|
||||
NETWORK_WEAK_EVENT.poiType -> {
|
||||
R.drawable.icon_warning_take_over
|
||||
}
|
||||
//机动车
|
||||
TYPE_USECASE_ID_VRUCW_MOTOR_VEHICLES.poiType -> {
|
||||
R.drawable.icon_warning_v2x_motorcycle_collision
|
||||
|
||||
@@ -5,6 +5,7 @@ public class EventLogout {
|
||||
private int messgaeType;
|
||||
public final static int LOGOUT_TYPE = 100001;
|
||||
public final static int PERSONAL_TYPE = 100002;
|
||||
public final static int SHOW_QR_TYPE = 100003;
|
||||
|
||||
public EventLogout(int messgaeType) {
|
||||
this.messgaeType = messgaeType;
|
||||
|
||||
@@ -38,6 +38,11 @@ android {
|
||||
sourceCompatibility JavaVersion.VERSION_1_8
|
||||
targetCompatibility JavaVersion.VERSION_1_8
|
||||
}
|
||||
|
||||
lintOptions {
|
||||
abortOnError false
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
dependencies {
|
||||
|
||||
@@ -29,12 +29,28 @@ interface IMoGoFuncBizProvider : IMoGoFunctionServerProvider {
|
||||
*/
|
||||
fun dispatchAffirm()
|
||||
|
||||
/**
|
||||
* 停止调度确认
|
||||
*/
|
||||
fun stopDispatchAffirm()
|
||||
|
||||
/**
|
||||
* 调度取消
|
||||
* @param manualTrigger 是否手动
|
||||
*/
|
||||
fun dispatchCancel(manualTrigger: Boolean)
|
||||
|
||||
/**
|
||||
* 停止调度取消
|
||||
* @param manualTrigger 是否手动
|
||||
*/
|
||||
fun stopDispatchCancel(manualTrigger: Boolean)
|
||||
|
||||
/**
|
||||
* 调度重启自驾确认
|
||||
*/
|
||||
fun restartDispatchAffirm()
|
||||
|
||||
/**
|
||||
* 调度测试
|
||||
*/
|
||||
|
||||
@@ -107,6 +107,11 @@ interface IMoGoHmiProvider :IProvider{
|
||||
*/
|
||||
fun dismissDispatchDialog()
|
||||
|
||||
/**
|
||||
* 调度重启自驾弹窗展示
|
||||
*/
|
||||
fun showDispatchRestartDialog(msgData: DispatchAdasAutoPilotLocReceiverBean)
|
||||
|
||||
/**
|
||||
* 设置状态栏暗夜或明亮模式
|
||||
* 默认 light
|
||||
|
||||
@@ -37,6 +37,10 @@ android {
|
||||
targetCompatibility JavaVersion.VERSION_1_8
|
||||
}
|
||||
|
||||
lintOptions {
|
||||
abortOnError false
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
dependencies {
|
||||
|
||||
@@ -165,6 +165,12 @@ object CallerHmiManager {
|
||||
hmiProviderApi?.dismissDispatchDialog()
|
||||
}
|
||||
|
||||
/**
|
||||
* 云调度重启自驾弹窗
|
||||
*/
|
||||
fun showDispatchRestartDialog(msgData: DispatchAdasAutoPilotLocReceiverBean){
|
||||
hmiProviderApi?.showDispatchRestartDialog(msgData)
|
||||
}
|
||||
|
||||
fun showVideoDialog(infList: List<Infrastructure>) {
|
||||
hmiProviderApi?.showVideoDialog(infList)
|
||||
|
||||
@@ -2,6 +2,7 @@ package com.mogo.eagle.core.function.call.map
|
||||
|
||||
import android.content.Context
|
||||
import com.mogo.eagle.core.data.constants.MogoServicePaths
|
||||
import com.mogo.eagle.core.data.map.MogoLocation
|
||||
import com.mogo.eagle.core.function.api.map.IMogoMapService
|
||||
import com.mogo.eagle.core.function.api.map.marker.IMogoMarkerService
|
||||
import com.mogo.eagle.core.function.call.base.CallerBase
|
||||
@@ -35,6 +36,10 @@ object CallerMapUIServiceManager {
|
||||
serviceProvider?.mapUIController?.cacheHDDataByCity(listener)
|
||||
}
|
||||
|
||||
fun cacheHDDataByCityByLonLat(listener: IHdCacheListener, location: MogoLocation) {
|
||||
serviceProvider?.mapUIController?.cacheHDDataByCity(listener, location)
|
||||
}
|
||||
|
||||
fun isCityDataCached(): Boolean {
|
||||
return serviceProvider?.mapUIController?.isCityDataCached ?: false
|
||||
}
|
||||
@@ -50,4 +55,8 @@ object CallerMapUIServiceManager {
|
||||
fun cancelDownloadCacheData() {
|
||||
serviceProvider?.mapUIController?.cancelDownloadCacheData()
|
||||
}
|
||||
|
||||
fun getCityCode(): String? {
|
||||
return serviceProvider?.mapUIController?.cityCode
|
||||
}
|
||||
}
|
||||
@@ -38,6 +38,10 @@ android {
|
||||
targetCompatibility JavaVersion.VERSION_1_8
|
||||
}
|
||||
|
||||
lintOptions {
|
||||
abortOnError false
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
dependencies {
|
||||
|
||||
@@ -38,6 +38,10 @@ android {
|
||||
targetCompatibility JavaVersion.VERSION_1_8
|
||||
}
|
||||
|
||||
lintOptions {
|
||||
abortOnError false
|
||||
}
|
||||
|
||||
sourceSets {
|
||||
main {
|
||||
res.srcDirs = [
|
||||
|
||||
Binary file not shown.
BIN
core/mogo-core-res/src/main/res/raw/cuzuche.nt3d
Normal file
BIN
core/mogo-core-res/src/main/res/raw/cuzuche.nt3d
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
core/mogo-core-res/src/main/res/raw/m1.nt3d
Normal file
BIN
core/mogo-core-res/src/main/res/raw/m1.nt3d
Normal file
Binary file not shown.
Binary file not shown.
@@ -46,6 +46,10 @@ android {
|
||||
kapt.includeCompileClasspath = false
|
||||
|
||||
|
||||
lintOptions {
|
||||
abortOnError false
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
dependencies {
|
||||
|
||||
@@ -2,11 +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
|
||||
isSweeper(appIdentityMode) -> 6
|
||||
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
|
||||
}
|
||||
}
|
||||
@@ -109,6 +117,16 @@ object AppIdentityModeUtils {
|
||||
}
|
||||
return false
|
||||
}
|
||||
/**
|
||||
* 是否是 接驳车(这里不细分具体是:司机、乘客等类型)
|
||||
*
|
||||
* @param appIdentityMode productFlavors 配置的类型
|
||||
* @return true - 是小巴车端 false - 不是小巴车端
|
||||
*/
|
||||
@JvmStatic
|
||||
fun isShuttlePassenger(appIdentityMode: String): Boolean {
|
||||
return isShuttle(appIdentityMode) && isPassenger(appIdentityMode)
|
||||
}
|
||||
@JvmStatic
|
||||
fun isM2(appIdentityMode: String): Boolean {
|
||||
val (_, _, model) = getInfo(appIdentityMode)
|
||||
|
||||
@@ -53,6 +53,18 @@ public final class ThreadUtils {
|
||||
|
||||
private static Executor sDeliver;
|
||||
|
||||
public enum MODE {
|
||||
/**
|
||||
* 多次post同一个Runnable对象,只会执行最后一次
|
||||
*/
|
||||
LATEST,
|
||||
|
||||
/**
|
||||
* 多次post,在主线程消息队列中排队执行
|
||||
*/
|
||||
QUEUE
|
||||
}
|
||||
|
||||
/**
|
||||
* Return whether the thread is the main thread.
|
||||
*
|
||||
@@ -63,23 +75,40 @@ public final class ThreadUtils {
|
||||
}
|
||||
|
||||
public static void runOnUiThread(final Runnable r) {
|
||||
runOnUiThread(r, MODE.LATEST);
|
||||
}
|
||||
|
||||
public static void runOnUiThread(final Runnable r, MODE mode) {
|
||||
if (Looper.myLooper() == Looper.getMainLooper()) {
|
||||
r.run();
|
||||
} else {
|
||||
int what = ObjectHashCodeUtils.getHashCodeIfNeed(r);
|
||||
HANDLER.removeMessages(what);
|
||||
Message msg = Message.obtain(HANDLER, r);
|
||||
msg.what = what;
|
||||
HANDLER.sendMessage(msg);
|
||||
if (mode == MODE.LATEST) {
|
||||
int what = ObjectHashCodeUtils.getHashCodeIfNeed(r);
|
||||
HANDLER.removeMessages(what);
|
||||
Message msg = Message.obtain(HANDLER, r);
|
||||
msg.what = what;
|
||||
HANDLER.sendMessage(msg);
|
||||
} else {
|
||||
HANDLER.post(r);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static void runOnUiThreadDelayed(final Runnable r, long delayMillis) {
|
||||
int what = ObjectHashCodeUtils.getHashCodeIfNeed(r);
|
||||
HANDLER.removeMessages(what);
|
||||
Message msg = Message.obtain(HANDLER, r);
|
||||
msg.what = what;
|
||||
HANDLER.sendMessageDelayed(msg, delayMillis);
|
||||
runOnUiThreadDelayed(r, delayMillis, MODE.LATEST);
|
||||
}
|
||||
|
||||
public static void runOnUiThreadDelayed(final Runnable r, long delayMillis, MODE mode) {
|
||||
if (mode == MODE.LATEST) {
|
||||
int what = ObjectHashCodeUtils.getHashCodeIfNeed(r);
|
||||
HANDLER.removeMessages(what);
|
||||
Message msg = Message.obtain(HANDLER, r);
|
||||
msg.what = what;
|
||||
HANDLER.sendMessageDelayed(msg, delayMillis);
|
||||
} else {
|
||||
HANDLER.postDelayed(r, delayMillis);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -10,24 +10,58 @@ public class UiThreadHandler {
|
||||
|
||||
private UiThreadHandler() { }
|
||||
|
||||
public enum MODE {
|
||||
/**
|
||||
* 多次post同一个Runnable对象,只会执行最后一次
|
||||
*/
|
||||
LATEST,
|
||||
|
||||
/**
|
||||
* 多次post,在主线程消息队列中排队执行
|
||||
*/
|
||||
QUEUE
|
||||
}
|
||||
|
||||
public static boolean post( Runnable r ) {
|
||||
int what = ObjectHashCodeUtils.getHashCodeIfNeed(r);
|
||||
sUiHandler.removeMessages(what);
|
||||
Message msg = Message.obtain(sUiHandler, r);
|
||||
msg.what = what;
|
||||
return sUiHandler.sendMessage(msg);
|
||||
return post(r, MODE.LATEST);
|
||||
}
|
||||
|
||||
public static boolean post(Runnable r, MODE mode) {
|
||||
if (mode == MODE.LATEST) {
|
||||
int what = ObjectHashCodeUtils.getHashCodeIfNeed(r);
|
||||
sUiHandler.removeMessages(what);
|
||||
Message msg = Message.obtain(sUiHandler, r);
|
||||
msg.what = what;
|
||||
return sUiHandler.sendMessage(msg);
|
||||
}
|
||||
return sUiHandler.post(r);
|
||||
}
|
||||
|
||||
public static boolean postDelayed( Runnable r, long delayMillis ) {
|
||||
int what = ObjectHashCodeUtils.getHashCodeIfNeed(r);
|
||||
sUiHandler.removeMessages(what);
|
||||
Message msg = Message.obtain(sUiHandler, r);
|
||||
msg.what = what;
|
||||
return sUiHandler.sendMessageDelayed(msg, delayMillis);
|
||||
return postDelayed(r, delayMillis, MODE.LATEST);
|
||||
}
|
||||
|
||||
public static boolean postDelayed( Runnable r, long delayMillis, MODE mode ) {
|
||||
if (mode == MODE.LATEST) {
|
||||
int what = ObjectHashCodeUtils.getHashCodeIfNeed(r);
|
||||
sUiHandler.removeMessages(what);
|
||||
Message msg = Message.obtain(sUiHandler, r);
|
||||
msg.what = what;
|
||||
return sUiHandler.sendMessageDelayed(msg, delayMillis);
|
||||
}
|
||||
return sUiHandler.postDelayed(r, delayMillis);
|
||||
}
|
||||
|
||||
public static void removeCallbacks( Runnable r ) {
|
||||
int what = ObjectHashCodeUtils.getHashCodeIfNeed(r);
|
||||
sUiHandler.removeMessages(what);
|
||||
removeCallbacks(r, MODE.LATEST);
|
||||
}
|
||||
|
||||
public static void removeCallbacks( Runnable r, MODE mode ) {
|
||||
if (mode == MODE.LATEST) {
|
||||
int what = ObjectHashCodeUtils.getHashCodeIfNeed(r);
|
||||
sUiHandler.removeMessages(what);
|
||||
} else {
|
||||
sUiHandler.removeCallbacks(r);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user