Merge branch 'dev_robotaxi-d_240912_6.7.0' of gitlab.zhidaoauto.com:SCA/L4HA/AndroidApp/MoGoEagleEye into dev_robotaxi-d_240912_6.7.0
@@ -1300,7 +1300,7 @@ class MoGoAdasListenerImpl : OnAdasListener {
|
||||
receivedAck.messageType == MessageType.TYPE_SEND_PLANNING_CMD ||//给Planning指令
|
||||
receivedAck.messageType == MessageType.TYPE_SEND_SET_PARAM_REQ_V2 //设置参数命令V2
|
||||
) {
|
||||
receiveReceivedAck(receivedAck)
|
||||
receiveReceivedAck(receivedAck.toString())
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1310,7 +1310,7 @@ class MoGoAdasListenerImpl : OnAdasListener {
|
||||
nodeAliasCode = AdasChain.CHAIN_CODE_ADAS_START_AUTOPILOT,
|
||||
paramIndexes = [0]
|
||||
)
|
||||
private fun receiveReceivedAck(receivedAck: ReceivedAck) {
|
||||
private fun receiveReceivedAck(receivedAck: String) {
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -9,6 +9,9 @@ import com.mogo.commons.debug.DebugConfig.getNetMode
|
||||
import com.mogo.commons.storage.SharedPrefsMgr
|
||||
import com.mogo.eagle.core.data.app.AppConfigInfo
|
||||
import com.mogo.eagle.core.data.config.FunctionBuildConfig
|
||||
import com.mogo.eagle.core.data.deva.chain.ChainConstant.Companion.CHAIN_CODE_ADAS_CONNECT_STATUS
|
||||
import com.mogo.eagle.core.data.deva.chain.ChainConstant.Companion.CHAIN_SOURCE_ADAS
|
||||
import com.mogo.eagle.core.data.deva.chain.ChainConstant.Companion.CHAIN_TYPE_SOCKET_AUTOPILOT
|
||||
import com.mogo.eagle.core.data.msgbox.AutopilotMsg
|
||||
import com.mogo.eagle.core.data.msgbox.MsgBoxBean
|
||||
import com.mogo.eagle.core.data.msgbox.MsgBoxType
|
||||
@@ -29,6 +32,7 @@ import com.mogo.eagle.core.utilcode.util.ToastUtils
|
||||
import com.zhidao.support.adas.high.AdasManager
|
||||
import com.zhidao.support.adas.high.OnAdasConnectStatusListener
|
||||
import com.zhidao.support.adas.high.bean.VersionCompatibility
|
||||
import com.zhidao.support.adas.high.chain.AdasChain
|
||||
import com.zhidao.support.adas.high.common.Constants.ENVIRONMENT.DEMO
|
||||
import com.zhidao.support.adas.high.common.Constants.ENVIRONMENT.DEVELOP
|
||||
import com.zhidao.support.adas.high.common.Constants.ENVIRONMENT.PRODUCTION
|
||||
@@ -36,6 +40,7 @@ import com.zhidao.support.adas.high.common.Constants.ENVIRONMENT.TEST
|
||||
import com.zhidao.support.adas.high.common.Constants.TERMINAL_ROLE.DRIVER
|
||||
import com.zhidao.support.adas.high.common.Constants.TERMINAL_ROLE.PASSENGER
|
||||
import com.zhjt.mogo.adas.data.AdasConstants
|
||||
import com.zhjt.service.chain.ChainLog
|
||||
import mogo.telematics.pad.MessagePad
|
||||
import java.util.concurrent.atomic.AtomicBoolean
|
||||
|
||||
@@ -237,7 +242,7 @@ class MoGoAdasMsgConnectStatusListenerImpl :
|
||||
CallerAutoPilotStatusListenerManager.getAutoPilotStatusInfo().connectStatusReason = reason
|
||||
CallerAutoPilotStatusListenerManager.invokeAutoPilotStatus()
|
||||
CallerAutoPilotStatusListenerManager.invokeAutoPilotIPCStatusChanged(status, reason)
|
||||
saveIntoMsgBox(status, reason)
|
||||
saveIntoMsgBox(status, connectStatusDescribe)
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -289,9 +294,15 @@ class MoGoAdasMsgConnectStatusListenerImpl :
|
||||
CallerAutopilotCarConfigListenerManager.invokeAutopilotCertFileResult(certificationResult)
|
||||
}
|
||||
|
||||
@ChainLog(
|
||||
linkChainLog = CHAIN_TYPE_SOCKET_AUTOPILOT,
|
||||
linkCode = CHAIN_SOURCE_ADAS,
|
||||
nodeAliasCode = CHAIN_CODE_ADAS_CONNECT_STATUS,
|
||||
paramIndexes = [0,1]
|
||||
)
|
||||
private fun saveIntoMsgBox(
|
||||
status: AdasConstants.IpcConnectionStatus,
|
||||
reason: String?
|
||||
reason: String
|
||||
) {
|
||||
var title = ""
|
||||
var content = ""
|
||||
|
||||
@@ -150,18 +150,16 @@ class TrafficLightDispatcher : IMoGoAutopilotIdentifyListener, IMoGoTrafficLight
|
||||
|
||||
if(light.nextState == null || light.nextState == FusionTrafficLightOuterClass.FusionLightState.STATE_OFF_FUSION
|
||||
|| light.nextTwoState == null || light.nextTwoState == FusionTrafficLightOuterClass.FusionLightState.STATE_OFF_FUSION){
|
||||
if (HmiBuildConfig.isShowCarSourceTrafficLightView) {
|
||||
var lightRemain = light.duration.toInt()
|
||||
val source = when (trafficLights.source) {
|
||||
1 -> DataSourceType.TELEMATIC_UNION_V2I
|
||||
2 -> DataSourceType.TELEMATIC_UNION_V2N
|
||||
else -> {
|
||||
lightRemain = 0
|
||||
DataSourceType.TELEMATIC
|
||||
}
|
||||
var lightRemain = light.duration.toInt()
|
||||
val source = when (trafficLights.source) {
|
||||
1 -> DataSourceType.TELEMATIC_UNION_V2I
|
||||
2 -> DataSourceType.TELEMATIC_UNION_V2N
|
||||
else -> {
|
||||
lightRemain = 0
|
||||
DataSourceType.TELEMATIC
|
||||
}
|
||||
onTrafficLightPlusSource(convert(light.state), lightRemain, source)
|
||||
}
|
||||
onTrafficLightPlusSource(convert(light.state), lightRemain, source)
|
||||
}else{
|
||||
Log.i(TAG,"current state="+light.state+" current duration="+light.duration+
|
||||
" nextState="+light.nextState+" nextDuration="+light.nextDuration+
|
||||
@@ -305,27 +303,25 @@ class TrafficLightDispatcher : IMoGoAutopilotIdentifyListener, IMoGoTrafficLight
|
||||
*/
|
||||
override fun onEnterCrossRoad(enter: Boolean) {
|
||||
CallerLogger.d("${SceneConstant.M_D_C}${TAG}", "onEnterCrossRoad enter = $enter ")
|
||||
if (HmiBuildConfig.isShowCarSourceTrafficLightView) {
|
||||
return
|
||||
}
|
||||
if (!enter) {
|
||||
Handler().postDelayed({
|
||||
hasAiLightStatus = false
|
||||
hasObuLightStatus = false
|
||||
hasFusionLightStatus = false
|
||||
}, 5000)
|
||||
if (AppIdentityModeUtils.isDriver(FunctionBuildConfig.appIdentityMode)) {
|
||||
CallerTelematicManager.sendMsgToAllClients(
|
||||
TelematicConstant.HIDE_TRAFFIC_LIGHT,
|
||||
"0".toByteArray()
|
||||
)
|
||||
}
|
||||
//如果没有OBU灯态则进行隐藏,如果有OBU灯态,则交由OBU管理
|
||||
if (!hasObuLightStatus) {
|
||||
CallerTrafficLightListenerManager.resetTrafficLightStatus(!hasObuLightStatus)
|
||||
// hide("云端离开路口隐藏", DataSourceType.AICLOUD)
|
||||
}
|
||||
}
|
||||
|
||||
// if (!enter) {
|
||||
// Handler().postDelayed({
|
||||
// hasAiLightStatus = false
|
||||
// hasObuLightStatus = false
|
||||
// hasFusionLightStatus = false
|
||||
// }, 5000)
|
||||
// if (AppIdentityModeUtils.isDriver(FunctionBuildConfig.appIdentityMode)) {
|
||||
// CallerTelematicManager.sendMsgToAllClients(
|
||||
// TelematicConstant.HIDE_TRAFFIC_LIGHT,
|
||||
// "0".toByteArray()
|
||||
// )
|
||||
// }
|
||||
// //如果没有OBU灯态则进行隐藏,如果有OBU灯态,则交由OBU管理
|
||||
// if (!hasObuLightStatus) {
|
||||
// CallerTrafficLightListenerManager.resetTrafficLightStatus(!hasObuLightStatus)
|
||||
//// hide("云端离开路口隐藏", DataSourceType.AICLOUD)
|
||||
// }
|
||||
// }
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -336,9 +332,6 @@ class TrafficLightDispatcher : IMoGoAutopilotIdentifyListener, IMoGoTrafficLight
|
||||
"${SceneConstant.M_D_C}${TAG}",
|
||||
"onTrafficRequestError hasObuLightStatus = $hasObuLightStatus ------> "
|
||||
)
|
||||
if (HmiBuildConfig.isShowCarSourceTrafficLightView) {
|
||||
return
|
||||
}
|
||||
CallerTrafficLightListenerManager.resetTrafficLightStatus(hasAiLightStatus)
|
||||
hasAiLightStatus = false
|
||||
// if (!hasObuLightStatus) {
|
||||
@@ -515,9 +508,6 @@ class TrafficLightDispatcher : IMoGoAutopilotIdentifyListener, IMoGoTrafficLight
|
||||
}
|
||||
|
||||
private fun updateTrafficLight(trafficLightResult: TrafficLightResult) {
|
||||
if(HmiBuildConfig.isShowCarSourceTrafficLightView){
|
||||
return
|
||||
}
|
||||
val currentTrafficLight = trafficLightResult.currentRoadTrafficLight()
|
||||
CallerLogger.d(
|
||||
"${SceneConstant.M_D_C}${TAG}",
|
||||
@@ -536,7 +526,7 @@ class TrafficLightDispatcher : IMoGoAutopilotIdentifyListener, IMoGoTrafficLight
|
||||
}
|
||||
|
||||
private fun filterTelematicUnion(source: DataSourceType): Boolean {
|
||||
return HmiBuildConfig.isShowCarSourceTrafficLightView && source != DataSourceType.TELEMATIC_UNION_V2N && source != DataSourceType.TELEMATIC_UNION_V2I && source != DataSourceType.TELEMATIC
|
||||
return source != DataSourceType.TELEMATIC_UNION_V2N && source != DataSourceType.TELEMATIC_UNION_V2I && source != DataSourceType.TELEMATIC
|
||||
}
|
||||
|
||||
fun destroy() {
|
||||
|
||||
@@ -89,7 +89,7 @@ class AIDataCollectView @JvmOverloads constructor(
|
||||
clickListener?.onClose()
|
||||
}
|
||||
//接管记录日期
|
||||
tvDataCollectDate.text = millis2String(System.currentTimeMillis(), getYMDFormat())
|
||||
tvDataCollectDate.text = millis2String(System.currentTimeMillis())
|
||||
val linearLayoutManager = LinearLayoutManager(context)
|
||||
linearLayoutManager.orientation = LinearLayoutManager.VERTICAL
|
||||
rvDataCollectList?.layoutManager = linearLayoutManager
|
||||
|
||||
@@ -220,7 +220,7 @@ class FaultReasonWindow constructor(activity: Activity) : View.OnTouchListener,
|
||||
|
||||
@SuppressLint("SetTextI18n")
|
||||
private fun initEvent() {
|
||||
CallerDevaToolsListenerManager.addListener(TAG, this)
|
||||
CallerDevaToolsListenerManager.addListener(this.hashCode().toString(), this)
|
||||
val iconDown = ContextCompat.getDrawable(mActivity, R.drawable.icon_fault_expand)
|
||||
iconDown?.setBounds(0, 0, iconDown.minimumWidth, iconDown.minimumHeight)
|
||||
val iconUp = ContextCompat.getDrawable(mActivity, R.drawable.icon_fault_retract)
|
||||
@@ -558,7 +558,7 @@ class FaultReasonWindow constructor(activity: Activity) : View.OnTouchListener,
|
||||
|
||||
fun hideFloatWindow() {
|
||||
etNoteInput.clearFocus()
|
||||
CallerDevaToolsListenerManager.removeListener(TAG)
|
||||
CallerDevaToolsListenerManager.removeListener(this.hashCode().toString())
|
||||
if (mFloatLayout.parent != null) {
|
||||
mWindowManager!!.removeView(mFloatLayout)
|
||||
}
|
||||
|
||||
@@ -135,7 +135,7 @@ class WorkOrderWindow constructor(activity: Activity) : View.OnTouchListener,
|
||||
@OptIn(DelicateCoroutinesApi::class)
|
||||
@SuppressLint("SetTextI18n")
|
||||
private fun initEvent(){
|
||||
CallerDevaToolsListenerManager.addListener(TAG, this)
|
||||
CallerDevaToolsListenerManager.addListener(this.hashCode().toString(), this)
|
||||
//弹窗展示时间
|
||||
tvWorkOrderTime.text = mActivity.resources.getString(R.string.work_order_time) +
|
||||
millis2String(System.currentTimeMillis(), TimeUtils.getHourMinSecondFormat())
|
||||
@@ -382,7 +382,7 @@ class WorkOrderWindow constructor(activity: Activity) : View.OnTouchListener,
|
||||
if (mFloatLayout.parent != null){
|
||||
mWindowManager!!.removeView(mFloatLayout)
|
||||
}
|
||||
CallerDevaToolsListenerManager.removeListener(TAG)
|
||||
CallerDevaToolsListenerManager.removeListener(this.hashCode().toString())
|
||||
}
|
||||
|
||||
override fun workOrderReportSuccess() {
|
||||
|
||||
|
After Width: | Height: | Size: 25 KiB |
@@ -39,7 +39,6 @@
|
||||
android:text="@string/take_over_type"
|
||||
android:textSize="@dimen/sp_38"
|
||||
android:textColor="@color/white"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintTop_toBottomOf="@id/tvTakeOverTitle"
|
||||
app:layout_constraintLeft_toLeftOf="@id/tvTakeOverTitle"
|
||||
android:layout_marginTop="@dimen/dp_65"
|
||||
@@ -69,7 +68,6 @@
|
||||
android:text="@string/take_over_reason"
|
||||
android:textSize="@dimen/sp_38"
|
||||
android:textColor="@color/white"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintTop_toBottomOf="@id/tvTakeOverType"
|
||||
app:layout_constraintLeft_toLeftOf="@id/tvTakeOverType"
|
||||
android:layout_marginTop="@dimen/dp_36"
|
||||
@@ -99,7 +97,6 @@
|
||||
android:text="@string/fault_note"
|
||||
android:textSize="@dimen/sp_38"
|
||||
android:textColor="@color/white"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintTop_toBottomOf="@id/tvTakeOverReason"
|
||||
app:layout_constraintLeft_toLeftOf="@id/tvTakeOverReason"
|
||||
android:layout_marginTop="@dimen/dp_36"
|
||||
|
||||
@@ -3,6 +3,7 @@ package com.mogo.eagle.core.function.hmi.bone
|
||||
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.datacenter.msgbox.IMsgBoxEventListener
|
||||
import com.mogo.eagle.core.function.call.msgbox.CallerMsgBoxEventListenerManager
|
||||
@@ -171,7 +172,9 @@ class BoneTabLayout @JvmOverloads constructor(
|
||||
override fun onUpdateTipEvent(isShow: Boolean) {
|
||||
super.onUpdateTipEvent(isShow)
|
||||
UiThreadHandler.post {
|
||||
tabSwitchMsgBox.updateNotice(isShow)
|
||||
if(msgBoxTabView.visibility == View.GONE){
|
||||
tabSwitchMsgBox.updateNotice(isShow)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -20,7 +20,7 @@ import com.zhjt.mogo_core_function_devatools.status.entity.Status
|
||||
/**
|
||||
* FSM状态展示 Dialog
|
||||
*/
|
||||
class FSMStatusDetailDialog(context: Context) : BaseFloatDialog(context),
|
||||
class FSMStatusDetailDialog(context: Context) : BaseFloatDialog(context, TAG),
|
||||
StatusManager.IStatusListener {
|
||||
companion object {
|
||||
private const val TAG = "FSMStatusDetailDialog"
|
||||
|
||||
@@ -8,7 +8,6 @@ import android.view.ViewGroup
|
||||
import android.widget.ImageView
|
||||
import android.widget.TextView
|
||||
import androidx.core.content.res.ResourcesCompat
|
||||
import androidx.core.view.isVisible
|
||||
import androidx.recyclerview.widget.RecyclerView
|
||||
import com.mogo.eagle.core.data.enums.DataSourceType
|
||||
import com.mogo.eagle.core.data.enums.EventTypeEnumNew
|
||||
@@ -213,15 +212,15 @@ class MsgBoxTabAdapter(private val activity: Activity) :
|
||||
when(receiveFaultLevel[0]){
|
||||
0->{
|
||||
//重度预警样式
|
||||
holder.ivFmImage.setImageDrawable(getDrawable(R.drawable.icon_fm_stop_normal))
|
||||
holder.ivFmImage.setImageDrawable(getDrawable(R.drawable.icon_fm_severe_warning))
|
||||
}
|
||||
1,2,3->{
|
||||
//中度预警样式
|
||||
holder.ivFmImage.setImageDrawable(getDrawable(R.drawable.icon_fm_reduce_normal))
|
||||
holder.ivFmImage.setImageDrawable(getDrawable(R.drawable.icon_fm_moderate_warning))
|
||||
}
|
||||
4,5->{
|
||||
//轻度预警样式
|
||||
holder.ivFmImage.setImageDrawable(getDrawable(R.drawable.icon_fm_warning_normal))
|
||||
holder.ivFmImage.setImageDrawable(getDrawable(R.drawable.icon_fm_mild_warning))
|
||||
}
|
||||
}
|
||||
receiveFaultLevel.forEach {level->
|
||||
@@ -248,7 +247,7 @@ class MsgBoxTabAdapter(private val activity: Activity) :
|
||||
}else{
|
||||
holder.tvFmAction.text = "建议操作:暂无"
|
||||
//轻度预警样式
|
||||
holder.ivFmImage.setImageDrawable(getDrawable(R.drawable.icon_fm_warning_normal))
|
||||
holder.ivFmImage.setImageDrawable(getDrawable(R.drawable.icon_fm_mild_warning))
|
||||
}
|
||||
}
|
||||
//故障策略
|
||||
@@ -342,18 +341,18 @@ class MsgBoxTabAdapter(private val activity: Activity) :
|
||||
|| reportEntity.resultList.contains(RESULT_REMOTEPILOT_DISABLE)
|
||||
) {
|
||||
//Error
|
||||
holder.ivReportImage.setImageDrawable(getDrawable(R.drawable.icon_report_error_normal))
|
||||
holder.ivReportImage.setImageDrawable(getDrawable(R.drawable.icon_report_error))
|
||||
holder.tvReportLevel.text = "Error"
|
||||
} else if(reportEntity.resultList.contains(RESULT_AUTOPILOT_INFERIOR)
|
||||
|| reportEntity.resultList.contains(RESULT_SHOW_WARNING)
|
||||
|| reportEntity.resultList.contains(RESULT_REMOTEPILOT_INFERIOR)
|
||||
){
|
||||
//Warning
|
||||
holder.ivReportImage.setImageDrawable(getDrawable(R.drawable.icon_report_warning_normal))
|
||||
holder.ivReportImage.setImageDrawable(getDrawable(R.drawable.icon_report_warning))
|
||||
holder.tvReportLevel.text = "Warning"
|
||||
}else {
|
||||
//INFO
|
||||
holder.ivReportImage.setImageDrawable(getDrawable(R.drawable.icon_report_info_normal))
|
||||
holder.ivReportImage.setImageDrawable(getDrawable(R.drawable.icon_report_info))
|
||||
holder.tvReportLevel.text = "Info"
|
||||
}
|
||||
|
||||
@@ -499,11 +498,6 @@ class MsgBoxTabAdapter(private val activity: Activity) :
|
||||
TimeUtils.millis2String(it[position].timestamp, getHourMinFormat())
|
||||
holder.tvV2XContent.text = v2XMsg.content
|
||||
holder.ivV2XImage.setImageDrawable(ResourcesCompat.getDrawable(activity.resources,EventTypeEnumNew.getUpdateIconRes(v2XMsg.type),null))
|
||||
if(v2XMsg.type== EventTypeEnumNew.TYPE_VERIFICATION_SUCCESSFUL.poiType||v2XMsg.type == EventTypeEnumNew.TYPE_DEVICE_STATUS_NORMAL.poiType){
|
||||
holder.itemView.setBackgroundResource(R.drawable.bg_temp_v2x_success)
|
||||
}else{
|
||||
holder.itemView.setBackgroundResource(R.drawable.bg_msg_box_v2x)
|
||||
}
|
||||
if(v2XMsg.communicationType.isNullOrEmpty()){
|
||||
holder.tvV2XTitle.text = EventTypeEnumNew.getEventTitle(v2XMsg.type)
|
||||
}else{
|
||||
|
||||
@@ -12,6 +12,9 @@ import androidx.annotation.NonNull;
|
||||
import androidx.annotation.RequiresApi;
|
||||
|
||||
import com.mogo.commons.debug.DebugConfig;
|
||||
import com.mogo.commons.module.status.IMogoStatusChangedListener;
|
||||
import com.mogo.commons.module.status.MogoStatusManager;
|
||||
import com.mogo.commons.module.status.StatusDescriptor;
|
||||
import com.mogo.eagle.core.function.hmi.R;
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger;
|
||||
import com.mogo.eagle.core.utilcode.util.PermissionUtils;
|
||||
@@ -21,14 +24,22 @@ import com.mogo.eagle.core.utilcode.util.PermissionUtils;
|
||||
*
|
||||
* @author tongchenfei
|
||||
*/
|
||||
public class BaseFloatDialog extends Dialog {
|
||||
public class BaseFloatDialog extends Dialog implements IMogoStatusChangedListener {
|
||||
|
||||
private static final String TAG = "BaseFloatDialog";
|
||||
|
||||
private static String REGISTER_TAG = "";
|
||||
|
||||
public BaseFloatDialog(@NonNull Context context) {
|
||||
this(context, R.style.BaseFloatDialogStyle);
|
||||
}
|
||||
|
||||
public BaseFloatDialog(@NonNull Context context, String tag) {
|
||||
this(context, R.style.BaseFloatDialogStyle);
|
||||
REGISTER_TAG = TAG + "_" + tag;
|
||||
MogoStatusManager.getInstance().registerStatusChangedListener(REGISTER_TAG, StatusDescriptor.MAIN_PAGE_IS_BACKGROUND, this);
|
||||
}
|
||||
|
||||
public BaseFloatDialog(@NonNull Context context, int themeResId) {
|
||||
super(context, themeResId);
|
||||
if (DebugConfig.getCarMachineType() != DebugConfig.CAR_MACHINE_TYPE_BYD) {
|
||||
@@ -61,6 +72,7 @@ public class BaseFloatDialog extends Dialog {
|
||||
@Override
|
||||
public void dismiss() {
|
||||
CallerLogger.d( TAG, "onDismiss====");
|
||||
MogoStatusManager.getInstance().unregisterStatusChangedListener(REGISTER_TAG, StatusDescriptor.MAIN_PAGE_IS_BACKGROUND, this);
|
||||
super.dismiss();
|
||||
}
|
||||
private void setWindowSize(){
|
||||
@@ -76,4 +88,11 @@ public class BaseFloatDialog extends Dialog {
|
||||
}
|
||||
getWindow().setAttributes(attributes);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onStatusChanged(StatusDescriptor descriptor, boolean isTrue) {
|
||||
if(descriptor == StatusDescriptor.MAIN_PAGE_IS_BACKGROUND && isTrue){
|
||||
dismiss();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16,7 +16,6 @@ import com.mogo.eagle.core.function.hmi.R
|
||||
import com.mogo.eagle.core.function.hmi.ui.widget.TypefaceTextView
|
||||
import com.mogo.eagle.core.utilcode.mogo.thread.WorkThreadHandler
|
||||
import com.mogo.eagle.core.utilcode.util.ThreadUtils
|
||||
import com.mogo.eagle.core.utilcode.util.UiThreadHandler
|
||||
|
||||
/**
|
||||
* 融合红绿灯变灯提示
|
||||
@@ -32,7 +31,7 @@ class TrafficLightPromptView @JvmOverloads constructor(
|
||||
private const val TAG = "TrafficLightPromptView"
|
||||
}
|
||||
|
||||
private var user = 0 //使用方,driver:0 passenger:1
|
||||
private var user = 0 //使用方,driver:0 passenger taxi:1 passenger bus:2
|
||||
private var tvPromptTitle: TextView ?= null
|
||||
private var tvPromptContent: TextView ?= null
|
||||
private var tvTrafficNum: TypefaceTextView ?= null
|
||||
@@ -91,11 +90,21 @@ class TrafficLightPromptView @JvmOverloads constructor(
|
||||
|
||||
override fun onAttachedToWindow() {
|
||||
super.onAttachedToWindow()
|
||||
if(user == 0){
|
||||
LayoutInflater.from(context).inflate(R.layout.view_traffic_light_prompt, this, true)
|
||||
tvPromptTitle = findViewById(R.id.tvPromptTitle)
|
||||
}else{
|
||||
LayoutInflater.from(context).inflate(R.layout.view_traffic_light_prompt_p, this, true)
|
||||
when (user) {
|
||||
0 -> {
|
||||
//司机端
|
||||
LayoutInflater.from(context).inflate(R.layout.view_traffic_light_prompt, this, true)
|
||||
tvPromptTitle = findViewById(R.id.tvPromptTitle)
|
||||
}
|
||||
1 -> {
|
||||
//TAXI乘客端
|
||||
LayoutInflater.from(context).inflate(R.layout.view_traffic_light_prompt_p_taxi, this, true)
|
||||
}
|
||||
else -> {
|
||||
//BUS乘客端
|
||||
LayoutInflater.from(context).inflate(R.layout.view_traffic_light_prompt_p_bus, this, true)
|
||||
tvPromptTitle = findViewById(R.id.tvPromptTitle)
|
||||
}
|
||||
}
|
||||
tvPromptContent = findViewById(R.id.tvPromptContent)
|
||||
tvTrafficNum = findViewById(R.id.tvTrafficNum)
|
||||
@@ -163,12 +172,22 @@ class TrafficLightPromptView @JvmOverloads constructor(
|
||||
msg.obj = currentDuration
|
||||
mLightHandler.sendMessageDelayed(msg,200)
|
||||
}
|
||||
if(user == 0){
|
||||
tvTrafficNum?.setTextColor(ContextCompat.getColor(context,R.color.light_prompt_green))
|
||||
tvTrafficNumDecimal?.setTextColor(ContextCompat.getColor(context,R.color.light_prompt_green))
|
||||
}else{
|
||||
tvTrafficNum?.setTextColor(ContextCompat.getColor(context,R.color.light_prompt_green_p))
|
||||
tvTrafficNumDecimal?.setTextColor(ContextCompat.getColor(context,R.color.light_prompt_green_p))
|
||||
when (user) {
|
||||
0 -> {
|
||||
//司机端
|
||||
tvTrafficNum?.setTextColor(ContextCompat.getColor(context,R.color.light_prompt_green))
|
||||
tvTrafficNumDecimal?.setTextColor(ContextCompat.getColor(context,R.color.light_prompt_green))
|
||||
}
|
||||
1 -> {
|
||||
//TAXI乘客端
|
||||
tvTrafficNum?.setTextColor(ContextCompat.getColor(context,R.color.light_prompt_green_p))
|
||||
tvTrafficNumDecimal?.setTextColor(ContextCompat.getColor(context,R.color.light_prompt_green_p))
|
||||
}
|
||||
else -> {
|
||||
//BUS乘客端
|
||||
tvTrafficNum?.setTextColor(ContextCompat.getColor(context,R.color.light_prompt_green_p_bus))
|
||||
tvTrafficNumDecimal?.setTextColor(ContextCompat.getColor(context,R.color.light_prompt_green_p_bus))
|
||||
}
|
||||
}
|
||||
}
|
||||
TrafficLightEnum.RED->{
|
||||
@@ -179,12 +198,22 @@ class TrafficLightPromptView @JvmOverloads constructor(
|
||||
msg.obj = currentDuration
|
||||
mLightHandler.sendMessageDelayed(msg,200)
|
||||
}
|
||||
if(user == 0){
|
||||
tvTrafficNum?.setTextColor(ContextCompat.getColor(context,R.color.light_prompt_red))
|
||||
tvTrafficNumDecimal?.setTextColor(ContextCompat.getColor(context,R.color.light_prompt_red))
|
||||
}else{
|
||||
tvTrafficNum?.setTextColor(ContextCompat.getColor(context,R.color.light_prompt_red_p))
|
||||
tvTrafficNumDecimal?.setTextColor(ContextCompat.getColor(context,R.color.light_prompt_red_p))
|
||||
when (user) {
|
||||
0 -> {
|
||||
//司机端
|
||||
tvTrafficNum?.setTextColor(ContextCompat.getColor(context,R.color.light_prompt_red))
|
||||
tvTrafficNumDecimal?.setTextColor(ContextCompat.getColor(context,R.color.light_prompt_red))
|
||||
}
|
||||
1 -> {
|
||||
//TAXI乘客端
|
||||
tvTrafficNum?.setTextColor(ContextCompat.getColor(context,R.color.light_prompt_red_p))
|
||||
tvTrafficNumDecimal?.setTextColor(ContextCompat.getColor(context,R.color.light_prompt_red_p))
|
||||
}
|
||||
else -> {
|
||||
//BUS乘客端
|
||||
tvTrafficNum?.setTextColor(ContextCompat.getColor(context,R.color.light_prompt_red_p_bus))
|
||||
tvTrafficNumDecimal?.setTextColor(ContextCompat.getColor(context,R.color.light_prompt_red_p_bus))
|
||||
}
|
||||
}
|
||||
}
|
||||
TrafficLightEnum.YELLOW->{
|
||||
@@ -195,12 +224,22 @@ class TrafficLightPromptView @JvmOverloads constructor(
|
||||
msg.obj = currentDuration
|
||||
mLightHandler.sendMessageDelayed(msg,200)
|
||||
}
|
||||
if(user == 0){
|
||||
tvTrafficNum?.setTextColor(ContextCompat.getColor(context,R.color.light_prompt_yellow))
|
||||
tvTrafficNumDecimal?.setTextColor(ContextCompat.getColor(context,R.color.light_prompt_yellow))
|
||||
}else{
|
||||
tvTrafficNum?.setTextColor(ContextCompat.getColor(context,R.color.light_prompt_yellow_p))
|
||||
tvTrafficNumDecimal?.setTextColor(ContextCompat.getColor(context,R.color.light_prompt_yellow_p))
|
||||
when (user) {
|
||||
0 -> {
|
||||
//司机端
|
||||
tvTrafficNum?.setTextColor(ContextCompat.getColor(context,R.color.light_prompt_yellow))
|
||||
tvTrafficNumDecimal?.setTextColor(ContextCompat.getColor(context,R.color.light_prompt_yellow))
|
||||
}
|
||||
1 -> {
|
||||
//TAXI乘客端
|
||||
tvTrafficNum?.setTextColor(ContextCompat.getColor(context,R.color.light_prompt_yellow_p))
|
||||
tvTrafficNumDecimal?.setTextColor(ContextCompat.getColor(context,R.color.light_prompt_yellow_p))
|
||||
}
|
||||
else -> {
|
||||
//BUS乘客端
|
||||
tvTrafficNum?.setTextColor(ContextCompat.getColor(context,R.color.light_prompt_yellow_p_bus))
|
||||
tvTrafficNumDecimal?.setTextColor(ContextCompat.getColor(context,R.color.light_prompt_yellow_p_bus))
|
||||
}
|
||||
}
|
||||
}
|
||||
TrafficLightEnum.BLACK->{
|
||||
@@ -218,33 +257,57 @@ class TrafficLightPromptView @JvmOverloads constructor(
|
||||
}
|
||||
when(nextState){
|
||||
TrafficLightEnum.GREEN->{
|
||||
if(user == 0){
|
||||
//司机端提示
|
||||
tvPromptTitle?.text = "即将绿灯"
|
||||
tvPromptContent?.text = "请准备出发"
|
||||
}else{
|
||||
//乘客端提示
|
||||
tvPromptContent?.text = "即将绿灯,请准备出发"
|
||||
when (user) {
|
||||
0 -> {
|
||||
//司机端提示
|
||||
tvPromptTitle?.text = "即将绿灯"
|
||||
tvPromptContent?.text = "请准备出发"
|
||||
}
|
||||
1 -> {
|
||||
//TAXI乘客端提示
|
||||
tvPromptContent?.text = "即将绿灯,请准备出发"
|
||||
}
|
||||
else -> {
|
||||
//BUS乘客端提示
|
||||
tvPromptTitle?.text = "即将绿灯"
|
||||
tvPromptContent?.text = "请准备出发"
|
||||
}
|
||||
}
|
||||
}
|
||||
TrafficLightEnum.RED->{
|
||||
if(user == 0){
|
||||
//司机端提示
|
||||
tvPromptTitle?.text = "即将红灯"
|
||||
tvPromptContent?.text = "请减速慢行"
|
||||
}else{
|
||||
//乘客端提示
|
||||
tvPromptContent?.text = "即将红灯,请减速慢行"
|
||||
when (user) {
|
||||
0 -> {
|
||||
//司机端提示
|
||||
tvPromptTitle?.text = "即将红灯"
|
||||
tvPromptContent?.text = "请减速慢行"
|
||||
}
|
||||
1 -> {
|
||||
//TAXI乘客端提示
|
||||
tvPromptContent?.text = "即将红灯,请减速慢行"
|
||||
}
|
||||
else -> {
|
||||
//BUS乘客端提示
|
||||
tvPromptTitle?.text = "即将红灯"
|
||||
tvPromptContent?.text = "请减速慢行"
|
||||
}
|
||||
}
|
||||
}
|
||||
TrafficLightEnum.YELLOW->{
|
||||
if(user == 0){
|
||||
//司机端提示
|
||||
tvPromptTitle?.text = "即将黄灯"
|
||||
tvPromptContent?.text = "请减速慢行"
|
||||
}else{
|
||||
//乘客端提示
|
||||
tvPromptContent?.text = "即将红灯,请减速慢行"
|
||||
when (user) {
|
||||
0 -> {
|
||||
//司机端提示
|
||||
tvPromptTitle?.text = "即将黄灯"
|
||||
tvPromptContent?.text = "请减速慢行"
|
||||
}
|
||||
1 -> {
|
||||
//TAXI乘客端提示
|
||||
tvPromptContent?.text = "即将红灯,请减速慢行"
|
||||
}
|
||||
else -> {
|
||||
//BUS乘客端提示
|
||||
tvPromptTitle?.text = "即将黄灯"
|
||||
tvPromptContent?.text = "请减速慢行"
|
||||
}
|
||||
}
|
||||
}
|
||||
TrafficLightEnum.BLACK->{
|
||||
|
||||
@@ -652,8 +652,6 @@ class OperatePanelLayout : LinearLayout {
|
||||
class BusinessPreferenceFragmentCompat : OperatePanelDetailBase() {
|
||||
|
||||
companion object {
|
||||
private const val KEY_RED_OR_GREEN_LIGHT_MARKER = "red_or_green_light_marker"
|
||||
private const val KEY_RED_OR_GREEN_LIGHT_MERGE_MARKER = "red_or_green_light_merge_marker"
|
||||
private const val KEY_FAULT_REPORT_TIP = "fault_report_tip"
|
||||
private const val KEY_LIMIT_SPEED_MARKER = "limit_speed_marker"
|
||||
private const val KEY_WEATHER_EFFECT_SWITCH = "weather_effect_switch"
|
||||
@@ -666,12 +664,6 @@ class OperatePanelLayout : LinearLayout {
|
||||
|
||||
override fun getDefaultVal(pref: Preference): Any? {
|
||||
when (pref.key) {
|
||||
KEY_RED_OR_GREEN_LIGHT_MARKER -> {
|
||||
return HmiBuildConfig.isShowTrafficLightView
|
||||
}
|
||||
KEY_RED_OR_GREEN_LIGHT_MERGE_MARKER -> {
|
||||
return HmiBuildConfig.isShowCarSourceTrafficLightView
|
||||
}
|
||||
KEY_FAULT_REPORT_TIP -> {
|
||||
return FunctionBuildConfig.isReportWarning
|
||||
}
|
||||
@@ -748,25 +740,6 @@ class OperatePanelLayout : LinearLayout {
|
||||
|
||||
override fun onPreferenceChange(preference: Preference, newValue: Any?): Boolean {
|
||||
when (preference.key) {
|
||||
KEY_RED_OR_GREEN_LIGHT_MARKER -> {
|
||||
val isChecked = newValue as? Boolean ?: false
|
||||
hmiAction("SOP 红绿灯标识开关, ", isChecked)
|
||||
HmiBuildConfig.isShowTrafficLightView = isChecked
|
||||
clickEventAnalytics("红绿灯标识", isChecked)
|
||||
if (isChecked) {
|
||||
CallerHmiManager.showTrafficLightView()
|
||||
} else {
|
||||
CallerHmiManager.hideTrafficLightView()
|
||||
}
|
||||
return true
|
||||
}
|
||||
KEY_RED_OR_GREEN_LIGHT_MERGE_MARKER -> {
|
||||
val isChecked = newValue as? Boolean ?: false
|
||||
hmiAction("SOP 红绿灯车端来源标识开关, ", isChecked)
|
||||
clickEventAnalytics("红绿灯车端融合标识", isChecked)
|
||||
HmiBuildConfig.isShowCarSourceTrafficLightView = isChecked
|
||||
return true
|
||||
}
|
||||
KEY_FAULT_REPORT_TIP -> {
|
||||
val isChecked = newValue as? Boolean ?: false
|
||||
hmiAction("SOP 是否开启异常上报, ", isChecked)
|
||||
|
||||
@@ -58,7 +58,6 @@ import kotlinx.android.synthetic.main.view_sop_setting.view.rbThirty
|
||||
import kotlinx.android.synthetic.main.view_sop_setting.view.rgFusionMode
|
||||
import kotlinx.android.synthetic.main.view_sop_setting.view.rgPullTime
|
||||
import kotlinx.android.synthetic.main.view_sop_setting.view.scCarAperture
|
||||
import kotlinx.android.synthetic.main.view_sop_setting.view.scCarUnionTrafficLight
|
||||
import kotlinx.android.synthetic.main.view_sop_setting.view.scConnectionSwitch
|
||||
import kotlinx.android.synthetic.main.view_sop_setting.view.scDemoMode
|
||||
import kotlinx.android.synthetic.main.view_sop_setting.view.scDrawPointCloudData
|
||||
@@ -83,7 +82,6 @@ import kotlinx.android.synthetic.main.view_sop_setting.view.scShowBagRecordWindo
|
||||
import kotlinx.android.synthetic.main.view_sop_setting.view.scSpeedLimit
|
||||
import kotlinx.android.synthetic.main.view_sop_setting.view.scSweeperModeSwitch
|
||||
import kotlinx.android.synthetic.main.view_sop_setting.view.scTakeOverRemind
|
||||
import kotlinx.android.synthetic.main.view_sop_setting.view.scTrafficLight
|
||||
import kotlinx.android.synthetic.main.view_sop_setting.view.scV2ISwitch
|
||||
import kotlinx.android.synthetic.main.view_sop_setting.view.scV2NSwitch
|
||||
import kotlinx.android.synthetic.main.view_sop_setting.view.scV2XSwitch
|
||||
@@ -718,26 +716,6 @@ internal class SOPSettingView @JvmOverloads constructor(
|
||||
* 其他类别开关设置
|
||||
*/
|
||||
private fun otherSetting() {
|
||||
//红绿灯标识开关
|
||||
scTrafficLight.isChecked = !HmiBuildConfig.isShowTrafficLightView
|
||||
scTrafficLight.setOnCheckedChangeListener { _, isChecked ->
|
||||
hmiAction("SOP 红绿灯标识开关, ", isChecked)
|
||||
clickEventAnalytics("红绿灯标识",isChecked)
|
||||
if (isChecked) {
|
||||
CallerHmiManager.showTrafficLightView()
|
||||
} else {
|
||||
CallerHmiManager.hideTrafficLightView()
|
||||
}
|
||||
}
|
||||
|
||||
//红绿灯车端来源标识开关
|
||||
scCarUnionTrafficLight.isChecked = HmiBuildConfig.isShowCarSourceTrafficLightView
|
||||
scCarUnionTrafficLight.setOnCheckedChangeListener { _, isChecked ->
|
||||
hmiAction("SOP 红绿灯车端来源标识开关, ", isChecked)
|
||||
clickEventAnalytics("红绿灯车端融合标识",isChecked)
|
||||
HmiBuildConfig.isShowCarSourceTrafficLightView = isChecked
|
||||
}
|
||||
|
||||
//系统启动状态展示
|
||||
scConnectionSwitch.isChecked = HmiBuildConfig.isShowConnectionProgressView
|
||||
scConnectionSwitch.setOnCheckedChangeListener { _, isChecked ->
|
||||
|
||||
@@ -15,9 +15,10 @@ import com.mogo.eagle.core.utilcode.util.ToastUtils
|
||||
* @since: 2022/1/13
|
||||
*/
|
||||
class AdUpgradeDialog(context: Context, images: List<String>, padSn: String, releaseId: String) :
|
||||
BaseFloatDialog(context), LifecycleObserver {
|
||||
BaseFloatDialog(context,TAG), LifecycleObserver {
|
||||
|
||||
companion object {
|
||||
private const val TAG = "AdUpgradeDialog"
|
||||
private var adUpgradeDialog: AdUpgradeDialog? = null
|
||||
|
||||
fun show(context: Context?, images: List<String>, padSn: String, releaseId: String) {
|
||||
|
||||
@@ -11,7 +11,7 @@ import com.mogo.eagle.core.function.hmi.dialog.BaseFloatDialog
|
||||
* @description 重启自动驾驶docker确认对话框
|
||||
* @since: 2022/2/17
|
||||
*/
|
||||
class DockerRebootDialog(context: Context): BaseFloatDialog(context), LifecycleObserver {
|
||||
class DockerRebootDialog(context: Context): BaseFloatDialog(context, "DockerReboot"), LifecycleObserver {
|
||||
|
||||
private var rebootConfirm : TextView? = null
|
||||
private var rebootCancel : TextView? = null
|
||||
|
||||
@@ -16,7 +16,7 @@ import com.mogo.eagle.core.utilcode.mogo.toast.TipToast
|
||||
* @brief 修改车辆对话框
|
||||
* @author lixiaopeng
|
||||
*/
|
||||
class ModifyBindingCarDialog(context: Context) : BaseFloatDialog(context), LifecycleObserver {
|
||||
class ModifyBindingCarDialog(context: Context) : BaseFloatDialog(context, TAG), LifecycleObserver {
|
||||
|
||||
companion object {
|
||||
private const val TAG = "ModifyBindingCarDialog"
|
||||
|
||||
@@ -22,7 +22,7 @@ import me.jessyan.autosize.utils.AutoSizeUtils
|
||||
/**
|
||||
* 离线地图缓存
|
||||
*/
|
||||
class OfflineMapDialog(context: Context) : BaseFloatDialog(context) {
|
||||
class OfflineMapDialog(context: Context) : BaseFloatDialog(context, TAG) {
|
||||
|
||||
companion object {
|
||||
private const val TAG = "OfflineMapDialog"
|
||||
|
||||
@@ -17,7 +17,7 @@ import com.mogo.eagle.core.utilcode.mogo.toast.TipToast
|
||||
* @brief 绑定车辆对话框
|
||||
* @author lixiaopeng
|
||||
*/
|
||||
class ToBindingCarDialog(context: Context) : BaseFloatDialog(context), LifecycleObserver {
|
||||
class ToBindingCarDialog(context: Context) : BaseFloatDialog(context, TAG), LifecycleObserver {
|
||||
|
||||
companion object {
|
||||
private const val TAG = "ToBindingCarDialog"
|
||||
|
||||
@@ -19,7 +19,7 @@ import java.lang.ref.WeakReference
|
||||
* @brief APP升级提示弹框
|
||||
* @author lixiaopeng
|
||||
*/
|
||||
class UpgradeAppDialog(context: Context) : BaseFloatDialog(context), LifecycleObserver {
|
||||
class UpgradeAppDialog(context: Context) : BaseFloatDialog(context,TAG), LifecycleObserver {
|
||||
|
||||
companion object{
|
||||
private const val TAG = "UpgradeAppDialog"
|
||||
|
||||
@@ -120,9 +120,7 @@ class SingleTrafficLightView @JvmOverloads constructor(
|
||||
UiThreadHandler.post {
|
||||
CallerLogger.d("$M_HMI$TAG","update checkLightId:$checkLightId, lightSource: $lightSource")
|
||||
mCurrentLightId = checkLightId
|
||||
if (!HmiBuildConfig.isShowTrafficLightView) {
|
||||
updateTrafficLightIcon(checkLightId, lightSource)
|
||||
}
|
||||
updateTrafficLightIcon(checkLightId, lightSource)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
After Width: | Height: | Size: 48 KiB |
|
After Width: | Height: | Size: 19 KiB |
|
After Width: | Height: | Size: 18 KiB |
|
After Width: | Height: | Size: 15 KiB |
|
After Width: | Height: | Size: 15 KiB |
|
After Width: | Height: | Size: 20 KiB |
|
After Width: | Height: | Size: 20 KiB |
@@ -1,9 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<gradient
|
||||
android:startColor="#19FFCB"
|
||||
android:endColor="#1970FF"
|
||||
android:angle="315"
|
||||
/>
|
||||
<corners android:radius="@dimen/dp_10" />
|
||||
</shape>
|
||||
@@ -16,7 +16,7 @@
|
||||
android:textSize="@dimen/dp_45"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="parent" />
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_upgrade_tips"
|
||||
|
||||
@@ -1,14 +1,11 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/clV2XLayout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_width="@dimen/dp_694"
|
||||
android:layout_height="wrap_content"
|
||||
android:minHeight="@dimen/dp_180"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:background="@drawable/bg_msg_box_toast"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginTop="@dimen/dp_7"
|
||||
android:layout_marginBottom="@dimen/dp_7"
|
||||
>
|
||||
|
||||
<ImageView
|
||||
@@ -25,13 +22,12 @@
|
||||
android:id="@+id/tvV2XTitle"
|
||||
android:layout_width="@dimen/dp_0"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintTop_toTopOf="@id/ivV2XImage"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintLeft_toRightOf="@id/ivV2XImage"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
android:layout_marginStart="@dimen/dp_20"
|
||||
android:textColor="#FFFFFFFF"
|
||||
android:textSize="@dimen/sp_40"
|
||||
android:textStyle="bold"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
@@ -43,8 +39,7 @@
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/sp_32"
|
||||
android:layout_marginTop="@dimen/dp_5"
|
||||
android:paddingBottom="@dimen/dp_30"
|
||||
android:layout_marginTop="@dimen/dp_6"
|
||||
/>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
@@ -2,17 +2,19 @@
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:paddingBottom="@dimen/dp_26">
|
||||
|
||||
<!--故障级别图标-->
|
||||
<ImageView
|
||||
android:id="@+id/ivFmImage"
|
||||
android:layout_width="@dimen/dp_120"
|
||||
android:layout_height="@dimen/dp_120"
|
||||
android:layout_width="@dimen/dp_152"
|
||||
android:layout_height="@dimen/dp_152"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
android:layout_marginTop="@dimen/dp_40"
|
||||
android:layout_marginTop="@dimen/dp_14"
|
||||
android:contentDescription="@string/fm_icon"
|
||||
android:src="@drawable/icon_fm_mild_warning"
|
||||
/>
|
||||
|
||||
<!--标题展示故障策略-->
|
||||
@@ -20,10 +22,11 @@
|
||||
android:id="@+id/tvFmTitle"
|
||||
android:layout_width="@dimen/dp_0"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintTop_toTopOf="@id/ivFmImage"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintLeft_toRightOf="@id/ivFmImage"
|
||||
app:layout_constraintRight_toLeftOf="@id/tvFmShowStatus"
|
||||
android:layout_marginStart="@dimen/dp_30"
|
||||
android:layout_marginStart="@dimen/dp_14"
|
||||
android:layout_marginTop="@dimen/dp_26"
|
||||
android:textSize="@dimen/sp_38"
|
||||
android:textColor="@color/white"
|
||||
/>
|
||||
@@ -54,6 +57,7 @@
|
||||
app:layout_constraintRight_toRightOf="@id/tvFmShowStatus"
|
||||
android:textColor="#CCCCCC"
|
||||
android:textSize="@dimen/sp_32"
|
||||
android:layout_marginTop="@dimen/dp_6"
|
||||
/>
|
||||
|
||||
<!--建议操作-->
|
||||
@@ -66,6 +70,7 @@
|
||||
app:layout_constraintRight_toRightOf="@id/tvFmShowStatus"
|
||||
android:textColor="#CCCCCC"
|
||||
android:textSize="@dimen/sp_32"
|
||||
android:layout_marginTop="@dimen/dp_6"
|
||||
/>
|
||||
|
||||
<!--故障策略-->
|
||||
@@ -79,6 +84,7 @@
|
||||
android:textColor="#CCCCCC"
|
||||
android:textSize="@dimen/sp_32"
|
||||
android:visibility="gone"
|
||||
android:layout_marginTop="@dimen/dp_6"
|
||||
/>
|
||||
|
||||
<!--故障原因-->
|
||||
@@ -92,6 +98,7 @@
|
||||
android:textColor="#CCCCCC"
|
||||
android:textSize="@dimen/sp_32"
|
||||
android:visibility="gone"
|
||||
android:layout_marginTop="@dimen/dp_6"
|
||||
/>
|
||||
|
||||
<!--后果-->
|
||||
@@ -102,10 +109,10 @@
|
||||
app:layout_constraintTop_toBottomOf="@id/tvFmReason"
|
||||
app:layout_constraintLeft_toLeftOf="@id/tvFmReason"
|
||||
app:layout_constraintRight_toRightOf="@id/tvFmShowStatus"
|
||||
android:paddingBottom="@dimen/dp_30"
|
||||
android:textColor="#CCCCCC"
|
||||
android:textSize="@dimen/sp_32"
|
||||
android:visibility="gone"
|
||||
android:layout_marginTop="@dimen/dp_6"
|
||||
/>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
@@ -2,15 +2,16 @@
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:paddingBottom="@dimen/dp_26">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/ivReportImage"
|
||||
android:layout_width="@dimen/dp_120"
|
||||
android:layout_height="@dimen/dp_120"
|
||||
android:layout_width="@dimen/dp_152"
|
||||
android:layout_height="@dimen/dp_152"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
android:layout_marginTop="@dimen/dp_40"
|
||||
android:layout_marginTop="@dimen/dp_14"
|
||||
android:contentDescription="@string/report_icon"
|
||||
/>
|
||||
|
||||
@@ -18,12 +19,13 @@
|
||||
android:id="@+id/tvReportLevel"
|
||||
android:layout_width="@dimen/dp_0"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintTop_toTopOf="@id/ivReportImage"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintLeft_toRightOf="@id/ivReportImage"
|
||||
app:layout_constraintRight_toLeftOf="@id/tvReportShowStatus"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/sp_38"
|
||||
android:layout_marginStart="@dimen/dp_30"
|
||||
android:layout_marginStart="@dimen/dp_14"
|
||||
android:layout_marginTop="@dimen/dp_26"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
@@ -35,6 +37,7 @@
|
||||
app:layout_constraintRight_toRightOf="@id/tvReportShowStatus"
|
||||
android:textSize="@dimen/sp_32"
|
||||
android:textColor="#CCCCCC"
|
||||
android:layout_marginTop="@dimen/dp_6"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
@@ -46,6 +49,7 @@
|
||||
app:layout_constraintRight_toRightOf="@id/tvReportShowStatus"
|
||||
android:textSize="@dimen/sp_32"
|
||||
android:textColor="#CCCCCC"
|
||||
android:layout_marginTop="@dimen/dp_6"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
@@ -58,6 +62,7 @@
|
||||
android:textSize="@dimen/sp_32"
|
||||
android:textColor="#CCCCCC"
|
||||
android:visibility="gone"
|
||||
android:layout_marginTop="@dimen/dp_6"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
@@ -70,6 +75,7 @@
|
||||
android:textSize="@dimen/sp_32"
|
||||
android:textColor="#CCCCCC"
|
||||
android:visibility="gone"
|
||||
android:layout_marginTop="@dimen/dp_6"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
@@ -79,10 +85,10 @@
|
||||
app:layout_constraintTop_toBottomOf="@id/tvReportSrc"
|
||||
app:layout_constraintLeft_toLeftOf="@id/tvReportSrc"
|
||||
app:layout_constraintRight_toRightOf="@id/tvReportShowStatus"
|
||||
android:paddingBottom="@dimen/dp_30"
|
||||
android:textSize="@dimen/sp_32"
|
||||
android:textColor="#CCCCCC"
|
||||
android:visibility="gone"
|
||||
android:layout_marginTop="@dimen/dp_6"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
@@ -96,7 +102,6 @@
|
||||
android:textSize="@dimen/sp_32"
|
||||
android:textColor="#2EACFF"
|
||||
android:paddingTop="@dimen/dp_20"
|
||||
android:paddingBottom="@dimen/dp_20"
|
||||
android:paddingLeft="@dimen/dp_30"
|
||||
/>
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/rvBubbleList"
|
||||
android:layout_width="@dimen/dp_654"
|
||||
android:layout_width="@dimen/dp_694"
|
||||
android:layout_height="wrap_content"
|
||||
/>
|
||||
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
<com.mogo.eagle.core.function.hmi.bone.tab.FaultReasonView
|
||||
android:id="@+id/faultReasonView"
|
||||
android:layout_width="@dimen/dp_960"
|
||||
android:layout_height="@dimen/dp_1137"
|
||||
android:layout_height="@dimen/dp_1214"
|
||||
android:layout_marginStart="@dimen/dp_40"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
@@ -39,7 +39,7 @@
|
||||
<com.mogo.eagle.core.function.hmi.bone.tab.WorkOrderView
|
||||
android:id="@+id/workOrderView"
|
||||
android:layout_width="@dimen/dp_960"
|
||||
android:layout_height="@dimen/dp_1137"
|
||||
android:layout_height="@dimen/dp_1214"
|
||||
android:layout_marginStart="@dimen/dp_40"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
|
||||
@@ -34,13 +34,11 @@
|
||||
android:id="@+id/tvFaultTime"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/fault_open_time"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/sp_32"
|
||||
app:layout_constraintTop_toTopOf="@id/tvFaultTitle"
|
||||
app:layout_constraintBottom_toBottomOf="@id/tvFaultTitle"
|
||||
app:layout_constraintEnd_toEndOf="@id/viewTitleBg"
|
||||
android:layout_marginEnd="@dimen/dp_30"
|
||||
app:layout_constraintRight_toRightOf="@id/tvFaultType"
|
||||
/>
|
||||
|
||||
<View
|
||||
@@ -275,7 +273,7 @@
|
||||
app:layout_constraintLeft_toLeftOf="@id/etNoteInput"
|
||||
app:layout_constraintTop_toBottomOf="@id/etNoteInput"
|
||||
android:layout_marginTop="@dimen/dp_39"
|
||||
android:background="@drawable/bg_fault_report"
|
||||
android:background="@drawable/bg_work_order"
|
||||
android:text="@string/fault_report"
|
||||
android:textColor="#FFFFFF"
|
||||
android:textSize="@dimen/sp_32"
|
||||
|
||||
@@ -135,8 +135,8 @@
|
||||
<com.mogo.eagle.core.function.hmi.ui.msgbox.MsgBoxToastView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_53"
|
||||
android:layout_marginEnd="@dimen/dp_60"
|
||||
android:layout_marginTop="@dimen/dp_39"
|
||||
android:layout_marginEnd="@dimen/dp_23"
|
||||
android:focusable="false"
|
||||
android:focusableInTouchMode="false"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
@@ -161,7 +161,7 @@
|
||||
android:layout_width="@dimen/dp_654"
|
||||
android:layout_height="@dimen/dp_790"
|
||||
android:layout_marginTop="@dimen/dp_39"
|
||||
android:layout_marginEnd="@dimen/dp_4"
|
||||
android:layout_marginEnd="@dimen/dp_19"
|
||||
android:visibility="gone"
|
||||
android:focusable="false"
|
||||
android:focusableInTouchMode="false"
|
||||
|
||||
@@ -88,7 +88,7 @@
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
android:layout_marginTop="@dimen/dp_20"
|
||||
android:layout_marginTop="@dimen/dp_10"
|
||||
android:layout_marginStart="@dimen/dp_66"
|
||||
android:layout_marginEnd="@dimen/dp_66"
|
||||
android:layout_marginBottom="@dimen/dp_216"
|
||||
|
||||
@@ -727,31 +727,6 @@
|
||||
app:layout_constraintLeft_toLeftOf="@id/tvOtherTitle"
|
||||
app:layout_constraintRight_toRightOf="parent" />
|
||||
|
||||
<!--红绿灯标识-->
|
||||
<androidx.appcompat.widget.SwitchCompat
|
||||
android:id="@+id/scTrafficLight"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_20"
|
||||
android:scaleX="1.2"
|
||||
android:scaleY="1.2"
|
||||
android:text="红绿灯标识"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="@id/otherGuideLine"
|
||||
app:layout_constraintTop_toBottomOf="@id/tvOtherTitle" />
|
||||
|
||||
<!--红绿灯新链路 车端融合标识-->
|
||||
<androidx.appcompat.widget.SwitchCompat
|
||||
android:id="@+id/scCarUnionTrafficLight"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_20"
|
||||
android:scaleX="1.2"
|
||||
android:scaleY="1.2"
|
||||
android:text="红绿灯车端融合标识"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintLeft_toRightOf="@id/otherGuideLine"
|
||||
app:layout_constraintTop_toBottomOf="@id/tvOtherTitle" />
|
||||
|
||||
<!--限速标识-->
|
||||
<androidx.appcompat.widget.SwitchCompat
|
||||
@@ -764,7 +739,7 @@
|
||||
android:text="限速标识"
|
||||
app:layout_constraintLeft_toRightOf="@id/otherGuideLine"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/scCarUnionTrafficLight" />
|
||||
app:layout_constraintTop_toBottomOf="@id/tvOtherTitle" />
|
||||
<!--异常上报提示-->
|
||||
<androidx.appcompat.widget.SwitchCompat
|
||||
android:id="@+id/scIPCReport"
|
||||
@@ -776,7 +751,7 @@
|
||||
android:text="异常上报提示"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="@id/otherGuideLine"
|
||||
app:layout_constraintTop_toBottomOf="@id/scTrafficLight" />
|
||||
app:layout_constraintTop_toBottomOf="@id/tvOtherTitle" />
|
||||
<!--360环视-->
|
||||
<androidx.appcompat.widget.SwitchCompat
|
||||
android:id="@+id/scNew360LookAround"
|
||||
|
||||
@@ -0,0 +1,54 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="@dimen/dp_396"
|
||||
android:layout_height="@dimen/dp_183"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:background="@drawable/bg_light_prompt_bus_p">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvPromptTitle"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
android:textColor="#203555"
|
||||
android:textSize="@dimen/sp_28"
|
||||
android:layout_marginTop="@dimen/dp_55"
|
||||
android:layout_marginStart="@dimen/dp_70"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvPromptContent"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintTop_toBottomOf="@id/tvPromptTitle"
|
||||
app:layout_constraintLeft_toLeftOf="@id/tvPromptTitle"
|
||||
android:textSize="@dimen/sp_28"
|
||||
android:textColor="#203555"
|
||||
/>
|
||||
|
||||
<com.mogo.eagle.core.function.hmi.ui.widget.TypefaceTextView
|
||||
android:id="@+id/tvTrafficNum"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintLeft_toRightOf="@id/tvPromptContent"
|
||||
android:textSize="@dimen/sp_90"
|
||||
android:layout_marginStart="@dimen/dp_30"
|
||||
app:textType="DS_DIGIB_2"
|
||||
android:layout_marginTop="@dimen/dp_20"
|
||||
/>
|
||||
|
||||
<com.mogo.eagle.core.function.hmi.ui.widget.TypefaceTextView
|
||||
android:id="@+id/tvTrafficNumDecimal"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintBottom_toBottomOf="@id/tvPromptContent"
|
||||
app:layout_constraintLeft_toRightOf="@id/tvTrafficNum"
|
||||
android:layout_marginStart="@dimen/dp_2"
|
||||
android:textSize="@dimen/sp_50"
|
||||
app:textType="DS_DIGIB_2"
|
||||
android:layout_marginBottom="@dimen/dp_m_2"
|
||||
/>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
@@ -23,12 +23,12 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/fault_reason"
|
||||
android:textSize="@dimen/sp_40"
|
||||
android:textColor="#CCFFFFFF"
|
||||
android:textColor="@color/white"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintTop_toTopOf="@id/view_title_bg"
|
||||
app:layout_constraintBottom_toBottomOf="@id/view_title_bg"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintStart_toStartOf="@id/view_title_bg"
|
||||
android:layout_marginStart="@dimen/dp_32"
|
||||
android:layout_marginTop="@dimen/dp_55"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
@@ -38,10 +38,9 @@
|
||||
android:text="@string/fault_open_time"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/sp_32"
|
||||
app:layout_constraintTop_toTopOf="@id/view_title_bg"
|
||||
app:layout_constraintBottom_toBottomOf="@id/view_title_bg"
|
||||
app:layout_constraintEnd_toEndOf="@id/view_title_bg"
|
||||
android:layout_marginEnd="@dimen/dp_53"
|
||||
app:layout_constraintTop_toTopOf="@id/tv_report_title"
|
||||
app:layout_constraintBottom_toBottomOf="@id/tv_report_title"
|
||||
app:layout_constraintEnd_toEndOf="@id/wrap_radio_group"
|
||||
/>
|
||||
|
||||
<View
|
||||
@@ -270,7 +269,7 @@
|
||||
android:layout_height="@dimen/dp_80"
|
||||
app:layout_constraintTop_toBottomOf="@id/et_describe_input"
|
||||
app:layout_constraintLeft_toLeftOf="@id/et_describe_input"
|
||||
android:background="@drawable/bg_fault_report"
|
||||
android:background="@drawable/bg_work_order"
|
||||
android:text="@string/work_order_report"
|
||||
android:textColor="#FFFFFF"
|
||||
android:textSize="@dimen/sp_36"
|
||||
|
||||
@@ -133,6 +133,7 @@
|
||||
<attr name="promptUser">
|
||||
<enum name="driver" value="0"/>
|
||||
<enum name="passenger" value="1"/>
|
||||
<enum name="passenger_bus" value="2"/>
|
||||
</attr>
|
||||
</declare-styleable>
|
||||
|
||||
|
||||
@@ -84,8 +84,11 @@
|
||||
<color name="light_prompt_green">#31FF56</color>
|
||||
<color name="light_prompt_yellow">#FFCD3D</color>
|
||||
<color name="light_prompt_red_p">#F63C12</color>
|
||||
<color name="light_prompt_red_p_bus">#F63C12</color>
|
||||
<color name="light_prompt_green_p">#36DB1C</color>
|
||||
<color name="light_prompt_green_p_bus">#1FD74A</color>
|
||||
<color name="light_prompt_yellow_p">#FDB700</color>
|
||||
<color name="light_prompt_yellow_p_bus">#FDB400</color>
|
||||
|
||||
<color name="auto_exploration_content_p">#131415</color>
|
||||
|
||||
|
||||
@@ -3,18 +3,6 @@
|
||||
<PreferenceCategory
|
||||
android:layout="@layout/layout_operate_panel_preference_category_title"
|
||||
android:title="业务类">
|
||||
<SwitchPreferenceCompat
|
||||
android:key="red_or_green_light_marker"
|
||||
android:layout="@layout/layout_operate_panel_preference_switch_compat"
|
||||
android:title="红绿灯标识"
|
||||
android:persistent="false"
|
||||
android:widgetLayout="@layout/layout_operate_panel_preference_widget_switch_compat" />
|
||||
<SwitchPreferenceCompat
|
||||
android:key="red_or_green_light_merge_marker"
|
||||
android:layout="@layout/layout_operate_panel_preference_switch_compat"
|
||||
android:title="红绿灯融合标识"
|
||||
android:persistent="false"
|
||||
android:widgetLayout="@layout/layout_operate_panel_preference_widget_switch_compat" />
|
||||
<SwitchPreferenceCompat
|
||||
android:key="fault_report_tip"
|
||||
android:layout="@layout/layout_operate_panel_preference_switch_compat"
|
||||
|
||||
@@ -9,7 +9,6 @@ import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotCarConfigListene
|
||||
import com.mogo.eagle.core.function.api.datacenter.obu.IMoGoObuStatusListener
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotCarConfigListenerManager
|
||||
import com.mogo.eagle.core.function.call.obu.CallerObuWarningListenerManager
|
||||
import com.mogo.eagle.core.utilcode.mogo.AppIdentityModeUtils.isT1T2
|
||||
import com.mogo.eagle.core.utilcode.mogo.AppIdentityModeUtils.isTaxi
|
||||
import com.mogo.eagle.core.utilcode.mogo.thread.WorkThreadHandler
|
||||
import com.mogo.eagle.core.utilcode.util.ParseVersionUtils
|
||||
@@ -78,24 +77,25 @@ object IdentifyFactory : Identify, IMoGoObuStatusListener, IMoGoAutopilotCarConf
|
||||
override fun handleMessage(msg: Message) {
|
||||
super.handleMessage(msg)
|
||||
|
||||
if(identify == null){
|
||||
if (identify == null) {
|
||||
if (dockerVersion != null && dockerVersion!!.isNotEmpty()) {
|
||||
try {
|
||||
val version = ParseVersionUtils.parseVersion(true, dockerVersion)
|
||||
identify = if (version >= 30100 && isTaxi(FunctionBuildConfig.appIdentityMode)) {
|
||||
FunctionBuildConfig.isBeautyMode = false
|
||||
drawType("关闭感知优化模式")
|
||||
DriverIdentify.originDataDrawer
|
||||
} else {
|
||||
FunctionBuildConfig.isBeautyMode = true
|
||||
drawType("开启感知优化模式")
|
||||
UserIdentify.beautifyDataDrawer
|
||||
}
|
||||
identify =
|
||||
if (version >= 30100 && isTaxi(FunctionBuildConfig.appIdentityMode)) {
|
||||
FunctionBuildConfig.isBeautyMode = false
|
||||
drawType("关闭感知优化模式")
|
||||
DriverIdentify.originDataDrawer
|
||||
} else {
|
||||
FunctionBuildConfig.isBeautyMode = true
|
||||
drawType("开启感知优化模式")
|
||||
UserIdentify.beautifyDataDrawer
|
||||
}
|
||||
} catch (e: Exception) {
|
||||
drawType("解析docker异常:$dockerVersion")
|
||||
identify = UserIdentify.beautifyDataDrawer
|
||||
}
|
||||
}else{
|
||||
} else {
|
||||
return
|
||||
}
|
||||
}
|
||||
@@ -118,13 +118,14 @@ object IdentifyFactory : Identify, IMoGoObuStatusListener, IMoGoAutopilotCarConf
|
||||
|
||||
when (msg.what) {
|
||||
MSG_CHECK -> {
|
||||
if(startTime == 0L){
|
||||
if (startTime == 0L) {
|
||||
sendEmptyMessageDelayed(MSG_CHECK, 1000L)
|
||||
return
|
||||
}
|
||||
val endTime = System.nanoTime()
|
||||
val internal = TimeUnit.NANOSECONDS.toMillis(endTime - startTime)
|
||||
if(internal >= 1000){
|
||||
if (internal >= 1000) {
|
||||
lostFrame(internal.toString())
|
||||
identify!!.clearOldMarker()
|
||||
}
|
||||
sendEmptyMessageDelayed(MSG_CHECK, 1000L)
|
||||
@@ -229,4 +230,13 @@ object IdentifyFactory : Identify, IMoGoObuStatusListener, IMoGoAutopilotCarConf
|
||||
mDrawerHandler.sendMessage(message)
|
||||
}
|
||||
|
||||
@ChainLog(
|
||||
linkChainLog = ChainConstant.CHAIN_TYPE_SOCKET_AUTOPILOT,
|
||||
linkCode = ChainConstant.CHAIN_SOURCE_ADAS,
|
||||
nodeAliasCode = ChainConstant.CHAIN_CODE_ADAS_LOST_FRAME,
|
||||
paramIndexes = [0]
|
||||
)
|
||||
private fun lostFrame(time: String) {
|
||||
}
|
||||
|
||||
}
|
||||
@@ -237,6 +237,8 @@ class OverMapView @JvmOverloads constructor(
|
||||
if (mMapView != null) {
|
||||
mMapView!!.onDestroy()
|
||||
}
|
||||
mAMap?.clear()
|
||||
mAMap = null
|
||||
}
|
||||
// =================必须通知高德地图生命周期的变化=================
|
||||
|
||||
|
||||
@@ -55,6 +55,7 @@ import com.mogo.eagle.core.utilcode.mogo.AppIdentityModeUtils
|
||||
import com.mogo.eagle.core.utilcode.mogo.MapAssetStyleUtils
|
||||
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_MAP
|
||||
import com.mogo.eagle.core.utilcode.util.CoordinateUtils
|
||||
import com.mogo.eagle.core.utilcode.util.LocationUtils
|
||||
import com.mogo.eagle.core.utilcode.util.UiThreadHandler
|
||||
@@ -202,7 +203,7 @@ class TravelRealityView @JvmOverloads constructor(
|
||||
* 在轨迹点附近的路口设备
|
||||
*/
|
||||
@Volatile
|
||||
private var deviceInPathList: List<DeviceInfoBean>?? = null
|
||||
private var deviceInPathList: List<DeviceInfoBean>? = null
|
||||
|
||||
@Volatile
|
||||
private var roadTrackList: List<List<List<Double>?>?>? = null
|
||||
@@ -269,31 +270,33 @@ class TravelRealityView @JvmOverloads constructor(
|
||||
initView(context)
|
||||
} catch (e: Exception) {
|
||||
e.printStackTrace()
|
||||
Log.d(TAG, "TravelRealityView初始化异常")
|
||||
CallerLogger.d("$M_MAP$TAG", "TravelRealityView初始化异常")
|
||||
}
|
||||
}
|
||||
|
||||
// =================必须通知高德地图生命周期的变化=================
|
||||
fun onCreateView(savedInstanceState: Bundle?) {
|
||||
mMapView?.onCreate(savedInstanceState)
|
||||
Log.d(TAG, "高德地图onCreateView")
|
||||
CallerLogger.d("$M_MAP$TAG", "高德地图onCreateView")
|
||||
}
|
||||
|
||||
fun onResume() {
|
||||
mMapView?.onResume()
|
||||
isMapDestroyed = false
|
||||
Log.d(TAG, "高德地图onResume")
|
||||
CallerLogger.d("$M_MAP$TAG", "高德地图onResume")
|
||||
}
|
||||
|
||||
fun onPause() {
|
||||
mMapView?.onPause()
|
||||
Log.d(TAG, "高德地图onPause")
|
||||
CallerLogger.d("$M_MAP$TAG", "高德地图onPause")
|
||||
}
|
||||
|
||||
fun onDestroy() {
|
||||
mMapView?.onDestroy()
|
||||
mAMap?.clear()
|
||||
mAMap = null
|
||||
isMapDestroyed = true
|
||||
Log.d(TAG, "高德地图页面已销毁!")
|
||||
CallerLogger.d("$M_MAP$TAG", "高德地图页面已销毁!")
|
||||
}
|
||||
// =================必须通知高德地图生命周期的变化=================
|
||||
|
||||
@@ -350,7 +353,7 @@ class TravelRealityView @JvmOverloads constructor(
|
||||
* 清除所有Marker和Polyline
|
||||
*/
|
||||
fun clearAllMarkersAndPolyline() {
|
||||
Log.d(TAG, "clearAllMarkersAndPolyline")
|
||||
CallerLogger.d("$M_MAP$TAG", "clearAllMarkersAndPolyline")
|
||||
nonFrequentHandler?.removeCallbacksAndMessages(null)
|
||||
travelNetWorkModel.cancelAllRequest()
|
||||
reqData = null
|
||||
@@ -469,7 +472,7 @@ class TravelRealityView @JvmOverloads constructor(
|
||||
}
|
||||
|
||||
private fun initTravelRealityMapView(isInit: Boolean = false) {
|
||||
Log.d(TAG, "initAMapView")
|
||||
CallerLogger.d("$M_MAP$TAG", "initAMapView")
|
||||
mAMap = mMapView?.map
|
||||
val mapStyleOptions = CustomMapStyleOptions()
|
||||
if (!mapStylePath.isNullOrEmpty() && !mapStyleExtraPath.isNullOrEmpty()) {
|
||||
@@ -511,7 +514,7 @@ class TravelRealityView @JvmOverloads constructor(
|
||||
}
|
||||
if (isInit) {
|
||||
mAMap?.setOnMapLoadedListener {
|
||||
Log.d(TAG, "地图加载完成!")
|
||||
CallerLogger.d("$M_MAP$TAG", "地图加载完成!")
|
||||
isMapLoaded = true
|
||||
mAMap?.setCustomMapStyle(mapStyleOptions)
|
||||
// 实时路况图层关闭,必须添加在loaded结束之后,其他位置不生效
|
||||
@@ -569,13 +572,13 @@ class TravelRealityView @JvmOverloads constructor(
|
||||
override fun onVisibilityChanged(changedView: View, visibility: Int) {
|
||||
super.onVisibilityChanged(changedView, visibility)
|
||||
if (visibility == VISIBLE) {
|
||||
Log.d(TAG, "onVisibilityChanged:VISIBLE!")
|
||||
CallerLogger.d("$M_MAP$TAG", "onVisibilityChanged:VISIBLE!")
|
||||
}
|
||||
}
|
||||
|
||||
override fun onAttachedToWindow() {
|
||||
super.onAttachedToWindow()
|
||||
Log.d(TAG, "onAttachedToWindow")
|
||||
CallerLogger.d("$M_MAP$TAG", "onAttachedToWindow")
|
||||
initHandlers()
|
||||
advanceRequest()
|
||||
CallerPlanningRottingListenerManager.addListener("${TAG}${this.hashCode()}", this)
|
||||
@@ -586,7 +589,7 @@ class TravelRealityView @JvmOverloads constructor(
|
||||
|
||||
override fun onDetachedFromWindow() {
|
||||
super.onDetachedFromWindow()
|
||||
Log.d(TAG, "onDetachedFromWindow")
|
||||
CallerLogger.d("$M_MAP$TAG", "onDetachedFromWindow")
|
||||
deviceList = null
|
||||
retryCount = 0
|
||||
// 注册定位监听
|
||||
@@ -606,10 +609,10 @@ class TravelRealityView @JvmOverloads constructor(
|
||||
|
||||
private fun advanceRequest() {
|
||||
isRoadTrackReq = true
|
||||
Log.d(TAG, "请求获取智慧道路轨迹!")
|
||||
CallerLogger.d("$M_MAP$TAG", "请求获取智慧道路轨迹!")
|
||||
// 获取智慧道路轨迹
|
||||
travelNetWorkModel.getCityRoadTrack(onSuccess = {
|
||||
Log.d(TAG, "Road track result is:$it")
|
||||
CallerLogger.d("$M_MAP$TAG", "Road track result is:$it")
|
||||
roadTrackList = it
|
||||
isRoadTrackReq = false
|
||||
// 司机屏默认显示小地图的渲染,乘客屏默认显示行程总览地图的渲染
|
||||
@@ -618,7 +621,7 @@ class TravelRealityView @JvmOverloads constructor(
|
||||
}
|
||||
}, onError = {
|
||||
isRoadTrackReq = false
|
||||
Log.d(TAG, "Road track error is:$it")
|
||||
CallerLogger.d("$M_MAP$TAG", "Road track error is:$it")
|
||||
})
|
||||
}
|
||||
|
||||
@@ -670,7 +673,7 @@ class TravelRealityView @JvmOverloads constructor(
|
||||
globalData[0].lat,
|
||||
globalData[0].lon
|
||||
)
|
||||
Log.w(TAG, "起终点距离为:$distance")
|
||||
CallerLogger.w("$M_MAP$TAG", "起终点距离为:$distance")
|
||||
// if (distance < 2000) {
|
||||
// roadRange = maxRoadRange
|
||||
// roadWidth = minRoadWidth
|
||||
@@ -706,7 +709,7 @@ class TravelRealityView @JvmOverloads constructor(
|
||||
}
|
||||
|
||||
private fun handleRoadEvent(eventList: List<EventBean>, globalList: ArrayList<Point>) {
|
||||
if (globalList.isNullOrEmpty()) return
|
||||
if (globalList.isEmpty()) return
|
||||
testTime = System.currentTimeMillis()
|
||||
if (eventList.isEmpty()) {
|
||||
listener?.onDraw(emptyList(), true)
|
||||
@@ -717,8 +720,8 @@ class TravelRealityView @JvmOverloads constructor(
|
||||
} else {
|
||||
val eventDrawMap = HashMap<String, EventDrawBean>()
|
||||
val eventOptionsList = ArrayList<MarkerOptions>()
|
||||
var distance = 0.0
|
||||
var key = ""
|
||||
var distance: Double
|
||||
var key: String
|
||||
val roadEvents = ArrayList<EventBean>()
|
||||
val eventPointMap = HashMap<String, Int>()
|
||||
globalList.forEachIndexed { index, globalPoint ->
|
||||
@@ -734,8 +737,7 @@ class TravelRealityView @JvmOverloads constructor(
|
||||
)
|
||||
key = "${eventBean.lon},${eventBean.lat}"
|
||||
if (distance >= 10 || eventPointMap.contains(key)) {
|
||||
Log.d(
|
||||
TAG,
|
||||
CallerLogger.d("$M_MAP$TAG",
|
||||
"道路事件:点(${key})到线段${index}-${index + 1}的距离为:${distance}米"
|
||||
)
|
||||
return@forEach
|
||||
@@ -750,7 +752,7 @@ class TravelRealityView @JvmOverloads constructor(
|
||||
}
|
||||
}
|
||||
listener?.onDraw(eventDrawMap.values.toList(), true)
|
||||
Log.d(TAG, "过滤掉的事件个数为:${eventList.size - eventOptionsList.size}")
|
||||
CallerLogger.d("$M_MAP$TAG", "过滤掉的事件个数为:${eventList.size - eventOptionsList.size}")
|
||||
// 事件不足3个则用路口设备补齐
|
||||
completeQuantity(roadEvents)
|
||||
// 绘制道路事件
|
||||
@@ -761,7 +763,7 @@ class TravelRealityView @JvmOverloads constructor(
|
||||
private fun completeQuantity(roadEvents: ArrayList<EventBean>) {
|
||||
val ipPointEntityMap = HashMap<String, MutableList<VideoMarkerEntity>>()
|
||||
// 全部展示事件,事件数不足则用路口设备补齐
|
||||
Log.d(TAG, "已绘制的道路事件个数为:${roadEvents.size}")
|
||||
CallerLogger.d("$M_MAP$TAG", "已绘制的道路事件个数为:${roadEvents.size}")
|
||||
if (roadEvents.size >= 3) {
|
||||
roadEvents[0].let {
|
||||
it.ip?.also { ip ->
|
||||
@@ -894,7 +896,7 @@ class TravelRealityView @JvmOverloads constructor(
|
||||
}
|
||||
|
||||
else -> {
|
||||
Log.d(TAG, "请求到未知事件!")
|
||||
CallerLogger.d("$M_MAP$TAG", "请求到未知事件!")
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -908,11 +910,11 @@ class TravelRealityView @JvmOverloads constructor(
|
||||
ipPointEntityMap: HashMap<String, MutableList<VideoMarkerEntity>>,
|
||||
eventSize: Int
|
||||
) {
|
||||
Log.d(TAG, "retryGetCrossDevice")
|
||||
CallerLogger.d("$M_MAP$TAG", "retryGetCrossDevice")
|
||||
val crossDeviceListTmp = deviceInPathList
|
||||
while (crossDeviceListTmp.isNullOrEmpty()) {
|
||||
if (retryCount >= 5) {
|
||||
Log.d(TAG, "尝试多次后仍无法获取到路口设备数据!")
|
||||
CallerLogger.d("$M_MAP$TAG", "尝试多次后仍无法获取到路口设备数据!")
|
||||
break
|
||||
}
|
||||
Thread.sleep(250)
|
||||
@@ -920,12 +922,12 @@ class TravelRealityView @JvmOverloads constructor(
|
||||
}
|
||||
var maxSize = 3 - eventSize
|
||||
if (maxSize <= 0) {
|
||||
Log.d(TAG, "全息路口个数计算有误则返回!")
|
||||
CallerLogger.d("$M_MAP$TAG", "全息路口个数计算有误则返回!")
|
||||
return
|
||||
}
|
||||
Log.d(TAG, "待查询缩略图的事件个数为:${eventSize}")
|
||||
CallerLogger.d("$M_MAP$TAG", "待查询缩略图的事件个数为:${eventSize}")
|
||||
if (!crossDeviceListTmp.isNullOrEmpty()) {
|
||||
Log.d(TAG, "缓存的全息路口个数为:${crossDeviceListTmp.size}")
|
||||
CallerLogger.d("$M_MAP$TAG", "缓存的全息路口个数为:${crossDeviceListTmp.size}")
|
||||
// 轨迹线附近的路口设备取几个进行卡片展示
|
||||
crossDeviceListTmp.forEach { deviceInfoBean ->
|
||||
if (maxSize > 0) {
|
||||
@@ -1005,12 +1007,12 @@ class TravelRealityView @JvmOverloads constructor(
|
||||
ipPointEntityMap: HashMap<String, MutableList<VideoMarkerEntity>>
|
||||
) {
|
||||
val ipList = ipPointEntityMap.keys.toMutableList()
|
||||
Log.d(TAG, "请求获取缩略图,个数为:${ipList.size}!")
|
||||
CallerLogger.d("$M_MAP$TAG", "请求获取缩略图,个数为:${ipList.size}!")
|
||||
if (ipList.isEmpty()) {
|
||||
return
|
||||
}
|
||||
travelNetWorkModel.batchRequestCrossLive(ipList, onSuccess = {
|
||||
Log.d(TAG, "Cross live result is:$it")
|
||||
CallerLogger.d("$M_MAP$TAG", "Cross live result is:$it")
|
||||
val liveOptionsList = ArrayList<MarkerOptions>()
|
||||
var markerOption: MarkerOptions
|
||||
var pair: Pair<Float, Float>
|
||||
@@ -1043,18 +1045,18 @@ class TravelRealityView @JvmOverloads constructor(
|
||||
ipPointEntityMap[ip]!!
|
||||
)
|
||||
} else {
|
||||
Log.d(TAG, "缓存中未查到对应ip!!")
|
||||
CallerLogger.d("$M_MAP$TAG", "缓存中未查到对应ip!!")
|
||||
return@let
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Log.d(TAG, "绘制卡片的个数为:${liveOptionsList.size}")
|
||||
CallerLogger.d("$M_MAP$TAG", "绘制卡片的个数为:${liveOptionsList.size}")
|
||||
// 绘制事件卡片
|
||||
drawMarkers(DRAW_LIVE_DETAIL, liveOptionsList)
|
||||
adjustCameraWithVertex(vertexList)
|
||||
}, onError = {
|
||||
Log.d(TAG, "Cross live error is:$it")
|
||||
CallerLogger.d("$M_MAP$TAG", "Cross live error is:$it")
|
||||
})
|
||||
}
|
||||
|
||||
@@ -1082,8 +1084,7 @@ class TravelRealityView @JvmOverloads constructor(
|
||||
)
|
||||
key = "${deviceBean.lon},${deviceBean.lat}"
|
||||
if (distance >= 10 || devicePointMap.contains(key)) {
|
||||
Log.d(
|
||||
TAG,
|
||||
CallerLogger.d("$M_MAP$TAG",
|
||||
"路口设备:点(${key})到线段${index}-${index + 1}的距离为:${distance}米"
|
||||
)
|
||||
return@loop
|
||||
@@ -1128,7 +1129,7 @@ class TravelRealityView @JvmOverloads constructor(
|
||||
)
|
||||
}
|
||||
deviceInPathList = deviceInPaths
|
||||
Log.d(TAG, "待绘制的全息路口的个数为:${crossOptionsList.size}")
|
||||
CallerLogger.d("$M_MAP$TAG", "待绘制的全息路口的个数为:${crossOptionsList.size}")
|
||||
// 绘制路口设备
|
||||
drawMarkers(DRAW_CROSS_DEVICE, crossOptionsList)
|
||||
}
|
||||
@@ -1164,7 +1165,7 @@ class TravelRealityView @JvmOverloads constructor(
|
||||
val globalOptionList = ArrayList<PolylineOptions>()
|
||||
val globalIndexSet = HashSet<Int>()
|
||||
if (globalList.isNullOrEmpty()) {// 无轨迹时以道路中心线为中轴画给定宽度的纹理
|
||||
Log.d(TAG, "无轨迹点,绘制全局智慧道路!")
|
||||
CallerLogger.d("$M_MAP$TAG", "无轨迹点,绘制全局智慧道路!")
|
||||
val boundsBuilder = LatLngBounds.Builder()
|
||||
var latLngTmp: LatLng
|
||||
roadTrajectoryList.forEach { trajectoryList ->
|
||||
@@ -1198,7 +1199,7 @@ class TravelRealityView @JvmOverloads constructor(
|
||||
)
|
||||
moveMapCamera(cameraUpdate)
|
||||
} else {
|
||||
Log.d(TAG, "有轨迹点,绘制局部智慧道路!")
|
||||
CallerLogger.d("$M_MAP$TAG", "有轨迹点,绘制局部智慧道路!")
|
||||
roadTrajectoryList.forEach { trajectoryList ->
|
||||
var distanceTmp: Double
|
||||
// var lastIndex = -1
|
||||
@@ -1234,7 +1235,7 @@ class TravelRealityView @JvmOverloads constructor(
|
||||
)
|
||||
// 如果距离小于50m则认为在智慧道路内
|
||||
if (distanceTmp < 50) {
|
||||
Log.d(TAG, "智慧道路内点索引为:$i")
|
||||
CallerLogger.d("$M_MAP$TAG", "智慧道路内点索引为:$i")
|
||||
globalIndexSet.add(i)
|
||||
}
|
||||
}
|
||||
@@ -1246,7 +1247,7 @@ class TravelRealityView @JvmOverloads constructor(
|
||||
var polylineOptionTmp: PolylineOptions? = null
|
||||
globalList.forEachIndexed { index, point ->
|
||||
if (!globalIndexSet.contains(index)) return@forEachIndexed
|
||||
Log.w(TAG, "智慧道路内点索引为:$index")
|
||||
CallerLogger.w("$M_MAP$TAG", "智慧道路内点索引为:$index")
|
||||
if (lastIndex < 0 || index - lastIndex > 1) {
|
||||
globalOptionList.add(PolylineOptions().also {
|
||||
optionTmp = it
|
||||
@@ -1414,7 +1415,7 @@ class TravelRealityView @JvmOverloads constructor(
|
||||
} else {
|
||||
lastTime = System.currentTimeMillis()
|
||||
}
|
||||
Log.d(TAG, "下发全局轨迹!")
|
||||
CallerLogger.d("$M_MAP$TAG", "下发全局轨迹!")
|
||||
globalPathResp?.let { globalPath ->
|
||||
if (isSmallMap) {
|
||||
if (globalPath.wayPointsList.size > 0) {
|
||||
@@ -1428,13 +1429,13 @@ class TravelRealityView @JvmOverloads constructor(
|
||||
pointList.add(Point(loc.longitude, loc.latitude))
|
||||
pointCloneList.add(Point(loc.longitude, loc.latitude))
|
||||
}
|
||||
Log.d(TAG, "轨迹点个数为:${pointList.size}")
|
||||
CallerLogger.d("$M_MAP$TAG", "轨迹点个数为:${pointList.size}")
|
||||
reqData = pointCloneList
|
||||
handleGlobalPath(pointList)
|
||||
|
||||
requestData(pointList)
|
||||
if (!isRoadTrackReq) {
|
||||
Log.d(TAG, "处理智慧道路轨迹!")
|
||||
CallerLogger.d("$M_MAP$TAG", "处理智慧道路轨迹!")
|
||||
handleRoadTrajectories(roadTrackList, pointList)
|
||||
}
|
||||
}
|
||||
@@ -1620,21 +1621,21 @@ class TravelRealityView @JvmOverloads constructor(
|
||||
|
||||
private fun requestData(pointList: ArrayList<Point>) {
|
||||
if (!isCrossDeviceReq) {
|
||||
Log.d(TAG, "请求获取路口设备!")
|
||||
CallerLogger.d("$M_MAP$TAG", "请求获取路口设备!")
|
||||
isCrossDeviceReq = true
|
||||
// 获取路口设备
|
||||
travelNetWorkModel.getCrossDevice(onSuccess = {
|
||||
Log.d(TAG, "Cross device result is:$it")
|
||||
CallerLogger.d("$M_MAP$TAG", "Cross device result is:$it")
|
||||
isCrossDeviceReq = false
|
||||
deviceList = it
|
||||
handleCrossDevices(it, pointList)
|
||||
}, onError = {
|
||||
isCrossDeviceReq = false
|
||||
Log.d(TAG, "Cross device error is:$it")
|
||||
CallerLogger.d("$M_MAP$TAG", "Cross device error is:$it")
|
||||
})
|
||||
}
|
||||
if (!isRoadEventReq) {
|
||||
Log.d(TAG, "请求获取道路事件!")
|
||||
CallerLogger.d("$M_MAP$TAG", "请求获取道路事件!")
|
||||
// 获取道路事件
|
||||
var cityCode = CallerMapUIServiceManager.getCityCode() ?: "0734"
|
||||
if (cityCode.isEmpty()) {
|
||||
@@ -1646,13 +1647,13 @@ class TravelRealityView @JvmOverloads constructor(
|
||||
onSuccess = {
|
||||
isRoadEventReq = false
|
||||
retryCount = 0
|
||||
Log.d(TAG, "Events result is:$it")
|
||||
CallerLogger.d("$M_MAP$TAG", "Events result is:$it")
|
||||
handleRoadEvent(it, pointList)
|
||||
},
|
||||
onError = {
|
||||
isRoadEventReq = false
|
||||
retryCount = 0
|
||||
Log.d(TAG, "Events error is:$it")
|
||||
CallerLogger.d("$M_MAP$TAG", "Events error is:$it")
|
||||
})
|
||||
}
|
||||
}
|
||||
@@ -1666,7 +1667,7 @@ class TravelRealityView @JvmOverloads constructor(
|
||||
if (mAMap != null && mAMap!!.projection != null) {
|
||||
var latLng: LatLng?
|
||||
// 经纬度转屏幕坐标
|
||||
var point = mAMap!!.projection!!.toScreenLocation(position)
|
||||
val point = mAMap!!.projection!!.toScreenLocation(position)
|
||||
point?.let {
|
||||
travelNetWorkModel.calculateVertex(context, orientation, it).forEach { screenP ->
|
||||
// 每个顶点屏幕坐标转高德坐标
|
||||
@@ -1817,7 +1818,7 @@ class TravelRealityView @JvmOverloads constructor(
|
||||
}
|
||||
} catch (e: Exception) {
|
||||
e.printStackTrace()
|
||||
Log.e(TAG, "概览页面渲染异常为:${e.message}")
|
||||
CallerLogger.e("$M_MAP$TAG", "概览页面渲染异常为:${e.message}")
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1859,7 +1860,7 @@ class TravelRealityView @JvmOverloads constructor(
|
||||
}
|
||||
|
||||
private fun realDrawGlobalPath(polylineOptions: PolylineOptions) {
|
||||
Log.d(TAG, "realDrawGlobalPath")
|
||||
CallerLogger.d("$M_MAP$TAG", "realDrawGlobalPath")
|
||||
if (globalPolyline == null) {
|
||||
globalPolyline = mAMap?.addPolyline(polylineOptions)
|
||||
} else {
|
||||
@@ -1868,7 +1869,7 @@ class TravelRealityView @JvmOverloads constructor(
|
||||
}
|
||||
|
||||
private fun realDrawEventMarkers(eventOptionList: ArrayList<MarkerOptions>) {
|
||||
Log.d(TAG, "realDrawEventMarkers")
|
||||
CallerLogger.d("$M_MAP$TAG", "realDrawEventMarkers")
|
||||
eventMarkerList.forEach {
|
||||
it.destroy()
|
||||
}
|
||||
@@ -1881,11 +1882,11 @@ class TravelRealityView @JvmOverloads constructor(
|
||||
it.isClickable = false
|
||||
}
|
||||
}
|
||||
Log.d(TAG, "计算到绘制事件耗时为:${System.currentTimeMillis() - testTime}")
|
||||
CallerLogger.d("$M_MAP$TAG", "计算到绘制事件耗时为:${System.currentTimeMillis() - testTime}")
|
||||
}
|
||||
|
||||
private fun realClearEventMarkers() {
|
||||
Log.d(TAG, "realClearEventMarkers")
|
||||
CallerLogger.d("$M_MAP$TAG", "realClearEventMarkers")
|
||||
eventMarkerList.forEach {
|
||||
it.destroy()
|
||||
}
|
||||
@@ -1893,7 +1894,7 @@ class TravelRealityView @JvmOverloads constructor(
|
||||
}
|
||||
|
||||
private fun realDrawCrossDeviceMarkers(eventMarkerList: ArrayList<MarkerOptions>) {
|
||||
Log.d(TAG, "realDrawCrossDeviceMarkers")
|
||||
CallerLogger.d("$M_MAP$TAG", "realDrawCrossDeviceMarkers")
|
||||
deviceMarkerList.forEach {
|
||||
it.destroy()
|
||||
}
|
||||
@@ -1907,7 +1908,7 @@ class TravelRealityView @JvmOverloads constructor(
|
||||
}
|
||||
|
||||
private fun realClearCrossDeviceMarkers() {
|
||||
Log.d(TAG, "realClearCrossDeviceMarkers")
|
||||
CallerLogger.d("$M_MAP$TAG", "realClearCrossDeviceMarkers")
|
||||
deviceMarkerList.forEach {
|
||||
it.destroy()
|
||||
}
|
||||
@@ -1918,7 +1919,7 @@ class TravelRealityView @JvmOverloads constructor(
|
||||
* 绘制在智慧道路范围内的轨迹
|
||||
*/
|
||||
private fun realDrawGlobalTrajectory(polylineOptionsList: ArrayList<PolylineOptions>) {
|
||||
Log.d(TAG, "realDrawGlobalTrajectory")
|
||||
CallerLogger.d("$M_MAP$TAG", "realDrawGlobalTrajectory")
|
||||
if (globalPolylineList.isNotEmpty() && globalPolylineList.size != polylineOptionsList.size) {
|
||||
globalPolylineList.forEach {
|
||||
it.remove()
|
||||
@@ -1948,7 +1949,7 @@ class TravelRealityView @JvmOverloads constructor(
|
||||
* 绘制智慧道路范围(和全局轨迹匹配过的)
|
||||
*/
|
||||
private fun realDrawRoadTrajectory(polylineOptionsList: ArrayList<PolylineOptions>) {
|
||||
Log.d(TAG, "realDrawRoadTrajectory")
|
||||
CallerLogger.d("$M_MAP$TAG", "realDrawRoadTrajectory")
|
||||
if (trajectoryPolylineList.isNotEmpty() && trajectoryPolylineList.size != polylineOptionsList.size) {
|
||||
trajectoryPolylineList.forEach {
|
||||
it.remove()
|
||||
@@ -1975,7 +1976,7 @@ class TravelRealityView @JvmOverloads constructor(
|
||||
}
|
||||
|
||||
private fun realDrawLiveMarkers(liveOptionList: ArrayList<MarkerOptions>) {
|
||||
Log.d(TAG, "realDrawLiveMarkers")
|
||||
CallerLogger.d("$M_MAP$TAG", "realDrawLiveMarkers")
|
||||
liveMarkerList.forEach {
|
||||
it.destroy()
|
||||
}
|
||||
@@ -1990,7 +1991,7 @@ class TravelRealityView @JvmOverloads constructor(
|
||||
}
|
||||
|
||||
private fun realClearLiveMarkers() {
|
||||
Log.d(TAG, "realClearLiveMarkers")
|
||||
CallerLogger.d("$M_MAP$TAG", "realClearLiveMarkers")
|
||||
liveMarkerList.forEach {
|
||||
it.destroy()
|
||||
}
|
||||
@@ -1998,7 +1999,7 @@ class TravelRealityView @JvmOverloads constructor(
|
||||
}
|
||||
|
||||
private fun realUpdateVideoMarker(options: List<MarkerOptions>) {
|
||||
Log.d(TAG, "realUpdateVideoMarker")
|
||||
CallerLogger.d("$M_MAP$TAG", "realUpdateVideoMarker")
|
||||
liveMarkerList.forEach { liveMarker ->
|
||||
options.forEach {
|
||||
if (it.position == liveMarker.position) {
|
||||
@@ -2010,7 +2011,7 @@ class TravelRealityView @JvmOverloads constructor(
|
||||
}
|
||||
|
||||
private fun realDrawEndMarker(options: List<MarkerOptions>) {
|
||||
Log.d(TAG, "realDrawEndMarker")
|
||||
CallerLogger.d("$M_MAP$TAG", "realDrawEndMarker")
|
||||
mStartMarker?.destroy()
|
||||
mStartMarker = null
|
||||
mEndMarker?.destroy()
|
||||
@@ -2035,7 +2036,7 @@ class TravelRealityView @JvmOverloads constructor(
|
||||
}
|
||||
|
||||
private fun realClearAllMarkersAndPolyline() {
|
||||
Log.d(TAG, "realClearAllMarkersAndPolyline")
|
||||
CallerLogger.d("$M_MAP$TAG", "realClearAllMarkersAndPolyline")
|
||||
// 清除终点
|
||||
mStartMarker?.destroy()
|
||||
mStartMarker = null
|
||||
|
||||