Merge branch 'dev_arch_opt_3.0' of gitlab.zhidaoauto.com:zhjt/AndroidApp/MoGoEagleEye into dev_arch_opt_3.0
This commit is contained in:
@@ -10,7 +10,7 @@ import com.mogo.eagle.function.biz.dispatch.DispatchAutoPilotManager.Companion.d
|
||||
import com.mogo.eagle.function.biz.monitoring.CronTaskManager.Companion.cronTaskManager
|
||||
import com.mogo.eagle.function.biz.notice.NoticeSocketManager.Companion.noticeSocketManager
|
||||
import com.mogo.eagle.function.biz.notice.network.NoticeNetWorkManager
|
||||
import com.mogo.eagle.function.biz.v2x.speedlimit.SpeedLimitDataManager
|
||||
import com.mogo.eagle.function.biz.v2x.speedlimit.SpeedLimitDispatcher
|
||||
import com.mogo.eagle.function.biz.v2x.trafficlight.core.MogoTrafficLightManager
|
||||
import com.mogo.eagle.function.biz.v2x.trafficlight.core.TrafficLightDispatcher
|
||||
import com.mogo.eagle.function.biz.v2x.vip.VipCarManager
|
||||
@@ -27,9 +27,9 @@ class FuncBizProvider : IMoGoFuncBizProvider {
|
||||
cronTaskManager.startCronTask()
|
||||
|
||||
MogoTrafficLightManager.INSTANCE.initServer(context)
|
||||
TrafficLightDispatcher.INSTANCE.initServer(context) //todo 红绿灯中心模块放入dataCenter
|
||||
VipCarManager.INSTANCE.initServer(context)
|
||||
SpeedLimitDataManager.getInstance().start()
|
||||
TrafficLightDispatcher.INSTANCE.initServer(context) //todo 宏宇 放入dataCenter
|
||||
SpeedLimitDispatcher.INSTANCE.initLimit(context) //todo 宏宇,放入dataCenter
|
||||
// RedLightWarningManager.INSTANCE.listenTrafficLight()
|
||||
}
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ import android.util.Log
|
||||
import com.mogo.eagle.core.data.deva.bizconfig.FuncBizConfig.Companion.BIZ_IVP
|
||||
import com.mogo.eagle.core.data.deva.bizconfig.FuncBizConfig.Companion.BIZ_IVP_GREEN
|
||||
import com.mogo.eagle.core.data.deva.bizconfig.FuncBizConfig.Companion.V2I
|
||||
import com.mogo.eagle.core.data.enums.EventTypeEnum
|
||||
import com.mogo.eagle.core.data.enums.EventTypeEnumNew
|
||||
import com.mogo.eagle.core.data.map.MogoLatLng
|
||||
import com.mogo.eagle.core.data.msgbox.MsgBoxBean
|
||||
import com.mogo.eagle.core.data.msgbox.MsgBoxType
|
||||
@@ -209,17 +209,17 @@ class RedLightWarningManager : IMoGoTrafficLightListener, IMoGoVipSetListener,
|
||||
MsgBoxBean(
|
||||
MsgBoxType.V2X,
|
||||
V2XMsg(
|
||||
EventTypeEnum.TYPE_USECASE_ID_IVP.poiType,
|
||||
EventTypeEnum.TYPE_USECASE_ID_IVP.content,
|
||||
EventTypeEnum.TYPE_USECASE_ID_IVP.tts
|
||||
EventTypeEnumNew.TYPE_USECASE_ID_IVP_RED.poiType,
|
||||
EventTypeEnumNew.TYPE_USECASE_ID_IVP_RED.content,
|
||||
EventTypeEnumNew.TYPE_USECASE_ID_IVP_RED.tts
|
||||
)
|
||||
)
|
||||
)
|
||||
CallerHmiManager.warningV2X(
|
||||
EventTypeEnum.TYPE_USECASE_ID_IVP.poiType,
|
||||
EventTypeEnum.TYPE_USECASE_ID_IVP.content,
|
||||
EventTypeEnum.TYPE_USECASE_ID_IVP.tts,
|
||||
EventTypeEnum.TYPE_USECASE_ID_IVP.poiType,
|
||||
EventTypeEnumNew.TYPE_USECASE_ID_IVP_RED.poiType,
|
||||
EventTypeEnumNew.TYPE_USECASE_ID_IVP_RED.content,
|
||||
EventTypeEnumNew.TYPE_USECASE_ID_IVP_RED.tts,
|
||||
EventTypeEnumNew.TYPE_USECASE_ID_IVP_RED.poiType,
|
||||
null,
|
||||
true,
|
||||
5000L
|
||||
@@ -235,11 +235,11 @@ class RedLightWarningManager : IMoGoTrafficLightListener, IMoGoVipSetListener,
|
||||
CallerLogger.d("$M_V2X$TAG", "=====绿灯通行预警=====")
|
||||
ThreadUtils.runOnUiThread {
|
||||
val content = String.format(
|
||||
EventTypeEnum.getWarningContent(EventTypeEnum.TYPE_USECASE_ID_IVP_GREEN.poiType),
|
||||
EventTypeEnumNew.getWarningContent(EventTypeEnumNew.TYPE_USECASE_ID_IVP_GREEN.poiType),
|
||||
speed
|
||||
)
|
||||
val tts = String.format(
|
||||
EventTypeEnum.getWarningTts(EventTypeEnum.TYPE_USECASE_ID_IVP_GREEN.poiType),
|
||||
EventTypeEnumNew.getWarningTts(EventTypeEnumNew.TYPE_USECASE_ID_IVP_GREEN.poiType),
|
||||
speed
|
||||
)
|
||||
if (content.isNullOrEmpty() || tts.isNullOrEmpty()) {
|
||||
@@ -249,17 +249,17 @@ class RedLightWarningManager : IMoGoTrafficLightListener, IMoGoVipSetListener,
|
||||
MsgBoxBean(
|
||||
MsgBoxType.V2X,
|
||||
V2XMsg(
|
||||
EventTypeEnum.TYPE_USECASE_ID_IVP_GREEN.poiType,
|
||||
EventTypeEnumNew.TYPE_USECASE_ID_IVP_GREEN.poiType,
|
||||
content,
|
||||
tts
|
||||
)
|
||||
)
|
||||
)
|
||||
CallerHmiManager.warningV2X(
|
||||
EventTypeEnum.TYPE_USECASE_ID_IVP_GREEN.poiType,
|
||||
EventTypeEnumNew.TYPE_USECASE_ID_IVP_GREEN.poiType,
|
||||
content,
|
||||
tts,
|
||||
EventTypeEnum.TYPE_USECASE_ID_IVP_GREEN.poiType,
|
||||
EventTypeEnumNew.TYPE_USECASE_ID_IVP_GREEN.poiType,
|
||||
null,
|
||||
true,
|
||||
5000L
|
||||
|
||||
@@ -0,0 +1,64 @@
|
||||
package com.mogo.eagle.function.biz.v2x.speedlimit
|
||||
|
||||
import android.content.Context
|
||||
import com.mogo.eagle.core.data.deva.bizconfig.FuncBizConfig
|
||||
import com.mogo.eagle.core.data.enums.DataSourceType
|
||||
import com.mogo.eagle.core.function.api.v2x.ILimitingVelocityListener
|
||||
import com.mogo.eagle.core.function.call.v2x.CallerLimitingVelocityListenerManager
|
||||
import com.mogo.eagle.core.function.call.v2x.CallerViewLimitingVelocityListenerManager
|
||||
import com.zhjt.service_biz.BizConfig
|
||||
|
||||
/**
|
||||
* @author lixiaopeng
|
||||
* @description 对多个限速进行调度(map,rsu ...)
|
||||
* @since: 2023/1/12
|
||||
*/
|
||||
class SpeedLimitDispatcher : ILimitingVelocityListener {
|
||||
companion object {
|
||||
const val TAG = "SpeedLimitDispatcher"
|
||||
val INSTANCE: SpeedLimitDispatcher by lazy(mode = LazyThreadSafetyMode.SYNCHRONIZED) {
|
||||
SpeedLimitDispatcher()
|
||||
}
|
||||
}
|
||||
|
||||
private var mContext: Context? = null
|
||||
|
||||
//obu限速状态
|
||||
private var hasObuStatus: Boolean = false
|
||||
|
||||
fun initLimit(context: Context) {
|
||||
mContext = context
|
||||
CallerLimitingVelocityListenerManager.addListener(TAG, this)
|
||||
}
|
||||
|
||||
/**
|
||||
* 地图限速数据
|
||||
*/
|
||||
// @BizConfig(FuncBizConfig.V2I, "", FuncBizConfig.BIZ_SLW) //todo arrow 重新考虑放的位置
|
||||
override fun onLimitingVelocityChange(limitingVelocity: Int, sourceType: DataSourceType) {
|
||||
when (sourceType) { // obu 优先级高于 map,体现链路能力
|
||||
DataSourceType.OBU -> {
|
||||
hasObuStatus = limitingVelocity > 0
|
||||
CallerViewLimitingVelocityListenerManager.invokeOnLimitingVelocityChange(
|
||||
limitingVelocity,
|
||||
sourceType
|
||||
)
|
||||
return
|
||||
}
|
||||
DataSourceType.MAP -> {
|
||||
if (!hasObuStatus) {
|
||||
CallerViewLimitingVelocityListenerManager.invokeOnLimitingVelocityChange(
|
||||
limitingVelocity,
|
||||
sourceType
|
||||
)
|
||||
}
|
||||
}
|
||||
else -> {}
|
||||
}
|
||||
}
|
||||
|
||||
fun destroy() {
|
||||
CallerLimitingVelocityListenerManager.removeListener(TAG)
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,65 +0,0 @@
|
||||
package com.mogo.eagle.function.biz.v2x.trafficlight
|
||||
|
||||
import com.mogo.eagle.core.data.trafficlight.*
|
||||
import com.mogo.eagle.core.function.call.hmi.CallerHmiManager
|
||||
|
||||
class TrafficLightHMIManager {
|
||||
|
||||
companion object {
|
||||
const val TAG = "TrafficLightHMIManager"
|
||||
|
||||
val INSTANCE: TrafficLightHMIManager by lazy(mode = LazyThreadSafetyMode.SYNCHRONIZED) {
|
||||
TrafficLightHMIManager()
|
||||
}
|
||||
}
|
||||
|
||||
private var initView: Boolean = false
|
||||
|
||||
fun isWarningTrafficLightShow(): Boolean {
|
||||
return CallerHmiManager.isWarningTrafficLightShow()
|
||||
}
|
||||
|
||||
fun updateTrafficLight(trafficLightResult: TrafficLightResult) {
|
||||
val currentTrafficLight = trafficLightResult.currentRoadTrafficLight()
|
||||
currentTrafficLight?.let {
|
||||
if (!initView) {
|
||||
initView = true
|
||||
CallerHmiManager.showWarningTrafficLight(0,1)
|
||||
}
|
||||
callerHMIToChangeLight(it)
|
||||
}
|
||||
}
|
||||
|
||||
private fun callerHMIToChangeLight(trafficLightStatus: TrafficLightStatus) {
|
||||
val remain = if (trafficLightStatus.remain > 99) {
|
||||
99
|
||||
} else {
|
||||
trafficLightStatus.remain
|
||||
}
|
||||
when {
|
||||
trafficLightStatus.isGreen() || trafficLightStatus.isFlashGreen() -> {
|
||||
CallerHmiManager.showWarningTrafficLight(3,1)
|
||||
CallerHmiManager.changeCountdownGreen(remain)
|
||||
// CallerHmiManager.changeCountdownRed(-1)
|
||||
// CallerHmiManager.changeCountdownYellow(-1)
|
||||
}
|
||||
trafficLightStatus.isYellow() -> {
|
||||
CallerHmiManager.showWarningTrafficLight(2,1)
|
||||
CallerHmiManager.changeCountdownYellow(remain)
|
||||
// CallerHmiManager.changeCountdownGreen(-1)
|
||||
// CallerHmiManager.changeCountdownRed(-1)
|
||||
}
|
||||
trafficLightStatus.isRed() -> {
|
||||
CallerHmiManager.showWarningTrafficLight(1,1)
|
||||
CallerHmiManager.changeCountdownRed(remain)
|
||||
// CallerHmiManager.changeCountdownGreen(-1)
|
||||
// CallerHmiManager.changeCountdownYellow(-1)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fun hideTrafficLight() {
|
||||
initView = false
|
||||
CallerHmiManager.disableWarningTrafficLight()
|
||||
}
|
||||
}
|
||||
@@ -8,14 +8,13 @@ import com.mogo.eagle.core.function.api.autopilot.IMoGoChassisLocationGCJ02Liste
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationGCJ20ListenerManager
|
||||
import com.mogo.eagle.core.function.call.map.CallerMapUIServiceManager
|
||||
import com.mogo.eagle.core.function.call.trafficlight.CallerTrafficLightListenerManager
|
||||
import com.mogo.eagle.function.biz.v2x.trafficlight.TrafficLightHMIManager
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_V2X
|
||||
import com.mogo.eagle.function.biz.v2x.trafficlight.core.TrafficLightThreadHandler.Companion.MSG_WHAT_LOOP_SEARCH_CROSS_ROAD
|
||||
import com.mogo.eagle.function.biz.v2x.trafficlight.core.TrafficLightThreadHandler.Companion.MSG_WHAT_LOOP_SEARCH_TRAFFIC_LIGHT
|
||||
import com.mogo.eagle.function.biz.v2x.trafficlight.core.TrafficLightThreadHandler.Companion.MSG_WHAT_STOP_SEARCH_CROSS_ROAD
|
||||
import com.mogo.eagle.function.biz.v2x.trafficlight.core.TrafficLightThreadHandler.Companion.MSG_WHAT_STOP_SEARCH_TRAFFIC_LIGHT
|
||||
import com.mogo.eagle.function.biz.v2x.trafficlight.network.TrafficLightNetWorkModel
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_V2X
|
||||
import mogo.telematics.pad.MessagePad
|
||||
|
||||
class MogoTrafficLightManager : IMoGoChassisLocationGCJ02Listener {
|
||||
@@ -46,9 +45,8 @@ class MogoTrafficLightManager : IMoGoChassisLocationGCJ02Listener {
|
||||
mThreadHandler =
|
||||
TrafficLightThreadHandler(Looper.getMainLooper(), {
|
||||
//第一次查询路口时,如果红绿灯显示,则隐藏掉
|
||||
if (firstLoopCrossRoad && TrafficLightHMIManager.INSTANCE.isWarningTrafficLightShow()) {
|
||||
TrafficLightHMIManager.INSTANCE.hideTrafficLight()
|
||||
CallerTrafficLightListenerManager.resetTrafficLightData()
|
||||
if (firstLoopCrossRoad) {
|
||||
CallerTrafficLightListenerManager.resetTrafficLightStatus()
|
||||
}
|
||||
firstLoopCrossRoad = false
|
||||
mLocation?.let { it ->
|
||||
@@ -98,10 +96,7 @@ class MogoTrafficLightManager : IMoGoChassisLocationGCJ02Listener {
|
||||
2_000L
|
||||
)
|
||||
}
|
||||
if (TrafficLightHMIManager.INSTANCE.isWarningTrafficLightShow()) {
|
||||
TrafficLightHMIManager.INSTANCE.hideTrafficLight()
|
||||
CallerTrafficLightListenerManager.resetTrafficLightData()
|
||||
}
|
||||
CallerTrafficLightListenerManager.resetTrafficLightStatus()
|
||||
CallerTrafficLightListenerManager.invokeTrafficRequestError()
|
||||
|
||||
})
|
||||
@@ -137,8 +132,7 @@ class MogoTrafficLightManager : IMoGoChassisLocationGCJ02Listener {
|
||||
trafficLightResult = null
|
||||
firstLoopCrossRoad = true
|
||||
mThreadHandler?.sendEmptyMessage(MSG_WHAT_STOP_SEARCH_TRAFFIC_LIGHT)
|
||||
TrafficLightHMIManager.INSTANCE.hideTrafficLight()
|
||||
CallerTrafficLightListenerManager.resetTrafficLightData()
|
||||
CallerTrafficLightListenerManager.resetTrafficLightStatus()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,38 +2,43 @@ package com.mogo.eagle.function.biz.v2x.trafficlight.core
|
||||
|
||||
import android.content.Context
|
||||
import android.os.Handler
|
||||
import com.mogo.eagle.core.data.trafficlight.TrafficLightResult
|
||||
import com.mogo.eagle.core.data.enums.DataSourceType
|
||||
import com.mogo.eagle.core.data.enums.TrafficLightEnum
|
||||
import com.mogo.eagle.core.data.trafficlight.*
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotIdentifyListener
|
||||
import com.mogo.eagle.core.function.api.trafficlight.IMoGoTrafficLightListener
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotIdentifyListenerManager
|
||||
import com.mogo.eagle.core.function.call.hmi.CallerHmiManager
|
||||
import com.mogo.eagle.core.function.call.trafficlight.CallerTrafficLightListenerManager
|
||||
import com.mogo.eagle.function.biz.v2x.trafficlight.TrafficLightHMIManager
|
||||
import perception.TrafficLightOuterClass
|
||||
import perception.TrafficLightOuterClass.TrafficLight
|
||||
|
||||
/**
|
||||
* @author XuXinChao
|
||||
* @description 对多个红绿灯信号来源进行统一调度(AI云、工控机)
|
||||
* @description 对多个红绿灯信号来源进行统一调度(AI云、工控机、OBU)
|
||||
* @优先级:OBU,云,工控
|
||||
* @since: 2022/4/28
|
||||
*/
|
||||
class TrafficLightDispatcher : IMoGoAutopilotIdentifyListener , IMoGoTrafficLightListener {
|
||||
class TrafficLightDispatcher : IMoGoAutopilotIdentifyListener, IMoGoTrafficLightListener {
|
||||
|
||||
companion object{
|
||||
companion object {
|
||||
const val TAG = "TrafficLightDispatcher"
|
||||
val INSTANCE: TrafficLightDispatcher by lazy(mode = LazyThreadSafetyMode.SYNCHRONIZED){
|
||||
val INSTANCE: TrafficLightDispatcher by lazy(mode = LazyThreadSafetyMode.SYNCHRONIZED) {
|
||||
TrafficLightDispatcher()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private var mContext: Context? = null
|
||||
|
||||
//是否有AI获取红绿灯灯态
|
||||
private var hasAiLightStatus: Boolean = false
|
||||
|
||||
fun initServer(context: Context){
|
||||
//obu数据
|
||||
private var hasObuLightStatus: Boolean = false
|
||||
|
||||
fun initServer(context: Context) {
|
||||
mContext = context
|
||||
//注册监听AI云获取红绿灯状态,注册监听AI云进入路口,注册监听红绿灯请求失败
|
||||
//注册监听AI云获取红绿灯状态
|
||||
CallerTrafficLightListenerManager.addListener(TAG, this)
|
||||
//注册监听工控机感知红绿灯
|
||||
CallerAutopilotIdentifyListenerManager.addListener(TAG, this)
|
||||
@@ -44,46 +49,57 @@ class TrafficLightDispatcher : IMoGoAutopilotIdentifyListener , IMoGoTrafficLigh
|
||||
* @param trafficLights 感知红绿灯
|
||||
*/
|
||||
override fun onAutopilotPerceptionTrafficLight(trafficLights: TrafficLightOuterClass.TrafficLights?) {
|
||||
if(!hasAiLightStatus){
|
||||
trafficLights?.let { it ->
|
||||
var light :TrafficLight?= null
|
||||
if(it.hasStraight()){
|
||||
light = it.straight
|
||||
}else if(it.hasLeft()){
|
||||
light = it.left
|
||||
}else if(it.hasRight()){
|
||||
light = it.right
|
||||
}else if(it.hasUTurn()){
|
||||
light = it.uTurn
|
||||
}
|
||||
if(light == null){
|
||||
//隐藏红绿灯显示
|
||||
TrafficLightHMIManager.INSTANCE.hideTrafficLight()
|
||||
}else{
|
||||
when (light.state) {
|
||||
TrafficLightOuterClass.LightState.STATE_RED -> {
|
||||
//红灯
|
||||
CallerHmiManager.showWarningTrafficLight(1,2)
|
||||
CallerHmiManager.changeCountdownGreen(0)
|
||||
}
|
||||
TrafficLightOuterClass.LightState.STATE_YELLOW -> {
|
||||
//黄灯
|
||||
CallerHmiManager.showWarningTrafficLight(2,2)
|
||||
CallerHmiManager.changeCountdownGreen(0)
|
||||
}
|
||||
TrafficLightOuterClass.LightState.STATE_GREEN -> {
|
||||
//绿灯
|
||||
CallerHmiManager.showWarningTrafficLight(3,2)
|
||||
CallerHmiManager.changeCountdownGreen(0)
|
||||
}
|
||||
TrafficLightOuterClass.LightState.STATE_OFF -> {
|
||||
//黑灯,隐藏红绿灯显示
|
||||
TrafficLightHMIManager.INSTANCE.hideTrafficLight()
|
||||
}
|
||||
else -> {}
|
||||
if (!hasObuLightStatus) {
|
||||
if (!hasAiLightStatus) {
|
||||
trafficLights?.let { it ->
|
||||
var light: TrafficLight? = null
|
||||
if (it.hasStraight()) {
|
||||
light = it.straight
|
||||
} else if (it.hasLeft()) {
|
||||
light = it.left
|
||||
} else if (it.hasRight()) {
|
||||
light = it.right
|
||||
} else if (it.hasUTurn()) {
|
||||
light = it.uTurn
|
||||
}
|
||||
if (light == null) {
|
||||
//隐藏红绿灯显示
|
||||
CallerTrafficLightListenerManager.disableTrafficLight()
|
||||
} else {
|
||||
when (light.state) {
|
||||
TrafficLightOuterClass.LightState.STATE_RED -> {
|
||||
//红灯
|
||||
CallerTrafficLightListenerManager.showTrafficLight(
|
||||
TrafficLightEnum.RED,
|
||||
DataSourceType.TELEMATIC
|
||||
)
|
||||
CallerTrafficLightListenerManager.changeCountdownRed(0)
|
||||
}
|
||||
TrafficLightOuterClass.LightState.STATE_YELLOW -> {
|
||||
//黄灯
|
||||
CallerTrafficLightListenerManager.showTrafficLight(
|
||||
TrafficLightEnum.YELLOW,
|
||||
DataSourceType.TELEMATIC
|
||||
)
|
||||
CallerTrafficLightListenerManager.changeCountdownYellow(0)
|
||||
}
|
||||
TrafficLightOuterClass.LightState.STATE_GREEN -> {
|
||||
//绿灯
|
||||
CallerTrafficLightListenerManager.showTrafficLight(
|
||||
TrafficLightEnum.GREEN,
|
||||
DataSourceType.TELEMATIC
|
||||
)
|
||||
CallerTrafficLightListenerManager.changeCountdownGreen(0)
|
||||
}
|
||||
TrafficLightOuterClass.LightState.STATE_OFF -> {
|
||||
//黑灯,隐藏红绿灯显示
|
||||
CallerTrafficLightListenerManager.disableTrafficLight()
|
||||
}
|
||||
else -> {}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -92,21 +108,25 @@ class TrafficLightDispatcher : IMoGoAutopilotIdentifyListener , IMoGoTrafficLigh
|
||||
* AI云获取红绿灯状态
|
||||
*/
|
||||
override fun onTrafficLightStatus(trafficLightResult: TrafficLightResult) {
|
||||
TrafficLightHMIManager.INSTANCE.updateTrafficLight(trafficLightResult)
|
||||
hasAiLightStatus = true
|
||||
if (!hasObuLightStatus) {
|
||||
updateTrafficLight(trafficLightResult)
|
||||
hasAiLightStatus = true
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 车辆进入路口
|
||||
* 车辆进入路口回调
|
||||
* @param enter true:进入路口;false:离开路口
|
||||
*/
|
||||
override fun onEnterCrossRoad(enter: Boolean) {
|
||||
if(!enter){
|
||||
if (!enter) {
|
||||
Handler().postDelayed({
|
||||
hasAiLightStatus = false
|
||||
hasObuLightStatus = false
|
||||
}, 5000)
|
||||
//如果没有OBU灯态则进行隐藏,如果有OBU灯态,则交由OBU管理
|
||||
CallerTrafficLightListenerManager.resetTrafficLightStatus(!hasObuLightStatus)
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -114,11 +134,45 @@ class TrafficLightDispatcher : IMoGoAutopilotIdentifyListener , IMoGoTrafficLigh
|
||||
*/
|
||||
override fun onTrafficRequestError() {
|
||||
hasAiLightStatus = false
|
||||
CallerTrafficLightListenerManager.resetTrafficLightStatus(!hasObuLightStatus)
|
||||
}
|
||||
|
||||
/**
|
||||
* obu 红绿灯数据
|
||||
*/
|
||||
override fun onObuTrafficLightStatus(light: TrafficLightEnum) {
|
||||
super.onObuTrafficLightStatus(light)
|
||||
hasObuLightStatus = true
|
||||
CallerTrafficLightListenerManager.showTrafficLight(light, DataSourceType.OBU)
|
||||
}
|
||||
|
||||
fun destroy(){
|
||||
//取消注册监听AI云获取红绿灯状态,取消注册监听红绿灯请求失败,取消注册监听AI云进入路口
|
||||
private fun updateTrafficLight(trafficLightResult: TrafficLightResult) {
|
||||
val currentTrafficLight = trafficLightResult.currentRoadTrafficLight()
|
||||
currentTrafficLight?.let {
|
||||
val remain = if (it.remain > 99) {
|
||||
99
|
||||
} else {
|
||||
it.remain
|
||||
}
|
||||
when {
|
||||
it.isGreen() || it.isFlashGreen() -> {
|
||||
CallerTrafficLightListenerManager.showTrafficLight(TrafficLightEnum.GREEN, DataSourceType.AICLOUD)
|
||||
CallerTrafficLightListenerManager.changeCountdownGreen(remain)
|
||||
}
|
||||
it.isYellow() -> {
|
||||
CallerTrafficLightListenerManager.showTrafficLight(TrafficLightEnum.YELLOW, DataSourceType.AICLOUD)
|
||||
CallerTrafficLightListenerManager.changeCountdownYellow(remain)
|
||||
}
|
||||
it.isRed() -> {
|
||||
CallerTrafficLightListenerManager.showTrafficLight(TrafficLightEnum.RED, DataSourceType.AICLOUD)
|
||||
CallerTrafficLightListenerManager.changeCountdownRed(remain)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fun destroy() {
|
||||
//取消注册监听AI云获取红绿灯状态
|
||||
CallerTrafficLightListenerManager.removeListener(TAG)
|
||||
//取消注册监听工控机感知红绿灯
|
||||
CallerAutopilotIdentifyListenerManager.removeListener(TAG)
|
||||
|
||||
@@ -10,7 +10,7 @@ import com.mogo.aicloud.services.socket.MogoAiCloudSocketManager
|
||||
import com.mogo.cloud.passport.MoGoAiCloudClientConfig
|
||||
import com.mogo.eagle.core.data.deva.bizconfig.FuncBizConfig.Companion.BIZ_VIP
|
||||
import com.mogo.eagle.core.data.deva.bizconfig.FuncBizConfig.Companion.V2N
|
||||
import com.mogo.eagle.core.data.enums.EventTypeEnum
|
||||
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
|
||||
@@ -209,17 +209,17 @@ class VipCarManager : IMogoOnMessageListener<VipMessage>, IMoGoTrafficLightListe
|
||||
val light = this.result?.currentRoadTrafficLight()
|
||||
if (light != null && light.isGreen()) {
|
||||
showWarning(
|
||||
EventTypeEnum.TYPE_VIP_IDENTIFICATION_EXTEND.poiType,
|
||||
EventTypeEnum.TYPE_VIP_IDENTIFICATION_EXTEND.content,
|
||||
EventTypeEnum.TYPE_VIP_IDENTIFICATION_EXTEND.tts,
|
||||
EventTypeEnum.TYPE_VIP_IDENTIFICATION_EXTEND.poiType
|
||||
EventTypeEnumNew.TYPE_VIP_IDENTIFICATION_EXTEND.poiType,
|
||||
EventTypeEnumNew.TYPE_VIP_IDENTIFICATION_EXTEND.content,
|
||||
EventTypeEnumNew.TYPE_VIP_IDENTIFICATION_EXTEND.tts,
|
||||
EventTypeEnumNew.TYPE_VIP_IDENTIFICATION_EXTEND.poiType
|
||||
)
|
||||
} else {
|
||||
showWarning(
|
||||
EventTypeEnum.TYPE_VIP_IDENTIFICATION_PASS.poiType,
|
||||
EventTypeEnum.TYPE_VIP_IDENTIFICATION_PASS.content,
|
||||
EventTypeEnum.TYPE_VIP_IDENTIFICATION_PASS.tts,
|
||||
EventTypeEnum.TYPE_VIP_IDENTIFICATION_PASS.poiType
|
||||
EventTypeEnumNew.TYPE_VIP_IDENTIFICATION_PASS.poiType,
|
||||
EventTypeEnumNew.TYPE_VIP_IDENTIFICATION_PASS.content,
|
||||
EventTypeEnumNew.TYPE_VIP_IDENTIFICATION_PASS.tts,
|
||||
EventTypeEnumNew.TYPE_VIP_IDENTIFICATION_PASS.poiType
|
||||
)
|
||||
}
|
||||
return@turnLightToGreen
|
||||
@@ -228,10 +228,10 @@ class VipCarManager : IMogoOnMessageListener<VipMessage>, IMoGoTrafficLightListe
|
||||
// 请求变灯失败,根据灯态来提示。 此处灯态未获取到
|
||||
if (this.result == null || this.result?.currentRoadTrafficLight() == null) {
|
||||
showWarning(
|
||||
EventTypeEnum.TYPE_VIP_ERROR_IDENTIFICATION.poiType,
|
||||
EventTypeEnum.TYPE_VIP_ERROR_IDENTIFICATION.content + ", 稍后重试",
|
||||
EventTypeEnum.TYPE_VIP_ERROR_IDENTIFICATION.tts,
|
||||
EventTypeEnum.TYPE_VIP_ERROR_IDENTIFICATION.poiType
|
||||
EventTypeEnumNew.TYPE_VIP_ERROR_IDENTIFICATION.poiType,
|
||||
EventTypeEnumNew.TYPE_VIP_ERROR_IDENTIFICATION.content + ", 稍后重试",
|
||||
EventTypeEnumNew.TYPE_VIP_ERROR_IDENTIFICATION.tts,
|
||||
EventTypeEnumNew.TYPE_VIP_ERROR_IDENTIFICATION.poiType
|
||||
)
|
||||
return@turnLightToGreen
|
||||
}
|
||||
@@ -249,10 +249,10 @@ class VipCarManager : IMogoOnMessageListener<VipMessage>, IMoGoTrafficLightListe
|
||||
"${temp}秒后重试"
|
||||
}
|
||||
showWarning(
|
||||
EventTypeEnum.TYPE_VIP_ERROR_IDENTIFICATION.poiType,
|
||||
EventTypeEnum.TYPE_VIP_ERROR_IDENTIFICATION.content + time,
|
||||
EventTypeEnum.TYPE_VIP_ERROR_IDENTIFICATION.tts,
|
||||
EventTypeEnum.TYPE_VIP_ERROR_IDENTIFICATION.poiType
|
||||
EventTypeEnumNew.TYPE_VIP_ERROR_IDENTIFICATION.poiType,
|
||||
EventTypeEnumNew.TYPE_VIP_ERROR_IDENTIFICATION.content + time,
|
||||
EventTypeEnumNew.TYPE_VIP_ERROR_IDENTIFICATION.tts,
|
||||
EventTypeEnumNew.TYPE_VIP_ERROR_IDENTIFICATION.poiType
|
||||
)
|
||||
} else {
|
||||
CallerLogger.d(
|
||||
|
||||
@@ -54,16 +54,17 @@ dependencies {
|
||||
kapt rootProject.ext.dependencies.androidxroomcompiler
|
||||
implementation rootProject.ext.dependencies.androidxroomktx
|
||||
|
||||
implementation rootProject.ext.dependencies.mogoami
|
||||
implementation rootProject.ext.dependencies.mogoaicloudtelematic
|
||||
|
||||
implementation rootProject.ext.dependencies.mogoobu
|
||||
|
||||
if (Boolean.valueOf(USE_MAVEN_PACKAGE)) {
|
||||
implementation rootProject.ext.dependencies.mogo_core_data
|
||||
implementation rootProject.ext.dependencies.mogo_core_utils
|
||||
implementation rootProject.ext.dependencies.mogo_core_function_call
|
||||
|
||||
implementation project(':libraries:mogo-adas')
|
||||
|
||||
implementation rootProject.ext.dependencies.mogocommons
|
||||
} else {
|
||||
implementation project(':core:mogo-core-data')
|
||||
implementation project(':core:mogo-core-utils')
|
||||
@@ -71,8 +72,6 @@ dependencies {
|
||||
|
||||
implementation project(':libraries:mogo-adas')
|
||||
implementation project(':foudations:mogo-commons')
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,43 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="com.mogo.eagle.core.function.datacenter">
|
||||
|
||||
<application>
|
||||
<receiver android:name=".obu.receiver.ObuTestTriggerReceiver">
|
||||
<intent-filter>
|
||||
<action android:name="com.obu.test_trigger" />
|
||||
|
||||
<category android:name="android.intent.category.DEFAULT" />
|
||||
</intent-filter>
|
||||
</receiver>
|
||||
<receiver android:name=".obu.receiver.ObuTestTriggerRecognizedReceiver">
|
||||
<intent-filter>
|
||||
<action android:name="com.obu.test_trigger_recognized" />
|
||||
|
||||
<category android:name="android.intent.category.DEFAULT" />
|
||||
</intent-filter>
|
||||
</receiver>
|
||||
|
||||
<receiver android:name=".obu.receiver.ObuRsuTestTriggerReceiver">
|
||||
<intent-filter>
|
||||
<action android:name="com.obu.test_light_recognized" />
|
||||
<category android:name="android.intent.category.DEFAULT" />
|
||||
</intent-filter>
|
||||
</receiver>
|
||||
|
||||
<receiver android:name=".obu.receiver.ObuTestNewObuReceiver">
|
||||
<intent-filter>
|
||||
<action android:name="com.obu.test_newobu" />
|
||||
<category android:name="android.intent.category.DEFAULT" />
|
||||
</intent-filter>
|
||||
</receiver>
|
||||
|
||||
<receiver android:name=".obu.receiver.ObuTestNewObuRsiReceiver">
|
||||
<intent-filter>
|
||||
<action android:name="com.obu.test_newobu_rsi" />
|
||||
<category android:name="android.intent.category.DEFAULT" />
|
||||
</intent-filter>
|
||||
</receiver>
|
||||
|
||||
</application>
|
||||
</manifest>
|
||||
@@ -0,0 +1,21 @@
|
||||
package com.mogo.eagle.core.function
|
||||
|
||||
import android.content.Context
|
||||
import com.alibaba.android.arouter.facade.annotation.Route
|
||||
import com.mogo.eagle.core.data.constants.MogoServicePaths
|
||||
import com.mogo.eagle.core.function.api.datacenter.IDataCenterProvider
|
||||
|
||||
@Route(path = MogoServicePaths.PATH_DATA_CENTER_MODULE)
|
||||
class DataCenterProvider: IDataCenterProvider {
|
||||
|
||||
override val functionName: String
|
||||
get() = "DataCenterProvider"
|
||||
|
||||
override fun init(context: Context?) {
|
||||
|
||||
}
|
||||
|
||||
override fun onDestroy() {
|
||||
|
||||
}
|
||||
}
|
||||
@@ -62,9 +62,9 @@ import java.util.concurrent.TimeUnit
|
||||
|
||||
|
||||
/**
|
||||
* 域控制器
|
||||
* @author xiaoyuzhou
|
||||
* @date 2021/9/22 8:43 下午
|
||||
* 域控制器
|
||||
*/
|
||||
@Route(path = MogoServicePaths.PATH_AUTO_PILOT)
|
||||
class MoGoAutopilotProvider :
|
||||
|
||||
@@ -51,7 +51,7 @@ import com.mogo.eagle.core.function.call.autopilot.CallerPlanningActionsListener
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerPlanningRottingListenerManager.invokeAutopilotRotting
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerPlanningTrajectoryListenerManager.invokeAutopilotTrajectory
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerStartAutopilotFailedListenerManager.invokeStartAutopilotFailed
|
||||
import com.mogo.eagle.core.function.call.map.CallerMapUIServiceManager
|
||||
import com.mogo.eagle.core.function.call.obucombine.CallerObuDcCombineListenerManager
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.Logger
|
||||
import com.mogo.support.obu.ObuScene
|
||||
@@ -534,8 +534,9 @@ class MoGoAdasListenerImpl : OnAdasListener {
|
||||
* @param obuWarningData 数据
|
||||
*/
|
||||
override fun onObuWarningData(header: MessagePad.Header?, obuWarningData: ObuWarningEvent.ObuWarningData?) {
|
||||
|
||||
CallerObuDcCombineListenerManager.invokeObuDcData(obuWarningData)
|
||||
}
|
||||
|
||||
/**
|
||||
* OBU 红绿灯预警信息
|
||||
*
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.mogo.eagle.core.function.obu.mogo
|
||||
package com.mogo.eagle.core.function.datacenter.obu
|
||||
|
||||
import android.content.Context
|
||||
import com.alibaba.android.arouter.facade.annotation.Route
|
||||
@@ -11,6 +11,7 @@ import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_OBU
|
||||
import com.mogo.eagle.core.utilcode.mogo.storage.SharedPrefsMgr
|
||||
import com.mogo.eagle.core.utilcode.util.CommonUtils
|
||||
import com.mogo.support.obu.MogoObuManager
|
||||
|
||||
/**
|
||||
* @author xiaoyuzhou
|
||||
@@ -33,12 +34,11 @@ class MoGoObuProvider : IMoGoObuProvider {
|
||||
|
||||
override fun init(context: Context) {
|
||||
//obu融合数据
|
||||
// MogoObuDcCombineManager.INSTANCE.init(context)
|
||||
MogoObuDcCombineManager.INSTANCE.init(context)
|
||||
CallerLogger.d("$M_OBU$TAG", "初始化蘑菇自研OBU…… localIp = " + CommonUtils.getLocalIPAddress())
|
||||
//bus乘客版本obu功能去掉
|
||||
if (AppIdentityModeUtils.isBus(FunctionBuildConfig.appIdentityMode) && AppIdentityModeUtils.isPassenger(
|
||||
FunctionBuildConfig.appIdentityMode
|
||||
)
|
||||
if (AppIdentityModeUtils.isBus(FunctionBuildConfig.appIdentityMode)
|
||||
&& AppIdentityModeUtils.isPassenger(FunctionBuildConfig.appIdentityMode)
|
||||
) {
|
||||
//不处理
|
||||
} else {
|
||||
@@ -54,9 +54,6 @@ class MoGoObuProvider : IMoGoObuProvider {
|
||||
ipAddress,
|
||||
CommonUtils.getIpAddressString()
|
||||
)
|
||||
|
||||
//old obu
|
||||
MogoPrivateObuManager.INSTANCE.init(context, ipAddress)
|
||||
} else if (AppIdentityModeUtils.isTaxi(FunctionBuildConfig.appIdentityMode)) { //taxi 司机端和乘客端
|
||||
val ipAddress =
|
||||
SharedPrefsMgr.getInstance(context).getString(MoGoConfig.OBU_IP, taxiObuIp)
|
||||
@@ -66,9 +63,6 @@ class MoGoObuProvider : IMoGoObuProvider {
|
||||
ipAddress,
|
||||
CommonUtils.getIpAddressString()
|
||||
)
|
||||
|
||||
//old obu
|
||||
MogoPrivateObuManager.INSTANCE.init(context, ipAddress)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -78,9 +72,8 @@ class MoGoObuProvider : IMoGoObuProvider {
|
||||
* 通过控制面板设置ip,进行传递
|
||||
*/
|
||||
override fun connect(ipAddress: String) {
|
||||
if (AppIdentityModeUtils.isBus(FunctionBuildConfig.appIdentityMode) && AppIdentityModeUtils.isPassenger(
|
||||
FunctionBuildConfig.appIdentityMode
|
||||
)
|
||||
if (AppIdentityModeUtils.isBus(FunctionBuildConfig.appIdentityMode)
|
||||
&& AppIdentityModeUtils.isPassenger(FunctionBuildConfig.appIdentityMode)
|
||||
) {
|
||||
//不处理
|
||||
} else {
|
||||
@@ -95,18 +88,16 @@ class MoGoObuProvider : IMoGoObuProvider {
|
||||
CommonUtils.getIpAddressString()
|
||||
)
|
||||
|
||||
//连接old obu
|
||||
MogoPrivateObuManager.INSTANCE.connectObu(it, ipAddress)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
override fun disConnect() {
|
||||
MogoPrivateObuManager.INSTANCE.disConnectObu()
|
||||
MogoPrivateObuNewManager.INSTANCE.disconnect()
|
||||
}
|
||||
|
||||
override fun isConnected(): Boolean {
|
||||
return MogoPrivateObuManager.INSTANCE.isConnected()
|
||||
return MogoObuManager.getInstance().connectStatus == 1
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.mogo.eagle.core.function.obu.mogo;
|
||||
package com.mogo.eagle.core.function.datacenter.obu;
|
||||
|
||||
/**
|
||||
* author : lxiiaopeng
|
||||
@@ -0,0 +1,668 @@
|
||||
package com.mogo.eagle.core.function.datacenter.obu
|
||||
|
||||
import android.content.Context
|
||||
import com.mogo.eagle.core.data.config.HmiBuildConfig
|
||||
import com.mogo.eagle.core.data.enums.EventTypeEnumNew
|
||||
import com.mogo.eagle.core.data.enums.WarningDirectionEnum
|
||||
import com.mogo.eagle.core.data.enums.DataSourceType
|
||||
import com.mogo.eagle.core.data.enums.TrafficLightEnum
|
||||
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.hmi.warning.IMoGoWarningStatusListener
|
||||
import com.mogo.eagle.core.function.api.obucombine.IMoGoObuDcCombineListener
|
||||
import com.mogo.eagle.core.function.call.hmi.CallerHmiManager
|
||||
import com.mogo.eagle.core.function.call.map.CallerMapUIServiceManager
|
||||
import com.mogo.eagle.core.function.call.msgbox.CallerMsgBoxManager
|
||||
import com.mogo.eagle.core.function.call.obucombine.CallerObuDcCombineListenerManager
|
||||
import com.mogo.eagle.core.function.call.trafficlight.CallerTrafficLightListenerManager
|
||||
import com.mogo.eagle.core.function.call.v2x.CallerLimitingVelocityListenerManager
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_OBU
|
||||
import com.mogo.support.obu.constants.MogoObuConstants
|
||||
import mogo.v2x.ObuWarningEvent
|
||||
import mogo.v2x.ObuWarningEvent.*
|
||||
import kotlin.math.roundToInt
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* @author lixiaopeng
|
||||
* @since 2021/11/30
|
||||
* @description 工控机融合数据
|
||||
*/
|
||||
class MogoObuDcCombineManager private constructor() : IMoGoObuDcCombineListener {
|
||||
companion object {
|
||||
val INSTANCE: MogoObuDcCombineManager by lazy(mode = LazyThreadSafetyMode.SYNCHRONIZED) {
|
||||
MogoObuDcCombineManager()
|
||||
}
|
||||
}
|
||||
|
||||
private var mContext: Context? = null
|
||||
private val TAG = "MogoObuDcCombineManager"
|
||||
|
||||
|
||||
fun init(context: Context) {
|
||||
mContext = context
|
||||
CallerObuDcCombineListenerManager.addListener(TAG, this)
|
||||
}
|
||||
|
||||
fun destoryListener() {
|
||||
CallerObuDcCombineListenerManager.removeListener(TAG)
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过工控机中转的obu数据,包括rsi,rsm,spat
|
||||
*
|
||||
*/
|
||||
override fun onMoGoObuDcCombineData(obuWarningData: ObuWarningEvent.ObuWarningData?) {
|
||||
CallerLogger.d(
|
||||
"${M_OBU}${TAG}",
|
||||
"MogoObuDcCombineManager onMoGoObuDcCombineData obuWarningData = ${obuWarningData.toString()} ---obuWarningData.msgDataType = ${obuWarningData?.msgDataType}"
|
||||
)
|
||||
|
||||
obuWarningData?.let {
|
||||
when (obuWarningData.msgDataType) {
|
||||
1 -> { //rsiEvent
|
||||
onMogoObuDcRsiWarning(obuWarningData.rsiEvent)
|
||||
}
|
||||
|
||||
2 -> { //RsmEvent
|
||||
onMogoObuDcRsmWarning(obuWarningData.rsmEvent)
|
||||
}
|
||||
|
||||
3 -> { //SpatEvent
|
||||
onMogoObuDcSpatWarning(obuWarningData.spatEvent)
|
||||
}
|
||||
|
||||
4 -> { //map
|
||||
onMogoObuMapMath(obuWarningData.mapMatchData)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* RSI预警信息 CvxRtiThreatIndInfo(交通标志预警(前方限速、前方学校等等),交通事件预警(前方拥堵、前方积水等等))
|
||||
*/
|
||||
fun onMogoObuDcRsiWarning(rsiWarningData: RsiWarningData?) {
|
||||
CallerLogger.d(
|
||||
"${M_OBU}${TAG}",
|
||||
"MogoObuDcCombineManager onMogoObuRsiWarning ------> ${rsiWarningData.toString()}"
|
||||
)
|
||||
if (rsiWarningData != null && rsiWarningData.warningMsgList != null && rsiWarningData.warningMsgList.size > 0) {
|
||||
var alertContent = ""
|
||||
var ttsContent = "" //列表只有一项
|
||||
var appId = rsiWarningData.warningMsgList[0].sceneType.toString()
|
||||
val status = rsiWarningData.status
|
||||
val level = rsiWarningData.warningMsgList[0].warningLevel
|
||||
val direction = getMessageDirection(rsiWarningData.warningMsgList[0].targetPosition)
|
||||
CallerLogger.d("${M_OBU}${TAG}",
|
||||
"MogoObuDcCombineManager onMogoObuDcRsiWarning appId = $appId --status = $status --level = $level -- eventSerialNum = ${rsiWarningData.warningMsgList[0].eventSerialNum} ---signSerialNum = ${rsiWarningData.warningMsgList[0].signSerialNum} --- direction = $direction -- targetPosition = ${rsiWarningData.warningMsgList[0].targetPosition}"
|
||||
)
|
||||
|
||||
when (appId) {
|
||||
// 道路危险情况预警
|
||||
MogoObuConstants.RSI_SCENE_TYPE.HLW.toString() -> {
|
||||
when (rsiWarningData.warningMsgList[0].eventSerialNum) {
|
||||
MogoObuConstants.RTE.RTI_TYPE_BREAKDOWN -> {//车辆故障
|
||||
appId = EventTypeEnumNew.TYPE_USECASE_ID_BREAKDOWN_WARNING.poiType
|
||||
}
|
||||
MogoObuConstants.RTE.RTI_TYPE_ROAD_WATER -> { //道路积水
|
||||
appId = EventTypeEnumNew.FOURS_PONDING.poiType
|
||||
}
|
||||
MogoObuConstants.RTE.RTI_TYPE_PARKING_VIOLATION -> { //异常停车
|
||||
appId = EventTypeEnumNew.TYPE_USECASE_ID_ROAD_PARKING.poiType
|
||||
}
|
||||
// MogoObuConstants.RTE.RTI_TYPE_CONSTRUCTION_RTE -> { //施工占道,和标牌重复
|
||||
// appId = EventTypeEnumNew.FOURS_ROAD_WORK.poiType
|
||||
// }
|
||||
MogoObuConstants.RTE.RTI_TYPE_SPEEDING -> { //超速行驶
|
||||
appId = EventTypeEnumNew.TYPE_USECASE_ID_SLW.poiType
|
||||
}
|
||||
MogoObuConstants.RTE.RTI_TYPE_RETRIGRADE -> { //车辆逆行
|
||||
appId =
|
||||
EventTypeEnumNew.TYPE_USECASE_ID_ROAD_VEHICLE_RETROGRADE.poiType
|
||||
}
|
||||
}
|
||||
alertContent = EventTypeEnumNew.getWarningContent(appId)
|
||||
ttsContent = EventTypeEnumNew.getWarningTts(appId)
|
||||
alertContent = String.format( //事件才有影响范围
|
||||
alertContent,
|
||||
Math.round(rsiWarningData.warningMsgList[0].distance / 100.0).toString(),
|
||||
Math.round(rsiWarningData.warningMsgList[0].eventRadius / 10.0).toString()
|
||||
)
|
||||
ttsContent = String.format(
|
||||
ttsContent,
|
||||
Math.round(rsiWarningData.warningMsgList[0].distance / 100.0).toString(),
|
||||
Math.round(rsiWarningData.warningMsgList[0].eventRadius / 10.0).toString()
|
||||
)
|
||||
}
|
||||
|
||||
//车内标牌
|
||||
MogoObuConstants.RSI_SCENE_TYPE.IVS.toString() -> {
|
||||
when (rsiWarningData.warningMsgList[0].signSerialNum) {
|
||||
// MogoObuConstants.RTS.RTI_TYPE_INTERSECTION -> { //十字路口
|
||||
// appId = V2iEventTypeEnum.TYPE_ID_NTERSECTION.poiType
|
||||
// }
|
||||
MogoObuConstants.RTS.RTI_TYPE_SHAPR_TURNS -> { //急转弯
|
||||
appId = EventTypeEnumNew.TYPE_ID_SHAPR_TURNS.poiType
|
||||
}
|
||||
MogoObuConstants.RTS.RTI_TYPE_BRIDGE -> { //桥梁
|
||||
appId = EventTypeEnumNew.TYPE_ID_BRIDGE.poiType
|
||||
}
|
||||
MogoObuConstants.RTS.RTI_TYPE_PEDESTRIAN -> { //行人
|
||||
appId = EventTypeEnumNew.TYPE_ID_PEDESTRIAN.poiType
|
||||
}
|
||||
MogoObuConstants.RTS.RTI_TYPE_SLIPPERY_ROAD -> { //路滑
|
||||
appId = EventTypeEnumNew.TYPE_ID_SLIPPERY_ROAD.poiType
|
||||
}
|
||||
MogoObuConstants.RTS.RTI_TYPE_TUNNEL -> { //隧道
|
||||
appId = EventTypeEnumNew.TYPE_ID_TUNNEL.poiType
|
||||
}
|
||||
MogoObuConstants.RTS.RTI_TYPE_FERRY -> { //渡轮
|
||||
appId = EventTypeEnumNew.TYPE_ID_FERRY.poiType
|
||||
}
|
||||
MogoObuConstants.RTS.RTI_TYPE_UNEVEN_ROAD -> { //路面不平
|
||||
appId = EventTypeEnumNew.TYPE_ID_UNEVEN_ROAD.poiType
|
||||
}
|
||||
MogoObuConstants.RTS.RTI_TYPE_NON_MOTOR_VEHICLE -> { //非机动车
|
||||
appId = EventTypeEnumNew.TYPE_ID_NON_MOTOR_VEHICLE.poiType
|
||||
}
|
||||
MogoObuConstants.RTS.RTI_TYPE_OBSTACLE -> { //障碍
|
||||
appId = EventTypeEnumNew.TYPE_ID_OBSTACLE.poiType
|
||||
}
|
||||
MogoObuConstants.RTS.RTI_TYPE_CONSTRUCTION -> { //施工
|
||||
appId = EventTypeEnumNew.TYPE_FOURS_ROAD_WORK.poiType
|
||||
}
|
||||
MogoObuConstants.RTS.RTI_TYPE_VEHICLE_QUEUE -> { //车队
|
||||
appId = EventTypeEnumNew.TYPE_VEHICLE_QUEUE.poiType
|
||||
}
|
||||
MogoObuConstants.RTS.RTI_TYPE_NO_PASSING -> { //不通
|
||||
appId = EventTypeEnumNew.TYPE_NO_PASSING.poiType
|
||||
}
|
||||
MogoObuConstants.RTS.RTI_TYPE_NO_TURNING_AROUND -> { //禁止掉头
|
||||
appId = EventTypeEnumNew.TYPE_NO_TURNING_AROUND.poiType
|
||||
}
|
||||
MogoObuConstants.RTS.RTI_TYPE_NO_STOPPING -> { //禁止停车
|
||||
appId = EventTypeEnumNew.TYPE_USECASE_ID_ROAD_NO_PARKING.poiType
|
||||
}
|
||||
MogoObuConstants.RTS.RTI_TYPE_NO_TOOTING -> { //禁止鸣笛
|
||||
appId = EventTypeEnumNew.TYPE_USECASE_ID_ROAD_NO_TOOTING.poiType
|
||||
}
|
||||
MogoObuConstants.RTS.RTI_TYPE_SPEED_LIMIT -> { //限速
|
||||
appId = EventTypeEnumNew.TYPE_USECASE_ID_ROAD_SPEED_LIMIT.poiType
|
||||
}
|
||||
// MogoObuConstants.RTS.RTI_TYPE_GO_STRAIGHT_TURN_RIGHT -> { //直行或右转
|
||||
// appId =
|
||||
// EventTypeEnumNew.TYPE_USECASE_ID_GO_STRAIGHT_TURN_RIGHT.poiType
|
||||
// }
|
||||
MogoObuConstants.RTS.RTI_TYPE_BUS_WARNING -> { //公交提醒
|
||||
appId = EventTypeEnumNew.TYPE_USECASE_ID_BUS_WARNING.poiType
|
||||
}
|
||||
MogoObuConstants.RTS.RTI_TYPE_NARROW_RIGHT -> { //右侧变窄/车道数减少
|
||||
appId = EventTypeEnumNew.TYPE_USECASE_ID_NARROW_RIGHT.poiType
|
||||
}
|
||||
MogoObuConstants.RTS.RTI_TYPE_GAS_STATION -> { //加油站
|
||||
appId = EventTypeEnumNew.TYPE_USECASE_ID_GAS_STATION.poiType
|
||||
}
|
||||
MogoObuConstants.RTS.RTI_TYPE_SCHOOL -> { //学校
|
||||
appId =
|
||||
EventTypeEnumNew.TYPE_USECASE_ID_ROAD_PEDESTRIAN_SCHOOL.poiType
|
||||
}
|
||||
MogoObuConstants.RTS.RTI_TYPE_ACCIDENT -> { //事故
|
||||
appId = EventTypeEnumNew.TYPE_USECASE_ID_ACCIDENT.poiType
|
||||
}
|
||||
}
|
||||
|
||||
alertContent = EventTypeEnumNew.getWarningContent(appId)
|
||||
ttsContent = EventTypeEnumNew.getWarningTts(appId)
|
||||
alertContent = String.format( //标牌是没有影响范围的
|
||||
alertContent,
|
||||
Math.round(rsiWarningData.warningMsgList[0].distance / 100.0).toString()
|
||||
)
|
||||
ttsContent = String.format(
|
||||
ttsContent,
|
||||
Math.round(rsiWarningData.warningMsgList[0].distance / 100.0).toString()
|
||||
)
|
||||
}
|
||||
|
||||
// 拥堵
|
||||
MogoObuConstants.RSI_SCENE_TYPE.TJW.toString() -> {
|
||||
appId = EventTypeEnumNew.TYPE_USECASE_ID_TJW.poiType
|
||||
alertContent = EventTypeEnumNew.getWarningContent(appId)
|
||||
ttsContent = EventTypeEnumNew.getWarningTts(appId)
|
||||
alertContent = String.format( //事件才有影响范围
|
||||
alertContent,
|
||||
Math.round(rsiWarningData.warningMsgList[0].distance / 100.0).toString(),
|
||||
Math.round(rsiWarningData.warningMsgList[0].eventRadius / 10.0).toString()
|
||||
)
|
||||
ttsContent = String.format(
|
||||
ttsContent,
|
||||
Math.round(rsiWarningData.warningMsgList[0].distance / 100.0).toString(),
|
||||
Math.round(rsiWarningData.warningMsgList[0].eventRadius / 10.0).toString()
|
||||
)
|
||||
}
|
||||
|
||||
//限速预警, ADD处理一次
|
||||
MogoObuConstants.RSI_SCENE_TYPE.SLW.toString() -> {
|
||||
alertContent = EventTypeEnumNew.getWarningContent(appId)
|
||||
ttsContent = EventTypeEnumNew.getWarningTts(appId)
|
||||
}
|
||||
}
|
||||
|
||||
CallerLogger.d(
|
||||
"${M_OBU}${TAG}",
|
||||
"MogoObuDcCombineManager ttsContent = $ttsContent --alertContent = $alertContent --appId = $appId ---direction = ${direction.direction} --distance = ${rsiWarningData.warningMsgList[0].distance} ---eventRadius = ${rsiWarningData.warningMsgList[0].eventRadius} --speedMaxLimit = ${rsiWarningData.warningMsgList[0].speedMaxLimit}"
|
||||
)
|
||||
when (status) {
|
||||
// 添加
|
||||
MogoObuConstants.STATUS.ADD -> {
|
||||
//显示警告红边
|
||||
CallerHmiManager.showWarning(direction)
|
||||
CallerMsgBoxManager.saveMsgBox(
|
||||
MsgBoxBean(
|
||||
MsgBoxType.V2X,
|
||||
V2XMsg(
|
||||
appId,
|
||||
alertContent,
|
||||
ttsContent
|
||||
)
|
||||
).apply {
|
||||
sourceType = DataSourceType.TELEMATIC
|
||||
}
|
||||
)
|
||||
CallerHmiManager.warningV2X(
|
||||
appId,
|
||||
alertContent,
|
||||
ttsContent,// 只有第一次才tts,防止更新的时候不断的提醒
|
||||
(appId + direction.direction),//使用当前事件类型+方向记录tag,当发生变化的时候关闭当前弹出新的
|
||||
object : IMoGoWarningStatusListener {
|
||||
override fun onDismiss() {
|
||||
// 关闭警告红边
|
||||
CallerHmiManager.showWarning(WarningDirectionEnum.ALERT_WARNING_NON)
|
||||
}
|
||||
},
|
||||
true,
|
||||
5000L
|
||||
)
|
||||
|
||||
// 更新数据,是否需要
|
||||
// TrafficDataConvertUtilsNew.cvxRtiThreatIndInfo2TrafficData(rsiWarningData)?.let {
|
||||
// CallerMapUIServiceManager.getMarkerService()
|
||||
// ?.updateITrafficThreatLevelInfo(it)
|
||||
// }
|
||||
}
|
||||
|
||||
MogoObuConstants.STATUS.UPDATE -> { // 更新
|
||||
}
|
||||
|
||||
// 删除
|
||||
MogoObuConstants.STATUS.DELETE -> {
|
||||
// 关闭警告红边
|
||||
// CallerHmiManager.showWarning(WarningDirectionEnum.ALERT_WARNING_NON)
|
||||
// 移除顶部弹窗
|
||||
CallerHmiManager.disableWarningV2X((appId + direction.direction))
|
||||
// 更新数据,删除标牌?
|
||||
// TrafficDataConvertUtilsNew.cvxRtiThreatIndInfo2TrafficData(rsiWarningData)
|
||||
// ?.let {
|
||||
// // 事件结束,还原车辆颜色
|
||||
// it.threatLevel = 0x01
|
||||
// CallerMapUIServiceManager.getMarkerService()
|
||||
// ?.updateITrafficInfo(it)
|
||||
// }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* RSM预警信息 CvxPtcThreatIndInfo CvxPtcInfoIndInfo(主车与弱势交通参与者之间的预警(如:弱势交通参与者碰撞预警))
|
||||
*/
|
||||
fun onMogoObuDcRsmWarning(rsmWarningData: RsmWarningData?) {
|
||||
if (HmiBuildConfig.isShowObuWeaknessTrafficView) {
|
||||
CallerLogger.d(
|
||||
"${M_OBU}${TAG}",
|
||||
"MogoObuDcCombineManager onMogoObuRsmWarning ------> ${rsmWarningData.toString()}"
|
||||
)
|
||||
// 交通参与者类型 0x0:未知 UNKNOWN | 1机动车 2:非机动车 NON_MOTOR | 3:行人 PEDESTRIAN 4:obu
|
||||
if (rsmWarningData != null && rsmWarningData.participantOfOne != null) {
|
||||
var v2xType = ""
|
||||
if (rsmWarningData.participantOfOne.ptcType == 1) { //机动车
|
||||
v2xType =
|
||||
EventTypeEnumNew.TYPE_USECASE_ID_VRUCW_MOTOR_VEHICLES.poiType
|
||||
} else if (rsmWarningData.participantOfOne.ptcType == 2) { //非机动车
|
||||
v2xType =
|
||||
EventTypeEnumNew.TYPE_USECASE_ID_VRUCW_NOT_MOTOR_VEHICLES.poiType
|
||||
} else if (rsmWarningData.participantOfOne.ptcType == 3) { //行人
|
||||
v2xType =
|
||||
EventTypeEnumNew.TYPE_USECASE_ID_VRUCW_PERSON.poiType
|
||||
} else { //未知
|
||||
v2xType = EventTypeEnumNew.TYPE_ERROR.poiType
|
||||
}
|
||||
val ttsContent = EventTypeEnumNew.getWarningTts(v2xType)
|
||||
val alertContent =
|
||||
EventTypeEnumNew.getWarningContent(v2xType)
|
||||
var level = -1
|
||||
val direction =
|
||||
getMessageDirection(rsmWarningData.participantOfOne.targetPosition) //TODO 只有一个
|
||||
if (rsmWarningData.warningMsg != null && rsmWarningData.warningMsg.warningDataList != null && rsmWarningData.warningMsg.warningDataList.size > 0) {
|
||||
level = rsmWarningData.warningMsg.warningDataList[0].warningLevel
|
||||
CallerLogger.d(
|
||||
"${M_OBU}${TAG}",
|
||||
"MogoObuDcCombineManager onMogoObuRsmWarning ---status---> ${rsmWarningData.status} --list status----> ${rsmWarningData.warningMsg.warningDataList.get(0).status} --v2xType--- $v2xType ---alertContent = $alertContent ---ttsContent= $ttsContent"
|
||||
)
|
||||
|
||||
when (rsmWarningData.warningMsg.warningDataList.get(0).status) {
|
||||
MogoObuConstants.STATUS.ADD -> { // 添加
|
||||
//显示警告红边
|
||||
CallerHmiManager.showWarning(direction)
|
||||
CallerMsgBoxManager.saveMsgBox(
|
||||
MsgBoxBean(
|
||||
MsgBoxType.V2X,
|
||||
V2XMsg(
|
||||
v2xType,
|
||||
alertContent,
|
||||
ttsContent
|
||||
)
|
||||
).apply {
|
||||
sourceType = DataSourceType.TELEMATIC
|
||||
}
|
||||
)
|
||||
CallerHmiManager.warningV2X(
|
||||
v2xType,
|
||||
alertContent,
|
||||
ttsContent,// 只有第一次才tts,防止更新的时候不断的提醒
|
||||
(v2xType + direction.direction),//使用当前事件类型+方向记录tag,当发生变化的时候关闭当前弹出新的
|
||||
object : IMoGoWarningStatusListener {
|
||||
override fun onDismiss() {
|
||||
// 关闭警告红边
|
||||
CallerHmiManager.showWarning(
|
||||
WarningDirectionEnum.ALERT_WARNING_NON
|
||||
)
|
||||
}
|
||||
},
|
||||
true,
|
||||
5000L
|
||||
)
|
||||
|
||||
// 更新数据 TODO
|
||||
// TrafficDataConvertUtils.cvxPtcThreatIndInfo2TrafficData(rsmWarningData)?.let {
|
||||
//// TrafficMarkerDrawer.updateITrafficThreatLevelInfo(it)
|
||||
// CallerMapUIServiceManager.getMarkerService()
|
||||
// ?.updateITrafficThreatLevelInfo(it)
|
||||
// }
|
||||
}
|
||||
|
||||
MogoObuConstants.STATUS.UPDATE -> {// 更新
|
||||
}
|
||||
|
||||
// 删除
|
||||
MogoObuConstants.STATUS.DELETE -> {
|
||||
// 关闭警告红边
|
||||
CallerHmiManager.showWarning(WarningDirectionEnum.ALERT_WARNING_NON)
|
||||
// 更新数据 TODO 由于obu通过域控需要转换单位,这里临时转换,后面3.0不需要转换
|
||||
// TrafficDataConvertUtils.cvxPtcThreatIndInfo2TrafficData(rsmWarningData)?.let {
|
||||
// // 事件结束,还原交通参与者颜色
|
||||
// it.threatLevel = 0x01
|
||||
//// TrafficMarkerDrawer.updateITrafficThreatLevelInfo(it)
|
||||
// CallerMapUIServiceManager.getMarkerService()
|
||||
// ?.updateITrafficThreatLevelInfo(it)
|
||||
// }
|
||||
//删除弱势交通元素
|
||||
CallerMapUIServiceManager.getMarkerService()
|
||||
?.removeCvxRvInfoIndInfo(rsmWarningData.participantOfOne.ptcID.toString())
|
||||
// TrafficMarkerDrawer.removeCvxRvInfoIndInfo(rsmWarningData.participantOfOne.ptcID.toString())
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 红绿灯预警信息
|
||||
*/
|
||||
fun onMogoObuDcSpatWarning(spatWarningData: SpatWarningData?) {
|
||||
CallerLogger.d("${M_OBU}${TAG}", "onMogoObuDcSpatWarning warningType = ${spatWarningData!!.warningType} --status = ${spatWarningData?.status} --lightsList = ${spatWarningData.lightsList}")
|
||||
handlerTrafficLight(
|
||||
spatWarningData!!.warningType,
|
||||
spatWarningData?.status,
|
||||
spatWarningData?.lightsList
|
||||
)
|
||||
}
|
||||
|
||||
/**
|
||||
* 地图匹配 是OBU算法输出地图匹配结果,主车匹配道路哪条路或者哪条车道
|
||||
*/
|
||||
fun onMogoObuMapMath(data: MapMatchData?) {
|
||||
CallerLogger.d("${M_OBU}${TAG}", "MogoObuDcCombineManager onMogoObuMapMath HmiBuildConfig.isShowObuLimitSpeedView = " + HmiBuildConfig.isShowObuLimitSpeedView)
|
||||
if(HmiBuildConfig.isShowObuLimitSpeedView) {
|
||||
if (data != null) {
|
||||
CallerLogger.d("${M_OBU}${TAG}",
|
||||
"MogoObuDcCombineManager onMogoObuMapMath = ${data.status} --speedMaxLimit = ${Math.round((data.speedMaxLimit*0.02*3.6))} --- data.speedMaxLimit = ${data.speedMaxLimit}")
|
||||
when (data.status) {
|
||||
MogoObuConstants.STATUS.ADD -> { // 添加 TODO
|
||||
CallerLimitingVelocityListenerManager.invokeOnLimitingVelocityChange(
|
||||
(data.speedMaxLimit * 0.02 * 3.6).roundToInt().toInt(),DataSourceType.OBU)
|
||||
}
|
||||
|
||||
MogoObuConstants.STATUS.UPDATE -> { // 更新
|
||||
}
|
||||
|
||||
MogoObuConstants.STATUS.DELETE -> { // 删除
|
||||
CallerLimitingVelocityListenerManager.invokeOnLimitingVelocityChange(-1 ,DataSourceType.OBU)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取消息的方位 车辆相关
|
||||
*/
|
||||
private fun getMessageDirection(targetClassification: Int): WarningDirectionEnum {
|
||||
return when (targetClassification) {
|
||||
MogoObuConstants.VEH_TARGET_POSITION.AHEAD_IN_LANE,
|
||||
MogoObuConstants.VEH_TARGET_POSITION.ONCOMING_IN_LANE -> WarningDirectionEnum.ALERT_WARNING_TOP //正前方
|
||||
|
||||
MogoObuConstants.VEH_TARGET_POSITION.BEHEAD_IN_LANE -> WarningDirectionEnum.ALERT_WARNING_BOTTOM //正后方
|
||||
|
||||
MogoObuConstants.VEH_TARGET_POSITION.INTERSECTION_RIGHT -> WarningDirectionEnum.ALERT_WARNING_RIGHT //正右方
|
||||
|
||||
MogoObuConstants.VEH_TARGET_POSITION.INTERSECTION_LEFT -> WarningDirectionEnum.ALERT_WARNING_LEFT //正左方
|
||||
|
||||
MogoObuConstants.VEH_TARGET_POSITION.AHEAD_LEFT, MogoObuConstants.VEH_TARGET_POSITION.AHEAD_FAR_LEFT,
|
||||
MogoObuConstants.VEH_TARGET_POSITION.ONCOMING_LEFT, MogoObuConstants.VEH_TARGET_POSITION.ONCOMING_FAR_LEFT
|
||||
-> WarningDirectionEnum.ALERT_WARNING_TOP_LEFT //左前方
|
||||
|
||||
MogoObuConstants.VEH_TARGET_POSITION.AHEAD_RIGHT, MogoObuConstants.VEH_TARGET_POSITION.AHEAD_FAR_RIGHT,
|
||||
MogoObuConstants.VEH_TARGET_POSITION.ONCOMING_RIGHT, MogoObuConstants.VEH_TARGET_POSITION.ONCOMING_FAT_RIGHT
|
||||
-> WarningDirectionEnum.ALERT_WARNING_TOP_RIGHT //右前方
|
||||
|
||||
MogoObuConstants.VEH_TARGET_POSITION.BEHEAD_LEFT, MogoObuConstants.VEH_TARGET_POSITION.BEHEAD_FAR_LEFT,
|
||||
-> WarningDirectionEnum.ALERT_WARNING_BOTTOM_LEFT //左后方
|
||||
|
||||
MogoObuConstants.VEH_TARGET_POSITION.BEHEAD_RIGHT, MogoObuConstants.VEH_TARGET_POSITION.BEHEAD_FAR_RIGHT,
|
||||
-> WarningDirectionEnum.ALERT_WARNING_BOTTOM_RIGHT //右后方
|
||||
|
||||
MogoObuConstants.VEH_TARGET_POSITION.UNCLASSIFIED -> WarningDirectionEnum.ALERT_WARNING_NON //未知
|
||||
else -> WarningDirectionEnum.ALERT_WARNING_ALL
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 处理红绿灯
|
||||
*/
|
||||
private fun handlerTrafficLight(appId: Int, status: Int, lights: List<ObuWarningEvent.SpatLight>) {
|
||||
CallerLogger.d(
|
||||
"${M_OBU}${TAG}",
|
||||
"MogoObuDcCombineManager handlerTrafficLight --- status = $status ---lights.size = ${lights.size} ---lights = $lights ---appId = $appId"
|
||||
)
|
||||
when (status) {
|
||||
// 添加
|
||||
MogoObuConstants.STATUS.ADD,
|
||||
MogoObuConstants.STATUS.UPDATE
|
||||
-> {
|
||||
if (lights != null && lights.isNotEmpty()) {
|
||||
changeTrafficLightStatus(appId, lights)
|
||||
}
|
||||
}
|
||||
// 删除
|
||||
MogoObuConstants.STATUS.DELETE -> {
|
||||
// 移除顶部弹窗,当收不到信号的时候触发一次
|
||||
CallerTrafficLightListenerManager.disableTrafficLight()
|
||||
CallerHmiManager.disableWarningV2X(appId.toString())
|
||||
isShowGreenWave = false
|
||||
isShowRunRedLight = false
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private var isRedLight = false
|
||||
private var isGreenLight = false
|
||||
private var isShowGreenWave = false
|
||||
private var isShowRunRedLight = false
|
||||
|
||||
/**
|
||||
* 修改红绿灯
|
||||
*/
|
||||
@Synchronized
|
||||
private fun changeTrafficLightStatus(
|
||||
appId: Int,
|
||||
lights: List<ObuWarningEvent.SpatLight>
|
||||
) {
|
||||
var ttsContent = ""
|
||||
var alertContent = ""
|
||||
//这里需要根据真实数据确定 index 取值方式
|
||||
val currentLight = lights[0]
|
||||
CallerLogger.e(
|
||||
"${M_OBU}${TAG}",
|
||||
"MogoObuDcCombineManager currentLight = $currentLight ---currentLight.phaseID = ${currentLight.phaseID} ---appId = $appId ---isShowRunRedLight = $isShowRunRedLight ---isShowGreenWave = $isShowGreenWave"
|
||||
)
|
||||
|
||||
// 闯红灯预警和绿波通行底层是互斥的
|
||||
when (appId) {
|
||||
0 -> {//不可用 V2I_RLVW_VIOLATION_TYPE_UNAVAILABLE 无效
|
||||
|
||||
}
|
||||
1 -> { //闯红灯 V2I_RLVW_VIOLATION_TYPE_RUNNING_RED_LIGHT 一个红灯周期只显示一次
|
||||
if (!isShowRunRedLight) {
|
||||
isShowRunRedLight = true
|
||||
CallerHmiManager.disableWarningV2X(1667.toString())
|
||||
ttsContent = EventTypeEnumNew.getWarningTts(EventTypeEnumNew.TYPE_USECASE_ID_IVP_RED.poiType)
|
||||
alertContent = EventTypeEnumNew.getWarningContent(EventTypeEnumNew.TYPE_USECASE_ID_IVP_RED.poiType)
|
||||
CallerLogger.d("${M_OBU}${TAG}","MogoObuDcCombineManager changeTrafficLightStatus 闯红灯 --------> ttsContent = $ttsContent ---alertContent = $alertContent ")
|
||||
CallerMsgBoxManager.saveMsgBox(
|
||||
MsgBoxBean(
|
||||
MsgBoxType.V2X,
|
||||
V2XMsg(
|
||||
EventTypeEnumNew.TYPE_USECASE_ID_IVP_RED.poiType,
|
||||
alertContent,
|
||||
ttsContent
|
||||
)
|
||||
).apply {
|
||||
sourceType = DataSourceType.TELEMATIC
|
||||
}
|
||||
)
|
||||
|
||||
CallerHmiManager.warningV2X(
|
||||
EventTypeEnumNew.TYPE_USECASE_ID_IVP_RED.poiType, alertContent, ttsContent,// 只有第一次才tts,防止更新的时候不断的提醒
|
||||
EventTypeEnumNew.TYPE_USECASE_ID_IVP_RED.poiType, null, true, 5000L)
|
||||
}
|
||||
}
|
||||
|
||||
2 -> { //绿波通行引导 V2I_RLVW_VIOLATION_TYPE_NO_VIOLATION 一个绿灯周期只显示一次
|
||||
if (!isShowGreenWave) {
|
||||
isShowGreenWave = true
|
||||
CallerHmiManager.disableWarningV2X(1666.toString())
|
||||
CallerLogger.d(
|
||||
"${M_OBU}${TAG}",
|
||||
"MogoObuDcCombineManager 绿波通行引导 --------> speed_min = ${currentLight.suggestMinSpeed} --speed_max = ${currentLight.suggestMaxSpeed}")
|
||||
val adviceSpeed =
|
||||
"${Math.round(currentLight.suggestMinSpeed*3.6*0.02)} - ${Math.round(currentLight.suggestMaxSpeed*3.6*0.02)}"
|
||||
val adviceSpeedTts =
|
||||
"${Math.round(currentLight.suggestMinSpeed*3.6*0.02)} - ${Math.round(currentLight.suggestMaxSpeed*3.6*0.02)}"
|
||||
|
||||
ttsContent =
|
||||
String.format(
|
||||
EventTypeEnumNew.getWarningTts(EventTypeEnumNew.TYPE_USECASE_ID_IVP_GREEN.poiType),
|
||||
adviceSpeedTts
|
||||
)
|
||||
alertContent =
|
||||
String.format(
|
||||
EventTypeEnumNew.getWarningContent(EventTypeEnumNew.TYPE_USECASE_ID_IVP_GREEN.poiType),
|
||||
adviceSpeed
|
||||
)
|
||||
val maxSpeed = currentLight.suggestMaxSpeed*3.6
|
||||
if (maxSpeed > 0) {
|
||||
CallerMsgBoxManager.saveMsgBox(
|
||||
MsgBoxBean(
|
||||
MsgBoxType.V2X,
|
||||
V2XMsg(
|
||||
EventTypeEnumNew.TYPE_USECASE_ID_IVP_GREEN.poiType,
|
||||
alertContent,
|
||||
ttsContent
|
||||
)
|
||||
).apply {
|
||||
sourceType = DataSourceType.TELEMATIC
|
||||
}
|
||||
)
|
||||
|
||||
CallerHmiManager.warningV2X(
|
||||
EventTypeEnumNew.TYPE_USECASE_ID_IVP_GREEN.poiType,
|
||||
alertContent,
|
||||
ttsContent,// 只有第一次才tts,防止更新的时候不断的提醒
|
||||
appId.toString(),
|
||||
null,
|
||||
true,
|
||||
5000L
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
when (currentLight.light) {
|
||||
// 灯光不可用
|
||||
0 -> {
|
||||
CallerTrafficLightListenerManager.showTrafficLight(TrafficLightEnum.BLACK, DataSourceType.TELEMATIC)
|
||||
}
|
||||
|
||||
// 红灯
|
||||
2, 3 -> {
|
||||
if (!isRedLight) {
|
||||
CallerHmiManager.disableWarningV2X(appId.toString())
|
||||
isRedLight = true
|
||||
}
|
||||
isGreenLight = false
|
||||
CallerTrafficLightListenerManager.showTrafficLight(TrafficLightEnum.RED, DataSourceType.TELEMATIC)
|
||||
val red = currentLight.countDown / 10
|
||||
CallerTrafficLightListenerManager.changeCountdownRed(red)
|
||||
}
|
||||
|
||||
// 绿灯
|
||||
4, 5, 6 -> {
|
||||
if (!isGreenLight) {
|
||||
CallerHmiManager.disableWarningV2X(appId.toString())
|
||||
isGreenLight = true
|
||||
}
|
||||
isRedLight = false
|
||||
CallerTrafficLightListenerManager.showTrafficLight(TrafficLightEnum.GREEN, DataSourceType.TELEMATIC)
|
||||
val green = currentLight.countDown / 10
|
||||
CallerTrafficLightListenerManager.changeCountdownGreen(green)
|
||||
}
|
||||
|
||||
// 黄灯
|
||||
7, 8 -> {
|
||||
CallerHmiManager.disableWarningV2X(appId.toString())
|
||||
CallerTrafficLightListenerManager.showTrafficLight(TrafficLightEnum.YELLOW, DataSourceType.TELEMATIC)
|
||||
val yellow = currentLight.countDown / 10
|
||||
CallerTrafficLightListenerManager.changeCountdownYellow(yellow)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,92 @@
|
||||
package com.mogo.eagle.core.function.datacenter.obu.adapter
|
||||
|
||||
import com.mogo.eagle.core.function.call.obu.*
|
||||
import com.mogo.support.obu.OnMogoObuListener
|
||||
import com.mogo.support.obu.constants.Define.ConnectStatus
|
||||
import com.mogo.support.obu.model.*
|
||||
|
||||
/**
|
||||
* 适配 OBU 回调监听分发,这里不做业务,只做数据包装及分发处理
|
||||
* @author dong hong yu
|
||||
*/
|
||||
object MoGoObuListenerImpl : OnMogoObuListener() {
|
||||
|
||||
/**
|
||||
* 连接状态
|
||||
*
|
||||
* @param connectStatus 连接状态
|
||||
* @since 1.0.0
|
||||
*/
|
||||
override fun onConnectStatus(@ConnectStatus connectStatus: Int) {
|
||||
//断开连接
|
||||
if (connectStatus == 0) {
|
||||
CallerObuConnectListenerManager.getObuStatusInfo().obuStatus = false
|
||||
}
|
||||
//连接成功
|
||||
else if (connectStatus == 1) {
|
||||
CallerObuConnectListenerManager.getObuStatusInfo().obuStatus = true
|
||||
}
|
||||
CallerObuConnectListenerManager.invokeObuConnectListener()
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* HV车辆基础信息
|
||||
*
|
||||
* @param data 数据
|
||||
* @since 1.0.0
|
||||
*/
|
||||
override fun onMogoObuHvBasics(data: MogoObuHvBasicsData) {
|
||||
CallerObuLocationWGS84ListenerManager.invokeObuLocationWGS84(data)
|
||||
}
|
||||
|
||||
/**
|
||||
* V2V预警信息
|
||||
*
|
||||
* @param data 数据
|
||||
* @since 1.0.0
|
||||
*/
|
||||
override fun onMogoObuRvWarning(data: MogoObuRvWarningData) {
|
||||
CallerObuWarningRvListenerManager.invokeObuRvWarning(data)
|
||||
}
|
||||
|
||||
/**
|
||||
* 红绿灯预警信息
|
||||
*
|
||||
* @param data 数据
|
||||
* @since 1.0.0
|
||||
*/
|
||||
override fun onMogoObuSpatWarning(data: MogoObuSpatWarningData) {
|
||||
CallerObuWarningSpatListenerManager.invokeObuSpatWarning(data)
|
||||
}
|
||||
|
||||
/**
|
||||
* RSI预警信息
|
||||
*
|
||||
* @param data 数据
|
||||
* @since 1.0.0
|
||||
*/
|
||||
override fun onMogoObuRsiWarning(data: MogoObuRsiWarningData) {
|
||||
CallerObuWarningRsiListenerManager.invokeObuRsiWarning(data)
|
||||
}
|
||||
|
||||
/**
|
||||
* RSM预警信息
|
||||
*
|
||||
* @param data 数据
|
||||
* @since 1.0.0
|
||||
*/
|
||||
override fun onMogoObuRsmWarning(data: MogoObuRsmWarningData) {
|
||||
CallerObuWarningRsmListenerManager.invokeObuRsmWarning(data)
|
||||
}
|
||||
|
||||
/**
|
||||
* 地图匹配结果
|
||||
*
|
||||
* @param data 数据
|
||||
* @since 1.0.0
|
||||
*/
|
||||
override fun onMogoObuMapMath(data: MogoObuMapMathData) {
|
||||
CallerObuMapMathListenerManager.invokeObuMapMath(data)
|
||||
}
|
||||
}
|
||||
@@ -1,10 +1,10 @@
|
||||
package com.mogo.eagle.core.function.obu.mogo.receiver
|
||||
package com.mogo.eagle.core.function.datacenter.obu.receiver
|
||||
|
||||
import android.content.BroadcastReceiver
|
||||
import android.content.Context
|
||||
import android.content.Intent
|
||||
//import com.mogo.eagle.core.function.obu.mogo.MogoObuConst
|
||||
//import com.mogo.eagle.core.function.obu.mogo.MogoPrivateObuManager
|
||||
//import com.mogo.eagle.core.function.datacenter.obu.MogoPrivateObuManager
|
||||
//import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
|
||||
//import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_OBU
|
||||
//import com.zhidao.support.obu.constants.ObuConstants
|
||||
@@ -1,10 +1,9 @@
|
||||
package com.mogo.eagle.core.function.obu.mogo.receiver
|
||||
package com.mogo.eagle.core.function.datacenter.obu.receiver
|
||||
|
||||
import android.content.BroadcastReceiver
|
||||
import android.content.Context
|
||||
import android.content.Intent
|
||||
import android.util.Log
|
||||
import com.mogo.eagle.core.function.obu.mogo.MogoPrivateObuNewManager
|
||||
import com.mogo.eagle.core.function.datacenter.obu.MogoPrivateObuNewManager
|
||||
import com.mogo.support.obu.model.MogoObuRvWarningData
|
||||
import com.mogo.support.obu.model.advance.V2xWarning
|
||||
import com.mogo.support.obu.model.advance.VehBasics
|
||||
@@ -1,16 +1,11 @@
|
||||
package com.mogo.eagle.core.function.obu.mogo.receiver
|
||||
package com.mogo.eagle.core.function.datacenter.obu.receiver
|
||||
|
||||
import android.content.BroadcastReceiver
|
||||
import android.content.Context
|
||||
import android.content.Intent
|
||||
import android.util.Log
|
||||
import com.mogo.eagle.core.function.obu.mogo.MogoPrivateObuNewManager
|
||||
import com.mogo.eagle.core.function.datacenter.obu.MogoPrivateObuNewManager
|
||||
import com.mogo.support.obu.model.MogoObuRsiWarningData
|
||||
import com.mogo.support.obu.model.MogoObuRvWarningData
|
||||
import com.mogo.support.obu.model.advance.RsiWarning
|
||||
import com.mogo.support.obu.model.advance.V2xWarning
|
||||
import com.mogo.support.obu.model.advance.VehBasics
|
||||
import com.mogo.support.obu.model.advance.WarningData
|
||||
|
||||
/**
|
||||
* @author lixiaopeng
|
||||
@@ -1,10 +1,10 @@
|
||||
package com.mogo.eagle.core.function.obu.mogo.receiver
|
||||
package com.mogo.eagle.core.function.datacenter.obu.receiver
|
||||
|
||||
import android.content.BroadcastReceiver
|
||||
import android.content.Context
|
||||
import android.content.Intent
|
||||
//import com.mogo.eagle.core.function.obu.mogo.MogoObuConst
|
||||
//import com.mogo.eagle.core.function.obu.mogo.MogoPrivateObuManager
|
||||
//import com.mogo.eagle.core.function.datacenter.obu.MogoPrivateObuManager
|
||||
//import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
|
||||
//import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_OBU
|
||||
//import com.zhidao.support.obu.constants.ObuConstants
|
||||
@@ -1,10 +1,10 @@
|
||||
package com.mogo.eagle.core.function.obu.mogo.receiver
|
||||
package com.mogo.eagle.core.function.datacenter.obu.receiver
|
||||
|
||||
import android.content.BroadcastReceiver
|
||||
import android.content.Context
|
||||
import android.content.Intent
|
||||
//import com.mogo.eagle.core.function.obu.mogo.MogoObuConst
|
||||
//import com.mogo.eagle.core.function.obu.mogo.MogoPrivateObuManager
|
||||
//import com.mogo.eagle.core.function.datacenter.obu.MogoPrivateObuManager
|
||||
//import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
|
||||
//import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_OBU
|
||||
//import com.zhidao.support.obu.model.CvxHvInfoIndInfo
|
||||
@@ -1,6 +1,5 @@
|
||||
package com.mogo.eagle.core.function.obu.mogo.utils
|
||||
package com.mogo.eagle.core.function.datacenter.obu.utils
|
||||
|
||||
import android.util.Log
|
||||
import com.mogo.eagle.core.data.enums.TrafficTypeEnum
|
||||
import com.mogo.eagle.core.data.traffic.TrafficData
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
|
||||
@@ -3,7 +3,6 @@ package com.mogo.eagle.core.function.msgbox
|
||||
import android.content.Context
|
||||
import android.os.Looper
|
||||
import com.mogo.eagle.core.data.msgbox.*
|
||||
import com.mogo.eagle.core.data.notice.NoticeNormalData
|
||||
import com.mogo.eagle.core.data.report.ReportEntity
|
||||
import com.mogo.eagle.core.function.call.msgbox.CallerMsgBoxListenerManager
|
||||
import com.mogo.eagle.core.function.msgbox.db.MsgBoxDb
|
||||
|
||||
@@ -5,6 +5,7 @@ import android.content.Context
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import com.alibaba.android.arouter.facade.annotation.Route
|
||||
import com.mogo.eagle.core.data.EnvConfig
|
||||
import com.mogo.eagle.core.data.bindingcar.ModifyBindingcarInfo
|
||||
import com.mogo.eagle.core.data.constants.MogoServicePaths
|
||||
import com.mogo.eagle.core.data.deva.chain.ChainLogParam
|
||||
@@ -13,6 +14,7 @@ import com.mogo.eagle.core.data.deva.scene.SceneTAG
|
||||
import com.mogo.eagle.core.data.msgbox.MsgBoxBean
|
||||
import com.mogo.eagle.core.function.api.devatools.IDevaToolsProvider
|
||||
import com.zhjt.mogo_core_function_devatools.badcase.BadCaseManager
|
||||
import com.zhjt.mogo_core_function_devatools.env.EnvChangeManager
|
||||
import com.zhjt.mogo_core_function_devatools.binding.BindingCarManager.Companion.bindingCarManager
|
||||
import com.zhjt.mogo_core_function_devatools.funcconfig.FuncConfigCenter.Companion.bizConfigCenter
|
||||
import com.zhjt.mogo_core_function_devatools.funcconfig.FuncConfigImpl
|
||||
@@ -142,6 +144,10 @@ class DevaToolsProvider : IDevaToolsProvider {
|
||||
traceManager.syncConfig()
|
||||
}
|
||||
|
||||
override fun getEnvConfig(): EnvConfig? {
|
||||
return EnvChangeManager.getEnvConfig()
|
||||
}
|
||||
|
||||
override fun modifyCarInfo(callBack: (ModifyBindingcarInfo) -> Unit) {
|
||||
bindingCarManager.modifyCarInfo(callBack)
|
||||
}
|
||||
|
||||
@@ -11,10 +11,19 @@ import androidx.lifecycle.LifecycleCoroutineScope
|
||||
import androidx.lifecycle.LifecycleEventObserver
|
||||
import androidx.lifecycle.LifecycleOwner
|
||||
import androidx.lifecycle.lifecycleScope
|
||||
import com.mogo.eagle.core.data.config.FunctionBuildConfig
|
||||
import com.mogo.eagle.core.data.msgbox.MsgBoxBean
|
||||
import com.mogo.eagle.core.data.msgbox.MsgBoxType
|
||||
import com.mogo.eagle.core.data.msgbox.RecordBagMsg
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotRecordListener
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotRecordListenerManager
|
||||
import com.mogo.eagle.core.function.call.msgbox.CallerMsgBoxManager
|
||||
import com.mogo.eagle.core.utilcode.kotlin.lifecycleOwner
|
||||
import com.mogo.eagle.core.utilcode.mogo.AppIdentityModeUtils
|
||||
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.mogo.logger.scene.SceneConstant.Companion.M_DEVA
|
||||
import com.mogo.eagle.core.utilcode.mogo.toast.TipToast
|
||||
import com.mogo.eagle.core.utilcode.util.*
|
||||
import com.zhjt.mogo_core_function_devatools.badcase.biz.*
|
||||
import com.zhjt.mogo_core_function_devatools.badcase.consts.BadCaseConfig
|
||||
@@ -27,7 +36,7 @@ import record_cache.RecordPanelOuterClass
|
||||
import java.lang.ref.WeakReference
|
||||
import java.util.concurrent.TimeUnit
|
||||
|
||||
internal object BadCaseManager : LifecycleEventObserver {
|
||||
internal object BadCaseManager : LifecycleEventObserver, IMoGoAutopilotRecordListener {
|
||||
|
||||
const val TAG = "BadCase"
|
||||
|
||||
@@ -96,6 +105,8 @@ internal object BadCaseManager : LifecycleEventObserver {
|
||||
* 主动采集BadCase
|
||||
*/
|
||||
fun initBadCase(view: View) {
|
||||
CallerAutopilotRecordListenerManager.addListener(TAG, this)
|
||||
|
||||
val activity = view.context as? FragmentActivity
|
||||
?: throw IllegalStateException("please ensure context is FragmentActivity.")
|
||||
view.setOnClickListener {
|
||||
@@ -193,24 +204,62 @@ internal object BadCaseManager : LifecycleEventObserver {
|
||||
}
|
||||
}
|
||||
|
||||
override fun onAutopilotRecordResult(recordPanel: RecordPanelOuterClass.RecordPanel) {
|
||||
super.onAutopilotRecordResult(recordPanel)
|
||||
CallerLogger.d("$M_DEVA$TAG", "recordKey=${recordPanel.key},stat=${recordPanel.stat}")
|
||||
if (BadCaseConfig.recordKeyList.contains(recordPanel.key)) {
|
||||
if (recordPanel.stat == 100 || recordPanel.stat == 101) {
|
||||
//成功结束录制
|
||||
TipToast.shortTip(
|
||||
"${
|
||||
TimeUtils.millis2String(
|
||||
System.currentTimeMillis(),
|
||||
TimeUtils.getHourMinSecondFormat()
|
||||
)
|
||||
} bag录制成功"
|
||||
)
|
||||
}
|
||||
if (recordPanel.stat == 200) {
|
||||
//录制失败
|
||||
TipToast.shortTip(
|
||||
"${
|
||||
TimeUtils.millis2String(
|
||||
System.currentTimeMillis(),
|
||||
TimeUtils.getHourMinSecondFormat()
|
||||
)
|
||||
} bag录制失败"
|
||||
)
|
||||
}
|
||||
return
|
||||
}
|
||||
//在工控机taxi2.3.0版本和Bus2.4.0版本上不支持被动录包,不进行被动录包的弹窗
|
||||
BadCaseConfig.dockerVersion?.let {
|
||||
if (it.contains("taxi") && it.contains("2.3.0")) {
|
||||
return
|
||||
}
|
||||
if (it.contains("bus") && it.contains("2.4.0")) {
|
||||
return
|
||||
}
|
||||
}
|
||||
//处于非美化模式下弹窗;是地图数据采集任务时即type=2时,不弹窗
|
||||
if (!FunctionBuildConfig.isDemoMode && (recordPanel.stat == 100 || recordPanel.stat == 101) && recordPanel.type != 2) {
|
||||
//只在司机屏生效,乘客屏不生效
|
||||
if (AppIdentityModeUtils.isDriver(FunctionBuildConfig.appIdentityMode)) {
|
||||
CallerMsgBoxManager.saveMsgBox(
|
||||
MsgBoxBean(
|
||||
MsgBoxType.RECORD, RecordBagMsg(
|
||||
recordPanel.key, recordPanel.stat, recordPanel.id,
|
||||
recordPanel.type, recordPanel.filename, recordPanel.note
|
||||
)
|
||||
)
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
override fun onStateChanged(source: LifecycleOwner, event: Event) {
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
internal fun RecordPanelOuterClass.RecordPanel.toRecord(): AutoPilotRecord =
|
||||
AutoPilotRecord().also {
|
||||
it.id = this.id
|
||||
it.stat = this.stat
|
||||
it.key = this.key.toString()
|
||||
it.note = this.note
|
||||
it.type = this.type
|
||||
it.total = this.totalSize
|
||||
it.fileName = this.filename
|
||||
it.duration = this.duration.toDouble()
|
||||
it.diskFree = this.diskFree
|
||||
it.consumed = false
|
||||
}
|
||||
@@ -373,6 +373,7 @@ class InitiativeBadCaseWindow constructor(activity: Activity) : View.OnTouchList
|
||||
|
||||
override fun onAutopilotRecordResult(recordPanel: RecordPanelOuterClass.RecordPanel) {
|
||||
CallerLogger.d("${M_DEVA}${TAG}", "-- 收到工控机录制任务回调 -- $recordPanel")
|
||||
|
||||
ThreadUtils.runOnUiThread {
|
||||
if (recordKey == null) {
|
||||
recordKey = recordPanel.key.toString()
|
||||
|
||||
@@ -4,6 +4,7 @@ import android.content.Context.MODE_PRIVATE
|
||||
import android.os.Process
|
||||
import com.mogo.commons.constants.*
|
||||
import com.mogo.commons.debug.*
|
||||
import com.mogo.eagle.core.data.EnvConfig
|
||||
import com.mogo.eagle.core.function.call.map.*
|
||||
import com.mogo.eagle.core.utilcode.mogo.storage.*
|
||||
import com.mogo.eagle.core.utilcode.util.*
|
||||
@@ -47,6 +48,11 @@ object EnvChangeManager {
|
||||
}
|
||||
}
|
||||
|
||||
fun getConfigNetMode(): Int {
|
||||
val cache = getConfig()
|
||||
return cache?.second ?: -1
|
||||
}
|
||||
|
||||
fun getNetMode(): String {
|
||||
val cache = getConfig()
|
||||
return if (cache == null) {
|
||||
@@ -88,6 +94,4 @@ object EnvChangeManager {
|
||||
if (it.first == "010") 116.397446 else 112.582654,
|
||||
if (it.first == "010") 39.909004 else 26.816478)
|
||||
}
|
||||
|
||||
data class EnvConfig(val cityCode: String, val netMode: Int, val lat: Double, val lon: Double)
|
||||
}
|
||||
@@ -69,11 +69,10 @@ dependencies {
|
||||
// debugImplementation rootProject.ext.dependencies.debugleakcanary
|
||||
// releaseImplementation rootProject.ext.dependencies.releaseleakcanary
|
||||
|
||||
implementation rootProject.ext.dependencies.mogoobu
|
||||
implementation rootProject.ext.dependencies.arouter
|
||||
kapt rootProject.ext.dependencies.aroutercompiler
|
||||
|
||||
implementation rootProject.ext.dependencies.mogoami
|
||||
|
||||
implementation rootProject.ext.dependencies.android_start_up
|
||||
implementation rootProject.ext.dependencies.cicle_indicator
|
||||
implementation rootProject.ext.dependencies.koomnative
|
||||
@@ -88,7 +87,6 @@ dependencies {
|
||||
api rootProject.ext.dependencies.mogo_core_data
|
||||
api rootProject.ext.dependencies.mogo_core_utils
|
||||
api rootProject.ext.dependencies.mogo_core_network
|
||||
api rootProject.ext.dependencies.mogo_core_function_obu_mogo
|
||||
api rootProject.ext.dependencies.mogo_core_function_map
|
||||
api rootProject.ext.dependencies.mogo_core_function_v2x
|
||||
api rootProject.ext.dependencies.mogo_core_function_devatools
|
||||
@@ -104,14 +102,12 @@ dependencies {
|
||||
api project(':core:mogo-core-res')
|
||||
api project(':core:mogo-core-data')
|
||||
api project(':core:mogo-core-utils')
|
||||
api project(':core:function-impl:mogo-core-function-obu-mogo')
|
||||
api project(':core:function-impl:mogo-core-function-map')
|
||||
api project(':core:function-impl:mogo-core-function-v2x')
|
||||
api project(':core:function-impl:mogo-core-function-devatools')
|
||||
api project(':core:function-impl:mogo-core-function-chat')
|
||||
api project(':core:function-impl:mogo-core-function-datacenter')
|
||||
api project(':core:function-impl:mogo-core-function-biz')
|
||||
|
||||
api project(':core:mogo-core-function-call')
|
||||
api project(':libraries:mogo-adas')
|
||||
api project(':libraries:map-usbcamera')
|
||||
|
||||
@@ -3,7 +3,11 @@ package com.mogo.eagle.core.function.hmi.receiver
|
||||
import android.content.BroadcastReceiver
|
||||
import android.content.Context
|
||||
import android.content.Intent
|
||||
import com.mogo.eagle.core.function.call.hmi.CallerHmiManager
|
||||
import android.view.View
|
||||
import com.mogo.eagle.core.data.enums.DataSourceType
|
||||
import com.mogo.eagle.core.function.api.hmi.view.IViewControlListener.Companion.LimitingVelocityView_TAG
|
||||
import com.mogo.eagle.core.function.call.hmi.CallerHmiViewControlListenerManager
|
||||
import com.mogo.eagle.core.function.call.v2x.CallerViewLimitingVelocityListenerManager
|
||||
import com.mogo.eagle.core.function.hmi.WaringConst
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_HMI
|
||||
@@ -57,13 +61,13 @@ class V2XLimitingVelocityBroadcastReceiver : BroadcastReceiver() {
|
||||
* @param limitingVelocitySpeed 限速速度
|
||||
*/
|
||||
private fun dispatchShowWaring(limitingVelocitySpeed: Int) {
|
||||
CallerHmiManager.showLimitingVelocity(limitingVelocitySpeed)
|
||||
CallerViewLimitingVelocityListenerManager.invokeOnLimitingVelocityChange(limitingVelocitySpeed,DataSourceType.MAP)
|
||||
}
|
||||
|
||||
/**
|
||||
* 关闭限速标志
|
||||
*/
|
||||
private fun dispatchCloseWaring() {
|
||||
CallerHmiManager.disableLimitingVelocity()
|
||||
CallerHmiViewControlListenerManager.invokeVisible(LimitingVelocityView_TAG, View.GONE)
|
||||
}
|
||||
}
|
||||
@@ -3,7 +3,9 @@ package com.mogo.eagle.core.function.hmi.receiver
|
||||
import android.content.BroadcastReceiver
|
||||
import android.content.Context
|
||||
import android.content.Intent
|
||||
import com.mogo.eagle.core.function.call.hmi.CallerHmiManager
|
||||
import com.mogo.eagle.core.data.enums.DataSourceType
|
||||
import com.mogo.eagle.core.data.enums.TrafficLightEnum
|
||||
import com.mogo.eagle.core.function.call.trafficlight.CallerTrafficLightListenerManager
|
||||
import com.mogo.eagle.core.function.hmi.WaringConst
|
||||
|
||||
/**
|
||||
@@ -57,11 +59,17 @@ class V2XTrafficLightBroadcastReceiver : BroadcastReceiver() {
|
||||
* @param trafficLightCountDown 对应交通灯倒计时,如果倒计时为0,则disable
|
||||
*/
|
||||
private fun dispatchShowWaring(trafficLightCheckType: Int, trafficLightCountDown: Int) {
|
||||
CallerHmiManager.showWarningTrafficLight(trafficLightCheckType,1)
|
||||
val trafficLightType = when(trafficLightCheckType){
|
||||
1 -> TrafficLightEnum.RED
|
||||
2 -> TrafficLightEnum.YELLOW
|
||||
3 -> TrafficLightEnum.GREEN
|
||||
else -> TrafficLightEnum.BLACK
|
||||
}
|
||||
CallerTrafficLightListenerManager.showTrafficLight(trafficLightType,DataSourceType.DEFAULT)
|
||||
when(trafficLightCheckType){
|
||||
1 -> CallerHmiManager.changeCountdownRed(trafficLightCountDown)
|
||||
2 -> CallerHmiManager.changeCountdownYellow(trafficLightCountDown)
|
||||
3 -> CallerHmiManager.changeCountdownGreen(trafficLightCountDown)
|
||||
1 -> CallerTrafficLightListenerManager.changeCountdownRed(trafficLightCountDown)
|
||||
2 -> CallerTrafficLightListenerManager.changeCountdownYellow(trafficLightCountDown)
|
||||
3 -> CallerTrafficLightListenerManager.changeCountdownGreen(trafficLightCountDown)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -69,6 +77,6 @@ class V2XTrafficLightBroadcastReceiver : BroadcastReceiver() {
|
||||
* 关闭交通灯
|
||||
*/
|
||||
private fun dispatchCloseWaring() {
|
||||
CallerHmiManager.disableWarningTrafficLight()
|
||||
CallerTrafficLightListenerManager.disableTrafficLight()
|
||||
}
|
||||
}
|
||||
@@ -4,15 +4,17 @@ import android.content.BroadcastReceiver
|
||||
import android.content.Context
|
||||
import android.content.Intent
|
||||
import android.util.Log
|
||||
import com.mogo.eagle.core.data.enums.DataSourceType
|
||||
import com.mogo.eagle.core.data.enums.EventTypeEnumNew
|
||||
import com.mogo.eagle.core.function.call.hmi.CallerHmiManager
|
||||
import com.mogo.eagle.core.function.hmi.WaringConst
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_HMI
|
||||
import com.mogo.eagle.core.data.enums.EventTypeEnum
|
||||
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.call.msgbox.CallerMsgBoxManager
|
||||
import com.mogo.eagle.core.function.call.v2x.CallerViewLimitingVelocityListenerManager
|
||||
|
||||
/**
|
||||
* V2X 预警广播接收。用于跨应用,跨进程,内部也可以通过这种方式弹出预警提示框
|
||||
@@ -75,8 +77,8 @@ class V2XWarningBroadcastReceiver : BroadcastReceiver() {
|
||||
ttsContent: String?,
|
||||
tag: String?
|
||||
) {
|
||||
if (EventTypeEnum.TYPE_USECASE_ID_IVP.poiType == v2xType.toString()) {
|
||||
CallerHmiManager.showLimitingVelocity(1)
|
||||
if (EventTypeEnumNew.TYPE_USECASE_ID_IVP_RED.poiType == v2xType.toString()) {
|
||||
CallerViewLimitingVelocityListenerManager.invokeOnLimitingVelocityChange(1,DataSourceType.MAP)
|
||||
}
|
||||
if (alertContent.isNullOrEmpty() || ttsContent.isNullOrEmpty()) {
|
||||
Log.d("MsgBox-V2XWarningBR", "alertContent或ttsContent为空!")
|
||||
|
||||
@@ -1,14 +1,13 @@
|
||||
package com.mogo.eagle.core.function.hmi.ui
|
||||
|
||||
import android.content.Context
|
||||
import android.os.Bundle
|
||||
import android.text.TextUtils
|
||||
import android.util.Log
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import android.view.animation.AlphaAnimation
|
||||
import android.view.animation.Animation
|
||||
import android.view.animation.LinearInterpolator
|
||||
import android.widget.FrameLayout
|
||||
import androidx.lifecycle.lifecycleScope
|
||||
import com.alibaba.android.arouter.facade.annotation.Route
|
||||
import com.alibaba.android.arouter.launcher.ARouter
|
||||
@@ -24,34 +23,21 @@ import com.mogo.eagle.core.data.constants.MoGoFragmentPaths
|
||||
import com.mogo.eagle.core.data.deva.bizconfig.FuncBizConfig.Companion.BIZ_RTS
|
||||
import com.mogo.eagle.core.data.deva.bizconfig.FuncBizConfig.Companion.V2I
|
||||
import com.mogo.eagle.core.data.dispatch.DispatchAdasAutoPilotLocReceiverBean
|
||||
import com.mogo.eagle.core.data.enums.EventTypeEnum
|
||||
import com.mogo.eagle.core.data.enums.EventTypeEnumNew
|
||||
import com.mogo.eagle.core.data.enums.WarningDirectionEnum
|
||||
import com.mogo.eagle.core.data.map.Infrastructure
|
||||
import com.mogo.eagle.core.data.msgbox.MsgBoxBean
|
||||
import com.mogo.eagle.core.data.msgbox.MsgBoxType
|
||||
import com.mogo.eagle.core.data.msgbox.RecordBagMsg
|
||||
import com.mogo.eagle.core.data.notice.NoticeNormalData
|
||||
import com.mogo.eagle.core.data.notice.NoticeTrafficStylePushData
|
||||
import com.mogo.eagle.core.data.report.ReportEntity
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotRecordListener
|
||||
import com.mogo.eagle.core.function.api.hmi.IMoGoHmiViewProxy
|
||||
import com.mogo.eagle.core.function.api.hmi.IMoGoHmiViewProxy.IViewNotificationProvider
|
||||
import com.mogo.eagle.core.function.api.hmi.view.IViewLimitingVelocity
|
||||
import com.mogo.eagle.core.function.api.hmi.view.IViewNotification
|
||||
import com.mogo.eagle.core.function.api.hmi.view.IViewTrafficLight
|
||||
import com.mogo.eagle.core.function.api.hmi.warning.IMoGoHmiProvider
|
||||
import com.mogo.eagle.core.function.api.hmi.warning.IMoGoWarningStatusListener
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotManager
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotRecordListenerManager
|
||||
import com.mogo.eagle.core.function.call.biz.CallerFuncBizManager
|
||||
import com.mogo.eagle.core.function.call.devatools.CallerDevaToolsManager
|
||||
import com.mogo.eagle.core.function.call.hmi.CallerHmiManager
|
||||
import com.mogo.eagle.core.function.call.map.CallerMapDataCollectorManager
|
||||
import com.mogo.eagle.core.function.call.hmi.CallerHmiViewControlListenerManager
|
||||
import com.mogo.eagle.core.function.call.map.CallerMapUIServiceManager
|
||||
import com.mogo.eagle.core.function.call.map.CallerVisualAngleManager
|
||||
import com.mogo.eagle.core.function.call.map.CallerVisualAngleManager.Scene.Turning
|
||||
import com.mogo.eagle.core.function.call.msgbox.CallerMsgBoxManager
|
||||
import com.mogo.eagle.core.function.hmi.R
|
||||
import com.mogo.eagle.core.function.hmi.notification.WarningFloat
|
||||
import com.mogo.eagle.core.function.hmi.ui.bindingcar.ModifyBindingCarDialog
|
||||
@@ -63,12 +49,10 @@ import com.mogo.eagle.core.function.hmi.ui.notice.NoticeCheckDialog
|
||||
import com.mogo.eagle.core.function.hmi.ui.notice.traffic.NoticeTrafficDialog
|
||||
import com.mogo.eagle.core.function.hmi.ui.setting.CameraLiveView.Companion.cameraLiveView
|
||||
import com.mogo.eagle.core.function.hmi.ui.setting.IPCReportWindow
|
||||
import com.mogo.eagle.core.function.hmi.ui.setting.ToggleDebugView.Companion.toggleDebugView
|
||||
import com.mogo.eagle.core.function.hmi.ui.setting.ToolsView.Companion.toolsView
|
||||
import com.mogo.eagle.core.function.hmi.ui.tools.AdUpgradeDialog
|
||||
import com.mogo.eagle.core.function.hmi.ui.widget.DemoModeView
|
||||
import com.mogo.eagle.core.function.hmi.ui.widget.StatusBarView
|
||||
import com.mogo.eagle.core.function.hmi.ui.widget.V2XNotificationView
|
||||
import com.mogo.eagle.core.function.main.DisplayEffectsHelper
|
||||
import com.mogo.eagle.core.utilcode.kotlin.safeCancel
|
||||
import com.mogo.eagle.core.utilcode.mogo.AppIdentityModeUtils
|
||||
@@ -76,21 +60,13 @@ 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.mogo.logger.scene.SceneConstant.Companion.M_HMI
|
||||
import com.mogo.eagle.core.utilcode.mogo.storage.SharedPrefsMgr
|
||||
import com.mogo.eagle.core.utilcode.mogo.toast.TipToast
|
||||
import com.mogo.eagle.core.utilcode.reminder.api.IReminder
|
||||
import com.mogo.eagle.core.utilcode.util.ThreadUtils
|
||||
import com.mogo.eagle.core.utilcode.util.TimeUtils
|
||||
import com.mogo.eagle.core.utilcode.util.TimeUtils.millis2String
|
||||
import com.mogo.eagle.core.utilcode.util.ToastUtils
|
||||
import com.zhjt.mogo_core_function_devatools.badcase.consts.BadCaseConfig
|
||||
import com.zhjt.service_biz.BizConfig
|
||||
import kotlinx.android.synthetic.main.fragment_hmi.*
|
||||
import kotlinx.coroutines.Job
|
||||
import kotlinx.coroutines.delay
|
||||
import kotlinx.coroutines.launch
|
||||
import kotlinx.coroutines.suspendCancellableCoroutine
|
||||
import record_cache.RecordPanelOuterClass
|
||||
|
||||
import kotlinx.coroutines.*
|
||||
import java.util.concurrent.atomic.AtomicReference
|
||||
|
||||
/**
|
||||
* @author xiaoyuzhou
|
||||
@@ -100,217 +76,24 @@ import record_cache.RecordPanelOuterClass
|
||||
@Route(path = MoGoFragmentPaths.PATH_FRAGMENT_HMI)
|
||||
class MoGoHmiFragment : MvpFragment<MoGoHmiContract.View?, HmiPresenter?>(),
|
||||
IMoGoHmiProvider,
|
||||
IMoGoHmiViewProxy,
|
||||
MoGoHmiContract.View,
|
||||
IMoGoAutopilotRecordListener,
|
||||
IViewNotificationProvider {
|
||||
MoGoHmiContract.View {
|
||||
|
||||
companion object {
|
||||
private const val TAG = "MoGoHmiFragment"
|
||||
}
|
||||
|
||||
//StatusView
|
||||
private var statusBarView: StatusBarView? = null
|
||||
|
||||
// HMI 视图控件代理
|
||||
// 红绿灯 View代理
|
||||
private var mViewTrafficLight: IViewTrafficLight? = null
|
||||
|
||||
// 限速 View代理
|
||||
private var mViewLimitingVelocity: IViewLimitingVelocity? = null
|
||||
|
||||
// V2X预警弹窗 View 代理
|
||||
private var mViewNotificationProvider: IViewNotificationProvider? = null
|
||||
|
||||
private var lastSpeakJob: Job? = null
|
||||
|
||||
private val lastSpeakJob by lazy { AtomicReference<Job>() }
|
||||
private var lastShowV2XJob: Job? = null
|
||||
|
||||
private var showingV2XTip: IReminder? = null
|
||||
|
||||
override fun initViews() {
|
||||
initViewShowWithConfig()
|
||||
// 同步AppInfo Config信息
|
||||
CallerDevaToolsManager.syncConfig() //todo arrow 页面初始化 放到合适位置
|
||||
|
||||
//todo 抽象fragment能力 放入baseHmi
|
||||
val decorView = requireActivity().window.decorView as FrameLayout
|
||||
statusBarView = decorView.findViewWithTag<View>("status_bar") as StatusBarView?
|
||||
//设置StatusBar初始状态
|
||||
if (FunctionBuildConfig.isDemoMode) {
|
||||
statusBarView?.updateRightView(true, "demoMode", DemoModeView(requireContext()))
|
||||
} else {
|
||||
statusBarView?.updateRightView(false, "demoMode", DemoModeView(requireContext()))
|
||||
}
|
||||
|
||||
ivCameraIcon?.setOnClickListener {
|
||||
cameraLiveView.showCameraList(
|
||||
context,
|
||||
CallerFuncBizManager.bizProvider.getCameraList
|
||||
) { liveStatus ->
|
||||
if (liveStatus) {
|
||||
ivCameraIcon.setBackgroundResource(R.drawable.icon_camera_selected)
|
||||
} else {
|
||||
ivCameraIcon.setBackgroundResource(R.drawable.icon_camera_nor)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
ivToolsIcon?.setOnClickListener {
|
||||
toolsView.showToolsFloat(requireContext())
|
||||
}
|
||||
|
||||
viewShowDebugView.setOnLongClickListener {
|
||||
toggleDebugView.toggle(requireContext())
|
||||
true
|
||||
}
|
||||
|
||||
//美化模式隐藏开关
|
||||
viewDemoModeSwitch.setOnClickListener {
|
||||
//只在司机端设置美化模式开关功能
|
||||
if (AppIdentityModeUtils.isDriver(FunctionBuildConfig.appIdentityMode)) {
|
||||
//单次查询,是否有行程信息(订单进行中时点击不生效),autopilotControlParameters为null代表不处于自动驾驶状态下
|
||||
if (CallerAutoPilotStatusListenerManager.getAutoPilotStatusInfo().autopilotControlParameters == null) {
|
||||
FunctionBuildConfig.isDemoMode = !FunctionBuildConfig.isDemoMode
|
||||
context?.let {
|
||||
CallerHmiManager.updateStatusBarLeftView(
|
||||
FunctionBuildConfig.isDemoMode,
|
||||
"demoMode",
|
||||
DemoModeView(it)
|
||||
)
|
||||
}
|
||||
CallerAutoPilotManager.setDemoMode(FunctionBuildConfig.isDemoMode)
|
||||
if (!FunctionBuildConfig.isDemoMode) {
|
||||
//关闭美化模式时,通知工控机
|
||||
CallerAutoPilotManager.setIPCDemoMode(FunctionBuildConfig.isDemoMode)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
cbMsgBoxDriver.setOnCheckedChangeListener { _, isChecked ->
|
||||
if (isChecked) {
|
||||
viewDriverMsgBoxList.visibility = View.VISIBLE
|
||||
viewDriverMsgBoxList.notifyData()
|
||||
viewDriverMsgBoxBubble.visibility = View.GONE
|
||||
viewDriverMsgBoxBubble.isShowData(false)
|
||||
CallerHmiManager.updateDriverMsgBoxTipView(false)
|
||||
} else {
|
||||
viewDriverMsgBoxList.visibility = View.GONE
|
||||
viewDriverMsgBoxBubble.visibility = View.VISIBLE
|
||||
viewDriverMsgBoxBubble.isShowData(true)
|
||||
}
|
||||
}
|
||||
|
||||
cbMsgBoxPassenger.setOnCheckedChangeListener { _, isChecked ->
|
||||
if (isChecked) {
|
||||
viewPassengerMsgBoxList.visibility = View.VISIBLE
|
||||
viewPassengerMsgBoxBubble.visibility = View.GONE
|
||||
viewPassengerMsgBoxBubble.isShowData(false)
|
||||
CallerHmiManager.updatePassengerMsgBoxTipView(false)
|
||||
} else {
|
||||
viewPassengerMsgBoxList.visibility = View.GONE
|
||||
viewPassengerMsgBoxBubble.visibility = View.VISIBLE
|
||||
viewPassengerMsgBoxBubble.isShowData(true)
|
||||
}
|
||||
}
|
||||
|
||||
if (AppIdentityModeUtils.isDriver(FunctionBuildConfig.appIdentityMode)) {
|
||||
cbMsgBoxDriver.visibility = View.VISIBLE
|
||||
viewDriverMsgBoxBubble.visibility = View.VISIBLE
|
||||
}
|
||||
if (AppIdentityModeUtils.isPassenger(FunctionBuildConfig.appIdentityMode) &&
|
||||
AppIdentityModeUtils.isTaxi(FunctionBuildConfig.appIdentityMode)
|
||||
) {
|
||||
cbMsgBoxPassenger.visibility = View.VISIBLE
|
||||
viewPassengerMsgBoxBubble.visibility = View.VISIBLE
|
||||
}
|
||||
}
|
||||
|
||||
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
||||
super.onViewCreated(view, savedInstanceState)
|
||||
CallerAutopilotRecordListenerManager.addListener(TAG, this)
|
||||
|
||||
// 首次初始化使用默认视图
|
||||
setProxyTrafficLightView(viewTrafficLightVr)
|
||||
setProxyLimitingSpeedView(viewLimitingVelocity)
|
||||
setViewNotificationProvider(this)
|
||||
}
|
||||
|
||||
override fun getNotificationView(): IViewNotification? =
|
||||
context?.let { V2XNotificationView(it) }
|
||||
|
||||
override fun onAutopilotRecordResult(recordPanel: RecordPanelOuterClass.RecordPanel) { //todo 数据中心
|
||||
CallerLogger.d("$M_HMI$TAG", "recordKey=${recordPanel.key},stat=${recordPanel.stat}")
|
||||
if (BadCaseConfig.recordKeyList.contains(recordPanel.key)) {
|
||||
if (recordPanel.stat == 100 || recordPanel.stat == 101) {
|
||||
//成功结束录制
|
||||
TipToast.shortTip(
|
||||
"${
|
||||
millis2String(
|
||||
System.currentTimeMillis(),
|
||||
TimeUtils.getHourMinSecondFormat()
|
||||
)
|
||||
} bag录制成功"
|
||||
)
|
||||
}
|
||||
if (recordPanel.stat == 200) {
|
||||
//录制失败
|
||||
TipToast.shortTip(
|
||||
"${
|
||||
millis2String(
|
||||
System.currentTimeMillis(),
|
||||
TimeUtils.getHourMinSecondFormat()
|
||||
)
|
||||
} bag录制失败"
|
||||
)
|
||||
}
|
||||
return
|
||||
}
|
||||
//在工控机taxi2.3.0版本和Bus2.4.0版本上不支持被动录包,不进行被动录包的弹窗
|
||||
BadCaseConfig.dockerVersion?.let {
|
||||
if (it.contains("taxi") && it.contains("2.3.0")) {
|
||||
return
|
||||
}
|
||||
if (it.contains("bus") && it.contains("2.4.0")) {
|
||||
return
|
||||
}
|
||||
}
|
||||
//处于非美化模式下弹窗;是地图数据采集任务时即type=2时,不弹窗
|
||||
if (!FunctionBuildConfig.isDemoMode && (recordPanel.stat == 100 || recordPanel.stat == 101) && recordPanel.type != 2) {
|
||||
//只在司机屏生效,乘客屏不生效
|
||||
if (AppIdentityModeUtils.isDriver(FunctionBuildConfig.appIdentityMode)) {
|
||||
CallerMsgBoxManager.saveMsgBox(
|
||||
MsgBoxBean(
|
||||
MsgBoxType.RECORD, RecordBagMsg(
|
||||
recordPanel.key, recordPanel.stat, recordPanel.id,
|
||||
recordPanel.type, recordPanel.filename, recordPanel.note
|
||||
)
|
||||
)
|
||||
)
|
||||
}
|
||||
}
|
||||
if (!FunctionBuildConfig.isDemoMode && recordPanel.type == 2 && (
|
||||
recordPanel.stat == 101 || //工控机采集完成-被动完成
|
||||
recordPanel.stat == 100 || //工控机采集完成-主动完成
|
||||
recordPanel.stat == 102 || //工控机达到最大采集时长
|
||||
recordPanel.stat == 103) //工控机磁盘满了
|
||||
) {
|
||||
CallerMapDataCollectorManager.finish(
|
||||
recordPanel.id, recordPanel.stat, "", recordPanel.filename
|
||||
?: "", recordPanel.note ?: ""
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
override fun onDestroyView() {
|
||||
super.onDestroyView()
|
||||
CallerAutopilotRecordListenerManager.removeListener(TAG)
|
||||
}
|
||||
|
||||
/**
|
||||
* ok
|
||||
* 工控机重启返回结果 todo 确认数据源
|
||||
* 工控机重启返回结果
|
||||
* @param code
|
||||
* @param msg
|
||||
*/
|
||||
@@ -352,121 +135,41 @@ class MoGoHmiFragment : MvpFragment<MoGoHmiContract.View?, HmiPresenter?>(),
|
||||
}
|
||||
}
|
||||
|
||||
/** todo----------------------------------------------- **/
|
||||
override fun setViewNotificationProvider(provider: IViewNotificationProvider) {
|
||||
mViewNotificationProvider = provider
|
||||
}
|
||||
|
||||
override fun setStatusBarDarkOrLight(light: Boolean) {
|
||||
statusBarView?.setStatusBarDarkOrLight(light)
|
||||
CallerHmiViewControlListenerManager.setStatusBarDarkOrLight(StatusBarView.TAG, light)
|
||||
}
|
||||
|
||||
override fun updateStatusBarRightView(insert: Boolean, tag: String, viewGroup: ViewGroup) {
|
||||
statusBarView?.updateRightView(insert, tag, viewGroup)
|
||||
CallerHmiViewControlListenerManager.updateStatusBarRightView(
|
||||
StatusBarView.TAG,
|
||||
insert,
|
||||
tag,
|
||||
viewGroup
|
||||
)
|
||||
}
|
||||
|
||||
override fun updateStatusBarLeftView(insert: Boolean, tag: String, viewGroup: ViewGroup) {
|
||||
statusBarView?.updateLeftView(insert, tag, viewGroup)
|
||||
CallerHmiViewControlListenerManager.updateStatusBarLeftView(
|
||||
StatusBarView.TAG,
|
||||
insert,
|
||||
tag,
|
||||
viewGroup
|
||||
)
|
||||
}
|
||||
|
||||
override fun updateStatusBarDownloadView(insert: Boolean, tag: String, progress: Int) {
|
||||
statusBarView?.updateProgressView(insert, tag, progress)
|
||||
CallerHmiViewControlListenerManager.updateStatusBarDownloadView(
|
||||
StatusBarView.TAG,
|
||||
insert,
|
||||
tag,
|
||||
progress
|
||||
)
|
||||
}
|
||||
|
||||
override fun updateMfStatus(tag: String, status: Boolean) {
|
||||
statusBarView?.updateMfStatus(tag, status)
|
||||
CallerHmiViewControlListenerManager.updateMfStatus(StatusBarView.TAG, tag, status)
|
||||
}
|
||||
|
||||
override fun updateDriverMsgBoxTipView(show: Boolean) {
|
||||
if (show) {
|
||||
MsgBoxTipView.visibility = View.VISIBLE
|
||||
} else {
|
||||
MsgBoxTipView.visibility = View.GONE
|
||||
}
|
||||
}
|
||||
|
||||
override fun updatePassengerMsgBoxTipView(show: Boolean) {
|
||||
if (show) {
|
||||
MsgBoxPTipView.visibility = View.VISIBLE
|
||||
} else {
|
||||
MsgBoxPTipView.visibility = View.GONE
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置 红绿灯 代理View
|
||||
*/
|
||||
override fun setProxyTrafficLightView(view: IViewTrafficLight) {
|
||||
mViewTrafficLight = view
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置 限速 代理View
|
||||
*/
|
||||
override fun setProxyLimitingSpeedView(view: IViewLimitingVelocity) {
|
||||
mViewLimitingVelocity = view
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据配置文件初始化视图显示
|
||||
*/
|
||||
private fun initViewShowWithConfig() {
|
||||
// 控制 速度 展示
|
||||
if (HmiBuildConfig.isShowSpeedView) {
|
||||
setSpeedChartViewVisibility(View.VISIBLE)
|
||||
} else {
|
||||
setSpeedChartViewVisibility(View.GONE)
|
||||
}
|
||||
|
||||
// 控制 自动驾驶状态 展示
|
||||
if (HmiBuildConfig.isShowAutopilotStatusView) {
|
||||
setAutopilotStatusViewVisibility(View.VISIBLE)
|
||||
} else {
|
||||
setAutopilotStatusViewVisibility(View.GONE)
|
||||
}
|
||||
|
||||
// 控制 切换视角 展示
|
||||
if (HmiBuildConfig.isShowPerspectiveSwitchView) {
|
||||
setPerspectiveSwitchViewVisibility(View.VISIBLE)
|
||||
} else {
|
||||
setPerspectiveSwitchViewVisibility(View.GONE)
|
||||
}
|
||||
|
||||
// 控制 切换视角 展示
|
||||
if (HmiBuildConfig.isShowToolsView) {
|
||||
setToolsViewVisibility(View.VISIBLE)
|
||||
} else {
|
||||
setToolsViewVisibility(View.GONE)
|
||||
}
|
||||
|
||||
// 控制 BadCase 按钮展示
|
||||
if (HmiBuildConfig.isShowBadCaseView) {
|
||||
ivBadCaseTools.visibility = View.VISIBLE
|
||||
ivAiCollectTools.visibility = View.VISIBLE
|
||||
CallerDevaToolsManager.initBadCase(ivBadCaseTools) //todo 新超 封装在hmi view
|
||||
CallerDevaToolsManager.initAiCollect(ivAiCollectTools) //todo 新超 封装在hmi view
|
||||
} else {
|
||||
ivBadCaseTools.visibility = View.GONE
|
||||
ivAiCollectTools.visibility = View.GONE
|
||||
}
|
||||
|
||||
// 控制 红绿灯 展示
|
||||
if (HmiBuildConfig.isShowTrafficLightView) {
|
||||
setTrafficLightVrVisibility(View.VISIBLE)
|
||||
} else {
|
||||
setTrafficLightVrVisibility(View.GONE)
|
||||
}
|
||||
|
||||
// 控制 远程摄像头图标 展示
|
||||
if (HmiBuildConfig.isShowCameraView) {
|
||||
setCameraViewVisibility(View.VISIBLE)
|
||||
} else {
|
||||
setCameraViewVisibility(View.GONE)
|
||||
}
|
||||
}
|
||||
|
||||
/** todo----------------------------------------------- **/
|
||||
|
||||
override fun getLayoutId(): Int {
|
||||
return R.layout.fragment_hmi
|
||||
}
|
||||
@@ -483,31 +186,6 @@ class MoGoHmiFragment : MvpFragment<MoGoHmiContract.View?, HmiPresenter?>(),
|
||||
DisplayEffectsHelper.getInstance().display()
|
||||
}
|
||||
|
||||
/** todo----------------------------------------------- **/
|
||||
override fun setSpeedChartViewVisibility(visibility: Int) {
|
||||
viewSpeedChart?.visibility = visibility
|
||||
}
|
||||
|
||||
override fun setTrafficLightVrVisibility(visibility: Int) {
|
||||
mViewTrafficLight?.visibility = visibility
|
||||
}
|
||||
|
||||
override fun setAutopilotStatusViewVisibility(visibility: Int) {
|
||||
viewAutopilotStatus?.visibility = visibility
|
||||
}
|
||||
|
||||
override fun setPerspectiveSwitchViewVisibility(visibility: Int) {
|
||||
viewPerspectiveSwitch?.visibility = visibility
|
||||
}
|
||||
|
||||
override fun setToolsViewVisibility(visibility: Int) {
|
||||
ivToolsIcon?.visibility = visibility
|
||||
}
|
||||
|
||||
override fun setCameraViewVisibility(visibility: Int) {
|
||||
ivCameraIcon?.visibility = visibility
|
||||
}
|
||||
|
||||
/** todo----------------------------------------------- **/
|
||||
/**
|
||||
* 不展示顶部弹窗,其它保留
|
||||
@@ -526,7 +204,7 @@ class MoGoHmiFragment : MvpFragment<MoGoHmiContract.View?, HmiPresenter?>(),
|
||||
playTts && !AppIdentityModeUtils.isPassenger(FunctionBuildConfig.appIdentityMode)
|
||||
activity?.let {
|
||||
val warningContent = alertContent
|
||||
?: EventTypeEnum.getWarningContent(v2xType)
|
||||
?: EventTypeEnumNew.getWarningContent(v2xType)
|
||||
|
||||
//占道施工预警
|
||||
if (v2xType == "10006" || v2xType == "100061") {
|
||||
@@ -551,10 +229,7 @@ class MoGoHmiFragment : MvpFragment<MoGoHmiContract.View?, HmiPresenter?>(),
|
||||
"$M_HMI$TAG",
|
||||
"--- show v2x dialog 1 ---: info -> v2x-type: $v2xType : expireTime: $expireTime"
|
||||
)
|
||||
|
||||
lastShowV2XJob?.safeCancel()
|
||||
lastSpeakJob?.safeCancel()
|
||||
|
||||
lifecycleScope.launch {
|
||||
delay(expireTime)
|
||||
}.also { itx ->
|
||||
@@ -565,10 +240,18 @@ class MoGoHmiFragment : MvpFragment<MoGoHmiContract.View?, HmiPresenter?>(),
|
||||
}
|
||||
|
||||
if (ttsContent != null && !TextUtils.isEmpty(ttsContent) && playTTS) {
|
||||
lifecycleScope.launch {
|
||||
val last = lastSpeakJob.get()
|
||||
Log.d("CODE", "---- 0 ------: last: $last")
|
||||
if (last != null && !last.isCompleted) {
|
||||
Log.d("CODE", "---- 1 ------")
|
||||
return
|
||||
}
|
||||
lifecycleScope.launch(Dispatchers.Default) {
|
||||
Log.d("CODE", "---- 2 ------")
|
||||
speak(it, ttsContent)
|
||||
Log.d("CODE", "---- 3 ------")
|
||||
}.also { itx ->
|
||||
lastSpeakJob = itx
|
||||
lastSpeakJob.set(itx)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -611,81 +294,6 @@ class MoGoHmiFragment : MvpFragment<MoGoHmiContract.View?, HmiPresenter?>(),
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 展示红绿灯预警
|
||||
*
|
||||
* @param checkLightId 0-都是默认不亮起,1-红,2-黄,3-绿
|
||||
* @param lightSource 1:云端下发;2:自车感知
|
||||
*/
|
||||
override fun showWarningTrafficLight(checkLightId: Int, lightSource: Int) {
|
||||
mViewTrafficLight?.showWarningTrafficLight(checkLightId, lightSource)
|
||||
}
|
||||
|
||||
override fun isWarningTrafficLightShow(): Boolean {
|
||||
return mViewTrafficLight?.visibility == View.VISIBLE
|
||||
}
|
||||
|
||||
/**
|
||||
* 关闭红绿灯预警展示,并重制灯态
|
||||
*/
|
||||
override fun disableWarningTrafficLight() {
|
||||
mViewTrafficLight?.disableWarningTrafficLight()
|
||||
}
|
||||
|
||||
/**
|
||||
* 关闭红绿灯倒计时
|
||||
*/
|
||||
override fun disableWarningTrafficLightCountDown() {
|
||||
mViewTrafficLight?.disableCountdown()
|
||||
}
|
||||
|
||||
override fun changeCountdownRed(redNum: Int) {
|
||||
mViewTrafficLight?.changeCountdownRed(redNum)
|
||||
}
|
||||
|
||||
override fun changeCountdownYellow(yellowNum: Int) {
|
||||
mViewTrafficLight?.changeCountdownYellow(yellowNum)
|
||||
}
|
||||
|
||||
override fun changeCountdownGreen(greenNum: Int) {
|
||||
mViewTrafficLight?.changeCountdownGreen(greenNum)
|
||||
}
|
||||
|
||||
/**
|
||||
* @param readNum 红灯倒计时
|
||||
* @param yellowNum 黄灯倒计时
|
||||
* @param greenNum 绿灯倒计时
|
||||
*/
|
||||
override fun changeCountdownTrafficLightNum(readNum: Int, yellowNum: Int, greenNum: Int) {
|
||||
mViewTrafficLight?.changeCountdownTrafficLightNum(readNum, yellowNum, greenNum)
|
||||
}
|
||||
|
||||
/**
|
||||
* 控制展示限速标志及内容
|
||||
*/
|
||||
override fun showLimitingVelocity(limitingSpeed: Int) {
|
||||
// 控制 限速UI 展示
|
||||
if (HmiBuildConfig.isShowLimitingVelocityView) {
|
||||
if (limitingSpeed > 0) {
|
||||
mViewLimitingVelocity?.visibility = View.VISIBLE
|
||||
mViewLimitingVelocity?.updateLimitingSpeed(limitingSpeed)
|
||||
} else {
|
||||
mViewLimitingVelocity?.visibility = View.INVISIBLE
|
||||
mViewLimitingVelocity?.updateLimitingSpeed(0)
|
||||
}
|
||||
} else {
|
||||
disableLimitingVelocity()
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 控制关闭限速标志及内容
|
||||
*/
|
||||
override fun disableLimitingVelocity() {
|
||||
mViewLimitingVelocity?.visibility = View.GONE
|
||||
mViewLimitingVelocity?.updateLimitingSpeed(0)
|
||||
}
|
||||
|
||||
/**
|
||||
* 展示指定方位上的红框预警
|
||||
* @param direction
|
||||
@@ -837,7 +445,6 @@ class MoGoHmiFragment : MvpFragment<MoGoHmiContract.View?, HmiPresenter?>(),
|
||||
"${SceneConstant.M_DEVA}${"TurnLight"}",
|
||||
"---showTurnLight = $light ---isLeftLight = $isLeftLight ---isRightLight = $isRightLight"
|
||||
)
|
||||
if (HmiBuildConfig.isShowTurnLightView) {
|
||||
ThreadUtils.runOnUiThread {
|
||||
if (light == 1 || light == 2) {
|
||||
if (!isVisualAngleChanged) {
|
||||
@@ -885,7 +492,6 @@ class MoGoHmiFragment : MvpFragment<MoGoHmiContract.View?, HmiPresenter?>(),
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private var isBrake: Boolean = false
|
||||
@@ -894,7 +500,6 @@ class MoGoHmiFragment : MvpFragment<MoGoHmiContract.View?, HmiPresenter?>(),
|
||||
* 显示刹车效果
|
||||
*/
|
||||
override fun showBrakeLight(light: Int) {
|
||||
if (HmiBuildConfig.isShowBrakeLightView) {
|
||||
ThreadUtils.runOnUiThread {
|
||||
if (light == 1) { //刹车灯亮
|
||||
if (!isBrake) {
|
||||
@@ -915,8 +520,8 @@ class MoGoHmiFragment : MvpFragment<MoGoHmiContract.View?, HmiPresenter?>(),
|
||||
CallerMapUIServiceManager.getMapUIController()?.setCarLightsType(3, 500)
|
||||
}
|
||||
}
|
||||
brakeView.setBrakeLight(light)
|
||||
}
|
||||
}
|
||||
}
|
||||
/** todo----------------------------------------------- **/
|
||||
|
||||
@@ -986,14 +591,6 @@ class MoGoHmiFragment : MvpFragment<MoGoHmiContract.View?, HmiPresenter?>(),
|
||||
}
|
||||
}
|
||||
|
||||
override fun setTurnLightFunction(isOpen: Boolean) {
|
||||
HmiBuildConfig.isShowTurnLightView = isOpen
|
||||
}
|
||||
|
||||
override fun setBrakeLightFunction(isOpen: Boolean) {
|
||||
HmiBuildConfig.isShowBrakeLightView = isOpen
|
||||
}
|
||||
|
||||
override fun setSnBinding(isOpen: Boolean) {
|
||||
HmiBuildConfig.isShowSnBindingView = isOpen
|
||||
}
|
||||
@@ -1035,7 +632,6 @@ class MoGoHmiFragment : MvpFragment<MoGoHmiContract.View?, HmiPresenter?>(),
|
||||
}
|
||||
}
|
||||
?.commitAllowingStateLoss()
|
||||
// context?.let { CallerDevaToolsManager.showStatusBar(it, statusBarContainer) }
|
||||
}
|
||||
|
||||
override fun onDestroy() {
|
||||
|
||||
@@ -13,6 +13,7 @@ import com.mogo.eagle.core.data.msgbox.MsgCategory
|
||||
import com.mogo.eagle.core.function.api.msgbox.IMsgBoxListener
|
||||
import com.mogo.eagle.core.function.call.devatools.CallerDevaToolsManager
|
||||
import com.mogo.eagle.core.function.call.hmi.CallerHmiManager
|
||||
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.DriverMsgBoxBubbleAdapter
|
||||
@@ -83,7 +84,7 @@ class DriverMsgBoxBubbleView @JvmOverloads constructor(
|
||||
}
|
||||
}
|
||||
if(isShowData){
|
||||
CallerHmiManager.updateDriverMsgBoxTipView(true)
|
||||
CallerMsgBoxEventListenerManager.invokeUpdateTipListener(true)
|
||||
if(category == MsgCategory.RECORD_BAG){
|
||||
//弹出被动录包弹窗
|
||||
CallerDevaToolsManager.onReceiveBadCaseRecord(msgBoxBean,context as Activity,true)
|
||||
@@ -98,16 +99,12 @@ class DriverMsgBoxBubbleView @JvmOverloads constructor(
|
||||
|
||||
override fun onAttachedToWindow() {
|
||||
super.onAttachedToWindow()
|
||||
if(AppIdentityModeUtils.isDriver(FunctionBuildConfig.appIdentityMode)){
|
||||
CallerMsgBoxListenerManager.addListener(TAG,this)
|
||||
}
|
||||
CallerMsgBoxListenerManager.addListener(TAG,this)
|
||||
}
|
||||
|
||||
override fun onDetachedFromWindow() {
|
||||
super.onDetachedFromWindow()
|
||||
if(AppIdentityModeUtils.isDriver(FunctionBuildConfig.appIdentityMode)){
|
||||
CallerMsgBoxListenerManager.removeListener(TAG)
|
||||
}
|
||||
CallerMsgBoxListenerManager.removeListener(TAG)
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,90 @@
|
||||
package com.mogo.eagle.core.function.hmi.ui.msgbox
|
||||
|
||||
import android.content.Context
|
||||
import android.util.AttributeSet
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import androidx.constraintlayout.widget.ConstraintLayout
|
||||
import com.mogo.eagle.core.data.msgbox.MsgBoxBean
|
||||
import com.mogo.eagle.core.function.api.msgbox.IMsgBoxEventListener
|
||||
import com.mogo.eagle.core.function.call.msgbox.CallerMsgBoxEventListenerManager
|
||||
import com.mogo.eagle.core.function.hmi.R
|
||||
import kotlinx.android.synthetic.main.view_driver_msg_box_button.view.*
|
||||
|
||||
/**
|
||||
* @author XuXinChao
|
||||
* @description 消息盒子司机端视图切换按钮
|
||||
* @since: 2023/1/31
|
||||
*/
|
||||
class DriverMsgBoxButtonView @JvmOverloads constructor(
|
||||
context: Context,
|
||||
attrs: AttributeSet? = null,
|
||||
defStyleAttr: Int = 0
|
||||
):ConstraintLayout(context, attrs, defStyleAttr), IMsgBoxEventListener {
|
||||
|
||||
companion object {
|
||||
const val TAG = "DriverMsgBoxButtonView"
|
||||
}
|
||||
|
||||
private var clickListener: ClickListener? = null
|
||||
|
||||
init{
|
||||
LayoutInflater.from(context).inflate(R.layout.view_driver_msg_box_button, this, true)
|
||||
initView()
|
||||
}
|
||||
|
||||
private fun initView(){
|
||||
cbMsgBoxDriver.setOnCheckedChangeListener { _, isChecked ->
|
||||
clickListener?.showMsgBoxList(isChecked)
|
||||
msgBoxTipView.visibility = View.GONE
|
||||
}
|
||||
}
|
||||
|
||||
override fun onAttachedToWindow() {
|
||||
super.onAttachedToWindow()
|
||||
CallerMsgBoxEventListenerManager.addListener(TAG,this)
|
||||
}
|
||||
|
||||
override fun onDetachedFromWindow() {
|
||||
super.onDetachedFromWindow()
|
||||
CallerMsgBoxEventListenerManager.removeListener(TAG)
|
||||
}
|
||||
|
||||
override fun onSummaryClickEvent() {
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新新消息提醒红点
|
||||
* @param isShow true:展示;false:不展示
|
||||
*/
|
||||
override fun onUpdateTipEvent(isShow: Boolean) {
|
||||
if(isShow){
|
||||
msgBoxTipView.visibility = View.VISIBLE
|
||||
}else{
|
||||
msgBoxTipView.visibility = View.GONE
|
||||
}
|
||||
}
|
||||
|
||||
override fun onBubbleOperationClickEvent(msgBoxBean: MsgBoxBean) {
|
||||
cbMsgBoxDriver.performClick()
|
||||
}
|
||||
|
||||
override fun onBubbleV2XClickEvent(msgBoxBean: MsgBoxBean) {
|
||||
cbMsgBoxDriver.performClick()
|
||||
}
|
||||
|
||||
override fun onBubbleReportClickEvent(msgBoxBean: MsgBoxBean) {
|
||||
cbMsgBoxDriver.performClick()
|
||||
}
|
||||
|
||||
fun setClickListener(clickListener: ClickListener) {
|
||||
this.clickListener = clickListener
|
||||
}
|
||||
|
||||
interface ClickListener{
|
||||
fun showMsgBoxList(show: Boolean)
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -7,16 +7,16 @@ import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import androidx.constraintlayout.widget.ConstraintLayout
|
||||
import androidx.recyclerview.widget.LinearLayoutManager
|
||||
import com.mogo.eagle.core.data.config.FunctionBuildConfig
|
||||
import com.mogo.eagle.core.data.msgbox.MsgBoxBean
|
||||
import com.mogo.eagle.core.data.msgbox.MsgCategory
|
||||
import com.mogo.eagle.core.function.api.msgbox.IMsgBoxEventListener
|
||||
import com.mogo.eagle.core.function.api.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.call.msgbox.CallerMsgBoxManager
|
||||
import com.mogo.eagle.core.function.hmi.R
|
||||
import com.mogo.eagle.core.function.hmi.ui.msgbox.adapter.DriverMsgBoxListAdapter
|
||||
import com.mogo.eagle.core.function.msgbox.MsgBoxConfig
|
||||
import com.mogo.eagle.core.utilcode.mogo.AppIdentityModeUtils
|
||||
import com.mogo.eagle.core.utilcode.util.UiThreadHandler
|
||||
import kotlinx.android.synthetic.main.layout_driver_msg_box_list.view.*
|
||||
import org.greenrobot.eventbus.EventBus
|
||||
@@ -32,7 +32,7 @@ class DriverMsgBoxListView @JvmOverloads constructor(
|
||||
context: Context,
|
||||
attrs: AttributeSet? = null,
|
||||
defStyleAttr: Int = 0
|
||||
) : ConstraintLayout(context, attrs, defStyleAttr) , IMsgBoxListener {
|
||||
) : ConstraintLayout(context, attrs, defStyleAttr) , IMsgBoxListener, IMsgBoxEventListener {
|
||||
|
||||
init {
|
||||
LayoutInflater.from(context).inflate(R.layout.layout_driver_msg_box_list, this, true)
|
||||
@@ -43,11 +43,13 @@ class DriverMsgBoxListView @JvmOverloads constructor(
|
||||
private var ipcReportList: ArrayList<MsgBoxBean> ?= null
|
||||
private var badCaseList: ArrayList<MsgBoxBean> ?= null
|
||||
private var driverMsgBoxListAdapter: DriverMsgBoxListAdapter ?=null
|
||||
private var linearLayoutManager: LinearLayoutManager ?= null
|
||||
|
||||
private fun initView() {
|
||||
driverMsgBoxListAdapter= DriverMsgBoxListAdapter(context as Activity)
|
||||
rvMsgBoxList.adapter = driverMsgBoxListAdapter
|
||||
rvMsgBoxList.layoutManager = LinearLayoutManager(context)
|
||||
linearLayoutManager = LinearLayoutManager(context)
|
||||
rvMsgBoxList.layoutManager = linearLayoutManager
|
||||
|
||||
//获取通知消息列表
|
||||
noticeList= CallerMsgBoxManager.getCachedNotifyData() as ArrayList<MsgBoxBean>?
|
||||
@@ -171,13 +173,21 @@ class DriverMsgBoxListView @JvmOverloads constructor(
|
||||
when (category) {
|
||||
MsgCategory.NOTICE -> {
|
||||
noticeList?.add(0,msgBoxList)
|
||||
if(MsgBoxConfig.getUserRecord() == 0){
|
||||
noticeList?.let { driverMsgBoxListAdapter?.setData(it) }
|
||||
}
|
||||
}
|
||||
MsgCategory.SYS_INFO -> {
|
||||
ipcReportList?.add(0,msgBoxList)
|
||||
if(MsgBoxConfig.getUserRecord() == 1){
|
||||
ipcReportList?.let { driverMsgBoxListAdapter?.setData(it) }
|
||||
}
|
||||
}
|
||||
MsgCategory.RECORD_BAG -> {
|
||||
badCaseList?.add(0,msgBoxList)
|
||||
badCaseList?.let { driverMsgBoxListAdapter?.setData(it) }
|
||||
if(MsgBoxConfig.getUserRecord() == 2){
|
||||
badCaseList?.let { driverMsgBoxListAdapter?.setData(it) }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -185,18 +195,16 @@ class DriverMsgBoxListView @JvmOverloads constructor(
|
||||
|
||||
override fun onAttachedToWindow() {
|
||||
super.onAttachedToWindow()
|
||||
if(AppIdentityModeUtils.isDriver(FunctionBuildConfig.appIdentityMode)){
|
||||
CallerMsgBoxListenerManager.addListener(TAG,this)
|
||||
EventBus.getDefault().register(this)
|
||||
}
|
||||
CallerMsgBoxListenerManager.addListener(TAG,this)
|
||||
CallerMsgBoxEventListenerManager.addListener(TAG,this)
|
||||
EventBus.getDefault().register(this)
|
||||
}
|
||||
|
||||
override fun onDetachedFromWindow() {
|
||||
super.onDetachedFromWindow()
|
||||
if(AppIdentityModeUtils.isDriver(FunctionBuildConfig.appIdentityMode)){
|
||||
CallerMsgBoxListenerManager.removeListener(TAG)
|
||||
EventBus.getDefault().unregister(this)
|
||||
}
|
||||
CallerMsgBoxListenerManager.removeListener(TAG)
|
||||
CallerMsgBoxEventListenerManager.removeListener(TAG)
|
||||
EventBus.getDefault().unregister(this)
|
||||
}
|
||||
|
||||
@Subscribe(threadMode = ThreadMode.MAIN)
|
||||
@@ -206,4 +214,36 @@ class DriverMsgBoxListView @JvmOverloads constructor(
|
||||
it.remove(msgBoxList)
|
||||
}
|
||||
}
|
||||
|
||||
override fun onSummaryClickEvent() {
|
||||
|
||||
}
|
||||
|
||||
override fun onUpdateTipEvent(isShow: Boolean) {
|
||||
|
||||
}
|
||||
|
||||
override fun onBubbleOperationClickEvent(msgBoxBean: MsgBoxBean) {
|
||||
MsgBoxConfig.setUserRecord(0)
|
||||
notifyData()
|
||||
noticeList?.let {
|
||||
rvMsgBoxList?.scrollToPosition(it.indexOf(msgBoxBean))
|
||||
}
|
||||
}
|
||||
|
||||
override fun onBubbleV2XClickEvent(msgBoxBean: MsgBoxBean) {
|
||||
MsgBoxConfig.setUserRecord(0)
|
||||
notifyData()
|
||||
noticeList?.let {
|
||||
rvMsgBoxList?.scrollToPosition(it.indexOf(msgBoxBean))
|
||||
}
|
||||
}
|
||||
|
||||
override fun onBubbleReportClickEvent(msgBoxBean: MsgBoxBean) {
|
||||
MsgBoxConfig.setUserRecord(1)
|
||||
notifyData()
|
||||
ipcReportList?.let {
|
||||
linearLayoutManager?.scrollToPositionWithOffset(it.indexOf(msgBoxBean),0)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -12,6 +12,7 @@ import com.mogo.eagle.core.data.msgbox.MsgBoxType
|
||||
import com.mogo.eagle.core.data.msgbox.MsgCategory
|
||||
import com.mogo.eagle.core.function.api.msgbox.IMsgBoxListener
|
||||
import com.mogo.eagle.core.function.call.hmi.CallerHmiManager
|
||||
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.PassengerMsgBoxBubbleAdapter
|
||||
@@ -64,7 +65,7 @@ class PassengerMsgBoxBubbleView @JvmOverloads constructor(
|
||||
|| msgBoxList.type == MsgBoxType.OBU){
|
||||
MsgBoxConfig.noticeList.add(msgBoxList)
|
||||
if(isShowData){
|
||||
CallerHmiManager.updatePassengerMsgBoxTipView(true)
|
||||
CallerMsgBoxEventListenerManager.invokeUpdateTipListener(true)
|
||||
dataList.add(msgBoxList)
|
||||
passengerMsgBoxBubbleAdapter?.setData(dataList)
|
||||
}
|
||||
@@ -75,18 +76,12 @@ class PassengerMsgBoxBubbleView @JvmOverloads constructor(
|
||||
|
||||
override fun onAttachedToWindow() {
|
||||
super.onAttachedToWindow()
|
||||
if(AppIdentityModeUtils.isPassenger(FunctionBuildConfig.appIdentityMode) &&
|
||||
AppIdentityModeUtils.isTaxi(FunctionBuildConfig.appIdentityMode)){
|
||||
CallerMsgBoxListenerManager.addListener(TAG,this)
|
||||
}
|
||||
CallerMsgBoxListenerManager.addListener(TAG,this)
|
||||
}
|
||||
|
||||
override fun onDetachedFromWindow() {
|
||||
super.onDetachedFromWindow()
|
||||
if(AppIdentityModeUtils.isPassenger(FunctionBuildConfig.appIdentityMode) &&
|
||||
AppIdentityModeUtils.isTaxi(FunctionBuildConfig.appIdentityMode)){
|
||||
CallerMsgBoxListenerManager.removeListener(TAG)
|
||||
}
|
||||
CallerMsgBoxListenerManager.removeListener(TAG)
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,89 @@
|
||||
package com.mogo.eagle.core.function.hmi.ui.msgbox
|
||||
|
||||
import android.content.Context
|
||||
import android.util.AttributeSet
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import androidx.constraintlayout.widget.ConstraintLayout
|
||||
import com.mogo.eagle.core.data.msgbox.MsgBoxBean
|
||||
import com.mogo.eagle.core.function.api.msgbox.IMsgBoxEventListener
|
||||
import com.mogo.eagle.core.function.call.msgbox.CallerMsgBoxEventListenerManager
|
||||
import com.mogo.eagle.core.function.hmi.R
|
||||
import kotlinx.android.synthetic.main.view_passenger_msg_box_button.view.*
|
||||
|
||||
/**
|
||||
* @author XuXinChao
|
||||
* @description 消息盒子乘客端视图切换按钮
|
||||
* @since: 2023/1/31
|
||||
*/
|
||||
class PassengerMsgBoxButtonView @JvmOverloads constructor(
|
||||
context: Context,
|
||||
attrs: AttributeSet? = null,
|
||||
defStyleAttr: Int = 0
|
||||
): ConstraintLayout(context, attrs, defStyleAttr), IMsgBoxEventListener {
|
||||
|
||||
companion object {
|
||||
const val TAG = "PassengerMsgBoxButtonView"
|
||||
}
|
||||
|
||||
private var clickListener: ClickListener? = null
|
||||
|
||||
init{
|
||||
LayoutInflater.from(context).inflate(R.layout.view_passenger_msg_box_button, this, true)
|
||||
initView()
|
||||
}
|
||||
|
||||
private fun initView(){
|
||||
cbMsgBoxPassenger.setOnCheckedChangeListener { _, isChecked ->
|
||||
clickListener?.showMsgBoxList(isChecked)
|
||||
msgBoxPTipView.visibility = View.GONE
|
||||
}
|
||||
}
|
||||
|
||||
override fun onAttachedToWindow() {
|
||||
super.onAttachedToWindow()
|
||||
CallerMsgBoxEventListenerManager.addListener(TAG,this)
|
||||
}
|
||||
|
||||
override fun onDetachedFromWindow() {
|
||||
super.onDetachedFromWindow()
|
||||
CallerMsgBoxEventListenerManager.removeListener(TAG)
|
||||
}
|
||||
|
||||
override fun onSummaryClickEvent() {
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新新消息提醒红点
|
||||
* @param isShow true:展示;false:不展示
|
||||
*/
|
||||
override fun onUpdateTipEvent(isShow: Boolean) {
|
||||
if(isShow){
|
||||
msgBoxPTipView.visibility = View.VISIBLE
|
||||
}else{
|
||||
msgBoxPTipView.visibility = View.GONE
|
||||
}
|
||||
}
|
||||
|
||||
override fun onBubbleOperationClickEvent(msgBoxBean: MsgBoxBean) {
|
||||
cbMsgBoxPassenger.performClick()
|
||||
}
|
||||
|
||||
override fun onBubbleV2XClickEvent(msgBoxBean: MsgBoxBean) {
|
||||
cbMsgBoxPassenger.performClick()
|
||||
}
|
||||
|
||||
override fun onBubbleReportClickEvent(msgBoxBean: MsgBoxBean) {
|
||||
cbMsgBoxPassenger.performClick()
|
||||
}
|
||||
|
||||
fun setClickListener(clickListener: ClickListener) {
|
||||
this.clickListener = clickListener
|
||||
}
|
||||
|
||||
interface ClickListener{
|
||||
fun showMsgBoxList(show: Boolean)
|
||||
}
|
||||
|
||||
}
|
||||
@@ -11,7 +11,9 @@ import com.mogo.eagle.core.data.config.FunctionBuildConfig
|
||||
import com.mogo.eagle.core.data.msgbox.MsgBoxBean
|
||||
import com.mogo.eagle.core.data.msgbox.MsgBoxType
|
||||
import com.mogo.eagle.core.data.msgbox.MsgCategory
|
||||
import com.mogo.eagle.core.function.api.msgbox.IMsgBoxEventListener
|
||||
import com.mogo.eagle.core.function.api.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.call.msgbox.CallerMsgBoxManager
|
||||
import com.mogo.eagle.core.function.hmi.R
|
||||
@@ -30,7 +32,7 @@ class PassengerMsgBoxListView @JvmOverloads constructor(
|
||||
context: Context,
|
||||
attrs: AttributeSet? = null,
|
||||
defStyleAttr: Int = 0
|
||||
) : ConstraintLayout(context, attrs, defStyleAttr), IMsgBoxListener {
|
||||
) : ConstraintLayout(context, attrs, defStyleAttr), IMsgBoxListener, IMsgBoxEventListener {
|
||||
|
||||
private val TAG = "PassengerMsgBoxListView"
|
||||
var passengerMsgBoxListAdapter: PassengerMsgBoxListAdapter ?= null
|
||||
@@ -75,18 +77,36 @@ class PassengerMsgBoxListView @JvmOverloads constructor(
|
||||
|
||||
override fun onAttachedToWindow() {
|
||||
super.onAttachedToWindow()
|
||||
if(AppIdentityModeUtils.isPassenger(FunctionBuildConfig.appIdentityMode) &&
|
||||
AppIdentityModeUtils.isTaxi(FunctionBuildConfig.appIdentityMode)){
|
||||
CallerMsgBoxListenerManager.addListener(TAG,this)
|
||||
}
|
||||
CallerMsgBoxListenerManager.addListener(TAG,this)
|
||||
CallerMsgBoxEventListenerManager.addListener(TAG,this)
|
||||
}
|
||||
|
||||
override fun onDetachedFromWindow() {
|
||||
super.onDetachedFromWindow()
|
||||
if(AppIdentityModeUtils.isPassenger(FunctionBuildConfig.appIdentityMode) &&
|
||||
AppIdentityModeUtils.isTaxi(FunctionBuildConfig.appIdentityMode)){
|
||||
CallerMsgBoxListenerManager.removeListener(TAG)
|
||||
CallerMsgBoxListenerManager.removeListener(TAG)
|
||||
CallerMsgBoxEventListenerManager.removeListener(TAG)
|
||||
}
|
||||
|
||||
override fun onSummaryClickEvent() {
|
||||
|
||||
}
|
||||
|
||||
override fun onUpdateTipEvent(isShow: Boolean) {
|
||||
|
||||
}
|
||||
|
||||
override fun onBubbleOperationClickEvent(msgBoxBean: MsgBoxBean) {
|
||||
|
||||
}
|
||||
|
||||
override fun onBubbleV2XClickEvent(msgBoxBean: MsgBoxBean) {
|
||||
noticeList?.let {
|
||||
rvPassengerList.scrollToPosition(it.indexOf(msgBoxBean))
|
||||
}
|
||||
}
|
||||
|
||||
override fun onBubbleReportClickEvent(msgBoxBean: MsgBoxBean) {
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -8,18 +8,20 @@ import android.view.ViewGroup
|
||||
import android.widget.ImageView
|
||||
import android.widget.TextView
|
||||
import androidx.recyclerview.widget.RecyclerView
|
||||
import com.mogo.eagle.core.data.enums.EventTypeEnum
|
||||
import com.mogo.eagle.core.data.enums.DataSourceType
|
||||
import com.mogo.eagle.core.data.enums.EventTypeEnumNew
|
||||
import com.mogo.eagle.core.data.msgbox.*
|
||||
import com.mogo.eagle.core.data.report.ReportEntity
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotManager
|
||||
import com.mogo.eagle.core.function.call.hmi.CallerHmiManager
|
||||
import com.mogo.eagle.core.function.call.msgbox.CallerMsgBoxEventListenerManager
|
||||
import com.mogo.eagle.core.function.call.msgbox.CallerMsgBoxManager
|
||||
import com.mogo.eagle.core.function.hmi.R
|
||||
import com.mogo.eagle.core.utilcode.mogo.glide.GlideApp
|
||||
import com.mogo.eagle.core.utilcode.mogo.glide.transform.GlideRoundedCornersTransform
|
||||
import com.mogo.eagle.core.utilcode.util.TimeUtils
|
||||
import com.mogo.eagle.core.utilcode.util.TimeUtils.getHourMinFormat
|
||||
import com.mogo.eagle.core.widget.RoundCanClickConstraintLayout
|
||||
|
||||
/**
|
||||
* @author XuXinChao
|
||||
@@ -34,6 +36,7 @@ class DriverMsgBoxBubbleAdapter(private val activity: Activity) : RecyclerView.A
|
||||
private val notice: Int = 2
|
||||
private val v2x: Int = 3
|
||||
private val report: Int = 4
|
||||
private val summary: Int = 5
|
||||
|
||||
var countDownTimer: CountDownTimer?=null
|
||||
private var changeViewListener: ChangeViewListener?=null
|
||||
@@ -47,89 +50,116 @@ class DriverMsgBoxBubbleAdapter(private val activity: Activity) : RecyclerView.A
|
||||
}
|
||||
|
||||
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): RecyclerView.ViewHolder {
|
||||
if(viewType == operation){
|
||||
val view = LayoutInflater.from(parent.context).inflate(R.layout.item_msg_bubble_operation,parent,false)
|
||||
return BubbleOperationHolder(view)
|
||||
}else if(viewType == report){
|
||||
val view = LayoutInflater.from(parent.context).inflate(R.layout.item_msg_bubble_report,parent,false)
|
||||
return BubbleReportHolder(view)
|
||||
}else if(viewType == notice){
|
||||
val view = LayoutInflater.from(parent.context).inflate(R.layout.item_msg_bubble_notice,parent,false)
|
||||
return BubbleNoticeHolder(view)
|
||||
}else{
|
||||
val view = LayoutInflater.from(parent.context).inflate(R.layout.item_msg_bubble_v2x,parent,false)
|
||||
return BubbleV2XHolder(view)
|
||||
when (viewType) {
|
||||
operation -> {
|
||||
val view = LayoutInflater.from(parent.context).inflate(R.layout.item_msg_bubble_operation,parent,false)
|
||||
return BubbleOperationHolder(view)
|
||||
}
|
||||
report -> {
|
||||
val view = LayoutInflater.from(parent.context).inflate(R.layout.item_msg_bubble_report,parent,false)
|
||||
return BubbleReportHolder(view)
|
||||
}
|
||||
notice -> {
|
||||
val view = LayoutInflater.from(parent.context).inflate(R.layout.item_msg_bubble_notice,parent,false)
|
||||
return BubbleNoticeHolder(view)
|
||||
}
|
||||
summary -> {
|
||||
val view = LayoutInflater.from(parent.context).inflate(R.layout.item_msg_bubble_summary,parent,false)
|
||||
return BubbleSummaryHolder(view)
|
||||
}
|
||||
else -> {
|
||||
val view = LayoutInflater.from(parent.context).inflate(R.layout.item_msg_bubble_v2x,parent,false)
|
||||
return BubbleV2XHolder(view)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
override fun onBindViewHolder(holder: RecyclerView.ViewHolder, position: Int) {
|
||||
if(holder is BubbleOperationHolder){
|
||||
data?.let {
|
||||
val operationMsg = it[position].bean as OperationMsg
|
||||
holder.tvBubbleOperationTime.text = TimeUtils.millis2String(it[position].timestamp,getHourMinFormat())
|
||||
holder.tvBubbleOperationContent.text = operationMsg.content
|
||||
}
|
||||
}else if(holder is BubbleReportHolder){
|
||||
data?.let {
|
||||
val reportEntity = it[position].bean as ReportEntity
|
||||
holder.tvBubbleReportTime.text = "时间:${TimeUtils.millis2String(it[position].timestamp)}"
|
||||
holder.tvBubbleReceiveTime.text = TimeUtils.millis2String(it[position].timestamp,getHourMinFormat())
|
||||
var resultStr = "类型:"
|
||||
for (result in reportEntity.resultList){
|
||||
resultStr = "${resultStr}${CallerAutoPilotManager.getReportResultDesc(result)}"
|
||||
}
|
||||
holder.tvBubbleReportType.text = resultStr
|
||||
}
|
||||
}else if(holder is BubbleNoticeHolder){
|
||||
data?.let {
|
||||
val msgBoxBean = it[position].bean
|
||||
val noticeFrCloudMsg = msgBoxBean as NoticeFrCloudMsg
|
||||
if(noticeFrCloudMsg.type == 0){
|
||||
val noticeNormalData = noticeFrCloudMsg.noticeNormalData
|
||||
holder.tvNoticeTime.text = TimeUtils.millis2String(it[position].timestamp,getHourMinFormat())
|
||||
holder.tvNoticeContent.text = noticeNormalData?.content
|
||||
GlideApp.with(activity).load(noticeNormalData?.imageUrl).optionalTransform(
|
||||
GlideRoundedCornersTransform(
|
||||
20f,
|
||||
GlideRoundedCornersTransform.CornerType.ALL
|
||||
)
|
||||
).into(holder.ivNoticeImage)
|
||||
holder.tvNoticeCheck.setOnClickListener {
|
||||
//云公告
|
||||
if (noticeNormalData != null) {
|
||||
CallerHmiManager.showNoticeNormalData(noticeNormalData)
|
||||
}
|
||||
when (holder) {
|
||||
is BubbleOperationHolder -> {
|
||||
data?.let {
|
||||
val msgBoxBean = it[position]
|
||||
val operationMsg = msgBoxBean.bean as OperationMsg
|
||||
holder.tvBubbleOperationTime.text = TimeUtils.millis2String(it[position].timestamp,getHourMinFormat())
|
||||
holder.tvBubbleOperationContent.text = operationMsg.content
|
||||
holder.clBubbleOperationLayout.setOnClickListener {
|
||||
CallerMsgBoxEventListenerManager.invokeBubbleOperationListener(msgBoxBean)
|
||||
}
|
||||
}else if(noticeFrCloudMsg.type == 1){
|
||||
val noticeTrafficStylePushData = noticeFrCloudMsg.trafficPushData
|
||||
holder.tvNoticeTime.text = TimeUtils.millis2String(it[position].timestamp,getHourMinFormat())
|
||||
holder.tvNoticeContent.text = noticeTrafficStylePushData?.content
|
||||
GlideApp.with(activity).load(noticeTrafficStylePushData?.poiImgUrl).optionalTransform(
|
||||
GlideRoundedCornersTransform(
|
||||
20f,
|
||||
GlideRoundedCornersTransform.CornerType.ALL
|
||||
)
|
||||
).into(holder.ivNoticeImage)
|
||||
holder.tvNoticeCheck.setOnClickListener {
|
||||
//云公告
|
||||
if (noticeTrafficStylePushData != null) {
|
||||
CallerHmiManager.showTrafficBanner(noticeTrafficStylePushData)
|
||||
}
|
||||
}
|
||||
is BubbleReportHolder -> {
|
||||
data?.let {
|
||||
val msgBoxBean = it[position]
|
||||
val reportEntity = msgBoxBean.bean as ReportEntity
|
||||
holder.tvBubbleReportTime.text = "时间:${TimeUtils.millis2String(it[position].timestamp)}"
|
||||
holder.tvBubbleReceiveTime.text = TimeUtils.millis2String(it[position].timestamp,getHourMinFormat())
|
||||
var resultStr = "类型:"
|
||||
for (result in reportEntity.resultList){
|
||||
resultStr = "${resultStr}${CallerAutoPilotManager.getReportResultDesc(result)}"
|
||||
}
|
||||
holder.tvBubbleReportType.text = resultStr
|
||||
holder.clReportLayout.setOnClickListener {
|
||||
CallerMsgBoxEventListenerManager.invokeBubbleReportListener(msgBoxBean)
|
||||
}
|
||||
}
|
||||
}
|
||||
is BubbleNoticeHolder -> {
|
||||
data?.let {
|
||||
val msgBoxBean = it[position].bean
|
||||
val noticeFrCloudMsg = msgBoxBean as NoticeFrCloudMsg
|
||||
if(noticeFrCloudMsg.type == 0){
|
||||
val noticeNormalData = noticeFrCloudMsg.noticeNormalData
|
||||
holder.tvNoticeTime.text = TimeUtils.millis2String(it[position].timestamp,getHourMinFormat())
|
||||
holder.tvNoticeContent.text = noticeNormalData?.content
|
||||
GlideApp.with(activity).load(noticeNormalData?.imageUrl).optionalTransform(
|
||||
GlideRoundedCornersTransform(
|
||||
20f,
|
||||
GlideRoundedCornersTransform.CornerType.ALL
|
||||
)
|
||||
).into(holder.ivNoticeImage)
|
||||
holder.tvNoticeCheck.setOnClickListener {
|
||||
//云公告
|
||||
if (noticeNormalData != null) {
|
||||
CallerHmiManager.showNoticeNormalData(noticeNormalData)
|
||||
}
|
||||
}
|
||||
}else if(noticeFrCloudMsg.type == 1){
|
||||
val noticeTrafficStylePushData = noticeFrCloudMsg.trafficPushData
|
||||
holder.tvNoticeTime.text = TimeUtils.millis2String(it[position].timestamp,getHourMinFormat())
|
||||
holder.tvNoticeContent.text = noticeTrafficStylePushData?.content
|
||||
GlideApp.with(activity).load(noticeTrafficStylePushData?.poiImgUrl).optionalTransform(
|
||||
GlideRoundedCornersTransform(
|
||||
20f,
|
||||
GlideRoundedCornersTransform.CornerType.ALL
|
||||
)
|
||||
).into(holder.ivNoticeImage)
|
||||
holder.tvNoticeCheck.setOnClickListener {
|
||||
//云公告
|
||||
if (noticeTrafficStylePushData != null) {
|
||||
CallerHmiManager.showTrafficBanner(noticeTrafficStylePushData)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}else if(holder is BubbleV2XHolder){
|
||||
data?.let {
|
||||
val msgBoxBean = it[position]
|
||||
val v2XMsg = msgBoxBean.bean as V2XMsg
|
||||
holder.tvV2XTime.text = TimeUtils.millis2String(it[position].timestamp,getHourMinFormat())
|
||||
holder.tvV2XContent.text = v2XMsg.content
|
||||
if(msgBoxBean.type == MsgBoxType.OBU){
|
||||
is BubbleV2XHolder -> {
|
||||
data?.let {
|
||||
val msgBoxBean = it[position]
|
||||
val v2XMsg = msgBoxBean.bean as V2XMsg
|
||||
holder.tvV2XTime.text = TimeUtils.millis2String(it[position].timestamp,getHourMinFormat())
|
||||
holder.tvV2XContent.text = v2XMsg.content
|
||||
holder.ivV2XImage.setImageDrawable(activity.resources.getDrawable(
|
||||
EventTypeEnumNew.getUpdateIconRes(v2XMsg.type)))
|
||||
}else{
|
||||
holder.ivV2XImage.setImageDrawable(activity.resources.getDrawable(
|
||||
EventTypeEnum.getUpdateIconRes(v2XMsg.type)))
|
||||
holder.clV2XLayout.setOnClickListener {
|
||||
CallerMsgBoxEventListenerManager.invokeBubbleV2XListener(msgBoxBean)
|
||||
}
|
||||
}
|
||||
}
|
||||
is BubbleSummaryHolder -> {
|
||||
data?.let {
|
||||
val summaryMsg = it[position].bean as V2XMsg
|
||||
holder.tvSummaryTime.text = TimeUtils.millis2String(it[position].timestamp,getHourMinFormat())
|
||||
holder.tvSummaryContent.text = summaryMsg.content
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -156,14 +186,16 @@ class DriverMsgBoxBubbleAdapter(private val activity: Activity) : RecyclerView.A
|
||||
override fun getItemCount() = data?.size ?: 0
|
||||
|
||||
override fun getItemViewType(position: Int): Int {
|
||||
if(data!![position].type == MsgBoxType.OPERATION){
|
||||
return operation
|
||||
return if(data!![position].type == MsgBoxType.OPERATION){
|
||||
operation
|
||||
}else if(data!![position].type == MsgBoxType.REPORT){
|
||||
return report
|
||||
report
|
||||
}else if(data!![position].type == MsgBoxType.NOTICE){
|
||||
return notice
|
||||
}else{
|
||||
return v2x
|
||||
notice
|
||||
}else if(data!![position].type == MsgBoxType.V2X && data!![position].sourceType == DataSourceType.SUMMARY){
|
||||
summary
|
||||
} else{
|
||||
v2x
|
||||
}
|
||||
}
|
||||
|
||||
@@ -172,12 +204,14 @@ class DriverMsgBoxBubbleAdapter(private val activity: Activity) : RecyclerView.A
|
||||
var tvBubbleReportTime: TextView = itemView.findViewById(R.id.tvBubbleReportTime)
|
||||
var tvBubbleReportType: TextView = itemView.findViewById(R.id.tvBubbleReportType)
|
||||
var tvBubbleReceiveTime: TextView = itemView.findViewById(R.id.tvBubbleReceiveTime)
|
||||
var clReportLayout: RoundCanClickConstraintLayout = itemView.findViewById(R.id.clReportLayout)
|
||||
}
|
||||
|
||||
//运营平台
|
||||
class BubbleOperationHolder(itemView: View): RecyclerView.ViewHolder(itemView){
|
||||
var tvBubbleOperationTime: TextView = itemView.findViewById(R.id.tvBubbleOperationTime)
|
||||
var tvBubbleOperationContent: TextView = itemView.findViewById(R.id.tvBubbleOperationContent)
|
||||
var clBubbleOperationLayout: RoundCanClickConstraintLayout = itemView.findViewById(R.id.clBubbleOperationLayout)
|
||||
}
|
||||
|
||||
//Notice
|
||||
@@ -194,6 +228,13 @@ class DriverMsgBoxBubbleAdapter(private val activity: Activity) : RecyclerView.A
|
||||
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 clV2XLayout: RoundCanClickConstraintLayout = itemView.findViewById(R.id.clV2XLayout)
|
||||
}
|
||||
|
||||
//汇总消息
|
||||
class BubbleSummaryHolder(itemView: View): RecyclerView.ViewHolder(itemView){
|
||||
var tvSummaryContent: TextView = itemView.findViewById(R.id.tvSummaryContent)
|
||||
var tvSummaryTime: TextView = itemView.findViewById(R.id.tvSummaryTime)
|
||||
}
|
||||
|
||||
fun setChangeListener(listener: ChangeViewListener){
|
||||
|
||||
@@ -9,7 +9,7 @@ import android.widget.ImageView
|
||||
import android.widget.TextView
|
||||
import androidx.core.view.isVisible
|
||||
import androidx.recyclerview.widget.RecyclerView
|
||||
import com.mogo.eagle.core.data.enums.EventTypeEnum
|
||||
import com.mogo.eagle.core.data.enums.DataSourceType
|
||||
import com.mogo.eagle.core.data.enums.EventTypeEnumNew
|
||||
import com.mogo.eagle.core.data.msgbox.*
|
||||
import com.mogo.eagle.core.data.report.ReportEntity
|
||||
@@ -28,198 +28,263 @@ import com.mogo.eagle.core.utilcode.util.TimeUtils.getHourMinFormat
|
||||
* @description 司机端消息盒子列表视图RecyclerView适配器
|
||||
* @since: 2022/11/25
|
||||
*/
|
||||
class DriverMsgBoxListAdapter(private val activity: Activity) : RecyclerView.Adapter<RecyclerView.ViewHolder>(){
|
||||
class DriverMsgBoxListAdapter(private val activity: Activity) :
|
||||
RecyclerView.Adapter<RecyclerView.ViewHolder>() {
|
||||
|
||||
private var data: List<MsgBoxBean> ?= null
|
||||
private var data: List<MsgBoxBean>? = null
|
||||
|
||||
private val operation: Int = 1
|
||||
private val notice: Int = 2
|
||||
private val v2x: Int = 3
|
||||
private val obu: Int = 4
|
||||
private val report: Int = 5
|
||||
private val record: Int = 6
|
||||
private val traffic: Int = 7
|
||||
private val summary: Int = 8
|
||||
|
||||
//Error
|
||||
val RESULT_AUTOPILOT_DISABLE = "RESULT_AUTOPILOT_DISABLE"
|
||||
val RESULT_AUTOPILOT_SYSTEM_UNSTARTED = "RESULT_AUTOPILOT_SYSTEM_UNSTARTED"
|
||||
val RESULT_REMOTEPILOT_DISABLE = "RESULT_REMOTEPILOT_DISABLE"
|
||||
|
||||
fun setData(data: List<MsgBoxBean>){
|
||||
fun setData(data: List<MsgBoxBean>) {
|
||||
this.data = data
|
||||
notifyDataSetChanged()
|
||||
}
|
||||
|
||||
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): RecyclerView.ViewHolder {
|
||||
if(viewType == record){
|
||||
val view = LayoutInflater.from(parent.context).inflate(R.layout.item_bad_case,parent,false)
|
||||
return BadCaseHolder(view)
|
||||
}else if(viewType == report){
|
||||
val view = LayoutInflater.from(parent.context).inflate(R.layout.item_msg_box_ipc_report,parent,false)
|
||||
return MsgBoxIpcReportHolder(view)
|
||||
}else if(viewType == operation){
|
||||
val view = LayoutInflater.from(parent.context).inflate(R.layout.item_msg_box_operation,parent,false)
|
||||
return MsgBoxOperation(view)
|
||||
}else if(viewType == notice){
|
||||
val view = LayoutInflater.from(parent.context).inflate(R.layout.item_msg_box_notice,parent,false)
|
||||
return MsgBoxNotice(view)
|
||||
}else{
|
||||
val view = LayoutInflater.from(parent.context).inflate(R.layout.item_msg_box_v2x,parent,false)
|
||||
return MsgBoxV2X(view)
|
||||
when (viewType) {
|
||||
record -> {
|
||||
val view = LayoutInflater.from(parent.context)
|
||||
.inflate(R.layout.item_bad_case, parent, false)
|
||||
return BadCaseHolder(view)
|
||||
}
|
||||
report -> {
|
||||
val view = LayoutInflater.from(parent.context)
|
||||
.inflate(R.layout.item_msg_box_ipc_report, parent, false)
|
||||
return MsgBoxIpcReportHolder(view)
|
||||
}
|
||||
operation -> {
|
||||
val view = LayoutInflater.from(parent.context)
|
||||
.inflate(R.layout.item_msg_box_operation, parent, false)
|
||||
return MsgBoxOperation(view)
|
||||
}
|
||||
notice -> {
|
||||
val view = LayoutInflater.from(parent.context)
|
||||
.inflate(R.layout.item_msg_box_notice, parent, false)
|
||||
return MsgBoxNotice(view)
|
||||
}
|
||||
summary -> {
|
||||
val view = LayoutInflater.from(parent.context)
|
||||
.inflate(R.layout.item_msg_box_summary, parent, false)
|
||||
return MsgBoxSummary(view)
|
||||
}
|
||||
else -> {
|
||||
val view = LayoutInflater.from(parent.context)
|
||||
.inflate(R.layout.item_msg_box_v2x, parent, false)
|
||||
return MsgBoxV2X(view)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressLint("SetTextI18n")
|
||||
override fun onBindViewHolder(holder: RecyclerView.ViewHolder, position: Int) {
|
||||
if(holder is BadCaseHolder){
|
||||
data?.let {
|
||||
holder.tvBagReceiveTime.text = TimeUtils.millis2String(it[position].timestamp,getHourMinFormat())
|
||||
holder.tvBagRecordTime.text = "时间:${TimeUtils.millis2String(it[position].timestamp)}"
|
||||
val msgBoxBean = it[position]
|
||||
holder.tvRecordCheck.setOnClickListener {
|
||||
//打开被动录包弹窗
|
||||
CallerDevaToolsManager.onReceiveBadCaseRecord(msgBoxBean,activity,false)
|
||||
}
|
||||
}
|
||||
}else if(holder is MsgBoxIpcReportHolder){
|
||||
data?.let { it ->
|
||||
holder.tvReportTimeNormal.text = "时间:${TimeUtils.millis2String(it[position].timestamp)}"
|
||||
holder.tvReportTimeOpen.text = "时间:${TimeUtils.millis2String(it[position].timestamp)}"
|
||||
val reportEntity = (it[position].bean as ReportEntity)
|
||||
if(reportEntity.resultList.contains(RESULT_AUTOPILOT_DISABLE)
|
||||
|| reportEntity.resultList.contains(RESULT_AUTOPILOT_SYSTEM_UNSTARTED)
|
||||
|| reportEntity.resultList.contains(RESULT_REMOTEPILOT_DISABLE)){
|
||||
//Error
|
||||
holder.ivReportImageNormal.setImageDrawable(getDrawable(R.drawable.icon_report_error_normal))
|
||||
holder.ivReportImageOpen.setImageDrawable(getDrawable(R.drawable.icon_report_error_open))
|
||||
holder.tvReportLevelNormal.text = "Error"
|
||||
holder.tvReportLevelOpen.text = "Error"
|
||||
}else{
|
||||
//Warning
|
||||
holder.ivReportImageNormal.setImageDrawable(getDrawable(R.drawable.icon_report_warning_normal))
|
||||
holder.ivReportImageOpen.setImageDrawable(getDrawable(R.drawable.icon_report_warning_open))
|
||||
holder.tvReportLevelNormal.text = "Warning"
|
||||
holder.tvReportLevelOpen.text = "Warning"
|
||||
}
|
||||
holder.tvReportTimeNormal.text = "时间:${TimeUtils.millis2String(it[position].timestamp)}"
|
||||
holder.tvReportTimeOpen.text = "时间:${TimeUtils.millis2String(it[position].timestamp)}"
|
||||
holder.tvReportTime.text =TimeUtils.millis2String(it[position].timestamp,getHourMinFormat())
|
||||
var resultStr = "类型:"
|
||||
for (result in reportEntity.resultList){
|
||||
resultStr = "${resultStr}${CallerAutoPilotManager.getReportResultDesc(result)}"
|
||||
}
|
||||
holder.tvReportTypeNormal.text = resultStr
|
||||
holder.tvReportTypeOpen.text = resultStr
|
||||
holder.tvReportReasonOpen.text = "原因:${reportEntity.msg}"
|
||||
var actionStr = ""
|
||||
for (action in reportEntity.actionsList){
|
||||
actionStr = "${actionStr}${CallerAutoPilotManager.getReportActionDesc(action)}"
|
||||
}
|
||||
holder.tvReportActionOpen.text = "建议操作:$actionStr"
|
||||
holder.tvStatusSelect.setOnClickListener {
|
||||
if(holder.tvReportLevelNormal.isVisible){
|
||||
holder.tvStatusSelect.setCompoundDrawablesWithIntrinsicBounds(getDrawable(R.drawable.icon_msg_close),null,null,null)
|
||||
holder.ivReportImageNormal.visibility = View.GONE
|
||||
holder.tvReportLevelNormal.visibility = View.GONE
|
||||
holder.tvReportTimeNormal.visibility = View.GONE
|
||||
holder.tvReportTypeNormal.visibility = View.GONE
|
||||
|
||||
holder.ivReportImageOpen.visibility = View.VISIBLE
|
||||
holder.tvReportLevelOpen.visibility = View.VISIBLE
|
||||
holder.tvReportTimeOpen.visibility = View.VISIBLE
|
||||
holder.tvReportTypeOpen.visibility = View.VISIBLE
|
||||
holder.tvReportReasonOpen.visibility = View.VISIBLE
|
||||
holder.tvReportActionOpen.visibility = View.VISIBLE
|
||||
}else{
|
||||
holder.tvStatusSelect.setCompoundDrawablesWithIntrinsicBounds(getDrawable(R.drawable.icon_msg_open),null,null,null)
|
||||
holder.ivReportImageNormal.visibility = View.VISIBLE
|
||||
holder.tvReportLevelNormal.visibility = View.VISIBLE
|
||||
holder.tvReportTimeNormal.visibility = View.VISIBLE
|
||||
holder.tvReportTypeNormal.visibility = View.VISIBLE
|
||||
|
||||
holder.ivReportImageOpen.visibility = View.GONE
|
||||
holder.tvReportLevelOpen.visibility = View.GONE
|
||||
holder.tvReportTimeOpen.visibility = View.GONE
|
||||
holder.tvReportTypeOpen.visibility = View.GONE
|
||||
holder.tvReportReasonOpen.visibility = View.GONE
|
||||
holder.tvReportActionOpen.visibility = View.GONE
|
||||
when (holder) {
|
||||
is BadCaseHolder -> {
|
||||
data?.let {
|
||||
holder.tvBagReceiveTime.text =
|
||||
TimeUtils.millis2String(it[position].timestamp, getHourMinFormat())
|
||||
holder.tvBagRecordTime.text =
|
||||
"时间:${TimeUtils.millis2String(it[position].timestamp)}"
|
||||
val msgBoxBean = it[position]
|
||||
holder.tvRecordCheck.setOnClickListener {
|
||||
//打开被动录包弹窗
|
||||
CallerDevaToolsManager.onReceiveBadCaseRecord(msgBoxBean, activity, false)
|
||||
}
|
||||
}
|
||||
}
|
||||
}else if(holder is MsgBoxOperation){
|
||||
data?.let {
|
||||
val operationMsg = it[position].bean as OperationMsg
|
||||
holder.tvOperationContentNormal.text = operationMsg.content
|
||||
holder.tvOperationContentOpen.text = operationMsg.content
|
||||
holder.tvOperationTime.text = TimeUtils.millis2String(operationMsg.timestamp,getHourMinFormat())
|
||||
holder.tvOperationStatusSelect.setOnClickListener {
|
||||
if(holder.ivOperationImageNormal.isVisible){
|
||||
holder.tvOperationStatusSelect.setCompoundDrawablesWithIntrinsicBounds(getDrawable(R.drawable.icon_msg_close),null,null,null)
|
||||
holder.ivOperationImageNormal.visibility = View.GONE
|
||||
holder.tvOperationTitleNormal.visibility = View.GONE
|
||||
holder.tvOperationContentNormal.visibility = View.GONE
|
||||
is MsgBoxIpcReportHolder -> {
|
||||
data?.let { it ->
|
||||
holder.tvReportTimeNormal.text =
|
||||
"时间:${TimeUtils.millis2String(it[position].timestamp)}"
|
||||
holder.tvReportTimeOpen.text =
|
||||
"时间:${TimeUtils.millis2String(it[position].timestamp)}"
|
||||
val reportEntity = (it[position].bean as ReportEntity)
|
||||
if (reportEntity.resultList.contains(RESULT_AUTOPILOT_DISABLE)
|
||||
|| reportEntity.resultList.contains(RESULT_AUTOPILOT_SYSTEM_UNSTARTED)
|
||||
|| reportEntity.resultList.contains(RESULT_REMOTEPILOT_DISABLE)
|
||||
) {
|
||||
//Error
|
||||
holder.ivReportImageNormal.setImageDrawable(getDrawable(R.drawable.icon_report_error_normal))
|
||||
holder.ivReportImageOpen.setImageDrawable(getDrawable(R.drawable.icon_report_error_open))
|
||||
holder.tvReportLevelNormal.text = "Error"
|
||||
holder.tvReportLevelOpen.text = "Error"
|
||||
} else {
|
||||
//Warning
|
||||
holder.ivReportImageNormal.setImageDrawable(getDrawable(R.drawable.icon_report_warning_normal))
|
||||
holder.ivReportImageOpen.setImageDrawable(getDrawable(R.drawable.icon_report_warning_open))
|
||||
holder.tvReportLevelNormal.text = "Warning"
|
||||
holder.tvReportLevelOpen.text = "Warning"
|
||||
}
|
||||
holder.tvReportTimeNormal.text =
|
||||
"时间:${TimeUtils.millis2String(it[position].timestamp)}"
|
||||
holder.tvReportTimeOpen.text =
|
||||
"时间:${TimeUtils.millis2String(it[position].timestamp)}"
|
||||
holder.tvReportTime.text =
|
||||
TimeUtils.millis2String(it[position].timestamp, getHourMinFormat())
|
||||
var resultStr = "类型:"
|
||||
for (result in reportEntity.resultList) {
|
||||
resultStr =
|
||||
"${resultStr}${CallerAutoPilotManager.getReportResultDesc(result)}"
|
||||
}
|
||||
holder.tvReportTypeNormal.text = resultStr
|
||||
holder.tvReportTypeOpen.text = resultStr
|
||||
holder.tvReportReasonOpen.text = "原因:${reportEntity.msg}"
|
||||
var actionStr = ""
|
||||
for (action in reportEntity.actionsList) {
|
||||
actionStr =
|
||||
"${actionStr}${CallerAutoPilotManager.getReportActionDesc(action)}"
|
||||
}
|
||||
holder.tvReportActionOpen.text = "建议操作:$actionStr"
|
||||
holder.tvStatusSelect.setOnClickListener {
|
||||
if (holder.tvReportLevelNormal.isVisible) {
|
||||
holder.tvStatusSelect.setCompoundDrawablesWithIntrinsicBounds(
|
||||
getDrawable(R.drawable.icon_msg_close),
|
||||
null,
|
||||
null,
|
||||
null
|
||||
)
|
||||
holder.ivReportImageNormal.visibility = View.GONE
|
||||
holder.tvReportLevelNormal.visibility = View.GONE
|
||||
holder.tvReportTimeNormal.visibility = View.GONE
|
||||
holder.tvReportTypeNormal.visibility = View.GONE
|
||||
|
||||
holder.ivOperationImageOpen.visibility = View.VISIBLE
|
||||
holder.tvOperationTitleOpen.visibility = View.VISIBLE
|
||||
holder.tvOperationContentOpen.visibility = View.VISIBLE
|
||||
}else{
|
||||
holder.tvOperationStatusSelect.setCompoundDrawablesWithIntrinsicBounds(getDrawable(R.drawable.icon_msg_open),null,null,null)
|
||||
holder.ivOperationImageNormal.visibility = View.VISIBLE
|
||||
holder.tvOperationTitleNormal.visibility = View.VISIBLE
|
||||
holder.tvOperationContentNormal.visibility = View.VISIBLE
|
||||
holder.ivReportImageOpen.visibility = View.VISIBLE
|
||||
holder.tvReportLevelOpen.visibility = View.VISIBLE
|
||||
holder.tvReportTimeOpen.visibility = View.VISIBLE
|
||||
holder.tvReportTypeOpen.visibility = View.VISIBLE
|
||||
holder.tvReportReasonOpen.visibility = View.VISIBLE
|
||||
holder.tvReportActionOpen.visibility = View.VISIBLE
|
||||
} else {
|
||||
holder.tvStatusSelect.setCompoundDrawablesWithIntrinsicBounds(
|
||||
getDrawable(R.drawable.icon_msg_open),
|
||||
null,
|
||||
null,
|
||||
null
|
||||
)
|
||||
holder.ivReportImageNormal.visibility = View.VISIBLE
|
||||
holder.tvReportLevelNormal.visibility = View.VISIBLE
|
||||
holder.tvReportTimeNormal.visibility = View.VISIBLE
|
||||
holder.tvReportTypeNormal.visibility = View.VISIBLE
|
||||
|
||||
holder.ivOperationImageOpen.visibility = View.GONE
|
||||
holder.tvOperationTitleOpen.visibility = View.GONE
|
||||
holder.tvOperationContentOpen.visibility = View.GONE
|
||||
holder.ivReportImageOpen.visibility = View.GONE
|
||||
holder.tvReportLevelOpen.visibility = View.GONE
|
||||
holder.tvReportTimeOpen.visibility = View.GONE
|
||||
holder.tvReportTypeOpen.visibility = View.GONE
|
||||
holder.tvReportReasonOpen.visibility = View.GONE
|
||||
holder.tvReportActionOpen.visibility = View.GONE
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}else if(holder is MsgBoxNotice){
|
||||
data?.let {
|
||||
val noticeFrCloudMsg = it[position].bean as NoticeFrCloudMsg
|
||||
if(noticeFrCloudMsg.type == 0){
|
||||
val noticeNormalData = noticeFrCloudMsg.noticeNormalData
|
||||
holder.tvNoticeTime.text = TimeUtils.millis2String(it[position].timestamp,getHourMinFormat())
|
||||
holder.tvNoticeContent.text = noticeNormalData?.content
|
||||
GlideApp.with(activity).load(noticeNormalData?.imageUrl).optionalTransform(
|
||||
GlideRoundedCornersTransform(
|
||||
20f,
|
||||
GlideRoundedCornersTransform.CornerType.ALL
|
||||
)
|
||||
).into(holder.ivNoticeImage)
|
||||
holder.tvNoticeCheck.setOnClickListener {
|
||||
//云公告
|
||||
noticeNormalData?.let { it1 -> CallerHmiManager.showNoticeNormalData(it1) }
|
||||
}
|
||||
}else if(noticeFrCloudMsg.type == 1){
|
||||
val noticeTrafficStylePushData = noticeFrCloudMsg.trafficPushData
|
||||
holder.tvNoticeTime.text = TimeUtils.millis2String(it[position].timestamp,getHourMinFormat())
|
||||
holder.tvNoticeContent.text = noticeTrafficStylePushData?.content
|
||||
GlideApp.with(activity).load(noticeTrafficStylePushData?.poiImgUrl).optionalTransform(
|
||||
GlideRoundedCornersTransform(
|
||||
20f,
|
||||
GlideRoundedCornersTransform.CornerType.ALL
|
||||
)
|
||||
).into(holder.ivNoticeImage)
|
||||
holder.tvNoticeCheck.setOnClickListener {
|
||||
//云公告
|
||||
noticeTrafficStylePushData?.let { it1 -> CallerHmiManager.showTrafficBanner(it1) }
|
||||
is MsgBoxOperation -> {
|
||||
data?.let {
|
||||
val operationMsg = it[position].bean as OperationMsg
|
||||
holder.tvOperationContentNormal.text = operationMsg.content
|
||||
holder.tvOperationContentOpen.text = operationMsg.content
|
||||
holder.tvOperationTime.text =
|
||||
TimeUtils.millis2String(operationMsg.timestamp, getHourMinFormat())
|
||||
holder.tvOperationStatusSelect.setOnClickListener {
|
||||
if (holder.ivOperationImageNormal.isVisible) {
|
||||
holder.tvOperationStatusSelect.setCompoundDrawablesWithIntrinsicBounds(
|
||||
getDrawable(R.drawable.icon_msg_close),
|
||||
null,
|
||||
null,
|
||||
null
|
||||
)
|
||||
holder.ivOperationImageNormal.visibility = View.GONE
|
||||
holder.tvOperationTitleNormal.visibility = View.GONE
|
||||
holder.tvOperationContentNormal.visibility = View.GONE
|
||||
|
||||
holder.ivOperationImageOpen.visibility = View.VISIBLE
|
||||
holder.tvOperationTitleOpen.visibility = View.VISIBLE
|
||||
holder.tvOperationContentOpen.visibility = View.VISIBLE
|
||||
} else {
|
||||
holder.tvOperationStatusSelect.setCompoundDrawablesWithIntrinsicBounds(
|
||||
getDrawable(R.drawable.icon_msg_open),
|
||||
null,
|
||||
null,
|
||||
null
|
||||
)
|
||||
holder.ivOperationImageNormal.visibility = View.VISIBLE
|
||||
holder.tvOperationTitleNormal.visibility = View.VISIBLE
|
||||
holder.tvOperationContentNormal.visibility = View.VISIBLE
|
||||
|
||||
holder.ivOperationImageOpen.visibility = View.GONE
|
||||
holder.tvOperationTitleOpen.visibility = View.GONE
|
||||
holder.tvOperationContentOpen.visibility = View.GONE
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}else if(holder is MsgBoxV2X){
|
||||
data?.let {
|
||||
val msgBoxBean = it[position]
|
||||
val v2XMsg = msgBoxBean.bean as V2XMsg
|
||||
holder.tvV2XTime.text = TimeUtils.millis2String(it[position].timestamp,getHourMinFormat())
|
||||
holder.tvV2XContent.text = v2XMsg.content
|
||||
if(msgBoxBean.type == MsgBoxType.OBU){
|
||||
is MsgBoxNotice -> {
|
||||
data?.let {
|
||||
val noticeFrCloudMsg = it[position].bean as NoticeFrCloudMsg
|
||||
if (noticeFrCloudMsg.type == 0) {
|
||||
val noticeNormalData = noticeFrCloudMsg.noticeNormalData
|
||||
holder.tvNoticeTime.text =
|
||||
TimeUtils.millis2String(it[position].timestamp, getHourMinFormat())
|
||||
holder.tvNoticeContent.text = noticeNormalData?.content
|
||||
GlideApp.with(activity).load(noticeNormalData?.imageUrl).optionalTransform(
|
||||
GlideRoundedCornersTransform(
|
||||
20f,
|
||||
GlideRoundedCornersTransform.CornerType.ALL
|
||||
)
|
||||
).into(holder.ivNoticeImage)
|
||||
holder.tvNoticeCheck.setOnClickListener {
|
||||
//云公告
|
||||
noticeNormalData?.let { it1 -> CallerHmiManager.showNoticeNormalData(it1) }
|
||||
}
|
||||
} else if (noticeFrCloudMsg.type == 1) {
|
||||
val noticeTrafficStylePushData = noticeFrCloudMsg.trafficPushData
|
||||
holder.tvNoticeTime.text =
|
||||
TimeUtils.millis2String(it[position].timestamp, getHourMinFormat())
|
||||
holder.tvNoticeContent.text = noticeTrafficStylePushData?.content
|
||||
GlideApp.with(activity).load(noticeTrafficStylePushData?.poiImgUrl)
|
||||
.optionalTransform(
|
||||
GlideRoundedCornersTransform(
|
||||
20f,
|
||||
GlideRoundedCornersTransform.CornerType.ALL
|
||||
)
|
||||
).into(holder.ivNoticeImage)
|
||||
holder.tvNoticeCheck.setOnClickListener {
|
||||
//云公告
|
||||
noticeTrafficStylePushData?.let { it1 ->
|
||||
CallerHmiManager.showTrafficBanner(
|
||||
it1
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
is MsgBoxV2X -> {
|
||||
data?.let {
|
||||
val msgBoxBean = it[position]
|
||||
val v2XMsg = msgBoxBean.bean as V2XMsg
|
||||
holder.tvV2XTime.text =
|
||||
TimeUtils.millis2String(it[position].timestamp, getHourMinFormat())
|
||||
holder.tvV2XContent.text = v2XMsg.content
|
||||
holder.ivV2XImage.setImageDrawable(activity.resources.getDrawable(
|
||||
EventTypeEnumNew.getUpdateIconRes(v2XMsg.type)))
|
||||
}else{
|
||||
holder.ivV2XImage.setImageDrawable(activity.resources.getDrawable(
|
||||
EventTypeEnum.getUpdateIconRes(v2XMsg.type)))
|
||||
EventTypeEnumNew.getUpdateIconRes(v2XMsg.type))
|
||||
)
|
||||
}
|
||||
}
|
||||
is MsgBoxSummary -> {
|
||||
data?.let {
|
||||
val summaryMsg = it[position].bean as V2XMsg
|
||||
holder.tvSummaryTime.text =
|
||||
TimeUtils.millis2String(it[position].timestamp, getHourMinFormat())
|
||||
holder.tvSummaryContent.text = summaryMsg.content
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -229,26 +294,30 @@ class DriverMsgBoxListAdapter(private val activity: Activity) : RecyclerView.Ada
|
||||
|
||||
|
||||
override fun getItemViewType(position: Int): Int {
|
||||
return when(data!![position].type){
|
||||
MsgBoxType.OPERATION -> operation
|
||||
MsgBoxType.NOTICE -> notice
|
||||
MsgBoxType.V2X -> v2x
|
||||
MsgBoxType.OBU -> obu
|
||||
MsgBoxType.REPORT -> report
|
||||
MsgBoxType.RECORD -> record
|
||||
MsgBoxType.TRAFFIC -> traffic
|
||||
}
|
||||
return if (data!![position].type == MsgBoxType.OPERATION) {
|
||||
operation
|
||||
} else if (data!![position].type == MsgBoxType.NOTICE) {
|
||||
notice
|
||||
} else if (data!![position].type == MsgBoxType.V2X && data!![position].sourceType == DataSourceType.SUMMARY) {
|
||||
summary
|
||||
} else if (data!![position].type == MsgBoxType.REPORT) {
|
||||
report
|
||||
} else if (data!![position].type == MsgBoxType.RECORD) {
|
||||
record
|
||||
} else {
|
||||
v2x
|
||||
}
|
||||
}
|
||||
|
||||
//录包实体
|
||||
class BadCaseHolder(itemView: View): RecyclerView.ViewHolder(itemView){
|
||||
var tvBagRecordTime: TextView= itemView.findViewById(R.id.tvBagRecordTime)
|
||||
class BadCaseHolder(itemView: View) : RecyclerView.ViewHolder(itemView) {
|
||||
var tvBagRecordTime: TextView = itemView.findViewById(R.id.tvBagRecordTime)
|
||||
var tvBagReceiveTime: TextView = itemView.findViewById(R.id.tvBagReceiveTime)
|
||||
var tvRecordCheck: TextView = itemView.findViewById(R.id.tvRecordCheck)
|
||||
}
|
||||
|
||||
//车辆系统信息
|
||||
class MsgBoxIpcReportHolder(itemView: View): RecyclerView.ViewHolder(itemView){
|
||||
class MsgBoxIpcReportHolder(itemView: View) : RecyclerView.ViewHolder(itemView) {
|
||||
var ivReportImageNormal: ImageView = itemView.findViewById(R.id.ivReportImageNormal)
|
||||
var tvReportLevelNormal: TextView = itemView.findViewById(R.id.tvReportLevelNormal)
|
||||
var tvReportTimeNormal: TextView = itemView.findViewById(R.id.tvReportTimeNormal)
|
||||
@@ -264,10 +333,11 @@ class DriverMsgBoxListAdapter(private val activity: Activity) : RecyclerView.Ada
|
||||
}
|
||||
|
||||
//运营平台
|
||||
class MsgBoxOperation(itemView: View): RecyclerView.ViewHolder(itemView){
|
||||
class MsgBoxOperation(itemView: View) : RecyclerView.ViewHolder(itemView) {
|
||||
var ivOperationImageNormal: ImageView = itemView.findViewById(R.id.ivOperationImageNormal)
|
||||
var tvOperationTitleNormal: TextView = itemView.findViewById(R.id.tvOperationTitleNormal)
|
||||
var tvOperationContentNormal: TextView = itemView.findViewById(R.id.tvOperationContentNormal)
|
||||
var tvOperationContentNormal: TextView =
|
||||
itemView.findViewById(R.id.tvOperationContentNormal)
|
||||
var tvOperationStatusSelect: TextView = itemView.findViewById(R.id.tvOperationStatusSelect)
|
||||
var tvOperationTime: TextView = itemView.findViewById(R.id.tvOperationTime)
|
||||
var ivOperationImageOpen: ImageView = itemView.findViewById(R.id.ivOperationImageOpen)
|
||||
@@ -276,7 +346,7 @@ class DriverMsgBoxListAdapter(private val activity: Activity) : RecyclerView.Ada
|
||||
}
|
||||
|
||||
//Notice
|
||||
class MsgBoxNotice(itemView: View): RecyclerView.ViewHolder(itemView){
|
||||
class MsgBoxNotice(itemView: View) : RecyclerView.ViewHolder(itemView) {
|
||||
var ivNoticeImage: ImageView = itemView.findViewById(R.id.ivNoticeImage)
|
||||
var tvNoticeTitle: TextView = itemView.findViewById(R.id.tvNoticeTitle)
|
||||
var tvNoticeTime: TextView = itemView.findViewById(R.id.tvNoticeTime)
|
||||
@@ -285,11 +355,17 @@ class DriverMsgBoxListAdapter(private val activity: Activity) : RecyclerView.Ada
|
||||
}
|
||||
|
||||
//V2X,OBU
|
||||
class MsgBoxV2X(itemView: View): RecyclerView.ViewHolder(itemView){
|
||||
class MsgBoxV2X(itemView: View) : RecyclerView.ViewHolder(itemView) {
|
||||
var ivV2XImage: ImageView = itemView.findViewById(R.id.ivV2XImage)
|
||||
var tvV2XTime: TextView = itemView.findViewById(R.id.tvV2XTime)
|
||||
var tvV2XContent: TextView = itemView.findViewById(R.id.tvV2XContent)
|
||||
}
|
||||
|
||||
//汇总消息
|
||||
class MsgBoxSummary(itemView: View) : RecyclerView.ViewHolder(itemView) {
|
||||
var tvSummaryContent: TextView = itemView.findViewById(R.id.tvSummaryContent)
|
||||
var tvSummaryTime: TextView = itemView.findViewById(R.id.tvSummaryTime)
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -8,20 +8,18 @@ import android.view.ViewGroup
|
||||
import android.widget.ImageView
|
||||
import android.widget.TextView
|
||||
import androidx.recyclerview.widget.RecyclerView
|
||||
import com.mogo.eagle.core.data.enums.EventTypeEnum
|
||||
import com.mogo.eagle.core.data.enums.DataSourceType
|
||||
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.NoticeFrCloudMsg
|
||||
import com.mogo.eagle.core.data.msgbox.V2XMsg
|
||||
import com.mogo.eagle.core.data.msgbox.*
|
||||
import com.mogo.eagle.core.utilcode.mogo.glide.GlideApp
|
||||
import com.mogo.eagle.core.data.notice.NoticeNormalData
|
||||
import com.mogo.eagle.core.function.call.hmi.CallerHmiManager
|
||||
import com.mogo.eagle.core.function.call.msgbox.CallerMsgBoxEventListenerManager
|
||||
import com.mogo.eagle.core.function.call.msgbox.CallerMsgBoxManager
|
||||
import com.mogo.eagle.core.function.hmi.R
|
||||
import com.mogo.eagle.core.utilcode.mogo.glide.transform.GlideRoundedCornersTransform
|
||||
import com.mogo.eagle.core.utilcode.util.TimeUtils
|
||||
import com.mogo.eagle.core.utilcode.util.TimeUtils.getHourMinFormat
|
||||
import com.mogo.eagle.core.widget.RoundCanClickConstraintLayout
|
||||
|
||||
/**
|
||||
* @author XuXinChao
|
||||
@@ -34,6 +32,7 @@ class PassengerMsgBoxBubbleAdapter(private val activity: Activity): RecyclerView
|
||||
|
||||
private val notice: Int = 1
|
||||
private val v2x: Int = 2
|
||||
private val summary: Int = 3
|
||||
|
||||
var countDownTimer: CountDownTimer?=null
|
||||
|
||||
@@ -46,65 +45,86 @@ class PassengerMsgBoxBubbleAdapter(private val activity: Activity): RecyclerView
|
||||
}
|
||||
|
||||
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): RecyclerView.ViewHolder {
|
||||
if(viewType == notice){
|
||||
val view = LayoutInflater.from(parent.context).inflate(R.layout.item_passenger_msg_box_notice,parent,false)
|
||||
return BubbleNoticeHolder(view)
|
||||
}else{
|
||||
val view = LayoutInflater.from(parent.context).inflate(R.layout.item_passenger_msg_box_v2x,parent,false)
|
||||
return BubbleV2XHolder(view)
|
||||
return when (viewType) {
|
||||
notice -> {
|
||||
val view = LayoutInflater.from(parent.context).inflate(R.layout.item_passenger_msg_box_notice,parent,false)
|
||||
BubbleNoticeHolder(view)
|
||||
}
|
||||
summary -> {
|
||||
val view = LayoutInflater.from(parent.context).inflate(R.layout.item_passenger_msg_box_summary,parent,false)
|
||||
BubbleSummaryHolder(view)
|
||||
}
|
||||
else -> {
|
||||
val view = LayoutInflater.from(parent.context).inflate(R.layout.item_passenger_msg_box_v2x,parent,false)
|
||||
BubbleV2XHolder(view)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
override fun onBindViewHolder(holder: RecyclerView.ViewHolder, position: Int) {
|
||||
if(holder is BubbleNoticeHolder){
|
||||
data?.let {
|
||||
val noticeFrCloudMsg = it[position].bean as NoticeFrCloudMsg
|
||||
if(noticeFrCloudMsg.type == 0){
|
||||
val noticeNormalData = noticeFrCloudMsg.noticeNormalData
|
||||
holder.tvPassengerNoticeTime.text = TimeUtils.millis2String(it[position].timestamp,getHourMinFormat())
|
||||
holder.tvPassengerNoticeContent.text = noticeNormalData?.content
|
||||
GlideApp.with(activity).load(noticeNormalData?.imageUrl).optionalTransform(
|
||||
GlideRoundedCornersTransform(
|
||||
20f,
|
||||
GlideRoundedCornersTransform.CornerType.ALL
|
||||
)
|
||||
).into(holder.ivPassengerNoticeImage)
|
||||
holder.tvPassengerNoticeCheck.setOnClickListener {
|
||||
//云公告
|
||||
noticeNormalData?.let { it1 -> CallerHmiManager.showNoticeNormalData(it1) }
|
||||
when (holder) {
|
||||
is BubbleNoticeHolder -> {
|
||||
data?.let {
|
||||
val noticeFrCloudMsg = it[position].bean as NoticeFrCloudMsg
|
||||
if(noticeFrCloudMsg.type == 0){
|
||||
val noticeNormalData = noticeFrCloudMsg.noticeNormalData
|
||||
holder.tvPassengerNoticeTime.text = TimeUtils.millis2String(it[position].timestamp,getHourMinFormat())
|
||||
holder.tvPassengerNoticeContent.text = noticeNormalData?.content
|
||||
GlideApp.with(activity).load(noticeNormalData?.imageUrl).optionalTransform(
|
||||
GlideRoundedCornersTransform(
|
||||
20f,
|
||||
GlideRoundedCornersTransform.CornerType.ALL
|
||||
)
|
||||
).into(holder.ivPassengerNoticeImage)
|
||||
holder.tvPassengerNoticeCheck.setOnClickListener {
|
||||
//云公告
|
||||
noticeNormalData?.let { it1 -> CallerHmiManager.showNoticeNormalData(it1) }
|
||||
}
|
||||
}else if(noticeFrCloudMsg.type == 1){
|
||||
val noticeTrafficStylePushData = noticeFrCloudMsg.trafficPushData
|
||||
holder.tvPassengerNoticeTime.text = TimeUtils.millis2String(it[position].timestamp,getHourMinFormat())
|
||||
holder.tvPassengerNoticeContent.text = noticeTrafficStylePushData?.content
|
||||
GlideApp.with(activity).load(noticeTrafficStylePushData?.poiImgUrl).optionalTransform(
|
||||
GlideRoundedCornersTransform(
|
||||
20f,
|
||||
GlideRoundedCornersTransform.CornerType.ALL
|
||||
)
|
||||
).into(holder.ivPassengerNoticeImage)
|
||||
holder.tvPassengerNoticeCheck.setOnClickListener {
|
||||
//云公告
|
||||
noticeTrafficStylePushData?.let { it1 -> CallerHmiManager.showTrafficBanner(it1) }
|
||||
}
|
||||
}
|
||||
}else if(noticeFrCloudMsg.type == 1){
|
||||
val noticeTrafficStylePushData = noticeFrCloudMsg.trafficPushData
|
||||
holder.tvPassengerNoticeTime.text = TimeUtils.millis2String(it[position].timestamp,getHourMinFormat())
|
||||
holder.tvPassengerNoticeContent.text = noticeTrafficStylePushData?.content
|
||||
GlideApp.with(activity).load(noticeTrafficStylePushData?.poiImgUrl).optionalTransform(
|
||||
GlideRoundedCornersTransform(
|
||||
20f,
|
||||
GlideRoundedCornersTransform.CornerType.ALL
|
||||
)
|
||||
).into(holder.ivPassengerNoticeImage)
|
||||
holder.tvPassengerNoticeCheck.setOnClickListener {
|
||||
//云公告
|
||||
noticeTrafficStylePushData?.let { it1 -> CallerHmiManager.showTrafficBanner(it1) }
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}else if(holder is BubbleV2XHolder){
|
||||
data?.let {
|
||||
val msgBoxBean = it[position]
|
||||
val v2XMsg = msgBoxBean.bean as V2XMsg
|
||||
holder.tvPassengerV2XTime.text = TimeUtils.millis2String(it[position].timestamp,getHourMinFormat())
|
||||
holder.tvPassengerV2XContent.text = v2XMsg.content
|
||||
if(msgBoxBean.type == MsgBoxType.OBU){
|
||||
is BubbleV2XHolder -> {
|
||||
data?.let {
|
||||
val msgBoxBean = it[position]
|
||||
val v2XMsg = msgBoxBean.bean as V2XMsg
|
||||
holder.tvPassengerV2XTime.text = TimeUtils.millis2String(it[position].timestamp,getHourMinFormat())
|
||||
holder.tvPassengerV2XContent.text = v2XMsg.content
|
||||
holder.ivPassengerV2XImage.setImageDrawable(activity.resources.getDrawable(
|
||||
EventTypeEnumNew.getUpdateIconRes(v2XMsg.type)))
|
||||
}else{
|
||||
holder.ivPassengerV2XImage.setImageDrawable(activity.resources.getDrawable(
|
||||
EventTypeEnum.getUpdateIconRes(v2XMsg.type)))
|
||||
holder.clPassengerVeXLayout.setOnClickListener {
|
||||
CallerMsgBoxEventListenerManager.invokeBubbleV2XListener(msgBoxBean)
|
||||
}
|
||||
}
|
||||
}
|
||||
is BubbleSummaryHolder -> {
|
||||
data?.let {
|
||||
val summaryMsg= it[position].bean as V2XMsg
|
||||
holder.tvPassengerSummaryTime.text = TimeUtils.millis2String(it[position].timestamp,getHourMinFormat())
|
||||
holder.tvPassengerSummaryContent.text = summaryMsg.content
|
||||
holder.tvPassengerSummaryCheck.setOnClickListener {
|
||||
//跳转全览模式
|
||||
// CallerHmiManager.showSmallFragment()
|
||||
CallerMsgBoxEventListenerManager.invokeSummaryListener()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
val msgBoxBean: MsgBoxBean = data!![position]
|
||||
countDownTimer =object: CountDownTimer(CallerMsgBoxManager.getDismissTime(),1000){
|
||||
override fun onTick(p0: Long) {
|
||||
@@ -125,10 +145,12 @@ class PassengerMsgBoxBubbleAdapter(private val activity: Activity): RecyclerView
|
||||
override fun getItemCount() = data?.size ?: 0
|
||||
|
||||
override fun getItemViewType(position: Int): Int {
|
||||
if(data!![position].type == MsgBoxType.NOTICE){
|
||||
return notice
|
||||
}else{
|
||||
return v2x
|
||||
return if(data!![position].type == MsgBoxType.NOTICE){
|
||||
notice
|
||||
}else if(data!![position].type == MsgBoxType.V2X && data!![position].sourceType == DataSourceType.SUMMARY){
|
||||
summary
|
||||
} else{
|
||||
v2x
|
||||
}
|
||||
}
|
||||
|
||||
@@ -146,6 +168,14 @@ class PassengerMsgBoxBubbleAdapter(private val activity: Activity): RecyclerView
|
||||
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 clPassengerVeXLayout: RoundCanClickConstraintLayout = itemView.findViewById(R.id.clPassengerVeXLayout)
|
||||
}
|
||||
|
||||
//汇总消息
|
||||
class BubbleSummaryHolder(itemView: View): RecyclerView.ViewHolder(itemView){
|
||||
var tvPassengerSummaryContent: TextView = itemView.findViewById(R.id.tvPassengerSummaryContent)
|
||||
var tvPassengerSummaryCheck: TextView = itemView.findViewById(R.id.tvPassengerSummaryCheck)
|
||||
var tvPassengerSummaryTime: TextView = itemView.findViewById(R.id.tvPassengerSummaryTime)
|
||||
}
|
||||
|
||||
}
|
||||
@@ -7,14 +7,11 @@ import android.view.ViewGroup
|
||||
import android.widget.ImageView
|
||||
import android.widget.TextView
|
||||
import androidx.recyclerview.widget.RecyclerView
|
||||
import com.mogo.eagle.core.data.enums.EventTypeEnum
|
||||
import com.mogo.eagle.core.data.enums.DataSourceType
|
||||
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.NoticeFrCloudMsg
|
||||
import com.mogo.eagle.core.data.msgbox.V2XMsg
|
||||
import com.mogo.eagle.core.data.notice.NoticeNormalData
|
||||
import com.mogo.eagle.core.data.msgbox.*
|
||||
import com.mogo.eagle.core.function.call.hmi.CallerHmiManager
|
||||
import com.mogo.eagle.core.function.call.msgbox.CallerMsgBoxEventListenerManager
|
||||
import com.mogo.eagle.core.function.hmi.R
|
||||
import com.mogo.eagle.core.utilcode.mogo.glide.GlideApp
|
||||
import com.mogo.eagle.core.utilcode.mogo.glide.transform.GlideRoundedCornersTransform
|
||||
@@ -32,6 +29,7 @@ class PassengerMsgBoxListAdapter(private val activity: Activity): RecyclerView.A
|
||||
|
||||
private val notice: Int = 1
|
||||
private val v2x: Int = 2
|
||||
private val summary: Int = 3
|
||||
|
||||
fun setData(data: List<MsgBoxBean>){
|
||||
this.data = data
|
||||
@@ -39,61 +37,78 @@ class PassengerMsgBoxListAdapter(private val activity: Activity): RecyclerView.A
|
||||
}
|
||||
|
||||
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): RecyclerView.ViewHolder {
|
||||
return if(viewType == notice){
|
||||
val view = LayoutInflater.from(parent.context).inflate(R.layout.item_passenger_msg_list_notice,parent,false)
|
||||
ListNoticeHolder(view)
|
||||
}else{
|
||||
val view = LayoutInflater.from(parent.context).inflate(R.layout.item_passenger_msg_list_v2x,parent,false)
|
||||
ListV2XHolder(view)
|
||||
return when (viewType) {
|
||||
notice -> {
|
||||
val view = LayoutInflater.from(parent.context).inflate(R.layout.item_passenger_msg_list_notice,parent,false)
|
||||
ListNoticeHolder(view)
|
||||
}
|
||||
summary -> {
|
||||
val view = LayoutInflater.from(parent.context).inflate(R.layout.item_passenger_msg_list_summary,parent,false)
|
||||
ListSummaryHolder(view)
|
||||
}
|
||||
else -> {
|
||||
val view = LayoutInflater.from(parent.context).inflate(R.layout.item_passenger_msg_list_v2x,parent,false)
|
||||
ListV2XHolder(view)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
override fun onBindViewHolder(holder: RecyclerView.ViewHolder, position: Int) {
|
||||
if(holder is ListNoticeHolder){
|
||||
data?.let {
|
||||
val noticeFrCloudMsg = it[position].bean as NoticeFrCloudMsg
|
||||
if(noticeFrCloudMsg.type == 0){
|
||||
val noticeNormalData = noticeFrCloudMsg.noticeNormalData
|
||||
holder.tvPassengerNoticeTime.text = TimeUtils.millis2String(it[position].timestamp,getHourMinFormat())
|
||||
holder.tvPassengerNoticeContent.text = noticeNormalData?.content
|
||||
GlideApp.with(activity).load(noticeNormalData?.imageUrl).optionalTransform(
|
||||
GlideRoundedCornersTransform(
|
||||
20f,
|
||||
GlideRoundedCornersTransform.CornerType.ALL
|
||||
)
|
||||
).into(holder.ivPassengerNoticeImage)
|
||||
holder.tvPassengerNoticeCheck.setOnClickListener {
|
||||
//云公告
|
||||
noticeNormalData?.let { it1 -> CallerHmiManager.showNoticeNormalData(it1) }
|
||||
}
|
||||
}else if(noticeFrCloudMsg.type == 1){
|
||||
val noticeTrafficStylePushData = noticeFrCloudMsg.trafficPushData
|
||||
holder.tvPassengerNoticeTime.text = TimeUtils.millis2String(it[position].timestamp,getHourMinFormat())
|
||||
holder.tvPassengerNoticeContent.text = noticeTrafficStylePushData?.content
|
||||
GlideApp.with(activity).load(noticeTrafficStylePushData?.poiImgUrl).optionalTransform(
|
||||
GlideRoundedCornersTransform(
|
||||
20f,
|
||||
GlideRoundedCornersTransform.CornerType.ALL
|
||||
)
|
||||
).into(holder.ivPassengerNoticeImage)
|
||||
holder.tvPassengerNoticeCheck.setOnClickListener {
|
||||
//云公告
|
||||
noticeTrafficStylePushData?.let { it1 -> CallerHmiManager.showTrafficBanner(it1) }
|
||||
when (holder) {
|
||||
is ListNoticeHolder -> {
|
||||
data?.let {
|
||||
val noticeFrCloudMsg = it[position].bean as NoticeFrCloudMsg
|
||||
if(noticeFrCloudMsg.type == 0){
|
||||
val noticeNormalData = noticeFrCloudMsg.noticeNormalData
|
||||
holder.tvPassengerNoticeTime.text = TimeUtils.millis2String(it[position].timestamp,getHourMinFormat())
|
||||
holder.tvPassengerNoticeContent.text = noticeNormalData?.content
|
||||
GlideApp.with(activity).load(noticeNormalData?.imageUrl).optionalTransform(
|
||||
GlideRoundedCornersTransform(
|
||||
20f,
|
||||
GlideRoundedCornersTransform.CornerType.ALL
|
||||
)
|
||||
).into(holder.ivPassengerNoticeImage)
|
||||
holder.tvPassengerNoticeCheck.setOnClickListener {
|
||||
//云公告
|
||||
noticeNormalData?.let { it1 -> CallerHmiManager.showNoticeNormalData(it1) }
|
||||
}
|
||||
}else if(noticeFrCloudMsg.type == 1){
|
||||
val noticeTrafficStylePushData = noticeFrCloudMsg.trafficPushData
|
||||
holder.tvPassengerNoticeTime.text = TimeUtils.millis2String(it[position].timestamp,getHourMinFormat())
|
||||
holder.tvPassengerNoticeContent.text = noticeTrafficStylePushData?.content
|
||||
GlideApp.with(activity).load(noticeTrafficStylePushData?.poiImgUrl).optionalTransform(
|
||||
GlideRoundedCornersTransform(
|
||||
20f,
|
||||
GlideRoundedCornersTransform.CornerType.ALL
|
||||
)
|
||||
).into(holder.ivPassengerNoticeImage)
|
||||
holder.tvPassengerNoticeCheck.setOnClickListener {
|
||||
//云公告
|
||||
noticeTrafficStylePushData?.let { it1 -> CallerHmiManager.showTrafficBanner(it1) }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}else if(holder is ListV2XHolder){
|
||||
data?.let {
|
||||
val msgBoxBean = it[position]
|
||||
val v2XMsg = msgBoxBean.bean as V2XMsg
|
||||
holder.tvPassengerV2XTime.text = TimeUtils.millis2String(it[position].timestamp,getHourMinFormat())
|
||||
holder.tvPassengerV2XContent.text = v2XMsg.content
|
||||
if(msgBoxBean.type == MsgBoxType.OBU){
|
||||
is ListV2XHolder -> {
|
||||
data?.let {
|
||||
val msgBoxBean = it[position]
|
||||
val v2XMsg = msgBoxBean.bean as V2XMsg
|
||||
holder.tvPassengerV2XTime.text = TimeUtils.millis2String(it[position].timestamp,getHourMinFormat())
|
||||
holder.tvPassengerV2XContent.text = v2XMsg.content
|
||||
holder.ivPassengerV2XImage.setImageDrawable(activity.resources.getDrawable(
|
||||
EventTypeEnumNew.getUpdateIconRes(v2XMsg.type)))
|
||||
}else{
|
||||
holder.ivPassengerV2XImage.setImageDrawable(activity.resources.getDrawable(
|
||||
EventTypeEnum.getUpdateIconRes(v2XMsg.type)))
|
||||
}
|
||||
}
|
||||
is ListSummaryHolder -> {
|
||||
data?.let {
|
||||
val summaryMsg= it[position].bean as V2XMsg
|
||||
holder.tvPassengerSummaryTime.text = TimeUtils.millis2String(it[position].timestamp,getHourMinFormat())
|
||||
holder.tvPassengerSummaryContent.text = summaryMsg.content
|
||||
holder.tvPassengerSummaryCheck.setOnClickListener {
|
||||
//跳转全览模式
|
||||
// CallerHmiManager.showSmallFragment()
|
||||
CallerMsgBoxEventListenerManager.invokeSummaryListener()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -102,10 +117,12 @@ class PassengerMsgBoxListAdapter(private val activity: Activity): RecyclerView.A
|
||||
override fun getItemCount() = data?.size ?: 0
|
||||
|
||||
override fun getItemViewType(position: Int): Int {
|
||||
if(data!![position].type == MsgBoxType.NOTICE){
|
||||
return notice
|
||||
}else{
|
||||
return v2x
|
||||
return if(data!![position].type == MsgBoxType.NOTICE){
|
||||
notice
|
||||
}else if(data!![position].type == MsgBoxType.V2X && data!![position].sourceType == DataSourceType.SUMMARY){
|
||||
summary
|
||||
} else{
|
||||
v2x
|
||||
}
|
||||
}
|
||||
|
||||
@@ -125,4 +142,11 @@ class PassengerMsgBoxListAdapter(private val activity: Activity): RecyclerView.A
|
||||
var tvPassengerV2XContent: TextView = itemView.findViewById(R.id.tvPassengerV2XContent)
|
||||
}
|
||||
|
||||
//汇总消息
|
||||
class ListSummaryHolder(itemView: View): RecyclerView.ViewHolder(itemView){
|
||||
var tvPassengerSummaryContent: TextView = itemView.findViewById(R.id.tvPassengerSummaryContent)
|
||||
var tvPassengerSummaryCheck: TextView = itemView.findViewById(R.id.tvPassengerSummaryCheck)
|
||||
var tvPassengerSummaryTime: TextView = itemView.findViewById(R.id.tvPassengerSummaryTime)
|
||||
}
|
||||
|
||||
}
|
||||
@@ -82,8 +82,8 @@ class PncActionsView @JvmOverloads constructor(
|
||||
//如果是存在云端红绿灯数据条件下,设置云端数据
|
||||
if (PncActionsHelper.isWaitingTrafficlight(it.drivingState.number, it.drivingAction.number)
|
||||
&& mTrafficLightResult != null
|
||||
&& getWaitTrafficlightTime().isNotBlank()) {
|
||||
actions += ",预计${getWaitTrafficlightTime()}秒后通过"
|
||||
&& getWaitTrafficLightTime().isNotBlank()) {
|
||||
actions += ",预计${getWaitTrafficLightTime()}秒后通过"
|
||||
} else {
|
||||
mTrafficLightResult = null
|
||||
}
|
||||
@@ -106,7 +106,7 @@ class PncActionsView @JvmOverloads constructor(
|
||||
mTrafficLightResult = trafficLightResult
|
||||
}
|
||||
|
||||
private fun getWaitTrafficlightTime(): String {
|
||||
private fun getWaitTrafficLightTime(): String {
|
||||
return if (mTrafficLightResult != null
|
||||
&& mTrafficLightResult!!.currentRoadTrafficLight() != null
|
||||
&& mTrafficLightResult!!.currentRoadTrafficLight()!!.isRed()
|
||||
|
||||
@@ -16,6 +16,7 @@ import androidx.appcompat.widget.PopupMenu
|
||||
import androidx.constraintlayout.widget.ConstraintLayout
|
||||
import androidx.core.content.ContextCompat
|
||||
import androidx.core.view.*
|
||||
import androidx.lifecycle.lifecycleScope
|
||||
import chassis.Chassis
|
||||
import chassis.ChassisStatesOuterClass
|
||||
import com.mogo.cloud.passport.MoGoAiCloudClient
|
||||
@@ -37,14 +38,12 @@ import com.mogo.eagle.core.data.deva.chain.ChainConstant
|
||||
import com.mogo.eagle.core.data.deva.scene.SceneModule
|
||||
import com.mogo.eagle.core.data.enums.TrafficTypeEnum
|
||||
import com.mogo.eagle.core.data.gnss.AccelerationEntity
|
||||
import com.mogo.eagle.core.data.map.MogoLocation
|
||||
import com.mogo.eagle.core.data.obu.ObuStatusInfo
|
||||
import com.mogo.eagle.core.data.report.ReportEntity
|
||||
import com.mogo.eagle.core.function.api.autopilot.*
|
||||
import com.mogo.eagle.core.function.api.devatools.IMoGoDevaToolsFuncConfigListener
|
||||
import com.mogo.eagle.core.function.api.devatools.IMoGoDevaToolsListener
|
||||
import com.mogo.eagle.core.function.api.map.listener.IMoGoMapLocationListener
|
||||
import com.mogo.eagle.core.function.api.obu.IMoGoObuStatusListener
|
||||
import com.mogo.eagle.core.function.api.obu.IMoGoObuConnectListener
|
||||
import com.mogo.eagle.core.function.business.routeoverlay.*
|
||||
import com.mogo.eagle.core.function.call.autopilot.*
|
||||
import com.mogo.eagle.core.function.call.devatools.CallerDevaToolsFuncConfigListenerManager
|
||||
@@ -54,8 +53,8 @@ import com.mogo.eagle.core.function.call.hmi.CallerHmiManager
|
||||
import com.mogo.eagle.core.function.call.map.CallerHDMapManager
|
||||
import com.mogo.eagle.core.function.call.map.CallerMapUIServiceManager
|
||||
import com.mogo.eagle.core.function.call.map.CallerSmpManager
|
||||
import com.mogo.eagle.core.function.call.obu.CallerOBUManager
|
||||
import com.mogo.eagle.core.function.call.obu.CallerObuListenerManager
|
||||
import com.mogo.eagle.core.function.call.obu.CallerObuApiManager
|
||||
import com.mogo.eagle.core.function.call.obu.CallerObuConnectListenerManager
|
||||
import com.mogo.eagle.core.function.call.setting.CallerMoGoUiSettingManager
|
||||
import com.mogo.eagle.core.function.call.telematic.CallerTelematicManager
|
||||
import com.mogo.eagle.core.function.hmi.R
|
||||
@@ -63,6 +62,7 @@ import com.mogo.eagle.core.function.hmi.ui.logcatch.ILogViewListener
|
||||
import com.mogo.eagle.core.function.hmi.ui.logcatch.LogInfoView
|
||||
import com.mogo.eagle.core.function.hmi.ui.widget.DemoModeView
|
||||
import com.mogo.eagle.core.utilcode.kotlin.currentPadding
|
||||
import com.mogo.eagle.core.utilcode.kotlin.lifecycleOwner
|
||||
import com.mogo.eagle.core.utilcode.kotlin.onClick
|
||||
import com.mogo.eagle.core.utilcode.mogo.AppIdentityModeUtils
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.LogLevel
|
||||
@@ -74,9 +74,12 @@ import com.mogo.eagle.core.utilcode.mogo.toast.TipToast
|
||||
import com.mogo.eagle.core.utilcode.util.*
|
||||
import com.mogo.map.uicontroller.VisualAngleMode
|
||||
import com.mogo.map.uicontroller.VisualAngleMode.*
|
||||
import com.zhidao.easysocket.utils.L
|
||||
import com.mogo.support.obu.MogoObuManager
|
||||
import com.mogo.support.obu.constants.MogoObuLogLevel
|
||||
import com.mogo.support.obu.option.MogoObuLog
|
||||
import com.zhjt.mogo_core_function_devatools.env.*
|
||||
import kotlinx.android.synthetic.main.view_debug_setting.view.*
|
||||
import kotlinx.coroutines.launch
|
||||
import mogo.telematics.pad.MessagePad
|
||||
import mogo_msg.MogoReportMsg
|
||||
import java.text.SimpleDateFormat
|
||||
@@ -95,22 +98,21 @@ internal class DebugSettingView @JvmOverloads constructor(
|
||||
attrs: AttributeSet? = null,
|
||||
defStyleAttr: Int = 0
|
||||
) : ConstraintLayout(context, attrs, defStyleAttr),
|
||||
IMoGoObuStatusListener,
|
||||
IMoGoAutopilotStatusListener,
|
||||
IMoGoChassisLocationWGS84Listener,
|
||||
IMoGoMapLocationListener,
|
||||
IMoGoAutopilotIdentifyListener,
|
||||
IMoGoPlanningRottingListener,
|
||||
IMoGoPlanningTrajectoryListener,
|
||||
IMoGoDevaToolsFuncConfigListener,
|
||||
IMoGoChassisLamplightListener,
|
||||
IMoGoDevaToolsListener,
|
||||
IMoGoChassisAccStateListener,
|
||||
IMoGoChassisSteeringStateListener,
|
||||
IMoGoChassisGearStateListener,
|
||||
IMoGoChassisBrakeStateListener,
|
||||
IMoGoChassisThrottleStateListener,
|
||||
IMoGoSweeperFutianCleanSystemListener{
|
||||
IMoGoObuConnectListener,
|
||||
IMoGoAutopilotStatusListener,
|
||||
IMoGoChassisLocationWGS84Listener,
|
||||
IMoGoAutopilotIdentifyListener,
|
||||
IMoGoPlanningRottingListener,
|
||||
IMoGoPlanningTrajectoryListener,
|
||||
IMoGoDevaToolsFuncConfigListener,
|
||||
IMoGoChassisLamplightListener,
|
||||
IMoGoDevaToolsListener,
|
||||
IMoGoChassisAccStateListener,
|
||||
IMoGoChassisSteeringStateListener,
|
||||
IMoGoChassisGearStateListener,
|
||||
IMoGoChassisBrakeStateListener,
|
||||
IMoGoChassisThrottleStateListener,
|
||||
IMoGoSweeperFutianCleanSystemListener {
|
||||
|
||||
private val TAG = "DebugSettingView"
|
||||
|
||||
@@ -184,7 +186,7 @@ internal class DebugSettingView @JvmOverloads constructor(
|
||||
override fun onAttachedToWindow() {
|
||||
super.onAttachedToWindow()
|
||||
// 添加 OBU状态 监听
|
||||
CallerObuListenerManager.addListener(TAG, this)
|
||||
CallerObuConnectListenerManager.addListener(TAG, this)
|
||||
// 添加 ADAS状态 监听
|
||||
CallerAutoPilotStatusListenerManager.addListener(TAG, this)
|
||||
// 添加 ADAS车辆状态&定位 监听
|
||||
@@ -215,7 +217,7 @@ internal class DebugSettingView @JvmOverloads constructor(
|
||||
logInfoView!!.onEnterForeground()
|
||||
}
|
||||
// 开启定时查询速度
|
||||
Timer().schedule(timerTaskRefresh, Date(), 100)
|
||||
Timer().schedule(timerTaskRefresh, Date(), 300)
|
||||
if (AppConfigInfo.isConnectAutopilot && (AppConfigInfo.plateNumber.isNullOrEmpty() || AppConfigInfo.iPCMacAddress.isNullOrEmpty())) {
|
||||
//查询工控机基础配置信息
|
||||
CallerAutoPilotManager.getCarConfig()
|
||||
@@ -225,7 +227,7 @@ internal class DebugSettingView @JvmOverloads constructor(
|
||||
override fun onDetachedFromWindow() {
|
||||
super.onDetachedFromWindow()
|
||||
// 移除 OBU状态 监听
|
||||
CallerObuListenerManager.removeListener(TAG)
|
||||
CallerObuConnectListenerManager.removeListener(TAG)
|
||||
// 移除 ADAS状态 监听
|
||||
CallerAutoPilotStatusListenerManager.removeListener(TAG)
|
||||
// 移除 ADAS车辆状态&定位 监听
|
||||
@@ -249,7 +251,10 @@ internal class DebugSettingView @JvmOverloads constructor(
|
||||
CallerChassisLamplightListenerManager.removeListener(TAG)
|
||||
|
||||
// 移除 业务配置监听
|
||||
CallerDevaToolsFuncConfigListenerManager.unRegisterDevaToolsFuncConfigListener( FuncBizConfig.FOUNDATION, TAG)
|
||||
CallerDevaToolsFuncConfigListenerManager.unRegisterDevaToolsFuncConfigListener(
|
||||
FuncBizConfig.FOUNDATION,
|
||||
TAG
|
||||
)
|
||||
|
||||
if (logInfoView != null) {
|
||||
logInfoView!!.onEnterBackground()
|
||||
@@ -547,7 +552,7 @@ internal class DebugSettingView @JvmOverloads constructor(
|
||||
setLogCheckedChangeListener()
|
||||
|
||||
//OBU配置信息
|
||||
tvObuInfo.text = CallerObuListenerManager.getObuStatusInfoJsonString()
|
||||
tvObuInfo.text = CallerObuConnectListenerManager.getObuStatusInfoJsonString()
|
||||
|
||||
//工控机配置信息
|
||||
tvAutopilotInfo.text =
|
||||
@@ -567,14 +572,14 @@ internal class DebugSettingView @JvmOverloads constructor(
|
||||
btnSetObuIP.setOnClickListener {
|
||||
val obuIP = etObuIP.text.toString()
|
||||
if (StringUtils.isValidIPAddress(obuIP)) {
|
||||
CallerOBUManager.resetObuIpAddress(obuIP)
|
||||
CallerObuApiManager.resetObuIpAddress(obuIP)
|
||||
} else {
|
||||
ToastUtils.showShort("请输入正确的IP地址")
|
||||
}
|
||||
}
|
||||
|
||||
btnDrawFusion.isChecked = FunctionBuildConfig.isFusionColor
|
||||
btnDrawFusion.setOnCheckedChangeListener{_, isChecked ->
|
||||
btnDrawFusion.setOnCheckedChangeListener { _, isChecked ->
|
||||
FunctionBuildConfig.isFusionColor = isChecked
|
||||
}
|
||||
|
||||
@@ -584,7 +589,11 @@ internal class DebugSettingView @JvmOverloads constructor(
|
||||
// 演示模式
|
||||
tbIsDemoMode.setOnCheckedChangeListener { _, _ ->
|
||||
FunctionBuildConfig.isDemoMode = !FunctionBuildConfig.isDemoMode
|
||||
CallerHmiManager.updateStatusBarLeftView(FunctionBuildConfig.isDemoMode, "demoMode", DemoModeView(context))
|
||||
CallerHmiManager.updateStatusBarLeftView(
|
||||
FunctionBuildConfig.isDemoMode,
|
||||
"demoMode",
|
||||
DemoModeView(context)
|
||||
)
|
||||
CallerAutoPilotManager.setDemoMode(FunctionBuildConfig.isDemoMode)
|
||||
if (!FunctionBuildConfig.isDemoMode) {
|
||||
//关闭美化模式时,通知工控机
|
||||
@@ -1027,49 +1036,6 @@ internal class DebugSettingView @JvmOverloads constructor(
|
||||
* 设置Hmi点击监听
|
||||
*/
|
||||
private fun setHmiCheckedChangeListener() {
|
||||
/**
|
||||
* 显示、隐藏迈速表
|
||||
*/
|
||||
tbSpeedView.setOnCheckedChangeListener { _, isChecked ->
|
||||
if (!isChecked) {
|
||||
CallerHmiManager.setSpeedChartViewVisibility(View.VISIBLE)
|
||||
} else {
|
||||
CallerHmiManager.setSpeedChartViewVisibility(View.GONE)
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 显示、隐藏“自动驾驶控制按钮”
|
||||
*/
|
||||
tbAutopilotStatusView.setOnCheckedChangeListener { _, isChecked ->
|
||||
if (!isChecked) {
|
||||
CallerHmiManager.setAutopilotStatusViewVisibility(View.VISIBLE)
|
||||
} else {
|
||||
CallerHmiManager.setAutopilotStatusViewVisibility(View.GONE)
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 显示、隐藏视角切换按钮
|
||||
*/
|
||||
tbPerspectiveSwitchView.setOnCheckedChangeListener { _, isChecked ->
|
||||
if (!isChecked) {
|
||||
CallerHmiManager.setPerspectiveSwitchViewVisibility(View.VISIBLE)
|
||||
} else {
|
||||
CallerHmiManager.setPerspectiveSwitchViewVisibility(View.GONE)
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 显示、隐藏工具箱
|
||||
*/
|
||||
tbCheckStatusView.setOnCheckedChangeListener { _, isChecked ->
|
||||
if (!isChecked) {
|
||||
CallerHmiManager.setToolsViewVisibility(View.VISIBLE)
|
||||
} else {
|
||||
CallerHmiManager.setToolsViewVisibility(View.GONE)
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 隐藏、显示小地图
|
||||
@@ -1082,29 +1048,6 @@ internal class DebugSettingView @JvmOverloads constructor(
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 打开、关闭转向灯控制
|
||||
*/
|
||||
tbOpenLight.setOnCheckedChangeListener { _, isChecked ->
|
||||
if (!isChecked) {
|
||||
CallerHmiManager.setTurnLightFunction(true)
|
||||
} else {
|
||||
CallerHmiManager.setTurnLightFunction(false)
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 打开、关闭刹车控制
|
||||
*/
|
||||
tbOpenBrakeLight.setOnCheckedChangeListener { _, isChecked ->
|
||||
if (!isChecked) {
|
||||
CallerHmiManager.setBrakeLightFunction(true)
|
||||
} else {
|
||||
CallerHmiManager.setBrakeLightFunction(false)
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* sn绑定控制
|
||||
*/
|
||||
@@ -1267,7 +1210,14 @@ internal class DebugSettingView @JvmOverloads constructor(
|
||||
* 设置是否输出OBU日志 true-打印日志,false-不打印日志
|
||||
*/
|
||||
tbObuLog.setOnCheckedChangeListener { _, isChecked ->
|
||||
L.setEnableLog(isChecked)
|
||||
MogoObuManager.getInstance().setEnableLog(isChecked)
|
||||
|
||||
val builder: com.mogo.support.obu.option.MogoObuLog.Builder =
|
||||
MogoObuLog.newBuilder().setEnableStdio(isChecked)
|
||||
if (isChecked) {
|
||||
builder.setStdioLevel(MogoObuLogLevel.DBG)
|
||||
}
|
||||
MogoObuManager.getInstance().logConfig(builder.build())
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1686,10 +1636,10 @@ internal class DebugSettingView @JvmOverloads constructor(
|
||||
}"
|
||||
)
|
||||
|
||||
|
||||
tvAutopilotInfo.text = GsonUtils.toJson(mAutoPilotStatusInfo)
|
||||
tvIpcInfo.text = GsonUtils.toJson(mAutoPilotStatusInfo)
|
||||
tvIpcInfoKey.text = GsonUtils.toJson(mAutoPilotStatusInfo)
|
||||
val autopilotJson = GsonUtils.toJson(mAutoPilotStatusInfo)
|
||||
tvAutopilotInfo.text = autopilotJson
|
||||
tvIpcInfo.text = autopilotJson
|
||||
tvIpcInfoKey.text = autopilotJson
|
||||
|
||||
tvCarInfo.text =
|
||||
"GPS时间:${(mGnssInfo?.satelliteTime?.times(1000))?.toLong()}\n" +
|
||||
@@ -1722,9 +1672,9 @@ internal class DebugSettingView @JvmOverloads constructor(
|
||||
mTrajectoryInfoSize = 0
|
||||
mRouteInfoSize = 0
|
||||
|
||||
if(FunctionBuildConfig.isDemoMode){
|
||||
if (FunctionBuildConfig.isDemoMode) {
|
||||
tbIsDemoMode.text = "关闭美化模式"
|
||||
}else{
|
||||
} else {
|
||||
tbIsDemoMode.text = "开启美化模式"
|
||||
}
|
||||
|
||||
@@ -1733,19 +1683,21 @@ internal class DebugSettingView @JvmOverloads constructor(
|
||||
/**
|
||||
* OBU状态回调
|
||||
*/
|
||||
override fun onObuStatusResponse(obuStatusInfo: ObuStatusInfo) {
|
||||
tvObuInfo.text = GsonUtils.toJson(obuStatusInfo)
|
||||
override fun onConnectStatus(obuStatusInfo: ObuStatusInfo) {
|
||||
lifecycleOwner.lifecycleScope.launch {
|
||||
tvObuInfo.text = GsonUtils.toJson(obuStatusInfo)
|
||||
|
||||
AppConfigInfo.obuSdkVersion = obuStatusInfo.obuSdkVersion
|
||||
AppConfigInfo.isConnectObu = obuStatusInfo.obuStatus
|
||||
AppConfigInfo.obuSdkVersion = obuStatusInfo.obuSdkVersion
|
||||
AppConfigInfo.isConnectObu = obuStatusInfo.obuStatus
|
||||
|
||||
if (obuStatusInfo.obuStatus) {
|
||||
obuConnectStatus = true
|
||||
}
|
||||
//OBU断开连接,提示异常
|
||||
if (obuConnectStatus && !obuStatusInfo.obuStatus) {
|
||||
obuConnectStatus = false
|
||||
toastMsg("OBU连接状态异常")
|
||||
if (obuStatusInfo.obuStatus) {
|
||||
obuConnectStatus = true
|
||||
}
|
||||
//OBU断开连接,提示异常
|
||||
if (obuConnectStatus && !obuStatusInfo.obuStatus) {
|
||||
obuConnectStatus = false
|
||||
toastMsg("OBU连接状态异常")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1811,7 +1763,7 @@ internal class DebugSettingView @JvmOverloads constructor(
|
||||
when (type) {
|
||||
BIZ_BEAUTY_MODE -> {
|
||||
tbIsDemoMode.isClickable = !lock
|
||||
val (left,top,right,bottom) = tbIsDemoMode.currentPadding()
|
||||
val (left, top, right, bottom) = tbIsDemoMode.currentPadding()
|
||||
if (lock) {
|
||||
tbIsDemoMode.background =
|
||||
resources.getDrawable(R.drawable.radio_button_lock_background)
|
||||
@@ -1819,11 +1771,11 @@ internal class DebugSettingView @JvmOverloads constructor(
|
||||
tbIsDemoMode.background =
|
||||
resources.getDrawable(R.drawable.radio_button_normal_background_right)
|
||||
}
|
||||
tbIsDemoMode.setPadding(left,top,right,bottom)
|
||||
tbIsDemoMode.setPadding(left, top, right, bottom)
|
||||
}
|
||||
BIZ_RAIN_MODE -> {
|
||||
tbIsRainMode.isClickable = !lock
|
||||
val (left,top,right,bottom) = tbIsRainMode.currentPadding()
|
||||
val (left, top, right, bottom) = tbIsRainMode.currentPadding()
|
||||
if (lock) {
|
||||
tbIsRainMode.background =
|
||||
resources.getDrawable(R.drawable.radio_button_lock_background)
|
||||
@@ -1831,21 +1783,21 @@ internal class DebugSettingView @JvmOverloads constructor(
|
||||
tbIsRainMode.background =
|
||||
resources.getDrawable(R.drawable.radio_button_normal_background_right)
|
||||
}
|
||||
tbIsRainMode.setPadding(left,top,right,bottom)
|
||||
tbIsRainMode.setPadding(left, top, right, bottom)
|
||||
}
|
||||
BIZ_WARNING_UPLOAD -> {
|
||||
tbReportWarning.isClickable = !lock
|
||||
val (left,top,right,bottom) = tbReportWarning.currentPadding()
|
||||
val (left, top, right, bottom) = tbReportWarning.currentPadding()
|
||||
if (lock) {
|
||||
tbReportWarning.background =
|
||||
resources.getDrawable(R.drawable.radio_button_lock_background)
|
||||
} else {
|
||||
tbReportWarning.background = null
|
||||
}
|
||||
tbReportWarning.setPadding(left,top,right,bottom)
|
||||
tbReportWarning.setPadding(left, top, right, bottom)
|
||||
}
|
||||
BIZ_BAG_RECORD -> {
|
||||
val (left,top,right,bottom) = btnRecordBag.currentPadding()
|
||||
val (left, top, right, bottom) = btnRecordBag.currentPadding()
|
||||
if (lock) {
|
||||
btnRecordBag.isClickable = false
|
||||
btnRecordBag.background =
|
||||
@@ -1855,10 +1807,10 @@ internal class DebugSettingView @JvmOverloads constructor(
|
||||
btnRecordBag.requestFocus()
|
||||
btnRecordBag.background = null
|
||||
}
|
||||
btnRecordBag.setPadding(left,top,right,bottom)
|
||||
btnRecordBag.setPadding(left, top, right, bottom)
|
||||
}
|
||||
BIZ_FULL_LOG -> {
|
||||
val (left,top,right,bottom) = tbLogCatch.currentPadding()
|
||||
val (left, top, right, bottom) = tbLogCatch.currentPadding()
|
||||
if (lock) {
|
||||
tbLogCatch.isClickable = false
|
||||
tbLogCatch.background =
|
||||
@@ -1868,7 +1820,7 @@ internal class DebugSettingView @JvmOverloads constructor(
|
||||
tbLogCatch.requestFocus()
|
||||
tbLogCatch.background = null
|
||||
}
|
||||
tbLogCatch.setPadding(left,top,right,bottom)
|
||||
tbLogCatch.setPadding(left, top, right, bottom)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1983,31 +1935,6 @@ internal class DebugSettingView @JvmOverloads constructor(
|
||||
}
|
||||
}
|
||||
|
||||
override fun onLocationChanged(location: MogoLocation?, from: Int, isGps: Boolean) {
|
||||
}
|
||||
|
||||
/**
|
||||
* 时延显示
|
||||
*/
|
||||
override fun onObuV2iDelayTime(delayTime: Long) {
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 车辆转向灯 数据
|
||||
* @param lightSwitch
|
||||
*/
|
||||
override fun onAutopilotLightSwitchData(lightSwitch: Chassis.LightSwitch?) {
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 车辆刹车灯 数据
|
||||
* @param brakeLight
|
||||
*/
|
||||
override fun onAutopilotBrakeLightData(brakeLight: Boolean) {
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 车辆方向盘转向角回调
|
||||
|
||||
@@ -2,7 +2,6 @@ package com.mogo.eagle.core.function.hmi.ui.setting
|
||||
|
||||
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
|
||||
@@ -10,18 +9,20 @@ import com.mogo.eagle.core.data.config.FunctionBuildConfig
|
||||
import com.mogo.eagle.core.data.config.HmiBuildConfig
|
||||
import com.mogo.eagle.core.data.deva.bizconfig.FuncBizConfig
|
||||
import com.mogo.eagle.core.function.api.devatools.IMoGoDevaToolsFuncConfigListener
|
||||
import com.mogo.eagle.core.function.api.hmi.view.IViewControlListener
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotManager
|
||||
import com.mogo.eagle.core.function.call.devatools.CallerDevaToolsFuncConfigListenerManager
|
||||
import com.mogo.eagle.core.function.call.hmi.CallerHmiManager
|
||||
import com.mogo.eagle.core.function.call.obu.CallerOBUManager
|
||||
import com.mogo.eagle.core.function.call.obu.CallerObuApiManager
|
||||
import com.mogo.eagle.core.function.hmi.R
|
||||
import com.mogo.eagle.core.utilcode.kotlin.currentPadding
|
||||
import com.mogo.eagle.core.utilcode.mogo.AppIdentityModeUtils
|
||||
import com.mogo.eagle.core.utilcode.util.ToastUtils
|
||||
import com.mogo.eagle.core.function.business.routeoverlay.RouteStrategy
|
||||
import com.mogo.eagle.core.function.call.hmi.CallerHmiViewControlListenerManager
|
||||
import com.mogo.eagle.core.function.call.trafficlight.CallerTrafficLightListenerManager
|
||||
import com.mogo.eagle.core.function.hmi.ui.widget.DemoModeView
|
||||
import com.mogo.eagle.core.utilcode.util.UiThreadHandler
|
||||
import kotlinx.android.synthetic.main.view_debug_setting.view.*
|
||||
import kotlinx.android.synthetic.main.view_sop_setting.view.*
|
||||
import kotlinx.android.synthetic.main.view_sop_setting.view.tbRouteDynamicEffect
|
||||
import java.util.*
|
||||
@@ -78,6 +79,7 @@ internal class SOPSettingView @JvmOverloads constructor(
|
||||
/**
|
||||
* obu弱势交通控制
|
||||
*/
|
||||
tbObuWeaknessTrafficSop.isChecked = HmiBuildConfig.isShowObuWeaknessTrafficView
|
||||
tbObuWeaknessTrafficSop.setOnCheckedChangeListener { _, isChecked ->
|
||||
if (!isChecked) { //默认开启
|
||||
CallerHmiManager.setObuWeaknessTraffic(true)
|
||||
@@ -89,6 +91,7 @@ internal class SOPSettingView @JvmOverloads constructor(
|
||||
/**
|
||||
* 云端弱势交通控制
|
||||
*/
|
||||
tbCloudWeaknessTrafficSop.isChecked = HmiBuildConfig.isShowCloudWeaknessTrafficView
|
||||
tbCloudWeaknessTrafficSop.setOnCheckedChangeListener { _, isChecked ->
|
||||
if (isChecked) { //默认关闭
|
||||
CallerHmiManager.setCloudWeaknessTraffic(true)
|
||||
@@ -137,7 +140,7 @@ internal class SOPSettingView @JvmOverloads constructor(
|
||||
HmiBuildConfig.isShowTrafficLightView = false
|
||||
} else {
|
||||
HmiBuildConfig.isShowTrafficLightView = true
|
||||
CallerHmiManager.disableWarningTrafficLight()
|
||||
CallerTrafficLightListenerManager.disableTrafficLight()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -148,7 +151,7 @@ internal class SOPSettingView @JvmOverloads constructor(
|
||||
HmiBuildConfig.isShowLimitingVelocityView = true
|
||||
} else {
|
||||
HmiBuildConfig.isShowLimitingVelocityView = false
|
||||
CallerHmiManager.disableLimitingVelocity()
|
||||
CallerHmiViewControlListenerManager.invokeVisible(IViewControlListener.LimitingVelocityView_TAG,View.GONE)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -183,17 +186,17 @@ internal class SOPSettingView @JvmOverloads constructor(
|
||||
}
|
||||
|
||||
//OBU控制总开关
|
||||
tbObu.isChecked = CallerOBUManager.isConnected()
|
||||
tbObu.isChecked = CallerObuApiManager.isConnected()
|
||||
tbObu.setOnCheckedChangeListener { _, isChecked ->
|
||||
if (!isChecked) {
|
||||
if (AppIdentityModeUtils.isTaxi(FunctionBuildConfig.appIdentityMode)) {
|
||||
CallerOBUManager.resetObuIpAddress("192.168.1.199")
|
||||
CallerObuApiManager.resetObuIpAddress("192.168.1.199")
|
||||
} else if (AppIdentityModeUtils.isBus(FunctionBuildConfig.appIdentityMode)) {
|
||||
CallerOBUManager.resetObuIpAddress("192.168.8.199")
|
||||
CallerObuApiManager.resetObuIpAddress("192.168.8.199")
|
||||
}
|
||||
} else {
|
||||
//断开链接
|
||||
CallerOBUManager.disConnectObu()
|
||||
CallerObuApiManager.disConnectObu()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,37 @@
|
||||
package com.mogo.eagle.core.function.hmi.ui.switch
|
||||
|
||||
import android.content.Context
|
||||
import android.util.AttributeSet
|
||||
import android.view.View
|
||||
import com.mogo.eagle.core.data.config.FunctionBuildConfig
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotManager
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager
|
||||
import com.mogo.eagle.core.function.call.hmi.CallerHmiManager
|
||||
import com.mogo.eagle.core.function.hmi.ui.widget.DemoModeView
|
||||
import com.mogo.eagle.core.utilcode.mogo.AppIdentityModeUtils
|
||||
|
||||
class DemoModeHiddenSwitch(context: Context, attrs: AttributeSet?) : View(context, attrs) {
|
||||
|
||||
init {
|
||||
isClickable = true
|
||||
setOnClickListener {
|
||||
//只在司机端设置美化模式开关功能
|
||||
if (AppIdentityModeUtils.isDriver(FunctionBuildConfig.appIdentityMode)) {
|
||||
//单次查询,是否有行程信息(订单进行中时点击不生效),autopilotControlParameters为null代表不处于自动驾驶状态下
|
||||
if (CallerAutoPilotStatusListenerManager.getAutoPilotStatusInfo().autopilotControlParameters == null) {
|
||||
FunctionBuildConfig.isDemoMode = !FunctionBuildConfig.isDemoMode
|
||||
CallerHmiManager.updateStatusBarLeftView(
|
||||
FunctionBuildConfig.isDemoMode,
|
||||
"demoMode",
|
||||
DemoModeView(context)
|
||||
)
|
||||
CallerAutoPilotManager.setDemoMode(FunctionBuildConfig.isDemoMode)
|
||||
if (!FunctionBuildConfig.isDemoMode) {
|
||||
//关闭美化模式时,通知工控机
|
||||
CallerAutoPilotManager.setIPCDemoMode(FunctionBuildConfig.isDemoMode)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -6,7 +6,7 @@ import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import androidx.constraintlayout.widget.ConstraintLayout
|
||||
import com.mogo.eagle.core.data.config.FunctionBuildConfig
|
||||
import com.mogo.eagle.core.data.enums.EventTypeEnum
|
||||
import com.mogo.eagle.core.data.enums.EventTypeEnumNew
|
||||
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
|
||||
@@ -56,10 +56,10 @@ class TakeOverView @JvmOverloads constructor(
|
||||
MogoReport.Code.Error.EMAP.EXIT_AUTOPILOT_FOR_CHASSIS,
|
||||
MogoReport.Code.Error.EMAP.EXIT_AUTOPILOT_FOR_DISTANCE -> {
|
||||
CallerHmiManager.warningV2X(
|
||||
EventTypeEnum.TAKE_OVER_EVENT.poiType,
|
||||
EventTypeEnum.TAKE_OVER_EVENT.content,
|
||||
EventTypeEnum.TAKE_OVER_EVENT.tts,
|
||||
EventTypeEnum.TAKE_OVER_EVENT.poiType,
|
||||
EventTypeEnumNew.TAKE_OVER_EVENT.poiType,
|
||||
EventTypeEnumNew.TAKE_OVER_EVENT.content,
|
||||
EventTypeEnumNew.TAKE_OVER_EVENT.tts,
|
||||
EventTypeEnumNew.TAKE_OVER_EVENT.poiType,
|
||||
object : IMoGoWarningStatusListener {
|
||||
override fun onShow() {
|
||||
takeOver = true
|
||||
|
||||
@@ -37,7 +37,7 @@ import kotlin.system.exitProcess
|
||||
* @author ChenFufeng
|
||||
* 设置自动驾驶速度和检测页入口
|
||||
*/
|
||||
class AutoPilotAndCheckView @JvmOverloads constructor(
|
||||
internal class AutoPilotAndCheckView @JvmOverloads constructor(
|
||||
context: Context,
|
||||
attrs: AttributeSet? = null,
|
||||
defStyleAttr: Int = 0
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
package com.mogo.eagle.core.function.hmi.ui.tools
|
||||
|
||||
import android.content.Context
|
||||
import android.util.AttributeSet
|
||||
import com.mogo.eagle.core.function.hmi.R
|
||||
import com.mogo.eagle.core.function.hmi.ui.setting.ToolsView.Companion.toolsView
|
||||
|
||||
class ToolsImageView(context: Context, attrs: AttributeSet?) :
|
||||
androidx.appcompat.widget.AppCompatImageView(context, attrs) {
|
||||
|
||||
override fun onAttachedToWindow() {
|
||||
super.onAttachedToWindow()
|
||||
scaleType = ScaleType.CENTER
|
||||
setBackgroundResource(R.drawable.module_ext_check)
|
||||
setImageResource(R.drawable.icon_tools_nor)
|
||||
setOnClickListener{
|
||||
toolsView.showToolsFloat(context)
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -25,33 +25,30 @@ import kotlinx.android.synthetic.main.view_autopilot_status.view.*
|
||||
* @date 2021/9/22 3:59 下午
|
||||
* 自动驾驶状态按钮
|
||||
*/
|
||||
class AutoPilotStatusView @JvmOverloads constructor(
|
||||
class AutoPilotStatusView constructor(
|
||||
context: Context,
|
||||
attrs: AttributeSet
|
||||
) : ConstraintLayout(context, attrs),
|
||||
View.OnClickListener,
|
||||
IMoGoAutopilotStatusListener {
|
||||
|
||||
private val TAG = "AutopilotStatusView"
|
||||
companion object {
|
||||
const val TAG = "AutopilotStatusView"
|
||||
}
|
||||
|
||||
private var mAutopilotStatus: Int = 0
|
||||
|
||||
init {
|
||||
init{
|
||||
initView(context)
|
||||
}
|
||||
|
||||
private fun initView(context: Context) {
|
||||
setBackgroundResource(R.drawable.module_hmi_autopilot_status_bg)
|
||||
LayoutInflater.from(context).inflate(R.layout.view_autopilot_status, this, true)
|
||||
|
||||
val lp = LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT)
|
||||
layoutParams = lp
|
||||
|
||||
// 设置点击监听
|
||||
setOnClickListener(this)
|
||||
// 自动驾驶状态监听
|
||||
CallerAutoPilotStatusListenerManager.addListener(TAG, this)
|
||||
|
||||
CallerLogger.d("$M_HMI$TAG", "autopilotStatus: $mAutopilotStatus")
|
||||
setAutoPilotStatus(mAutopilotStatus)
|
||||
}
|
||||
@@ -61,8 +58,6 @@ class AutoPilotStatusView @JvmOverloads constructor(
|
||||
0 -> {// 不可自动驾驶,adas与工控机没有链接,或工控机异常
|
||||
CallerLogger.e("$M_HMI$TAG", "不可自动驾驶,adas与工控机没有链接,或工控机异常,请检查")
|
||||
ToastUtils.showShort("不可自动驾驶,adas与工控机没有链接,或工控机异常,请检查")
|
||||
// TODO 这里临时触发自动驾驶能力,测试功过这里删除
|
||||
//CallerHmiListenerManager.invokeCheckAutoPilotBtnListener(true)
|
||||
}
|
||||
1 -> {// 可自动驾驶,目前处于人工干预状态
|
||||
CallerHmiListenerManager.invokeCheckAutoPilotBtnListener(true)
|
||||
@@ -85,7 +80,7 @@ class AutoPilotStatusView @JvmOverloads constructor(
|
||||
currentAutopilot.endName = "HYJC"
|
||||
currentAutopilot.isSpeakVoice = false
|
||||
currentAutopilot.startLatLon =
|
||||
AutopilotControlParameters.AutoPilotLonLat(getCurWgs84Lat(),getCurWgs84Lon())
|
||||
AutopilotControlParameters.AutoPilotLonLat(getCurWgs84Lat(), getCurWgs84Lon())
|
||||
currentAutopilot.endLatLon =
|
||||
AutopilotControlParameters.AutoPilotLonLat(26.819716071924688, 112.57715442110867)
|
||||
currentAutopilot.vehicleType = 10
|
||||
@@ -126,4 +121,9 @@ class AutoPilotStatusView @JvmOverloads constructor(
|
||||
setAutoPilotStatus(autoPilotStatusInfo.state)
|
||||
}
|
||||
|
||||
override fun onDetachedFromWindow() {
|
||||
super.onDetachedFromWindow()
|
||||
CallerAutoPilotStatusListenerManager.removeListener(TAG)
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
package com.mogo.eagle.core.function.hmi.ui.widget
|
||||
|
||||
import android.content.Context
|
||||
import android.util.AttributeSet
|
||||
import com.mogo.eagle.core.function.call.biz.CallerFuncBizManager
|
||||
import com.mogo.eagle.core.function.hmi.R
|
||||
import com.mogo.eagle.core.function.hmi.ui.setting.CameraLiveView.Companion.cameraLiveView
|
||||
|
||||
class CameraView(context: Context, attrs: AttributeSet?) :
|
||||
androidx.appcompat.widget.AppCompatImageView(context, attrs) {
|
||||
|
||||
override fun onAttachedToWindow() {
|
||||
super.onAttachedToWindow()
|
||||
setBackgroundResource(R.drawable.icon_camera_nor)
|
||||
setOnClickListener {
|
||||
cameraLiveView.showCameraList(
|
||||
context,
|
||||
CallerFuncBizManager.bizProvider.getCameraList
|
||||
) { liveStatus ->
|
||||
if (liveStatus) {
|
||||
setBackgroundResource(R.drawable.icon_camera_selected)
|
||||
} else {
|
||||
setBackgroundResource(R.drawable.icon_camera_nor)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -3,25 +3,59 @@ package com.mogo.eagle.core.function.hmi.ui.widget
|
||||
import android.content.Context
|
||||
import android.util.AttributeSet
|
||||
import android.view.LayoutInflater
|
||||
import com.mogo.eagle.core.function.api.hmi.view.IViewLimitingVelocity
|
||||
import android.view.View
|
||||
import androidx.constraintlayout.widget.ConstraintLayout
|
||||
import com.mogo.eagle.core.data.enums.DataSourceType
|
||||
import com.mogo.eagle.core.function.api.hmi.view.IViewControlListener
|
||||
import com.mogo.eagle.core.function.api.hmi.view.IViewControlListener.Companion.LimitingVelocityView_TAG
|
||||
import com.mogo.eagle.core.function.api.v2x.ILimitingVelocityListener
|
||||
import com.mogo.eagle.core.function.call.hmi.CallerHmiViewControlListenerManager
|
||||
import com.mogo.eagle.core.function.call.v2x.CallerViewLimitingVelocityListenerManager
|
||||
import com.mogo.eagle.core.function.hmi.R
|
||||
import kotlinx.android.synthetic.main.view_limiting_speed_vr.view.*
|
||||
|
||||
/**
|
||||
* 限速控件
|
||||
*/
|
||||
class LimitingVelocityView @JvmOverloads constructor(
|
||||
context: Context,
|
||||
attrs: AttributeSet? = null,
|
||||
defStyleAttr: Int = 0
|
||||
) : IViewLimitingVelocity(context, attrs, defStyleAttr) {
|
||||
class LimitingVelocityView constructor(
|
||||
context: Context,
|
||||
attrs: AttributeSet? = null,
|
||||
) : ConstraintLayout(context, attrs), ILimitingVelocityListener, IViewControlListener {
|
||||
|
||||
companion object {
|
||||
private const val TAG = "LimitingVelocityView"
|
||||
}
|
||||
|
||||
init {
|
||||
LayoutInflater.from(context).inflate(R.layout.view_limiting_speed_vr, this, true)
|
||||
}
|
||||
|
||||
override fun updateLimitingSpeed(limitingSpeed: Int) {
|
||||
super.updateLimitingSpeed(limitingSpeed)
|
||||
tvLimitingVelocity.text = "$limitingSpeed"
|
||||
override fun onAttachedToWindow() {
|
||||
super.onAttachedToWindow()
|
||||
CallerViewLimitingVelocityListenerManager.addListener(TAG, this)
|
||||
CallerHmiViewControlListenerManager.addListener(LimitingVelocityView_TAG, this)
|
||||
}
|
||||
|
||||
override fun onLimitingVelocityChange(limitingVelocity: Int, sourceType: DataSourceType) {
|
||||
if (limitingVelocity > 0) {
|
||||
this.visibility = View.VISIBLE
|
||||
tvLimitingVelocity.text = "$limitingVelocity"
|
||||
tvLimitingSource.text = sourceType.name
|
||||
} else {
|
||||
this.visibility = View.GONE
|
||||
tvLimitingSource.text = ""
|
||||
}
|
||||
}
|
||||
|
||||
override fun visible(v: Int) {
|
||||
super.visible(v)
|
||||
this.visibility = v
|
||||
}
|
||||
|
||||
override fun onDetachedFromWindow() {
|
||||
super.onDetachedFromWindow()
|
||||
CallerViewLimitingVelocityListenerManager.removeListener(TAG)
|
||||
CallerHmiViewControlListenerManager.removeListener(LimitingVelocityView_TAG)
|
||||
}
|
||||
|
||||
}
|
||||
@@ -19,9 +19,10 @@ class PerspectiveSwitchView @JvmOverloads constructor(
|
||||
context: Context,
|
||||
attrs: AttributeSet? = null,
|
||||
defStyleAttr: Int = 0
|
||||
) : FrameLayout(context, attrs, defStyleAttr), View.OnClickListener {
|
||||
) : FrameLayout(context, attrs, defStyleAttr), View.OnClickListener{
|
||||
|
||||
init {
|
||||
override fun onAttachedToWindow() {
|
||||
super.onAttachedToWindow()
|
||||
LayoutInflater.from(context).inflate(R.layout.view_perspective_switch, this, true)
|
||||
setBackgroundResource(R.drawable.module_switch_map_bg)
|
||||
setOnClickListener(this)
|
||||
@@ -41,4 +42,5 @@ class PerspectiveSwitchView @JvmOverloads constructor(
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -5,10 +5,17 @@ import android.util.AttributeSet
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.widget.ImageView
|
||||
import android.widget.LinearLayout
|
||||
import android.widget.TextView
|
||||
import com.mogo.eagle.core.data.config.FunctionBuildConfig
|
||||
import com.mogo.eagle.core.data.config.HmiBuildConfig
|
||||
import com.mogo.eagle.core.function.api.hmi.view.IViewTrafficLight
|
||||
import com.mogo.eagle.core.data.enums.DataSourceType
|
||||
import com.mogo.eagle.core.data.enums.TrafficLightEnum
|
||||
import com.mogo.eagle.core.function.api.hmi.view.IViewControlListener
|
||||
import com.mogo.eagle.core.function.api.hmi.view.IViewControlListener.Companion.TrafficLightView_TAG
|
||||
import com.mogo.eagle.core.function.api.trafficlight.IMoGoTrafficLightListener
|
||||
import com.mogo.eagle.core.function.call.hmi.CallerHmiViewControlListenerManager
|
||||
import com.mogo.eagle.core.function.call.trafficlight.CallerTrafficLightListenerManager
|
||||
import com.mogo.eagle.core.function.hmi.R
|
||||
import com.mogo.eagle.core.utilcode.mogo.AppIdentityModeUtils
|
||||
import com.mogo.eagle.core.utilcode.util.UiThreadHandler
|
||||
@@ -20,74 +27,94 @@ class SingleTrafficLightView @JvmOverloads constructor(
|
||||
context: Context?,
|
||||
attrs: AttributeSet? = null,
|
||||
defStyleAttr: Int = 0
|
||||
) : IViewTrafficLight(context, attrs, defStyleAttr) {
|
||||
) : LinearLayout(context, attrs, defStyleAttr), IViewControlListener, IMoGoTrafficLightListener {
|
||||
|
||||
companion object {
|
||||
private const val TAG = "SingleTrafficLightView"
|
||||
}
|
||||
|
||||
private var mLightIconIV: ImageView? = null
|
||||
private var mLightIconBG: ImageView? = null
|
||||
private var mLightTimeTV: GradientTextView? = null
|
||||
private var mLightSourceTV: TextView? = null
|
||||
private var mLightSourceDivider: View? = null
|
||||
private var mCurrentLightId = 0
|
||||
private var mCurrentLightId = TrafficLightEnum.BLACK
|
||||
|
||||
init {
|
||||
init(context)
|
||||
}
|
||||
|
||||
private fun init(context: Context?) {
|
||||
override fun onAttachedToWindow() {
|
||||
super.onAttachedToWindow()
|
||||
LayoutInflater.from(context).inflate(R.layout.hmi_view_traffic_light, this, true)
|
||||
mLightIconIV = findViewById(R.id.hmi_traffic_light_iv)
|
||||
mLightIconBG = findViewById(R.id.hmi_traffic_light_bg)
|
||||
mLightTimeTV = findViewById(R.id.hmi_traffic_light_time_tv)
|
||||
mLightSourceTV = findViewById(R.id.hmi_traffic_light_source)
|
||||
mLightSourceDivider = findViewById(R.id.hmi_traffic_light_divider)
|
||||
|
||||
CallerTrafficLightListenerManager.addListener(TAG, this)
|
||||
CallerHmiViewControlListenerManager.addListener(TrafficLightView_TAG, this)
|
||||
}
|
||||
|
||||
override fun visible(v: Int) {
|
||||
super.visible(v)
|
||||
visibility = v
|
||||
}
|
||||
|
||||
override fun onDetachedFromWindow() {
|
||||
super.onDetachedFromWindow()
|
||||
CallerTrafficLightListenerManager.removeListener(TAG)
|
||||
CallerHmiViewControlListenerManager.removeListener(TrafficLightView_TAG)
|
||||
}
|
||||
|
||||
/**
|
||||
* 展示红绿灯预警
|
||||
*
|
||||
* @param checkLightId 0-都是默认,1-红,2-黄,3-绿
|
||||
* @param lightSource 1:云端下发;2:自车感知
|
||||
* @param lightSource 1:云端下发;2:自车感知 3:OBU
|
||||
*/
|
||||
override fun showWarningTrafficLight(checkLightId: Int,lightSource: Int) {
|
||||
super.showWarningTrafficLight(checkLightId,lightSource)
|
||||
override fun showTrafficLight(checkLightId: TrafficLightEnum, lightSource: DataSourceType) {
|
||||
super.showTrafficLight(checkLightId, lightSource)
|
||||
mCurrentLightId = checkLightId
|
||||
if(!HmiBuildConfig.isShowTrafficLightView){
|
||||
updateTrafficLightIcon(checkLightId,lightSource)
|
||||
if (!HmiBuildConfig.isShowTrafficLightView) {
|
||||
updateTrafficLightIcon(checkLightId, lightSource)
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 关闭红绿灯预警展示,并重制灯态
|
||||
*/
|
||||
override fun disableWarningTrafficLight() {
|
||||
super.disableWarningTrafficLight()
|
||||
override fun disableTrafficLight() {
|
||||
super.disableTrafficLight()
|
||||
UiThreadHandler.post {
|
||||
mCurrentLightId = 0
|
||||
mCurrentLightId = TrafficLightEnum.BLACK
|
||||
this@SingleTrafficLightView.visibility = GONE
|
||||
}
|
||||
}
|
||||
|
||||
override fun disableCountdown() {
|
||||
super.disableCountdown()
|
||||
override fun disableTrafficLightCountDown() {
|
||||
super.disableTrafficLightCountDown()
|
||||
UiThreadHandler.post {
|
||||
// 小巴车的司机端需要展示红绿灯信号来源
|
||||
if(AppIdentityModeUtils.isDriver(FunctionBuildConfig.appIdentityMode)
|
||||
&& AppIdentityModeUtils.isBus(FunctionBuildConfig.appIdentityMode)){
|
||||
if (AppIdentityModeUtils.isDriver(FunctionBuildConfig.appIdentityMode)
|
||||
&& AppIdentityModeUtils.isBus(FunctionBuildConfig.appIdentityMode)
|
||||
) {
|
||||
val lp = this.layoutParams as MarginLayoutParams
|
||||
lp.width = context.resources.getDimension(R.dimen.dp_325).toInt()
|
||||
this.layoutParams = lp
|
||||
mLightSourceTV!!.visibility = VISIBLE
|
||||
mLightSourceDivider!!.visibility = VISIBLE
|
||||
mLightTimeTV!!.visibility = GONE
|
||||
mLightSourceTV!!.setPadding(0,0,75,0)
|
||||
mLightIconBG!!.layoutParams.width = context.resources.getDimension(R.dimen.dp_310).toInt()
|
||||
}else{
|
||||
mLightSourceTV!!.setPadding(0, 0, 75, 0)
|
||||
mLightIconBG!!.layoutParams.width =
|
||||
context.resources.getDimension(R.dimen.dp_310).toInt()
|
||||
} else {
|
||||
val lp = this.layoutParams as MarginLayoutParams
|
||||
lp.width = context.resources.getDimension(R.dimen.hmi_traffic_light_icon_size).toInt()
|
||||
lp.width =
|
||||
context.resources.getDimension(R.dimen.hmi_traffic_light_icon_size).toInt()
|
||||
this.layoutParams = lp
|
||||
mLightTimeTV!!.visibility = GONE
|
||||
mLightSourceDivider!!.visibility = View.GONE
|
||||
mLightSourceTV!!.visibility = View.GONE
|
||||
mLightIconBG!!.layoutParams.width = context.resources.getDimension(R.dimen.dp_124).toInt()
|
||||
mLightIconBG!!.layoutParams.width =
|
||||
context.resources.getDimension(R.dimen.dp_124).toInt()
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -102,9 +129,9 @@ class SingleTrafficLightView @JvmOverloads constructor(
|
||||
UiThreadHandler.post {
|
||||
resetView()
|
||||
when (mCurrentLightId) {
|
||||
1 -> changeCountdownRed(redNum)
|
||||
2 -> changeCountdownYellow(yellowNum)
|
||||
3 -> changeCountdownGreen(greenNum)
|
||||
TrafficLightEnum.RED -> changeCountdownRed(redNum)
|
||||
TrafficLightEnum.YELLOW -> changeCountdownYellow(yellowNum)
|
||||
TrafficLightEnum.GREEN -> changeCountdownGreen(greenNum)
|
||||
else -> UiThreadHandler.post { mLightTimeTV!!.text = "" }
|
||||
}
|
||||
}
|
||||
@@ -124,7 +151,7 @@ class SingleTrafficLightView @JvmOverloads constructor(
|
||||
)
|
||||
mLightTimeTV!!.text = redNum.toString()
|
||||
} else {
|
||||
disableCountdown()
|
||||
disableTrafficLightCountDown()
|
||||
mLightTimeTV!!.text = ""
|
||||
}
|
||||
}
|
||||
@@ -144,7 +171,7 @@ class SingleTrafficLightView @JvmOverloads constructor(
|
||||
)
|
||||
mLightTimeTV!!.text = greenNum.toString()
|
||||
} else {
|
||||
disableCountdown()
|
||||
disableTrafficLightCountDown()
|
||||
mLightTimeTV!!.text = ""
|
||||
}
|
||||
}
|
||||
@@ -164,7 +191,7 @@ class SingleTrafficLightView @JvmOverloads constructor(
|
||||
)
|
||||
mLightTimeTV!!.text = yellowNum.toString()
|
||||
} else {
|
||||
disableCountdown()
|
||||
disableTrafficLightCountDown()
|
||||
mLightTimeTV!!.text = ""
|
||||
}
|
||||
}
|
||||
@@ -176,30 +203,33 @@ class SingleTrafficLightView @JvmOverloads constructor(
|
||||
* @param lightId 0-都是默认,1-红,2-黄,3-绿
|
||||
* @param lightSource 1:云端下发;2:自车感知
|
||||
*/
|
||||
private fun updateTrafficLightIcon(lightId: Int,lightSource: Int) {
|
||||
private fun updateTrafficLightIcon(lightId: TrafficLightEnum, lightSource: DataSourceType) {
|
||||
UiThreadHandler.post {
|
||||
when (lightId) {
|
||||
1 -> {
|
||||
TrafficLightEnum.RED -> {
|
||||
mLightIconIV!!.setBackgroundResource(R.drawable.hmi_light_red_nor)
|
||||
this@SingleTrafficLightView.visibility = VISIBLE
|
||||
}
|
||||
2 -> {
|
||||
TrafficLightEnum.YELLOW -> {
|
||||
mLightIconIV!!.setBackgroundResource(R.drawable.hmi_lightyellow_nor)
|
||||
this@SingleTrafficLightView.visibility = VISIBLE
|
||||
}
|
||||
3 -> {
|
||||
TrafficLightEnum.GREEN -> {
|
||||
mLightIconIV!!.setBackgroundResource(R.drawable.hmi_light_green_nor)
|
||||
this@SingleTrafficLightView.visibility = VISIBLE
|
||||
}
|
||||
else -> this@SingleTrafficLightView.visibility = GONE
|
||||
}
|
||||
when(lightSource){
|
||||
1 -> {
|
||||
when (lightSource) {
|
||||
DataSourceType.AICLOUD -> {
|
||||
mLightSourceTV!!.text = "云端下发"
|
||||
}
|
||||
2 -> {
|
||||
DataSourceType.TELEMATIC -> {
|
||||
mLightSourceTV!!.text = "自车感知"
|
||||
}
|
||||
DataSourceType.OBU -> {
|
||||
mLightSourceTV!!.text = "OBU"
|
||||
}
|
||||
else -> {
|
||||
mLightSourceTV!!.visibility = GONE
|
||||
}
|
||||
@@ -207,26 +237,31 @@ class SingleTrafficLightView @JvmOverloads constructor(
|
||||
}
|
||||
}
|
||||
|
||||
private fun resetView(){
|
||||
private fun resetView() {
|
||||
// 小巴车的司机端需要展示红绿灯信号来源
|
||||
if(AppIdentityModeUtils.isDriver(FunctionBuildConfig.appIdentityMode)
|
||||
&& AppIdentityModeUtils.isBus(FunctionBuildConfig.appIdentityMode)){
|
||||
if (AppIdentityModeUtils.isDriver(FunctionBuildConfig.appIdentityMode)
|
||||
&& AppIdentityModeUtils.isBus(FunctionBuildConfig.appIdentityMode)
|
||||
) {
|
||||
val lp = this.layoutParams as MarginLayoutParams
|
||||
lp.width = context.resources.getDimension(R.dimen.hmi_traffic_light_bus_layout_width).toInt()
|
||||
lp.width =
|
||||
context.resources.getDimension(R.dimen.hmi_traffic_light_bus_layout_width).toInt()
|
||||
this.layoutParams = lp
|
||||
mLightTimeTV!!.visibility = View.VISIBLE
|
||||
mLightSourceDivider!!.visibility = View.VISIBLE
|
||||
mLightSourceTV!!.visibility = View.VISIBLE
|
||||
mLightSourceTV!!.setPadding(0,0,0,0)
|
||||
mLightIconBG!!.layoutParams.width = context.resources.getDimension(R.dimen.hmi_traffic_light_bus_bg_width).toInt()
|
||||
}else{
|
||||
mLightSourceTV!!.setPadding(0, 0, 0, 0)
|
||||
mLightIconBG!!.layoutParams.width =
|
||||
context.resources.getDimension(R.dimen.hmi_traffic_light_bus_bg_width).toInt()
|
||||
} else {
|
||||
val lp = this.layoutParams as MarginLayoutParams
|
||||
lp.width = context.resources.getDimension(R.dimen.hmi_traffic_light_layout_width).toInt()
|
||||
lp.width =
|
||||
context.resources.getDimension(R.dimen.hmi_traffic_light_layout_width).toInt()
|
||||
this.layoutParams = lp
|
||||
mLightTimeTV!!.visibility = View.VISIBLE
|
||||
mLightSourceDivider!!.visibility = View.GONE
|
||||
mLightSourceTV!!.visibility = View.GONE
|
||||
mLightIconBG!!.layoutParams.width = context.resources.getDimension(R.dimen.hmi_traffic_light_bg_width).toInt()
|
||||
mLightIconBG!!.layoutParams.width =
|
||||
context.resources.getDimension(R.dimen.hmi_traffic_light_bg_width).toInt()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -178,7 +178,7 @@ public class SpeedChartView extends View {
|
||||
setAnimation(lastAngle, currentAngle, 1000);
|
||||
lastAngle = currentAngle;
|
||||
//重新绘制
|
||||
postInvalidate();
|
||||
invalidate();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -7,7 +7,6 @@ import android.view.Gravity
|
||||
import android.widget.FrameLayout
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoChassisLocationGCJ02Listener
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationGCJ20ListenerManager
|
||||
import com.mogo.eagle.core.function.call.hmi.CallerHmiManager
|
||||
import com.mogo.eagle.core.function.call.map.CallerMapUIServiceManager
|
||||
import com.mogo.eagle.core.function.hmi.R
|
||||
import com.mogo.eagle.core.utilcode.util.UiThreadHandler
|
||||
@@ -54,7 +53,8 @@ class SpeedPanelView @JvmOverloads constructor(
|
||||
private var timerTask: TimerTask? = null
|
||||
|
||||
override fun onAttachedToWindow() {
|
||||
super.onAttachedToWindow() // 注册位置回调
|
||||
super.onAttachedToWindow()
|
||||
// 注册位置回调
|
||||
CallerChassisLocationGCJ20ListenerManager.addListener(TAG, this)
|
||||
// 开启定时查询速度
|
||||
timerTask?.cancel()
|
||||
@@ -74,7 +74,7 @@ class SpeedPanelView @JvmOverloads constructor(
|
||||
}
|
||||
}
|
||||
this.timerTask = task
|
||||
timer.schedule(task, Date(), 100)
|
||||
timer.schedule(task, Date(), 200)
|
||||
}
|
||||
|
||||
override fun onChassisLocationGCJ02(gnssInfo: MessagePad.GnssInfo?) {
|
||||
|
||||
@@ -1,18 +1,20 @@
|
||||
package com.mogo.eagle.core.function.hmi.ui.widget
|
||||
|
||||
import android.annotation.SuppressLint
|
||||
import android.content.Context
|
||||
import android.util.AttributeSet
|
||||
import android.util.Log
|
||||
import android.view.*
|
||||
import android.widget.*
|
||||
import android.view.LayoutInflater
|
||||
import android.view.ViewGroup
|
||||
import android.widget.LinearLayout
|
||||
import com.mogo.eagle.core.data.config.FunctionBuildConfig
|
||||
import com.mogo.eagle.core.data.mofang.MfConstants
|
||||
import com.mogo.eagle.core.function.api.hmi.view.IViewControlListener
|
||||
import com.mogo.eagle.core.function.api.setting.IMoGoSkinModeChangeListener
|
||||
import com.mogo.eagle.core.function.call.devatools.*
|
||||
import com.mogo.eagle.core.function.call.devatools.CallerDevaToolsManager
|
||||
import com.mogo.eagle.core.function.call.hmi.CallerHmiViewControlListenerManager
|
||||
import com.mogo.eagle.core.function.call.setting.CallerSkinModeListenerManager
|
||||
import com.mogo.eagle.core.function.hmi.R
|
||||
import com.mogo.eagle.core.utilcode.mogo.storage.SharedPrefsMgr
|
||||
import com.mogo.eagle.core.utilcode.util.BarUtils
|
||||
import com.mogo.eagle.core.utilcode.util.ScreenUtils
|
||||
import kotlinx.android.synthetic.main.view_status_bar.view.*
|
||||
import java.util.concurrent.CopyOnWriteArrayList
|
||||
|
||||
@@ -20,7 +22,7 @@ class StatusBarView @JvmOverloads constructor(
|
||||
context: Context,
|
||||
attrs: AttributeSet? = null,
|
||||
defStyleAttr: Int = 0
|
||||
) : LinearLayout(context, attrs, defStyleAttr), IMoGoSkinModeChangeListener {
|
||||
) : LinearLayout(context, attrs, defStyleAttr), IMoGoSkinModeChangeListener, IViewControlListener {
|
||||
|
||||
companion object {
|
||||
const val TAG = "StatusBarView"
|
||||
@@ -37,17 +39,20 @@ class StatusBarView @JvmOverloads constructor(
|
||||
override fun onAttachedToWindow() {
|
||||
super.onAttachedToWindow()
|
||||
viewStatusBarRight.addView(BatteryGroupView(this.context))
|
||||
|
||||
//将状态窗口中的状态移到状态栏上
|
||||
CallerDevaToolsManager.showStatusBar(context, status_container)
|
||||
|
||||
// 添加换肤监听
|
||||
CallerSkinModeListenerManager.addListener(TAG, this)
|
||||
|
||||
var isBluetoothConnect = SharedPrefsMgr.getInstance(context).getBoolean(MfConstants.BLUETOOTH_STATUS, false)
|
||||
val isBluetoothConnect =
|
||||
SharedPrefsMgr.getInstance(context).getBoolean(MfConstants.BLUETOOTH_STATUS, false)
|
||||
if (isBluetoothConnect) {
|
||||
updateMfStatus("MoFangManager", true)
|
||||
}
|
||||
|
||||
//添加view控制
|
||||
CallerHmiViewControlListenerManager.addListener(TAG,this)
|
||||
// 添加换肤监听
|
||||
CallerSkinModeListenerManager.addListener(TAG, this)
|
||||
//将状态窗口中的状态移到状态栏上
|
||||
CallerDevaToolsManager.showStatusBar(context, status_container)
|
||||
|
||||
updateStatusBarRightView(FunctionBuildConfig.isDemoMode, "demoMode", DemoModeView(this.context))
|
||||
}
|
||||
|
||||
override fun onSkinModeChange(skinMode: Int) {
|
||||
@@ -57,15 +62,13 @@ class StatusBarView @JvmOverloads constructor(
|
||||
}
|
||||
}
|
||||
|
||||
fun setStatusBarDarkOrLight(light: Boolean) {
|
||||
if (light) {
|
||||
setTextColor(resources.getColor(R.color.color_2C2E30))
|
||||
} else {
|
||||
setTextColor(resources.getColor(R.color.color_FFFFFF))
|
||||
}
|
||||
override fun setStatusBarDarkOrLight(light: Boolean) = if (light) {
|
||||
setTextColor(resources.getColor(R.color.color_2C2E30))
|
||||
} else {
|
||||
setTextColor(resources.getColor(R.color.color_FFFFFF))
|
||||
}
|
||||
|
||||
fun updateRightView(insert: Boolean, tag: String, viewGroup: ViewGroup) {
|
||||
override fun updateStatusBarRightView(insert: Boolean, tag: String, viewGroup: ViewGroup) {
|
||||
if (insert) {
|
||||
rightViewList.add(0, tag)
|
||||
viewStatusBarRight.addView(viewGroup, 0)
|
||||
@@ -79,7 +82,7 @@ class StatusBarView @JvmOverloads constructor(
|
||||
}
|
||||
}
|
||||
|
||||
fun updateLeftView(insert: Boolean, tag: String, viewGroup: ViewGroup) {
|
||||
override fun updateStatusBarLeftView(insert: Boolean, tag: String, viewGroup: ViewGroup) {
|
||||
if (insert) {
|
||||
leftViewList.add(0, tag)
|
||||
viewStatusBarLeft.addView(viewGroup, 0)
|
||||
@@ -93,7 +96,8 @@ class StatusBarView @JvmOverloads constructor(
|
||||
}
|
||||
}
|
||||
|
||||
fun updateProgressView(insert: Boolean, tag: String, progress: Int) {
|
||||
@SuppressLint("SetTextI18n")
|
||||
override fun updateStatusBarDownloadView(insert: Boolean, tag: String, progress: Int) {
|
||||
if (insert) {
|
||||
viewProgressTv.visibility = VISIBLE
|
||||
viewProgressTv.text = "$progress%"
|
||||
@@ -102,7 +106,7 @@ class StatusBarView @JvmOverloads constructor(
|
||||
}
|
||||
}
|
||||
|
||||
fun updateMfStatus(tag: String, status: Boolean) {
|
||||
override fun updateMfStatus(tag: String, status: Boolean) {
|
||||
if (status) {
|
||||
viewMofangStatus.setImageResource(R.drawable.icon_bluetooth_p)
|
||||
} else {
|
||||
@@ -117,6 +121,7 @@ class StatusBarView @JvmOverloads constructor(
|
||||
|
||||
override fun onDetachedFromWindow() {
|
||||
super.onDetachedFromWindow()
|
||||
CallerHmiViewControlListenerManager.removeListener(TAG)
|
||||
CallerSkinModeListenerManager.removeListener(TAG)
|
||||
CallerDevaToolsManager.hideStatusBar()
|
||||
}
|
||||
|
||||
@@ -1,122 +0,0 @@
|
||||
package com.mogo.eagle.core.function.hmi.ui.widget
|
||||
|
||||
import android.content.Context
|
||||
import android.util.AttributeSet
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import androidx.constraintlayout.widget.ConstraintLayout
|
||||
import com.mogo.eagle.core.function.api.hmi.view.IViewTrafficLight
|
||||
import com.mogo.eagle.core.function.hmi.R
|
||||
import com.mogo.eagle.core.utilcode.util.UiThreadHandler
|
||||
import kotlinx.android.synthetic.main.view_traffic_light_vr.view.*
|
||||
|
||||
/**
|
||||
* @author xiaoyuzhou
|
||||
* @date 2021/8/4 3:16 下午
|
||||
* 红绿灯控件
|
||||
*/
|
||||
class TrafficLightView @JvmOverloads constructor(
|
||||
context: Context,
|
||||
attrs: AttributeSet? = null,
|
||||
defStyleAttr: Int = 0
|
||||
) : IViewTrafficLight(context, attrs, defStyleAttr) {
|
||||
|
||||
|
||||
init {
|
||||
LayoutInflater.from(context).inflate(R.layout.view_traffic_light_vr, this, true)
|
||||
}
|
||||
|
||||
/**
|
||||
* 展示红绿灯预警
|
||||
*
|
||||
* @param checkLightId 0-都是默认,1-红,2-黄,3-绿
|
||||
* @param lightSource 1:云端下发;2:自车感知
|
||||
*/
|
||||
override fun showWarningTrafficLight(checkLightId: Int,lightSource: Int) {
|
||||
UiThreadHandler.post {
|
||||
visibility = View.VISIBLE
|
||||
when (checkLightId) {
|
||||
0 -> {
|
||||
ctvRedTrafficLight.isChecked = false
|
||||
ctvYellowTrafficLight.isChecked = false
|
||||
ctvGreenTrafficLight.isChecked = false
|
||||
}
|
||||
1 -> {
|
||||
ctvRedTrafficLight.isChecked = true
|
||||
ctvYellowTrafficLight.isChecked = false
|
||||
ctvGreenTrafficLight.isChecked = false
|
||||
}
|
||||
2 -> {
|
||||
ctvRedTrafficLight.isChecked = false
|
||||
ctvYellowTrafficLight.isChecked = true
|
||||
ctvGreenTrafficLight.isChecked = false
|
||||
}
|
||||
3 -> {
|
||||
ctvRedTrafficLight.isChecked = false
|
||||
ctvYellowTrafficLight.isChecked = false
|
||||
ctvGreenTrafficLight.isChecked = true
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 关闭红绿灯预警展示,并重制灯态
|
||||
*/
|
||||
override fun disableWarningTrafficLight() {
|
||||
UiThreadHandler.post {
|
||||
visibility = View.GONE
|
||||
ctvRedTrafficLight.isChecked = false
|
||||
ctvYellowTrafficLight.isChecked = false
|
||||
ctvGreenTrafficLight.isChecked = false
|
||||
ctvRedTrafficLight.text = ""
|
||||
ctvYellowTrafficLight.text = ""
|
||||
ctvGreenTrafficLight.text = ""
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param readNum 红灯倒计时
|
||||
* @param yellowNum 黄灯倒计时
|
||||
* @param greenNum 绿灯倒计时
|
||||
*/
|
||||
override fun changeCountdownTrafficLightNum(readNum: Int, yellowNum: Int, greenNum: Int) {
|
||||
UiThreadHandler.post {
|
||||
changeCountdownGreen(readNum)
|
||||
changeCountdownYellow(yellowNum)
|
||||
changeCountdownRed(greenNum)
|
||||
}
|
||||
}
|
||||
|
||||
override fun changeCountdownGreen(greenNum: Int) {
|
||||
UiThreadHandler.post {
|
||||
if (greenNum > 0) {
|
||||
ctvGreenTrafficLight.text = "$greenNum"
|
||||
} else {
|
||||
ctvGreenTrafficLight.text = ""
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
override fun changeCountdownYellow(yellowNum: Int) {
|
||||
UiThreadHandler.post {
|
||||
if (yellowNum > 0) {
|
||||
ctvYellowTrafficLight.text = "$yellowNum"
|
||||
} else {
|
||||
ctvYellowTrafficLight.text = ""
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
override fun changeCountdownRed(redNum: Int) {
|
||||
UiThreadHandler.post {
|
||||
if (redNum > 0) {
|
||||
ctvRedTrafficLight.text = "$redNum"
|
||||
} else {
|
||||
ctvRedTrafficLight.text = ""
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -52,7 +52,7 @@ class VersionNameView @JvmOverloads constructor(
|
||||
@SuppressLint("SetTextI18n")
|
||||
private fun showCurrentPadVersion() {
|
||||
tvAppVersionName?.let {
|
||||
it.text = "APP:${AppUtils.getAppVersionName()}"
|
||||
// it.text = "APP:${AppUtils.getAppVersionName()}"
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -27,32 +27,14 @@ class VipIdentificationView : ConstraintLayout, IMoGoVipSetListener {
|
||||
attributeSet,
|
||||
defStyleAttr
|
||||
) {
|
||||
init(attributeSet, defStyleAttr)
|
||||
}
|
||||
|
||||
private var marginStart: Float = 0.0f
|
||||
private var marginTop: Float = 0.0f
|
||||
|
||||
private fun init(attrs: AttributeSet, defStyleAttr: Int) {
|
||||
init {
|
||||
LayoutInflater.from(context).inflate(R.layout.view_vip_identification, this, true)
|
||||
val a = context.obtainStyledAttributes(
|
||||
attrs,
|
||||
R.styleable.VipIdentificationView,
|
||||
defStyleAttr,
|
||||
0
|
||||
)
|
||||
marginStart = a.getDimension(R.styleable.VipIdentificationView_marginStart, 0.0f)
|
||||
marginTop = a.getDimension(R.styleable.VipIdentificationView_marginTop, 0.0f)
|
||||
a.recycle()
|
||||
}
|
||||
|
||||
override fun onAttachedToWindow() {
|
||||
super.onAttachedToWindow()
|
||||
val lp = this.layoutParams as LayoutParams
|
||||
lp.marginStart = marginStart.toInt()
|
||||
lp.topMargin = marginTop.toInt()
|
||||
this.layoutParams = lp
|
||||
invalidate()
|
||||
CallVipSetListenerManager.addListener(TAG, this)
|
||||
}
|
||||
|
||||
|
||||
@@ -39,11 +39,12 @@ import com.mogo.eagle.core.data.config.HdMapBuildConfig;
|
||||
import com.mogo.eagle.core.data.constants.MoGoFragmentPaths;
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotStatusListener;
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager;
|
||||
import com.mogo.eagle.core.function.call.devatools.CallerDevaToolsManager;
|
||||
import com.mogo.eagle.core.function.call.map.CallerMapUIServiceManager;
|
||||
import com.mogo.eagle.core.function.call.startup.CallerStartUpManager;
|
||||
import com.mogo.eagle.core.function.hmi.R;
|
||||
import com.mogo.eagle.core.function.hmi.ui.widget.StatusBarView;
|
||||
import com.mogo.eagle.core.function.main.modules.MogoModulesManager;
|
||||
import com.mogo.eagle.core.function.main.stagetwo.AutopilotStartup;
|
||||
import com.mogo.eagle.core.function.main.windowview.FloatingViewHandler;
|
||||
import com.mogo.eagle.core.utilcode.mogo.AppLaunchTimeUtils;
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger;
|
||||
@@ -137,7 +138,7 @@ public class MainActivity extends MvpActivity<MainView, MainPresenter> implement
|
||||
|
||||
View statusBarView = decorView.findViewWithTag("status_bar");
|
||||
if (statusBarView == null) {
|
||||
statusBarView = new StatusBarView(this);
|
||||
statusBarView = getStatusBarView();
|
||||
statusBarView.setTag("status_bar");
|
||||
}
|
||||
FrameLayout.LayoutParams statusBarLP =
|
||||
@@ -147,6 +148,14 @@ public class MainActivity extends MvpActivity<MainView, MainPresenter> implement
|
||||
decorView.addView(statusBarView, statusBarLP);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改statusBar 重写实现,需要继承 StatusBarView,xml中基础系统控件不要修改其id,拿来即用
|
||||
* @return StatusBarView
|
||||
*/
|
||||
protected StatusBarView getStatusBarView(){
|
||||
return new StatusBarView(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onCreate(@Nullable Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
@@ -154,7 +163,7 @@ public class MainActivity extends MvpActivity<MainView, MainPresenter> implement
|
||||
ContextHolderUtil.holdContext(this);
|
||||
// 监听工控机连接信息
|
||||
CallerAutoPilotStatusListenerManager.INSTANCE.addListener(TAG, this);
|
||||
startUpInStage2();
|
||||
CallerStartUpManager.initStageTwo();
|
||||
// 加载模块
|
||||
mPresenter.postLoadModuleMsg();
|
||||
// 监听网络状态
|
||||
@@ -163,6 +172,9 @@ public class MainActivity extends MvpActivity<MainView, MainPresenter> implement
|
||||
DisplayEffectsHelper.getInstance().init(clSpecialEffect);
|
||||
|
||||
mPresenter.checkPermission(this);
|
||||
|
||||
// 同步AppInfo Config信息
|
||||
CallerDevaToolsManager.INSTANCE.syncConfig();
|
||||
}
|
||||
|
||||
private void calculateStartTime() {
|
||||
@@ -206,26 +218,6 @@ public class MainActivity extends MvpActivity<MainView, MainPresenter> implement
|
||||
mConnectInfoRV.setAdapter(mConnAdapter);
|
||||
}
|
||||
|
||||
/**
|
||||
* 第二阶段初始化,第一阶段初始化可查看:{@link com.mogo.launcher.stageone}
|
||||
*/
|
||||
public void startUpInStage2() {
|
||||
StartupConfig config = null;
|
||||
if (DebugConfig.isDebug()) {
|
||||
config = new StartupConfig.Builder()
|
||||
.setLoggerLevel(LoggerLevel.DEBUG)
|
||||
.setOpenStatistics(true)
|
||||
.build();
|
||||
}
|
||||
new StartupManager.Builder()
|
||||
.addStartup(new AutopilotStartup())
|
||||
// .addStartup(new APMStartup())
|
||||
.setConfig(config)
|
||||
.build(this)
|
||||
.start()
|
||||
.await();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void loadModules() {
|
||||
final long start = System.currentTimeMillis();
|
||||
|
||||
@@ -149,10 +149,14 @@ public class MainLauncherActivity extends MainActivity implements IMogoIntentLis
|
||||
ochProvider = (IMoGoFunctionProvider) ARouter.getInstance()
|
||||
.build("/driver/api")
|
||||
.navigation(getContext());
|
||||
} else {
|
||||
} else if(AppIdentityModeUtils.isPassenger(FunctionBuildConfig.appIdentityMode)){
|
||||
ochProvider = (IMoGoFunctionProvider) ARouter.getInstance()
|
||||
.build("/passenger/api")
|
||||
.navigation(getContext());
|
||||
} else {
|
||||
ochProvider = (IMoGoFunctionProvider) ARouter.getInstance()
|
||||
.build("/noop/api")
|
||||
.navigation(getContext());
|
||||
}
|
||||
}
|
||||
// 处理一个机器多个屏幕方案
|
||||
@@ -238,34 +242,35 @@ public class MainLauncherActivity extends MainActivity implements IMogoIntentLis
|
||||
*/
|
||||
@Override
|
||||
public boolean dispatchKeyEvent(KeyEvent event) {
|
||||
CallerLogger.INSTANCE.d(M_F + "MoFangManager", "dispatchKeyEvent code = " + event.getKeyCode() + "--action = " + event.getAction() + "----" + event);
|
||||
CallerLogger.INSTANCE.d(M_F + "MoFangManager", "dispatchKeyEvent code = " + event.getKeyCode() + "--action = " + event.getAction() + "----" + event);
|
||||
String bluetoothName = SharedPrefsMgr.getInstance(getContext()).getString(MfConstants.BLUETOOTH_NAME);
|
||||
if (!isPressEnd) {
|
||||
CallerLogger.INSTANCE.d(M_F + "MoFangManager", "dispatchKeyEvent ---1--- bluetoothName = " + bluetoothName);
|
||||
CallerLogger.INSTANCE.d(M_F + "MoFangManager","dispatchKeyEvent ---1--- bluetoothName = " + bluetoothName);
|
||||
}
|
||||
if (bluetoothName.equals("MINI_KEYBOARD")) {
|
||||
if (!isPressEnd) {
|
||||
isPressEnd = true;
|
||||
startPressTime = System.currentTimeMillis();
|
||||
}
|
||||
CallerLogger.INSTANCE.d(M_F + "MoFangManager", "dispatchKeyEvent ---2--- bluetoothName = " + bluetoothName + "--- code = " + event.getKeyCode() + "--action = " + event.getAction());
|
||||
CallerLogger.INSTANCE.d(M_F + "MoFangManager","dispatchKeyEvent ---2--- bluetoothName = " + bluetoothName + "--- code = " + event.getKeyCode() + "--action = " + event.getAction());
|
||||
if (event.getKeyCode() == KeyEvent.KEYCODE_A) { //单击 -1,长按无操作,AB组合-2
|
||||
if (event.getAction() == KeyEvent.ACTION_DOWN) {
|
||||
pressADownTime = System.currentTimeMillis();
|
||||
CallerLogger.INSTANCE.d(M_F + "MoFangManager", "dispatchKeyEvent A down pressADownTime = " + pressADownTime + "---" + (pressADownTime - startPressTime) + "----isCombinationKey = " + isCombinationKey + "--pressBDownTime = " + pressBDownTime);
|
||||
if ((pressADownTime - startPressTime) > 360 && (pressADownTime - startPressTime) < 1300 && pressBDownTime > 0) {
|
||||
if (isShowToast) {
|
||||
ToastUtils.showShort("方块 A 按AB组合 -2 ");
|
||||
ToastUtils.showShort("方块 A 按AB组合 +1 ");
|
||||
}
|
||||
sendAcc(true, -2);
|
||||
sendAcc(true, +1);
|
||||
isCombinationKey = 3;
|
||||
}
|
||||
|
||||
if (isCombinationKey != 3 && isCombinationKey != 1) {
|
||||
if ((pressADownTime - startPressTime) > 1320) {
|
||||
if (isShowToast) {
|
||||
ToastUtils.showShort("方块 长按A 无 操作 ");
|
||||
ToastUtils.showShort("方块 长按A -2 ");
|
||||
}
|
||||
sendAcc(true, -2);
|
||||
isCombinationKey = 2;
|
||||
}
|
||||
}
|
||||
@@ -295,17 +300,16 @@ public class MainLauncherActivity extends MainActivity implements IMogoIntentLis
|
||||
CallerLogger.INSTANCE.d(M_F + "MoFangManager", "dispatchKeyEvent B down pressBDownTime = " + pressBDownTime + "--差-" + (pressBDownTime - startPressTime) + "---isCombinationKey = " + isCombinationKey + "--pressADownTime = " + pressADownTime);
|
||||
if ((pressBDownTime - startPressTime) > 360 && (pressBDownTime - startPressTime) < 1300 && pressADownTime > 0) {
|
||||
if (isShowToast) {
|
||||
ToastUtils.showShort("方块 B 按AB组合 ");
|
||||
ToastUtils.showShort("方块 B 按AB组合 +1 ");
|
||||
}
|
||||
sendAcc(true, -2);
|
||||
sendAcc(true, +1);
|
||||
isCombinationKey = 3;
|
||||
}
|
||||
if (isCombinationKey != 3 && isCombinationKey != 1) {
|
||||
if ((pressBDownTime - startPressTime) > 1320) {
|
||||
if (isShowToast) {
|
||||
ToastUtils.showShort("方块 长按B +1 ");
|
||||
ToastUtils.showShort("方块 长按B 无操作 ");
|
||||
}
|
||||
sendAcc(true, +1);
|
||||
isCombinationKey = 2;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -27,14 +27,13 @@ import com.mogo.eagle.core.function.call.devatools.CallerDevaToolsUpgradeListene
|
||||
import com.mogo.eagle.core.function.call.hmi.CallerHmiManager;
|
||||
import com.mogo.eagle.core.function.call.msgbox.CallerMsgBoxManager;
|
||||
import com.mogo.eagle.core.function.msgbox.db.MsgBoxDb;
|
||||
import com.mogo.eagle.core.function.overview.OverviewDb;
|
||||
import com.mogo.eagle.core.function.overview.db.OverviewDb;
|
||||
import com.mogo.eagle.core.utilcode.mogo.AppIdentityModeUtils;
|
||||
import com.mogo.eagle.core.utilcode.mogo.AppLaunchTimeUtils;
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger;
|
||||
import com.mogo.eagle.core.utilcode.mogo.storage.SharedPrefsMgr;
|
||||
import com.mogo.eagle.core.utilcode.util.ProcessUtils;
|
||||
import com.mogo.eagle.core.utilcode.util.SPUtils;
|
||||
import com.zhidao.support.obu.ami.AmiClientManager;
|
||||
|
||||
import java.io.File;
|
||||
import java.lang.reflect.Field;
|
||||
@@ -122,7 +121,6 @@ public abstract class MainMoGoApplication extends AbsMogoApplication {
|
||||
}).start();
|
||||
}
|
||||
|
||||
// TODO 李小鹏 这里需要将逻辑抽离出去,单独使用更新服务控制
|
||||
private void upgradeProgressListener() {
|
||||
final NotificationCompat.Builder builder = new NotificationCompat.Builder(this);
|
||||
// builder.setSmallIcon(R.mipmap.icon1001);//todo emArrow 更换图标,去除地图下载图标的依赖关系
|
||||
@@ -204,7 +202,7 @@ public abstract class MainMoGoApplication extends AbsMogoApplication {
|
||||
*/
|
||||
private void connectAmiIp() {
|
||||
String ipAddress = SharedPrefsMgr.getInstance(AbsMogoApplication.getApp().getBaseContext()).getString(MoGoConfig.OBU_IP, "192.168.1.199");
|
||||
AmiClientManager.getInstance().setObuIp(ipAddress);
|
||||
// AmiClientManager.getInstance().setObuIp(ipAddress);
|
||||
}
|
||||
|
||||
private void initModules() {
|
||||
@@ -213,13 +211,13 @@ public abstract class MainMoGoApplication extends AbsMogoApplication {
|
||||
MogoModulePaths.addModuleFunctionServer(new MogoModule(MogoServicePaths.PATH_V2X_OBU_MOGO, "IMoGoObuProvider"));
|
||||
// BIZ
|
||||
MogoModulePaths.addModuleFunctionServer(new MogoModule(MogoServicePaths.PATH_FUNC_BIZ, "IMoGoNoticeProvider"));
|
||||
// 车聊聊,IM
|
||||
// todo 后置 车聊聊,IM
|
||||
MogoModulePaths.addModuleFunctionServer(new MogoModule(ChatConsts.CHAT_PROVIDER_PATH, ChatConsts.CHAT_MODULE_NAME));
|
||||
// V2X 模块
|
||||
MogoModulePaths.addBaseModule(new MogoModule(MogoServicePaths.PATH_V2X_MODULE, "V2XProvider"));
|
||||
// 司机身份专属模块
|
||||
// 司机身份专属
|
||||
if (AppIdentityModeUtils.isDriver(FunctionBuildConfig.appIdentityMode)) {
|
||||
// 地图数据收集模块
|
||||
// todo 后置 地图数据收集模块
|
||||
MogoModulePaths.addModuleFunctionServer(new MogoModule(MogoServicePaths.PATH_MAP_DATA_COLLECT_PROVIDER, "MoGoMapDataCollector"));
|
||||
}
|
||||
CallerLogger.INSTANCE.i(M_HMI + TAG, "App launch timer cost " + (System.currentTimeMillis() - start) + "ms");
|
||||
|
||||
@@ -1,40 +0,0 @@
|
||||
package com.mogo.eagle.core.function.main.stagetwo;
|
||||
|
||||
import android.content.Context;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
import com.alibaba.android.arouter.launcher.ARouter;
|
||||
import com.mogo.eagle.core.data.constants.MogoServicePaths;
|
||||
import com.rousetime.android_startup.AndroidStartup;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class AutopilotStartup extends AndroidStartup<Boolean> {
|
||||
@Nullable
|
||||
@Override
|
||||
public Boolean create(@NonNull Context context) {
|
||||
ARouter.getInstance().build(MogoServicePaths.PATH_AUTO_PILOT).navigation();
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean callCreateOnMainThread() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean waitOnMainThread() {
|
||||
return false;
|
||||
}
|
||||
|
||||
// @Nullable
|
||||
// @Override
|
||||
// public List<String> dependenciesByName() {
|
||||
// List<String> deps = new ArrayList<>();
|
||||
// deps.add("com.mogo.eagle.core.function.main.stagetwo.APMStartup");
|
||||
// return deps;
|
||||
// }
|
||||
}
|
||||
@@ -1,38 +0,0 @@
|
||||
package com.mogo.eagle.core.function.main.stagetwo;
|
||||
|
||||
import android.content.Context;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
import com.rousetime.android_startup.AndroidStartup;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class MapStartup extends AndroidStartup<Boolean> {
|
||||
@Nullable
|
||||
@Override
|
||||
public Boolean create(@NonNull Context context) {
|
||||
// TODO:暂不支持分步加载
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean callCreateOnMainThread() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean waitOnMainThread() {
|
||||
return false;
|
||||
}
|
||||
|
||||
// @Nullable
|
||||
// @Override
|
||||
// public List<String> dependenciesByName() {
|
||||
// List<String> deps = new ArrayList<>();
|
||||
// deps.add("com.mogo.eagle.core.function.main.stagetwo.APMStartup");
|
||||
// return deps;
|
||||
// }
|
||||
}
|
||||
@@ -6,14 +6,6 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<View
|
||||
android:id="@+id/viewShowDebugView"
|
||||
android:layout_width="@dimen/dp_400"
|
||||
android:layout_height="@dimen/dp_100"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent" />
|
||||
|
||||
<!--V2X预警红色边框-->
|
||||
<com.mogo.eagle.core.function.hmi.ui.widget.V2XWarningView
|
||||
android:id="@+id/flV2XWarningView"
|
||||
@@ -28,246 +20,6 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:paddingTop="72dp">
|
||||
<!--脉速表-->
|
||||
<com.mogo.eagle.core.function.hmi.ui.widget.SpeedPanelView
|
||||
android:id="@+id/viewSpeedChart"
|
||||
android:layout_width="@dimen/module_ext_speed_width"
|
||||
android:layout_height="@dimen/module_ext_speed_height"
|
||||
android:layout_marginLeft="@dimen/module_mogo_autopilot_status_margin_left"
|
||||
android:layout_marginTop="@dimen/module_ext_arcView_top"
|
||||
android:elevation="@dimen/dp_10"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<!--Vip车辆标志-->
|
||||
<!-- <com.mogo.eagle.core.function.hmi.ui.widget.VipIdentificationView-->
|
||||
<!-- android:id="@+id/flVipIdentificationView"-->
|
||||
<!-- android:layout_width="@dimen/module_vip_width"-->
|
||||
<!-- android:layout_height="@dimen/module_vip_height"-->
|
||||
<!-- android:visibility="gone"-->
|
||||
<!-- app:layout_constraintLeft_toLeftOf="parent"-->
|
||||
<!-- app:layout_constraintTop_toTopOf="parent" />-->
|
||||
|
||||
<com.mogo.eagle.core.function.hmi.ui.takeover.TakeOverView
|
||||
android:id="@+id/clTakeOverView"
|
||||
android:layout_width="@dimen/hmi_take_over_request_width"
|
||||
android:layout_height="@dimen/hmi_take_over_request_height"
|
||||
android:layout_marginTop="@dimen/hmi_take_over_request_m_top"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<!--自动驾驶按钮及状态-->
|
||||
<com.mogo.eagle.core.function.hmi.ui.widget.AutoPilotStatusView
|
||||
android:id="@+id/viewAutopilotStatus"
|
||||
android:layout_width="@dimen/module_mogo_autopilot_status_bg_width"
|
||||
android:layout_height="@dimen/module_mogo_autopilot_status_bg_height"
|
||||
android:layout_marginTop="@dimen/module_mogo_autopilot_status_margin_top"
|
||||
android:elevation="@dimen/dp_10"
|
||||
app:layout_constraintLeft_toLeftOf="@+id/viewSpeedChart"
|
||||
app:layout_constraintTop_toBottomOf="@+id/viewSpeedChart"
|
||||
app:layout_goneMarginStart="@dimen/module_mogo_autopilot_status_margin_left" />
|
||||
|
||||
<!--超视距-->
|
||||
<ImageView
|
||||
android:id="@+id/ivCameraIcon"
|
||||
android:layout_width="120dp"
|
||||
android:layout_height="120dp"
|
||||
android:layout_marginTop="45dp"
|
||||
android:layout_marginEnd="40dp"
|
||||
android:background="@drawable/icon_camera_nor"
|
||||
app:layout_constraintRight_toLeftOf="@id/viewTrafficLightVr"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:visibility="visible" />
|
||||
|
||||
<!--红绿灯-->
|
||||
<com.mogo.eagle.core.function.hmi.ui.widget.SingleTrafficLightView
|
||||
android:id="@+id/viewTrafficLightVr"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/hmi_traffic_light_layout_margin_top"
|
||||
android:layout_marginEnd="@dimen/hmi_traffic_light_layout_margin_right"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<!--地图视角切换-->
|
||||
<com.mogo.eagle.core.function.hmi.ui.widget.PerspectiveSwitchView
|
||||
android:id="@+id/viewPerspectiveSwitch"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="50dp"
|
||||
android:layout_marginBottom="40dp"
|
||||
android:elevation="@dimen/dp_10"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent" />
|
||||
|
||||
<View
|
||||
android:id="@+id/viewDemoModeSwitch"
|
||||
android:layout_width="120dp"
|
||||
android:layout_height="100dp"
|
||||
android:layout_marginStart="40dp"
|
||||
android:layout_marginBottom="200dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent" />
|
||||
|
||||
<!--工具箱-->
|
||||
<ImageView
|
||||
android:id="@+id/ivToolsIcon"
|
||||
android:layout_width="@dimen/module_hmi_check_size"
|
||||
android:layout_height="@dimen/module_hmi_check_size"
|
||||
android:layout_marginLeft="25dp"
|
||||
android:layout_marginBottom="40dp"
|
||||
android:background="@drawable/module_ext_check"
|
||||
android:elevation="@dimen/dp_10"
|
||||
android:scaleType="center"
|
||||
android:src="@drawable/icon_tools_nor"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@+id/viewPerspectiveSwitch"
|
||||
app:layout_goneMarginStart="50dp" />
|
||||
|
||||
<!--问题反馈-->
|
||||
<ImageView
|
||||
android:id="@+id/ivBadCaseTools"
|
||||
android:layout_width="120dp"
|
||||
android:layout_height="120dp"
|
||||
android:layout_marginStart="50dp"
|
||||
android:layout_marginBottom="40dp"
|
||||
android:src="@drawable/bad_case_selector"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@id/ivToolsIcon" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/ivAiCollectTools"
|
||||
android:layout_width="120dp"
|
||||
android:layout_height="120dp"
|
||||
android:layout_marginStart="50dp"
|
||||
android:layout_marginBottom="40dp"
|
||||
android:src="@drawable/ai_collect_selector"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@id/ivBadCaseTools" />
|
||||
|
||||
<View
|
||||
android:id="@+id/viewUpgradeTips"
|
||||
android:layout_width="22dp"
|
||||
android:layout_height="22dp"
|
||||
android:background="@drawable/version_upgrade_tips_background"
|
||||
android:translationZ="30dp"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintCircle="@id/ivToolsIcon"
|
||||
app:layout_constraintCircleAngle="45"
|
||||
app:layout_constraintCircleRadius="60dp"
|
||||
tools:ignore="MissingConstraints" />
|
||||
|
||||
<!--限速牌子-->
|
||||
<com.mogo.eagle.core.function.hmi.ui.widget.LimitingVelocityView
|
||||
android:id="@+id/viewLimitingVelocity"
|
||||
android:layout_width="120dp"
|
||||
android:layout_height="120dp"
|
||||
android:layout_marginTop="30dp"
|
||||
android:layout_marginEnd="40dp"
|
||||
android:background="@drawable/bg_waring_limiting_velocity"
|
||||
android:elevation="@dimen/dp_10"
|
||||
android:gravity="center"
|
||||
android:text="60"
|
||||
android:textColor="#FFFFFF"
|
||||
android:textSize="60dp"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/ivCameraIcon"
|
||||
app:layout_goneMarginEnd="40dp"
|
||||
app:layout_goneMarginTop="40dp"
|
||||
tools:visibility="gone" />
|
||||
|
||||
<!--消息盒子司机端选择入口-->
|
||||
<CheckBox
|
||||
android:id="@+id/cbMsgBoxDriver"
|
||||
android:layout_width="150dp"
|
||||
android:layout_height="150dp"
|
||||
android:layout_marginTop="15dp"
|
||||
android:layout_marginEnd="25dp"
|
||||
android:background="@drawable/selector_msg_box"
|
||||
android:button="@null"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintRight_toLeftOf="@id/viewLimitingVelocity"
|
||||
app:layout_constraintTop_toBottomOf="@+id/ivCameraIcon" />
|
||||
|
||||
<!--司机端消息提示-->
|
||||
<View
|
||||
android:id="@+id/MsgBoxTipView"
|
||||
android:layout_width="8dp"
|
||||
android:layout_height="8dp"
|
||||
android:background="@drawable/version_upgrade_tips_background"
|
||||
android:translationZ="30dp"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintCircle="@id/cbMsgBoxDriver"
|
||||
app:layout_constraintCircleAngle="40"
|
||||
app:layout_constraintCircleRadius="32dp"
|
||||
tools:ignore="MissingConstraints" />
|
||||
|
||||
<!--消息盒子乘客端选择入口-->
|
||||
<CheckBox
|
||||
android:id="@+id/cbMsgBoxPassenger"
|
||||
android:layout_width="100dp"
|
||||
android:layout_height="100dp"
|
||||
android:layout_marginStart="320dp"
|
||||
android:layout_marginBottom="50dp"
|
||||
android:background="@drawable/selector_msg_box_p"
|
||||
android:button="@null"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent" />
|
||||
|
||||
<!--乘客端消息提示-->
|
||||
<View
|
||||
android:id="@+id/MsgBoxPTipView"
|
||||
android:layout_width="15dp"
|
||||
android:layout_height="15dp"
|
||||
android:background="@drawable/version_upgrade_tips_background"
|
||||
android:translationZ="30dp"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintCircle="@id/cbMsgBoxPassenger"
|
||||
app:layout_constraintCircleAngle="40"
|
||||
app:layout_constraintCircleRadius="50dp"
|
||||
tools:ignore="MissingConstraints" />
|
||||
|
||||
<com.mogo.eagle.core.function.hmi.ui.msgbox.DriverMsgBoxListView
|
||||
android:id="@+id/viewDriverMsgBoxList"
|
||||
android:layout_width="864px"
|
||||
android:layout_height="746px"
|
||||
android:layout_marginEnd="40dp"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/cbMsgBoxDriver" />
|
||||
|
||||
<com.mogo.eagle.core.function.hmi.ui.msgbox.DriverMsgBoxBubbleView
|
||||
android:id="@+id/viewDriverMsgBoxBubble"
|
||||
android:layout_width="864px"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="40dp"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/cbMsgBoxDriver" />
|
||||
|
||||
<com.mogo.eagle.core.function.hmi.ui.msgbox.PassengerMsgBoxBubbleView
|
||||
android:id="@+id/viewPassengerMsgBoxBubble"
|
||||
android:layout_width="650px"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="20dp"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintBottom_toTopOf="@id/cbMsgBoxPassenger"
|
||||
app:layout_constraintLeft_toLeftOf="@id/cbMsgBoxPassenger"
|
||||
app:layout_constraintRight_toRightOf="@id/cbMsgBoxPassenger" />
|
||||
|
||||
<com.mogo.eagle.core.function.hmi.ui.msgbox.PassengerMsgBoxListView
|
||||
android:id="@+id/viewPassengerMsgBoxList"
|
||||
android:layout_width="650px"
|
||||
android:layout_height="750px"
|
||||
android:layout_marginBottom="20dp"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintBottom_toTopOf="@id/cbMsgBoxPassenger"
|
||||
app:layout_constraintLeft_toLeftOf="@id/cbMsgBoxPassenger"
|
||||
app:layout_constraintRight_toRightOf="@id/cbMsgBoxPassenger" />
|
||||
|
||||
<!--左右转向灯-->
|
||||
<com.mogo.eagle.core.function.hmi.ui.turnlight.TurnLightViewStatus
|
||||
@@ -289,32 +41,6 @@
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<com.mogo.eagle.core.function.hmi.ui.pnc.PncActionsView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="@dimen/dp_110"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent" />
|
||||
|
||||
<!--APP、MAP版本-->
|
||||
<com.mogo.eagle.core.function.hmi.ui.widget.VersionNameView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="45dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent" />
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/statusBarContainer"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="30dp"
|
||||
app:layout_constraintEnd_toStartOf="@+id/viewLimitingVelocity"
|
||||
app:layout_constraintTop_toTopOf="@+id/viewLimitingVelocity"
|
||||
app:layout_goneMarginEnd="40dp"
|
||||
app:layout_goneMarginTop="30dp" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
@@ -1,28 +1,28 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<com.mogo.eagle.core.widget.RoundConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/layoutBadCase"
|
||||
android:layout_width="804px"
|
||||
android:layout_height="160px"
|
||||
android:layout_width="804dp"
|
||||
android:layout_height="160dp"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:background="#53000000"
|
||||
app:roundLayoutRadius="24px"
|
||||
app:roundLayoutRadius="24dp"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginStart="30px"
|
||||
android:layout_marginEnd="30px"
|
||||
android:layout_marginTop="7px"
|
||||
android:layout_marginBottom="7px"
|
||||
android:layout_marginStart="30dp"
|
||||
android:layout_marginEnd="30dp"
|
||||
android:layout_marginTop="7dp"
|
||||
android:layout_marginBottom="7dp"
|
||||
android:clickable="true"
|
||||
>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/ivBadCaseImage"
|
||||
android:layout_width="110px"
|
||||
android:layout_height="110px"
|
||||
android:layout_width="110dp"
|
||||
android:layout_height="110dp"
|
||||
android:src="@drawable/icon_bad_case"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
android:layout_marginStart="25px"
|
||||
android:layout_marginStart="25dp"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
@@ -33,8 +33,8 @@
|
||||
app:layout_constraintLeft_toRightOf="@id/ivBadCaseImage"
|
||||
android:text="录包提醒"
|
||||
android:textColor="#FFFFFFFF"
|
||||
android:textSize="32px"
|
||||
android:layout_marginStart="25px"
|
||||
android:textSize="32dp"
|
||||
android:layout_marginStart="25dp"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
@@ -43,9 +43,9 @@
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintBottom_toBottomOf="@id/ivBadCaseImage"
|
||||
app:layout_constraintLeft_toRightOf="@id/ivBadCaseImage"
|
||||
android:layout_marginStart="25px"
|
||||
android:layout_marginStart="25dp"
|
||||
android:textColor="#B3FFFFFF"
|
||||
android:textSize="30px"
|
||||
android:textSize="30dp"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
@@ -55,8 +55,8 @@
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@id/tvRecordTip"
|
||||
android:textColor="#80FFFFFF"
|
||||
android:textSize="24px"
|
||||
android:layout_marginEnd="25px"
|
||||
android:textSize="24dp"
|
||||
android:layout_marginEnd="25dp"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
@@ -66,11 +66,11 @@
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@id/tvBagRecordTime"
|
||||
app:layout_constraintBottom_toBottomOf="@id/tvBagRecordTime"
|
||||
android:paddingEnd="25px"
|
||||
android:paddingStart="20px"
|
||||
android:paddingEnd="25dp"
|
||||
android:paddingStart="20dp"
|
||||
android:text="查看"
|
||||
android:textColor="#FFFFFFFF"
|
||||
android:textSize="30px"
|
||||
android:textSize="30dp"
|
||||
/>
|
||||
|
||||
</com.mogo.eagle.core.widget.RoundConstraintLayout>
|
||||
@@ -1,27 +1,27 @@
|
||||
<?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="804px"
|
||||
android:layout_width="804dp"
|
||||
android:layout_height="wrap_content"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:background="#53000000"
|
||||
app:roundLayoutRadius="24px"
|
||||
app:roundLayoutRadius="24dp"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginStart="30px"
|
||||
android:layout_marginEnd="30px"
|
||||
android:layout_marginTop="7px"
|
||||
android:layout_marginBottom="7px"
|
||||
android:layout_marginStart="30dp"
|
||||
android:layout_marginEnd="30dp"
|
||||
android:layout_marginTop="7dp"
|
||||
android:layout_marginBottom="7dp"
|
||||
>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/ivReportImageNormal"
|
||||
android:layout_width="110px"
|
||||
android:layout_height="110px"
|
||||
android:layout_width="110dp"
|
||||
android:layout_height="110dp"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
android:layout_marginTop="25px"
|
||||
android:layout_marginBottom="25px"
|
||||
android:layout_marginStart="25px"
|
||||
android:layout_marginTop="25dp"
|
||||
android:layout_marginBottom="25dp"
|
||||
android:layout_marginStart="25dp"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
@@ -30,10 +30,10 @@
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintLeft_toRightOf="@id/ivReportImageNormal"
|
||||
android:layout_marginTop="25px"
|
||||
android:layout_marginStart="23px"
|
||||
android:layout_marginTop="25dp"
|
||||
android:layout_marginStart="23dp"
|
||||
android:textColor="#FFFFFFFF"
|
||||
android:textSize="32px"
|
||||
android:textSize="32dp"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
@@ -43,8 +43,8 @@
|
||||
app:layout_constraintTop_toBottomOf="@id/tvReportLevelNormal"
|
||||
app:layout_constraintLeft_toLeftOf="@id/tvReportLevelNormal"
|
||||
android:textColor="#B3FFFFFF"
|
||||
android:textSize="28px"
|
||||
android:layout_marginTop="5px"
|
||||
android:textSize="28dp"
|
||||
android:layout_marginTop="5dp"
|
||||
android:lineSpacingMultiplier="1.2"
|
||||
/>
|
||||
|
||||
@@ -56,11 +56,11 @@
|
||||
app:layout_constraintLeft_toLeftOf="@id/tvReportTimeNormal"
|
||||
app:layout_constraintRight_toRightOf="@id/tvStatusSelect"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
android:layout_marginTop="5px"
|
||||
android:layout_marginBottom="25px"
|
||||
android:layout_marginTop="5dp"
|
||||
android:layout_marginBottom="25dp"
|
||||
android:textColor="#B3FFFFFF"
|
||||
android:gravity="start"
|
||||
android:textSize="28px"
|
||||
android:textSize="28dp"
|
||||
android:maxLines="1"
|
||||
android:ellipsize="end"
|
||||
android:lineSpacingMultiplier="1.2"
|
||||
@@ -72,18 +72,18 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:text="折叠"
|
||||
android:textColor="#FFFFFFFF"
|
||||
android:textSize="24px"
|
||||
android:textSize="24dp"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
android:layout_marginTop="25px"
|
||||
android:layout_marginEnd="25px"
|
||||
android:layout_marginTop="25dp"
|
||||
android:layout_marginEnd="25dp"
|
||||
android:background="@drawable/bg_msg_status_select"
|
||||
android:drawableStart="@drawable/icon_msg_open"
|
||||
android:drawablePadding="10px"
|
||||
android:paddingStart="15px"
|
||||
android:paddingEnd="15px"
|
||||
android:paddingTop="5px"
|
||||
android:paddingBottom="5px"
|
||||
android:drawablePadding="10dp"
|
||||
android:paddingStart="15dp"
|
||||
android:paddingEnd="15dp"
|
||||
android:paddingTop="5dp"
|
||||
android:paddingBottom="5dp"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
@@ -93,20 +93,20 @@
|
||||
app:layout_constraintTop_toTopOf="@id/tvStatusSelect"
|
||||
app:layout_constraintBottom_toBottomOf="@id/tvStatusSelect"
|
||||
app:layout_constraintRight_toLeftOf="@id/tvStatusSelect"
|
||||
android:layout_marginEnd="20px"
|
||||
android:layout_marginEnd="20dp"
|
||||
android:textColor="#80FFFFFF"
|
||||
android:textSize="24px"
|
||||
android:textSize="24dp"
|
||||
android:lineSpacingMultiplier="1.2"
|
||||
/>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/ivReportImageOpen"
|
||||
android:layout_width="44px"
|
||||
android:layout_height="44px"
|
||||
android:layout_width="44dp"
|
||||
android:layout_height="44dp"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
android:layout_marginTop="20px"
|
||||
android:layout_marginStart="20px"
|
||||
android:layout_marginTop="20dp"
|
||||
android:layout_marginStart="20dp"
|
||||
android:visibility="gone"
|
||||
/>
|
||||
|
||||
@@ -118,8 +118,8 @@
|
||||
app:layout_constraintBottom_toBottomOf="@id/ivReportImageOpen"
|
||||
app:layout_constraintLeft_toRightOf="@id/ivReportImageOpen"
|
||||
android:textColor="#FFFFFFFF"
|
||||
android:textSize="32px"
|
||||
android:layout_marginStart="10px"
|
||||
android:textSize="32dp"
|
||||
android:layout_marginStart="10dp"
|
||||
android:visibility="gone"
|
||||
/>
|
||||
|
||||
@@ -129,9 +129,9 @@
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintTop_toBottomOf="@id/ivReportImageOpen"
|
||||
app:layout_constraintLeft_toLeftOf="@id/ivReportImageOpen"
|
||||
android:layout_marginTop="10px"
|
||||
android:layout_marginTop="10dp"
|
||||
android:textColor="#B3FFFFFF"
|
||||
android:textSize="28px"
|
||||
android:textSize="28dp"
|
||||
android:lineSpacingMultiplier="1.2"
|
||||
android:visibility="gone"
|
||||
/>
|
||||
@@ -143,7 +143,7 @@
|
||||
app:layout_constraintTop_toBottomOf="@id/tvReportTimeOpen"
|
||||
app:layout_constraintLeft_toLeftOf="@id/tvReportTimeOpen"
|
||||
android:textColor="#B3FFFFFF"
|
||||
android:textSize="28px"
|
||||
android:textSize="28dp"
|
||||
android:lineSpacingMultiplier="1.2"
|
||||
android:visibility="gone"
|
||||
/>
|
||||
@@ -157,7 +157,7 @@
|
||||
app:layout_constraintRight_toRightOf="@id/tvStatusSelect"
|
||||
android:gravity="start"
|
||||
android:textColor="#B3FFFFFF"
|
||||
android:textSize="28px"
|
||||
android:textSize="28dp"
|
||||
android:lineSpacingMultiplier="1.2"
|
||||
android:visibility="gone"
|
||||
/>
|
||||
@@ -170,9 +170,9 @@
|
||||
app:layout_constraintLeft_toLeftOf="@id/tvReportReasonOpen"
|
||||
app:layout_constraintRight_toRightOf="@id/tvStatusSelect"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
android:layout_marginBottom="15px"
|
||||
android:layout_marginBottom="15dp"
|
||||
android:textColor="#B3FFFFFF"
|
||||
android:textSize="28px"
|
||||
android:textSize="28dp"
|
||||
android:lineSpacingMultiplier="1.2"
|
||||
android:visibility="gone"
|
||||
/>
|
||||
|
||||
@@ -1,25 +1,25 @@
|
||||
<?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="804px"
|
||||
android:layout_height="160px"
|
||||
android:layout_width="804dp"
|
||||
android:layout_height="160dp"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:background="#53000000"
|
||||
app:roundLayoutRadius="24px"
|
||||
app:roundLayoutRadius="24dp"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginStart="30px"
|
||||
android:layout_marginEnd="30px"
|
||||
android:layout_marginTop="7px"
|
||||
android:layout_marginBottom="7px"
|
||||
android:layout_marginStart="30dp"
|
||||
android:layout_marginEnd="30dp"
|
||||
android:layout_marginTop="7dp"
|
||||
android:layout_marginBottom="7dp"
|
||||
>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/ivNoticeImage"
|
||||
android:layout_width="140px"
|
||||
android:layout_height="130px"
|
||||
android:layout_width="140dp"
|
||||
android:layout_height="130dp"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
android:layout_marginStart="15px"
|
||||
android:layout_marginStart="15dp"
|
||||
android:src="@drawable/icon_notice_default"
|
||||
/>
|
||||
|
||||
@@ -29,10 +29,10 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:text="官方公告"
|
||||
android:textColor="#FFFFFFFF"
|
||||
android:textSize="32px"
|
||||
android:textSize="32dp"
|
||||
app:layout_constraintTop_toTopOf="@id/ivNoticeImage"
|
||||
app:layout_constraintLeft_toRightOf="@id/ivNoticeImage"
|
||||
android:layout_marginStart="15px"
|
||||
android:layout_marginStart="15dp"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
@@ -42,9 +42,9 @@
|
||||
app:layout_constraintTop_toTopOf="@id/tvNoticeTitle"
|
||||
app:layout_constraintBottom_toBottomOf="@id/tvNoticeTitle"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
android:layout_marginEnd="25px"
|
||||
android:layout_marginEnd="25dp"
|
||||
android:textColor="#80FFFFFF"
|
||||
android:textSize="24px"
|
||||
android:textSize="24dp"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
@@ -53,11 +53,11 @@
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
android:layout_marginEnd="25px"
|
||||
android:layout_marginBottom="20px"
|
||||
android:layout_marginEnd="25dp"
|
||||
android:layout_marginBottom="20dp"
|
||||
android:text="查看"
|
||||
android:textColor="#FFFFFFFF"
|
||||
android:textSize="30px"
|
||||
android:textSize="30dp"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
@@ -72,7 +72,7 @@
|
||||
android:maxLines="1"
|
||||
android:ellipsize="end"
|
||||
android:textColor="#B3FFFFFF"
|
||||
android:textSize="28px"
|
||||
android:textSize="28dp"
|
||||
/>
|
||||
|
||||
</com.mogo.eagle.core.widget.RoundConstraintLayout>
|
||||
@@ -1,27 +1,27 @@
|
||||
<?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="804px"
|
||||
android:layout_width="804dp"
|
||||
android:layout_height="wrap_content"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:background="#53000000"
|
||||
app:roundLayoutRadius="24px"
|
||||
app:roundLayoutRadius="24dp"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginStart="30px"
|
||||
android:layout_marginEnd="30px"
|
||||
android:layout_marginTop="7px"
|
||||
android:layout_marginBottom="7px"
|
||||
android:layout_marginStart="30dp"
|
||||
android:layout_marginEnd="30dp"
|
||||
android:layout_marginTop="7dp"
|
||||
android:layout_marginBottom="7dp"
|
||||
>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/ivOperationImageNormal"
|
||||
android:layout_width="110px"
|
||||
android:layout_height="110px"
|
||||
android:layout_width="110dp"
|
||||
android:layout_height="110dp"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
android:layout_marginTop="25px"
|
||||
android:layout_marginBottom="25px"
|
||||
android:layout_marginStart="25px"
|
||||
android:layout_marginTop="25dp"
|
||||
android:layout_marginBottom="25dp"
|
||||
android:layout_marginStart="25dp"
|
||||
android:src="@drawable/icon_msg_box_operation"
|
||||
/>
|
||||
|
||||
@@ -34,8 +34,8 @@
|
||||
app:layout_constraintLeft_toRightOf="@id/ivOperationImageNormal"
|
||||
android:text="运营平台"
|
||||
android:textColor="#FFFFFFFF"
|
||||
android:textSize="32px"
|
||||
android:layout_marginStart="23px"
|
||||
android:textSize="32dp"
|
||||
android:layout_marginStart="23dp"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
@@ -45,13 +45,13 @@
|
||||
app:layout_constraintTop_toBottomOf="@id/tvOperationTitleNormal"
|
||||
app:layout_constraintLeft_toLeftOf="@id/tvOperationTitleNormal"
|
||||
app:layout_constraintRight_toRightOf="@id/tvOperationStatusSelect"
|
||||
android:layout_marginTop="10px"
|
||||
android:layout_marginTop="10dp"
|
||||
android:textColor="#B3FFFFFF"
|
||||
android:gravity="start"
|
||||
android:textSize="28px"
|
||||
android:textSize="28dp"
|
||||
android:maxLines="2"
|
||||
android:ellipsize="end"
|
||||
android:paddingBottom="15px"
|
||||
android:paddingBottom="15dp"
|
||||
android:lineSpacingMultiplier="1.2"
|
||||
/>
|
||||
|
||||
@@ -61,18 +61,18 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:text="折叠"
|
||||
android:textColor="#FFFFFFFF"
|
||||
android:textSize="24px"
|
||||
android:textSize="24dp"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
android:layout_marginTop="25px"
|
||||
android:layout_marginEnd="25px"
|
||||
android:layout_marginTop="25dp"
|
||||
android:layout_marginEnd="25dp"
|
||||
android:background="@drawable/bg_msg_status_select"
|
||||
android:drawableStart="@drawable/icon_msg_open"
|
||||
android:drawablePadding="10px"
|
||||
android:paddingStart="15px"
|
||||
android:paddingEnd="15px"
|
||||
android:paddingTop="5px"
|
||||
android:paddingBottom="5px"
|
||||
android:drawablePadding="10dp"
|
||||
android:paddingStart="15dp"
|
||||
android:paddingEnd="15dp"
|
||||
android:paddingTop="5dp"
|
||||
android:paddingBottom="5dp"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
@@ -82,19 +82,19 @@
|
||||
app:layout_constraintTop_toTopOf="@id/tvOperationStatusSelect"
|
||||
app:layout_constraintBottom_toBottomOf="@id/tvOperationStatusSelect"
|
||||
app:layout_constraintRight_toLeftOf="@id/tvOperationStatusSelect"
|
||||
android:layout_marginEnd="20px"
|
||||
android:layout_marginEnd="20dp"
|
||||
android:textColor="#80FFFFFF"
|
||||
android:textSize="24px"
|
||||
android:textSize="24dp"
|
||||
/>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/ivOperationImageOpen"
|
||||
android:layout_width="44px"
|
||||
android:layout_height="44px"
|
||||
android:layout_width="44dp"
|
||||
android:layout_height="44dp"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
android:layout_marginTop="25px"
|
||||
android:layout_marginStart="25px"
|
||||
android:layout_marginTop="25dp"
|
||||
android:layout_marginStart="25dp"
|
||||
android:src="@drawable/icon_msg_box_operation"
|
||||
android:visibility="gone"
|
||||
/>
|
||||
@@ -108,8 +108,8 @@
|
||||
app:layout_constraintLeft_toRightOf="@id/ivOperationImageOpen"
|
||||
android:text="运营平台"
|
||||
android:textColor="#FFFFFFFF"
|
||||
android:textSize="32px"
|
||||
android:layout_marginStart="10px"
|
||||
android:textSize="32dp"
|
||||
android:layout_marginStart="10dp"
|
||||
android:visibility="gone"
|
||||
/>
|
||||
|
||||
@@ -122,11 +122,11 @@
|
||||
app:layout_constraintLeft_toLeftOf="@id/ivOperationImageOpen"
|
||||
app:layout_constraintRight_toRightOf="@id/tvOperationStatusSelect"
|
||||
android:gravity="start"
|
||||
android:layout_marginTop="10px"
|
||||
android:layout_marginBottom="15px"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_marginBottom="15dp"
|
||||
android:lineSpacingMultiplier="1.2"
|
||||
android:textColor="#B3FFFFFF"
|
||||
android:textSize="28px"
|
||||
android:textSize="28dp"
|
||||
android:visibility="gone"
|
||||
/>
|
||||
|
||||
|
||||
@@ -0,0 +1,64 @@
|
||||
<?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="804dp"
|
||||
android:layout_height="160dp"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:background="#53000000"
|
||||
app:roundLayoutRadius="24dp"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginStart="30dp"
|
||||
android:layout_marginEnd="30dp"
|
||||
android:layout_marginTop="7dp"
|
||||
android:layout_marginBottom="7dp"
|
||||
>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/ivSummaryImage"
|
||||
android:layout_width="140dp"
|
||||
android:layout_height="130dp"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
android:layout_marginStart="15dp"
|
||||
android:src="@drawable/icon_notice_default"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvSummaryTitle"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="蘑菇小助手"
|
||||
android:textColor="#FFFFFFFF"
|
||||
android:textSize="32dp"
|
||||
app:layout_constraintLeft_toRightOf="@id/ivSummaryImage"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toTopOf="@id/tvSummaryContent"
|
||||
android:layout_marginStart="15dp"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvSummaryContent"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintLeft_toLeftOf="@id/tvSummaryTitle"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/tvSummaryTitle"
|
||||
app:layout_constraintRight_toRightOf="@id/tvSummaryTime"
|
||||
android:gravity="start"
|
||||
android:textColor="#B3FFFFFF"
|
||||
android:textSize="28dp"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvSummaryTime"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintTop_toTopOf="@id/tvSummaryTitle"
|
||||
app:layout_constraintBottom_toBottomOf="@id/tvSummaryTitle"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
android:layout_marginEnd="25dp"
|
||||
android:textColor="#80FFFFFF"
|
||||
android:textSize="24dp"
|
||||
/>
|
||||
|
||||
</com.mogo.eagle.core.widget.RoundConstraintLayout>
|
||||
@@ -1,24 +1,24 @@
|
||||
<?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="804px"
|
||||
android:layout_height="160px"
|
||||
android:layout_width="804dp"
|
||||
android:layout_height="160dp"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:background="#53000000"
|
||||
app:roundLayoutRadius="24px"
|
||||
app:roundLayoutRadius="24dp"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginStart="30px"
|
||||
android:layout_marginEnd="30px"
|
||||
android:layout_marginTop="7px"
|
||||
android:layout_marginBottom="7px">
|
||||
android:layout_marginStart="30dp"
|
||||
android:layout_marginEnd="30dp"
|
||||
android:layout_marginTop="7dp"
|
||||
android:layout_marginBottom="7dp">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/ivV2XImage"
|
||||
android:layout_width="110px"
|
||||
android:layout_height="110px"
|
||||
android:layout_width="110dp"
|
||||
android:layout_height="110dp"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
android:layout_margin="25px"/>
|
||||
android:layout_margin="25dp"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvV2XTime"
|
||||
@@ -26,9 +26,9 @@
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintTop_toTopOf="@id/ivV2XImage"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
android:layout_marginEnd="25px"
|
||||
android:layout_marginEnd="25dp"
|
||||
android:textColor="#80FFFFFF"
|
||||
android:textSize="24px"
|
||||
android:textSize="24dp"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
@@ -39,9 +39,9 @@
|
||||
app:layout_constraintRight_toRightOf="@id/tvV2XTime"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
android:layout_marginStart="25px"
|
||||
android:layout_marginStart="25dp"
|
||||
android:textColor="#FFFFFFFF"
|
||||
android:textSize="32px"
|
||||
android:textSize="32dp"
|
||||
android:maxLines="1"
|
||||
android:ellipsize="end"
|
||||
/>
|
||||
|
||||
@@ -1,24 +1,23 @@
|
||||
<?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="804px"
|
||||
android:layout_height="160px"
|
||||
android:layout_width="804dp"
|
||||
android:layout_height="160dp"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:background="#53000000"
|
||||
app:roundLayoutRadius="24px"
|
||||
app:roundLayoutRadius="24dp"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginTop="7px"
|
||||
android:layout_marginBottom="7px"
|
||||
android:clickable="true"
|
||||
android:layout_marginTop="7dp"
|
||||
android:layout_marginBottom="7dp"
|
||||
>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/ivNoticeImage"
|
||||
android:layout_width="140px"
|
||||
android:layout_height="130px"
|
||||
android:layout_width="140dp"
|
||||
android:layout_height="130dp"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
android:layout_marginStart="15px"
|
||||
android:layout_marginStart="15dp"
|
||||
android:src="@drawable/icon_notice_default"
|
||||
/>
|
||||
|
||||
@@ -28,10 +27,10 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:text="官方公告"
|
||||
android:textColor="#FFFFFFFF"
|
||||
android:textSize="32px"
|
||||
android:textSize="32dp"
|
||||
app:layout_constraintTop_toTopOf="@id/ivNoticeImage"
|
||||
app:layout_constraintLeft_toRightOf="@id/ivNoticeImage"
|
||||
android:layout_marginStart="15px"
|
||||
android:layout_marginStart="15dp"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
@@ -41,9 +40,9 @@
|
||||
app:layout_constraintTop_toTopOf="@id/tvNoticeTitle"
|
||||
app:layout_constraintBottom_toBottomOf="@id/tvNoticeTitle"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
android:layout_marginEnd="25px"
|
||||
android:layout_marginEnd="25dp"
|
||||
android:textColor="#80FFFFFF"
|
||||
android:textSize="24px"
|
||||
android:textSize="24dp"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
@@ -52,11 +51,11 @@
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
android:layout_marginEnd="25px"
|
||||
android:layout_marginBottom="20px"
|
||||
android:layout_marginEnd="25dp"
|
||||
android:layout_marginBottom="20dp"
|
||||
android:text="查看"
|
||||
android:textColor="#FFFFFFFF"
|
||||
android:textSize="30px"
|
||||
android:textSize="30dp"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
@@ -71,7 +70,7 @@
|
||||
android:maxLines="1"
|
||||
android:ellipsize="end"
|
||||
android:textColor="#B3FFFFFF"
|
||||
android:textSize="28px"
|
||||
android:textSize="28dp"
|
||||
/>
|
||||
|
||||
</com.mogo.eagle.core.widget.RoundConstraintLayout>
|
||||
@@ -1,22 +1,24 @@
|
||||
<?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="804px"
|
||||
android:layout_height="160px"
|
||||
<com.mogo.eagle.core.widget.RoundCanClickConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/clBubbleOperationLayout"
|
||||
android:layout_width="804dp"
|
||||
android:layout_height="160dp"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:background="#53000000"
|
||||
app:roundLayoutRadius="24px"
|
||||
app:roundLayoutRadius="24dp"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginTop="7px"
|
||||
android:layout_marginBottom="7px">
|
||||
android:layout_marginTop="7dp"
|
||||
android:layout_marginBottom="7dp"
|
||||
>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/ivBubbleOperationImage"
|
||||
android:layout_width="110px"
|
||||
android:layout_height="110px"
|
||||
android:layout_width="110dp"
|
||||
android:layout_height="110dp"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
android:layout_marginStart="25px"
|
||||
android:layout_marginStart="25dp"
|
||||
android:src="@drawable/icon_msg_box_operation"
|
||||
/>
|
||||
|
||||
@@ -27,9 +29,9 @@
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toTopOf="@id/tvBubbleOperationContent"
|
||||
app:layout_constraintLeft_toRightOf="@id/ivBubbleOperationImage"
|
||||
android:layout_marginStart="25px"
|
||||
android:layout_marginStart="25dp"
|
||||
android:textColor="#FFFFFFFF"
|
||||
android:textSize="32px"
|
||||
android:textSize="32dp"
|
||||
android:text="运营平台"
|
||||
/>
|
||||
|
||||
@@ -40,9 +42,9 @@
|
||||
app:layout_constraintTop_toTopOf="@id/tvBubbleOperationTitle"
|
||||
app:layout_constraintBottom_toBottomOf="@id/tvBubbleOperationTitle"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
android:layout_marginEnd="25px"
|
||||
android:layout_marginEnd="25dp"
|
||||
android:textColor="#80FFFFFF"
|
||||
android:textSize="24px"
|
||||
android:textSize="24dp"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
@@ -57,8 +59,8 @@
|
||||
android:maxLines="2"
|
||||
android:ellipsize="end"
|
||||
android:textColor="#B3FFFFFF"
|
||||
android:textSize="28px"
|
||||
android:textSize="28dp"
|
||||
android:lineSpacingMultiplier="1.2"
|
||||
/>
|
||||
|
||||
</com.mogo.eagle.core.widget.RoundConstraintLayout>
|
||||
</com.mogo.eagle.core.widget.RoundCanClickConstraintLayout>
|
||||
@@ -1,23 +1,24 @@
|
||||
<?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="804px"
|
||||
android:layout_height="160px"
|
||||
<com.mogo.eagle.core.widget.RoundCanClickConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/clReportLayout"
|
||||
android:layout_width="804dp"
|
||||
android:layout_height="160dp"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:background="#53000000"
|
||||
app:roundLayoutRadius="24px"
|
||||
app:roundLayoutRadius="24dp"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginTop="7px"
|
||||
android:layout_marginBottom="7px"
|
||||
android:layout_marginTop="7dp"
|
||||
android:layout_marginBottom="7dp"
|
||||
>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/ivBubbleReportImage"
|
||||
android:layout_width="110px"
|
||||
android:layout_height="110px"
|
||||
android:layout_width="110dp"
|
||||
android:layout_height="110dp"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
android:layout_marginStart="25px"
|
||||
android:layout_marginStart="25dp"
|
||||
android:src="@drawable/icon_report_error_normal"
|
||||
/>
|
||||
|
||||
@@ -27,10 +28,10 @@
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintLeft_toRightOf="@id/ivBubbleReportImage"
|
||||
android:layout_marginTop="15px"
|
||||
android:layout_marginStart="25px"
|
||||
android:layout_marginTop="15dp"
|
||||
android:layout_marginStart="25dp"
|
||||
android:textColor="#FFFFFFFF"
|
||||
android:textSize="32px"
|
||||
android:textSize="32dp"
|
||||
android:text="Error"
|
||||
/>
|
||||
|
||||
@@ -40,9 +41,9 @@
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintTop_toBottomOf="@id/tvBubbleReportTitle"
|
||||
app:layout_constraintLeft_toLeftOf="@id/tvBubbleReportTitle"
|
||||
android:layout_marginTop="5px"
|
||||
android:layout_marginTop="5dp"
|
||||
android:textColor="#B3FFFFFF"
|
||||
android:textSize="28px"
|
||||
android:textSize="28dp"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
@@ -52,9 +53,9 @@
|
||||
app:layout_constraintTop_toBottomOf="@id/tvBubbleReportTime"
|
||||
app:layout_constraintLeft_toLeftOf="@id/tvBubbleReportTime"
|
||||
app:layout_constraintRight_toRightOf="@id/tvBubbleReceiveTime"
|
||||
android:layout_marginTop="6px"
|
||||
android:layout_marginTop="6dp"
|
||||
android:textColor="#B3FFFFFF"
|
||||
android:textSize="28px"
|
||||
android:textSize="28dp"
|
||||
android:maxLines="1"
|
||||
android:ellipsize="end"
|
||||
android:gravity="start"
|
||||
@@ -67,9 +68,9 @@
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@id/tvBubbleReportTitle"
|
||||
app:layout_constraintBottom_toBottomOf="@id/tvBubbleReportTitle"
|
||||
android:layout_marginEnd="25px"
|
||||
android:layout_marginEnd="25dp"
|
||||
android:textColor="#80FFFFFF"
|
||||
android:textSize="24px"
|
||||
android:textSize="24dp"
|
||||
/>
|
||||
|
||||
</com.mogo.eagle.core.widget.RoundConstraintLayout>
|
||||
</com.mogo.eagle.core.widget.RoundCanClickConstraintLayout>
|
||||
@@ -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="804dp"
|
||||
android:layout_height="160dp"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:background="#53000000"
|
||||
app:roundLayoutRadius="24dp"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginTop="7dp"
|
||||
android:layout_marginBottom="7dp"
|
||||
>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/ivSummaryImage"
|
||||
android:layout_width="140dp"
|
||||
android:layout_height="130dp"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
android:layout_marginStart="15dp"
|
||||
android:src="@drawable/icon_notice_default"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvSummaryTitle"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="蘑菇小助手"
|
||||
android:textColor="#FFFFFFFF"
|
||||
android:textSize="32dp"
|
||||
app:layout_constraintLeft_toRightOf="@id/ivSummaryImage"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toTopOf="@id/tvSummaryContent"
|
||||
android:layout_marginStart="15dp"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvSummaryContent"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintLeft_toLeftOf="@id/tvSummaryTitle"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/tvSummaryTitle"
|
||||
app:layout_constraintRight_toRightOf="@id/tvSummaryTime"
|
||||
android:gravity="start"
|
||||
android:textColor="#B3FFFFFF"
|
||||
android:textSize="28dp"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvSummaryTime"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintTop_toTopOf="@id/tvSummaryTitle"
|
||||
app:layout_constraintBottom_toBottomOf="@id/tvSummaryTitle"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
android:layout_marginEnd="25dp"
|
||||
android:textColor="#80FFFFFF"
|
||||
android:textSize="24dp"
|
||||
/>
|
||||
|
||||
</com.mogo.eagle.core.widget.RoundConstraintLayout>
|
||||
@@ -1,22 +1,23 @@
|
||||
<?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="804px"
|
||||
android:layout_height="160px"
|
||||
<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_height="160dp"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:background="#53000000"
|
||||
app:roundLayoutRadius="24px"
|
||||
app:roundLayoutRadius="24dp"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginTop="7px"
|
||||
android:layout_marginBottom="7px">
|
||||
android:layout_marginTop="7dp"
|
||||
android:layout_marginBottom="7dp">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/ivV2XImage"
|
||||
android:layout_width="110px"
|
||||
android:layout_height="110px"
|
||||
android:layout_width="110dp"
|
||||
android:layout_height="110dp"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
android:layout_margin="25px"/>
|
||||
android:layout_margin="25dp"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvV2XTime"
|
||||
@@ -24,9 +25,9 @@
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintTop_toTopOf="@id/ivV2XImage"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
android:layout_marginEnd="25px"
|
||||
android:layout_marginEnd="25dp"
|
||||
android:textColor="#80FFFFFF"
|
||||
android:textSize="24px"
|
||||
android:textSize="24dp"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
@@ -37,11 +38,11 @@
|
||||
app:layout_constraintRight_toRightOf="@id/tvV2XTime"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
android:layout_marginStart="25px"
|
||||
android:layout_marginStart="25dp"
|
||||
android:textColor="#FFFFFFFF"
|
||||
android:textSize="32px"
|
||||
android:textSize="32dp"
|
||||
android:maxLines="1"
|
||||
android:ellipsize="end"
|
||||
/>
|
||||
|
||||
</com.mogo.eagle.core.widget.RoundConstraintLayout>
|
||||
</com.mogo.eagle.core.widget.RoundCanClickConstraintLayout>
|
||||
@@ -1,18 +1,18 @@
|
||||
<?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="650px"
|
||||
android:layout_height="160px"
|
||||
android:layout_width="650dp"
|
||||
android:layout_height="160dp"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:background="#465878"
|
||||
app:roundLayoutRadius="24px"
|
||||
android:layout_marginTop="16px"
|
||||
android:layout_marginBottom="16px"
|
||||
app:roundLayoutRadius="24dp"
|
||||
android:layout_marginTop="16dp"
|
||||
android:layout_marginBottom="16dp"
|
||||
>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/ivPassengerNoticeImage"
|
||||
android:layout_width="160px"
|
||||
android:layout_height="160px"
|
||||
android:layout_width="160dp"
|
||||
android:layout_height="160dp"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
@@ -25,20 +25,20 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:text="官方公告"
|
||||
android:textColor="#FFFFFFFF"
|
||||
android:textSize="36px"
|
||||
android:layout_marginStart="20px"
|
||||
android:textSize="36dp"
|
||||
android:layout_marginStart="20dp"
|
||||
app:layout_constraintLeft_toRightOf="@id/ivPassengerNoticeImage"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toTopOf="@id/tvPassengerNoticeContent"
|
||||
/>
|
||||
|
||||
<ImageView
|
||||
android:layout_width="25px"
|
||||
android:layout_height="23px"
|
||||
android:layout_width="25dp"
|
||||
android:layout_height="23dp"
|
||||
app:layout_constraintTop_toTopOf="@id/tvPassengerNoticeTitle"
|
||||
app:layout_constraintBottom_toBottomOf="@id/tvPassengerNoticeTitle"
|
||||
app:layout_constraintLeft_toRightOf="@id/tvPassengerNoticeTitle"
|
||||
android:layout_marginStart="10px"
|
||||
android:layout_marginStart="10dp"
|
||||
android:src="@drawable/icon_msg_box_video"
|
||||
/>
|
||||
|
||||
@@ -47,7 +47,7 @@
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="#FFFFFFFF"
|
||||
android:textSize="28px"
|
||||
android:textSize="28dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="@id/tvPassengerNoticeTitle"
|
||||
app:layout_constraintTop_toBottomOf="@id/tvPassengerNoticeTitle"
|
||||
@@ -59,11 +59,11 @@
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvPassengerNoticeCheck"
|
||||
android:layout_width="140px"
|
||||
android:layout_height="160px"
|
||||
android:layout_width="140dp"
|
||||
android:layout_height="160dp"
|
||||
android:text="查 看"
|
||||
android:textColor="#FF84D4FF"
|
||||
android:textSize="28px"
|
||||
android:textSize="28dp"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
@@ -71,8 +71,8 @@
|
||||
/>
|
||||
|
||||
<View
|
||||
android:layout_width="1px"
|
||||
android:layout_height="80px"
|
||||
android:layout_width="1dp"
|
||||
android:layout_height="80dp"
|
||||
android:background="#5E70A6"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
@@ -84,11 +84,11 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="#FFFFFFFF"
|
||||
android:textSize="26px"
|
||||
android:textSize="26dp"
|
||||
app:layout_constraintTop_toTopOf="@id/tvPassengerNoticeTitle"
|
||||
app:layout_constraintBottom_toBottomOf="@id/tvPassengerNoticeTitle"
|
||||
app:layout_constraintRight_toLeftOf="@id/tvPassengerNoticeCheck"
|
||||
android:layout_marginEnd="20px"
|
||||
android:layout_marginEnd="20dp"
|
||||
/>
|
||||
|
||||
</com.mogo.eagle.core.widget.RoundConstraintLayout>
|
||||
@@ -0,0 +1,83 @@
|
||||
<?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="650dp"
|
||||
android:layout_height="160dp"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:background="#465878"
|
||||
app:roundLayoutRadius="24dp"
|
||||
android:layout_marginTop="16dp"
|
||||
android:layout_marginBottom="16dp"
|
||||
>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/ivPassengerSummaryImage"
|
||||
android:layout_width="160dp"
|
||||
android:layout_height="160dp"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
android:src="@drawable/icon_passenger_operation"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvPassengerSummaryTitle"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="蘑菇小助手"
|
||||
android:textColor="#FFFFFFFF"
|
||||
android:textSize="36dp"
|
||||
android:layout_marginStart="20dp"
|
||||
app:layout_constraintLeft_toRightOf="@id/ivPassengerSummaryImage"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toTopOf="@id/tvPassengerSummaryContent"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvPassengerSummaryContent"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="#FFFFFFFF"
|
||||
android:textSize="28dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="@id/tvPassengerSummaryTitle"
|
||||
app:layout_constraintTop_toBottomOf="@id/tvPassengerSummaryTitle"
|
||||
app:layout_constraintRight_toRightOf="@id/tvPassengerSummaryTime"
|
||||
android:gravity="start"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvPassengerSummaryCheck"
|
||||
android:layout_width="140dp"
|
||||
android:layout_height="160dp"
|
||||
android:text="查 看"
|
||||
android:textColor="#FF84D4FF"
|
||||
android:textSize="28dp"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
android:gravity="center"
|
||||
/>
|
||||
|
||||
<View
|
||||
android:layout_width="1dp"
|
||||
android:layout_height="80dp"
|
||||
android:background="#5E70A6"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintRight_toLeftOf="@id/tvPassengerSummaryCheck"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvPassengerSummaryTime"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="#FFFFFFFF"
|
||||
android:textSize="26dp"
|
||||
app:layout_constraintTop_toTopOf="@id/tvPassengerSummaryTitle"
|
||||
app:layout_constraintBottom_toBottomOf="@id/tvPassengerSummaryTitle"
|
||||
app:layout_constraintRight_toLeftOf="@id/tvPassengerSummaryCheck"
|
||||
android:layout_marginEnd="20dp"
|
||||
/>
|
||||
|
||||
|
||||
</com.mogo.eagle.core.widget.RoundConstraintLayout>
|
||||
@@ -1,21 +1,22 @@
|
||||
<?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="650px"
|
||||
android:layout_height="160px"
|
||||
<com.mogo.eagle.core.widget.RoundCanClickConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/clPassengerVeXLayout"
|
||||
android:layout_width="650dp"
|
||||
android:layout_height="160dp"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:background="#465878"
|
||||
app:roundLayoutRadius="24px"
|
||||
android:layout_marginTop="16px"
|
||||
android:layout_marginBottom="16px">
|
||||
app:roundLayoutRadius="24dp"
|
||||
android:layout_marginTop="16dp"
|
||||
android:layout_marginBottom="16dp">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/ivPassengerV2XImage"
|
||||
android:layout_width="120px"
|
||||
android:layout_height="120px"
|
||||
android:layout_width="120dp"
|
||||
android:layout_height="120dp"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
android:layout_marginStart="20px"
|
||||
android:layout_marginStart="20dp"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
@@ -26,8 +27,8 @@
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
android:textColor="#FFFFFFFF"
|
||||
android:textSize="26px"
|
||||
android:layout_marginEnd="20px"
|
||||
android:textSize="26dp"
|
||||
android:layout_marginEnd="20dp"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
@@ -42,9 +43,9 @@
|
||||
android:maxLines="1"
|
||||
android:ellipsize="end"
|
||||
android:textColor="#FFFFFFFF"
|
||||
android:textSize="36px"
|
||||
android:layout_marginStart="25px"
|
||||
android:layout_marginEnd="25px"
|
||||
android:textSize="36dp"
|
||||
android:layout_marginStart="25dp"
|
||||
android:layout_marginEnd="25dp"
|
||||
/>
|
||||
|
||||
</com.mogo.eagle.core.widget.RoundConstraintLayout>
|
||||
</com.mogo.eagle.core.widget.RoundCanClickConstraintLayout>
|
||||
@@ -1,13 +1,13 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="150px"
|
||||
android:layout_height="150dp"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/ivPassengerNoticeImage"
|
||||
android:layout_width="96px"
|
||||
android:layout_height="96px"
|
||||
android:layout_width="96dp"
|
||||
android:layout_height="96dp"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
@@ -20,8 +20,8 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:text="官方公告"
|
||||
android:textColor="#FFFFFFFF"
|
||||
android:textSize="36px"
|
||||
android:layout_marginStart="20px"
|
||||
android:textSize="36dp"
|
||||
android:layout_marginStart="20dp"
|
||||
app:layout_constraintLeft_toRightOf="@id/ivPassengerNoticeImage"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toTopOf="@id/tvPassengerNoticeContent"
|
||||
@@ -32,7 +32,7 @@
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="#FFFFFFFF"
|
||||
android:textSize="28px"
|
||||
android:textSize="28dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="@id/tvPassengerNoticeTitle"
|
||||
app:layout_constraintTop_toBottomOf="@id/tvPassengerNoticeTitle"
|
||||
@@ -44,11 +44,11 @@
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvPassengerNoticeCheck"
|
||||
android:layout_width="140px"
|
||||
android:layout_height="150px"
|
||||
android:layout_width="140dp"
|
||||
android:layout_height="150dp"
|
||||
android:text="查 看"
|
||||
android:textColor="#FF84D4FF"
|
||||
android:textSize="28px"
|
||||
android:textSize="28dp"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
@@ -56,8 +56,8 @@
|
||||
/>
|
||||
|
||||
<View
|
||||
android:layout_width="1px"
|
||||
android:layout_height="80px"
|
||||
android:layout_width="1dp"
|
||||
android:layout_height="80dp"
|
||||
android:background="#5E70A6"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
@@ -69,11 +69,11 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="#FFFFFFFF"
|
||||
android:textSize="26px"
|
||||
android:textSize="26dp"
|
||||
app:layout_constraintTop_toTopOf="@id/tvPassengerNoticeTitle"
|
||||
app:layout_constraintBottom_toBottomOf="@id/tvPassengerNoticeTitle"
|
||||
app:layout_constraintRight_toLeftOf="@id/tvPassengerNoticeCheck"
|
||||
android:layout_marginEnd="20px"
|
||||
android:layout_marginEnd="20dp"
|
||||
/>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
@@ -0,0 +1,78 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="150dp"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/ivPassengerSummaryImage"
|
||||
android:layout_width="96dp"
|
||||
android:layout_height="96dp"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
android:src="@drawable/icon_passenger_operation"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvPassengerSummaryTitle"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="蘑菇小助手"
|
||||
android:textColor="#FFFFFFFF"
|
||||
android:textSize="36dp"
|
||||
android:layout_marginStart="20dp"
|
||||
app:layout_constraintLeft_toRightOf="@id/ivPassengerSummaryImage"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toTopOf="@id/tvPassengerSummaryContent"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvPassengerSummaryContent"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="#FFFFFFFF"
|
||||
android:textSize="28dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/tvPassengerSummaryTitle"
|
||||
app:layout_constraintLeft_toLeftOf="@id/tvPassengerSummaryTitle"
|
||||
app:layout_constraintRight_toRightOf="@id/tvPassengerSummaryTime"
|
||||
android:gravity="start"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvPassengerSummaryCheck"
|
||||
android:layout_width="140dp"
|
||||
android:layout_height="150dp"
|
||||
android:text="查 看"
|
||||
android:textColor="#FF84D4FF"
|
||||
android:textSize="28dp"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
android:gravity="center"
|
||||
/>
|
||||
|
||||
<View
|
||||
android:layout_width="1dp"
|
||||
android:layout_height="80dp"
|
||||
android:background="#5E70A6"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintRight_toLeftOf="@id/tvPassengerSummaryCheck"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvPassengerSummaryTime"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="#FFFFFFFF"
|
||||
android:textSize="26dp"
|
||||
app:layout_constraintTop_toTopOf="@id/tvPassengerSummaryTitle"
|
||||
app:layout_constraintBottom_toBottomOf="@id/tvPassengerSummaryTitle"
|
||||
app:layout_constraintRight_toLeftOf="@id/tvPassengerSummaryCheck"
|
||||
android:layout_marginEnd="20dp"
|
||||
/>
|
||||
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
@@ -1,13 +1,13 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="150px"
|
||||
android:layout_height="150dp"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/ivPassengerV2XImage"
|
||||
android:layout_width="96px"
|
||||
android:layout_height="96px"
|
||||
android:layout_width="96dp"
|
||||
android:layout_height="96dp"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
@@ -21,7 +21,7 @@
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
android:textColor="#99FFFFFF"
|
||||
android:textSize="26px"
|
||||
android:textSize="26dp"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
@@ -36,9 +36,9 @@
|
||||
android:maxLines="1"
|
||||
android:ellipsize="end"
|
||||
android:textColor="#FFFFFFFF"
|
||||
android:textSize="36px"
|
||||
android:layout_marginStart="25px"
|
||||
android:layout_marginEnd="25px"
|
||||
android:textSize="36dp"
|
||||
android:layout_marginStart="25dp"
|
||||
android:layout_marginEnd="25dp"
|
||||
/>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="864px"
|
||||
android:layout_width="864dp"
|
||||
android:layout_height="wrap_content"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:background="@drawable/bg_msg_box_bubble"
|
||||
|
||||
@@ -1,18 +1,18 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="864px"
|
||||
android:layout_height="746px"
|
||||
android:layout_width="864dp"
|
||||
android:layout_height="746dp"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:background="@drawable/bg_msg_box"
|
||||
>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvMsgNotice"
|
||||
android:layout_width="288px"
|
||||
android:layout_height="90px"
|
||||
android:layout_width="288dp"
|
||||
android:layout_height="90dp"
|
||||
android:text="通知"
|
||||
android:textColor="@color/msg_box_title_color"
|
||||
android:textSize="38px"
|
||||
android:textSize="38dp"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
android:gravity="center"
|
||||
@@ -20,8 +20,8 @@
|
||||
|
||||
<View
|
||||
android:id="@+id/viewNoticeDivider"
|
||||
android:layout_width="62.7px"
|
||||
android:layout_height="5px"
|
||||
android:layout_width="62.7dp"
|
||||
android:layout_height="5dp"
|
||||
android:background="@drawable/bg_msg_box_divider"
|
||||
app:layout_constraintLeft_toLeftOf="@id/tvMsgNotice"
|
||||
app:layout_constraintRight_toRightOf="@id/tvMsgNotice"
|
||||
@@ -30,11 +30,11 @@
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvMsgIpcReport"
|
||||
android:layout_width="288px"
|
||||
android:layout_height="90px"
|
||||
android:layout_width="288dp"
|
||||
android:layout_height="90dp"
|
||||
android:text="车辆系统信息"
|
||||
android:textColor="#FFFFFFFF"
|
||||
android:textSize="38px"
|
||||
android:textSize="38dp"
|
||||
android:gravity="center"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintLeft_toRightOf="@id/tvMsgNotice"
|
||||
@@ -43,8 +43,8 @@
|
||||
|
||||
<View
|
||||
android:id="@+id/viewIpcReportDivider"
|
||||
android:layout_width="62.7px"
|
||||
android:layout_height="5px"
|
||||
android:layout_width="62.7dp"
|
||||
android:layout_height="5dp"
|
||||
android:background="@drawable/bg_msg_box_divider"
|
||||
app:layout_constraintLeft_toLeftOf="@id/tvMsgIpcReport"
|
||||
app:layout_constraintRight_toRightOf="@id/tvMsgIpcReport"
|
||||
@@ -54,11 +54,11 @@
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvMsgBadCase"
|
||||
android:layout_width="288px"
|
||||
android:layout_height="90px"
|
||||
android:layout_width="288dp"
|
||||
android:layout_height="90dp"
|
||||
android:text="录包"
|
||||
android:textColor="#FFFFFFFF"
|
||||
android:textSize="38px"
|
||||
android:textSize="38dp"
|
||||
android:gravity="center"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
@@ -66,8 +66,8 @@
|
||||
|
||||
<View
|
||||
android:id="@+id/viewBadCaseDivider"
|
||||
android:layout_width="62.7px"
|
||||
android:layout_height="5px"
|
||||
android:layout_width="62.7dp"
|
||||
android:layout_height="5dp"
|
||||
android:background="@drawable/bg_msg_box_divider"
|
||||
app:layout_constraintLeft_toLeftOf="@id/tvMsgBadCase"
|
||||
app:layout_constraintRight_toRightOf="@id/tvMsgBadCase"
|
||||
@@ -81,7 +81,7 @@
|
||||
android:layout_height="0dp"
|
||||
app:layout_constraintTop_toBottomOf="@id/tvMsgIpcReport"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
android:layout_marginTop="20px"
|
||||
android:layout_marginTop="20dp"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
/>
|
||||
|
||||
@@ -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/rvPassengerBubbleList"
|
||||
android:layout_width="650px"
|
||||
android:layout_width="650dp"
|
||||
android:layout_height="wrap_content"
|
||||
>
|
||||
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<com.mogo.eagle.core.widget.RoundConstraintLayout
|
||||
android:layout_width="650px"
|
||||
android:layout_height="750px"
|
||||
android:layout_width="650dp"
|
||||
android:layout_height="750dp"
|
||||
android:background="@drawable/bg_msg_box_list_p"
|
||||
app:roundLayoutRadius="40px"
|
||||
app:roundLayoutRadius="40dp"
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_marginBottom="16px">
|
||||
android:layout_marginBottom="16dp">
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/rvPassengerList"
|
||||
@@ -15,8 +15,8 @@
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
android:layout_marginStart="30px"
|
||||
android:layout_marginEnd="30px"
|
||||
android:layout_marginStart="30dp"
|
||||
android:layout_marginEnd="30dp"
|
||||
/>
|
||||
|
||||
</com.mogo.eagle.core.widget.RoundConstraintLayout>
|
||||
@@ -1274,54 +1274,6 @@
|
||||
app:layout_constraintLeft_toRightOf="@+id/tbChangeCurrentCarIcon"
|
||||
app:layout_constraintTop_toTopOf="@id/tbChangeCurrentCarIcon" />
|
||||
|
||||
<ToggleButton
|
||||
android:id="@+id/tbSpeedView"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_columnWeight="1"
|
||||
android:layout_margin="2dp"
|
||||
android:gravity="center"
|
||||
android:padding="@dimen/dp_20"
|
||||
android:textOff="隐藏「脉速表」"
|
||||
android:textOn="显示「脉速表」"
|
||||
android:textSize="@dimen/dp_24" />
|
||||
|
||||
<ToggleButton
|
||||
android:id="@+id/tbAutopilotStatusView"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_columnWeight="1"
|
||||
android:layout_margin="2dp"
|
||||
android:gravity="center"
|
||||
android:padding="@dimen/dp_20"
|
||||
android:textOff="隐藏「自动驾驶控制按钮」"
|
||||
android:textOn="显示「自动驾驶控制按钮」"
|
||||
android:textSize="@dimen/dp_24" />
|
||||
|
||||
<ToggleButton
|
||||
android:id="@+id/tbPerspectiveSwitchView"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_columnWeight="1"
|
||||
android:layout_margin="2dp"
|
||||
android:gravity="center"
|
||||
android:padding="@dimen/dp_20"
|
||||
android:textOff="隐藏「视角切换按钮」"
|
||||
android:textOn="显示「视角切换按钮」"
|
||||
android:textSize="@dimen/dp_24" />
|
||||
|
||||
<ToggleButton
|
||||
android:id="@+id/tbCheckStatusView"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_columnWeight="1"
|
||||
android:layout_margin="2dp"
|
||||
android:gravity="center"
|
||||
android:padding="@dimen/dp_20"
|
||||
android:textOff="隐藏「工具箱」"
|
||||
android:textOn="显示「工具箱」"
|
||||
android:textSize="@dimen/dp_24" />
|
||||
|
||||
<ToggleButton
|
||||
android:id="@+id/tbControlView"
|
||||
android:layout_width="wrap_content"
|
||||
@@ -1334,30 +1286,6 @@
|
||||
android:textOn="显示「小地图」"
|
||||
android:textSize="@dimen/dp_24" />
|
||||
|
||||
<ToggleButton
|
||||
android:id="@+id/tbOpenLight"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_columnWeight="1"
|
||||
android:layout_margin="2dp"
|
||||
android:gravity="center"
|
||||
android:padding="@dimen/dp_20"
|
||||
android:textOff="关闭「转向灯控制」"
|
||||
android:textOn="打开「转向灯控制」"
|
||||
android:textSize="@dimen/dp_24" />
|
||||
|
||||
<ToggleButton
|
||||
android:id="@+id/tbOpenBrakeLight"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_columnWeight="1"
|
||||
android:layout_margin="2dp"
|
||||
android:gravity="center"
|
||||
android:padding="@dimen/dp_20"
|
||||
android:textOff="关闭「刹车控制」"
|
||||
android:textOn="打开「刹车控制」"
|
||||
android:textSize="@dimen/dp_24" />
|
||||
|
||||
<ToggleButton
|
||||
android:id="@+id/tbOpenSnBinding"
|
||||
android:layout_width="wrap_content"
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="150dp"
|
||||
android:layout_height="150dp"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools">
|
||||
|
||||
<!--消息盒子司机端选择入口-->
|
||||
<CheckBox
|
||||
android:id="@+id/cbMsgBoxDriver"
|
||||
android:layout_width="150dp"
|
||||
android:layout_height="150dp"
|
||||
android:background="@drawable/selector_msg_box"
|
||||
android:button="@null"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
/>
|
||||
|
||||
<!--司机端消息提示-->
|
||||
<View
|
||||
android:id="@+id/msgBoxTipView"
|
||||
android:layout_width="8dp"
|
||||
android:layout_height="8dp"
|
||||
android:background="@drawable/version_upgrade_tips_background"
|
||||
android:translationZ="30dp"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintCircle="@id/cbMsgBoxDriver"
|
||||
app:layout_constraintCircleAngle="40"
|
||||
app:layout_constraintCircleRadius="32dp"
|
||||
tools:ignore="MissingConstraints" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
@@ -1,22 +1,36 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
android:layout_height="match_parent"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvLimitingVelocity"
|
||||
android:layout_width="120dp"
|
||||
android:layout_height="120dp"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
android:background="@drawable/bg_waring_limiting_velocity"
|
||||
android:elevation="@dimen/dp_10"
|
||||
android:gravity="center"
|
||||
android:text="60"
|
||||
android:textColor="#FFFFFF"
|
||||
android:textSize="@dimen/dp_60"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/ivCameraIcon"
|
||||
/>
|
||||
android:textSize="@dimen/dp_60"/>
|
||||
|
||||
</LinearLayout>
|
||||
<!--限速来源-->
|
||||
<TextView
|
||||
android:id="@+id/tvLimitingSource"
|
||||
android:layout_width="120dp"
|
||||
android:layout_height="35dp"
|
||||
android:layout_marginEnd="40dp"
|
||||
android:gravity="center"
|
||||
android:text=""
|
||||
android:textColor="@color/color_FFFFFF"
|
||||
android:textSize="@dimen/dp_30"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/tvLimitingVelocity"
|
||||
android:visibility="gone" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
@@ -0,0 +1,31 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="100dp"
|
||||
android:layout_height="100dp"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools">
|
||||
|
||||
<!--消息盒子乘客端选择入口-->
|
||||
<CheckBox
|
||||
android:id="@+id/cbMsgBoxPassenger"
|
||||
android:layout_width="100dp"
|
||||
android:layout_height="100dp"
|
||||
android:background="@drawable/selector_msg_box_p"
|
||||
android:button="@null"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent" />
|
||||
|
||||
<!--乘客端消息提示-->
|
||||
<View
|
||||
android:id="@+id/msgBoxPTipView"
|
||||
android:layout_width="15dp"
|
||||
android:layout_height="15dp"
|
||||
android:background="@drawable/version_upgrade_tips_background"
|
||||
android:translationZ="30dp"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintCircle="@id/cbMsgBoxPassenger"
|
||||
app:layout_constraintCircleAngle="40"
|
||||
app:layout_constraintCircleRadius="50dp"
|
||||
tools:ignore="MissingConstraints" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
@@ -1,63 +0,0 @@
|
||||
<?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"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:id="@+id/clTrafficLight"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/bg_waring_traffic_light_vr"
|
||||
android:paddingStart="10dp"
|
||||
android:paddingTop="10dp"
|
||||
android:paddingEnd="10dp"
|
||||
android:paddingBottom="10dp"
|
||||
tools:visibility="visible">
|
||||
|
||||
<CheckedTextView
|
||||
android:id="@+id/ctvRedTrafficLight"
|
||||
android:layout_width="110dp"
|
||||
android:layout_height="110dp"
|
||||
android:background="@drawable/icon_waring_traffic_light_red_vr"
|
||||
android:gravity="center"
|
||||
android:textAlignment="center"
|
||||
android:textColor="#FFFFFF"
|
||||
android:textSize="38dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:checked="true"
|
||||
tools:text="99" />
|
||||
|
||||
<CheckedTextView
|
||||
android:id="@+id/ctvYellowTrafficLight"
|
||||
android:layout_width="110dp"
|
||||
android:layout_height="110dp"
|
||||
android:layout_marginStart="90dp"
|
||||
android:background="@drawable/icon_waring_traffic_light_yellow_vr"
|
||||
android:gravity="center"
|
||||
android:singleLine="true"
|
||||
android:textAlignment="center"
|
||||
android:textColor="#FFFFFF"
|
||||
android:textSize="38dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="@+id/ctvRedTrafficLight"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:checked="true"
|
||||
tools:text="99" />
|
||||
|
||||
<CheckedTextView
|
||||
android:id="@+id/ctvGreenTrafficLight"
|
||||
android:layout_width="110dp"
|
||||
android:layout_height="110dp"
|
||||
android:layout_marginStart="90dp"
|
||||
android:background="@drawable/icon_waring_traffic_light_green_vr"
|
||||
android:gravity="center"
|
||||
android:textAlignment="center"
|
||||
android:textColor="#FFFFFF"
|
||||
android:textSize="38dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="@+id/ctvYellowTrafficLight"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:checked="true"
|
||||
tools:text="99" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
@@ -69,9 +69,4 @@
|
||||
<item name="android:borderlessButtonStyle">@android:color/transparent</item>
|
||||
</style>
|
||||
|
||||
<declare-styleable name="VipIdentificationView">
|
||||
<attr name="marginStart" format="dimension" />
|
||||
<attr name="marginTop" format="dimension" />
|
||||
</declare-styleable>
|
||||
|
||||
</resources>
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user