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

This commit is contained in:
aibingbing
2024-10-09 19:14:54 +08:00
44 changed files with 1323 additions and 315 deletions

View File

@@ -39,6 +39,7 @@ import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationWGS84Lis
import com.mogo.eagle.core.function.call.devatools.CallerDevaToolsListenerManager
import com.mogo.eagle.core.function.call.devatools.CallerDevaToolsManager
import com.mogo.eagle.core.function.hmi.R
import com.mogo.eagle.core.utilcode.util.ClickUtils
import com.mogo.eagle.core.utilcode.util.JsonParser
import com.mogo.eagle.core.utilcode.util.ThreadUtils
import com.mogo.eagle.core.utilcode.util.TimeUtils
@@ -110,6 +111,9 @@ class FaultReasonView @JvmOverloads constructor(
private val type = 1 //故障类接口请求Type值为1
private val iconDown = ContextCompat.getDrawable(context, R.drawable.icon_fault_expand)
private val iconUp = ContextCompat.getDrawable(context, R.drawable.icon_fault_retract)
init {
LayoutInflater.from(context).inflate(R.layout.view_fault_reason, this, true)
initView()
@@ -166,9 +170,7 @@ class FaultReasonView @JvmOverloads constructor(
@SuppressLint("SetTextI18n")
private fun initEvent() {
CallerDevaToolsListenerManager.addListener(TAG, this)
val iconDown = ContextCompat.getDrawable(context, R.drawable.icon_fault_expand)
iconDown?.setBounds(0, 0, iconDown.minimumWidth, iconDown.minimumHeight)
val iconUp = ContextCompat.getDrawable(context, R.drawable.icon_fault_retract)
iconUp?.setBounds(0, 0, iconUp.minimumWidth, iconUp.minimumHeight)
//获取一级分类
CallerDevaToolsManager.getCategories(BadCaseConfig.tenantId, 1, 0, type, 0)
@@ -300,53 +302,57 @@ class FaultReasonView @JvmOverloads constructor(
}
//上报
tvFaultReport.setOnClickListener {
if (level2Name.isEmpty()) {
ToastUtils.showShort("请完整填写再上报")
return@setOnClickListener
}
if (hasLevel3 && level3Name.isEmpty()) {
ToastUtils.showShort("请完整填写再上报")
return@setOnClickListener
}
reportNote = etNoteInput.text.toString()
//故障码列表赋值
BadCaseConfig.newFMInfoMsg?.fmInfoList?.forEach {
faultCodeList.add(it.faultId)
}
val geocodeSearch = GeocodeSearch(context)
geocodeSearch.setOnGeocodeSearchListener(object :
GeocodeSearch.OnGeocodeSearchListener {
override fun onRegeocodeSearched(regeocodeResult: RegeocodeResult?, p1: Int) {
regeocodeResult?.regeocodeAddress?.formatAddress?.let {
address = it
}
val padProblemList = ArrayList<PadProblemInfo>()
val note = if (reportNote.isEmpty()) {
"$level1Name-$level2Name-$level3Name"
} else {
"$level1Name-$level2Name-$level3Name($reportNote)"
}
val padProblemInfo = PadProblemInfo(
address, faultCodeList, millis2String(workOrderOccurrenceTime), level1Id,
level2Id, level3Id, BadCaseConfig.lineName, note, reportType,
SharedPrefsMgr.getInstance().getString("och_account", "")
)
padProblemList.add(padProblemInfo)
val padAddProblemReq =
PadAddProblemReq(padProblemList, AppConfigInfo.plateNumber)
CallerDevaToolsManager.problemPadAdd(padAddProblemReq)
if(ClickUtils.isFastClick()){
if (level2Name.isEmpty()) {
ToastUtils.showShort("请完整填写再上报")
return@setOnClickListener
}
override fun onGeocodeSearched(p0: GeocodeResult?, p1: Int) {
if (hasLevel3 && level3Name.isEmpty()) {
ToastUtils.showShort("请完整填写再上报")
return@setOnClickListener
}
})
val latLon = LatLonPoint(
CallerChassisLocationWGS84ListenerManager.getChassisLocationWGS84().latitude,
CallerChassisLocationWGS84ListenerManager.getChassisLocationWGS84().longitude
)
val q = RegeocodeQuery(latLon, 200f, GeocodeSearch.AMAP)
geocodeSearch.getFromLocationAsyn(q)
reportNote = etNoteInput.text.toString()
//故障码列表赋值
BadCaseConfig.newFMInfoMsg?.fmInfoList?.forEach {
faultCodeList.add(it.faultId)
}
val geocodeSearch = GeocodeSearch(context)
geocodeSearch.setOnGeocodeSearchListener(object :
GeocodeSearch.OnGeocodeSearchListener {
override fun onRegeocodeSearched(regeocodeResult: RegeocodeResult?, p1: Int) {
regeocodeResult?.regeocodeAddress?.formatAddress?.let {
address = it
}
val padProblemList = ArrayList<PadProblemInfo>()
val note = if (reportNote.isEmpty()) {
"$level1Name-$level2Name-$level3Name"
} else {
"$level1Name-$level2Name-$level3Name($reportNote)"
}
val padProblemInfo = PadProblemInfo(
address, faultCodeList, millis2String(workOrderOccurrenceTime), level1Id,
level2Id, level3Id, BadCaseConfig.lineName, note, reportType,
SharedPrefsMgr.getInstance().getString("och_account", "")
)
padProblemList.add(padProblemInfo)
val padAddProblemReq =
PadAddProblemReq(padProblemList, AppConfigInfo.plateNumber)
CallerDevaToolsManager.problemPadAdd(padAddProblemReq)
}
override fun onGeocodeSearched(p0: GeocodeResult?, p1: Int) {
}
})
val latLon = LatLonPoint(
CallerChassisLocationWGS84ListenerManager.getChassisLocationWGS84().latitude,
CallerChassisLocationWGS84ListenerManager.getChassisLocationWGS84().longitude
)
val q = RegeocodeQuery(latLon, 200f, GeocodeSearch.AMAP)
geocodeSearch.getFromLocationAsyn(q)
}else{
ToastUtils.showShort("请勿连续上报,稍后再试")
}
}
//取消
@@ -531,4 +537,34 @@ class FaultReasonView @JvmOverloads constructor(
ToastUtils.showShort("故障列表获取失败:$msg")
}
override fun onVisibilityAggregated(isVisible: Boolean) {
super.onVisibilityAggregated(isVisible)
if(visibility == View.VISIBLE){
//弹窗展示时间
tvFaultTime.text =
millis2String(System.currentTimeMillis(), TimeUtils.getHourMinSecondFormat())
//故障发生时间
workOrderOccurrenceTime = System.currentTimeMillis()
tvOccurrenceTime.text = millis2String(workOrderOccurrenceTime, TimeUtils.getHourMinFormat())
//关闭故障类型选择
faultTypeSelectStatus = false
tvFaultType.setCompoundDrawables(null, null, iconDown, null)
//关闭故障原因选择
faultReasonSelectStatus = false
tvFaultReason.setCompoundDrawables(null, null, iconDown, null)
//隐藏列表
rvFaultList.visibility = View.GONE
//补充描述
etNoteInput.setText("")
//问题描述录音
ivNoteAudio.setImageDrawable(
ContextCompat.getDrawable(
context,
R.drawable.icon_reason_audio_normal
)
)
setAudio(false)
}
}
}

View File

@@ -13,6 +13,7 @@ import android.view.animation.Animation
import android.view.animation.ScaleAnimation
import android.widget.EditText
import androidx.constraintlayout.widget.ConstraintLayout
import androidx.core.content.ContextCompat
import com.iflytek.cloud.ErrorCode
import com.iflytek.cloud.InitListener
import com.iflytek.cloud.RecognizerListener
@@ -31,6 +32,7 @@ import com.mogo.eagle.core.function.call.devatools.CallerDevaToolsListenerManage
import com.mogo.eagle.core.function.call.devatools.CallerDevaToolsManager
import com.mogo.eagle.core.function.call.msgbox.CallerMsgBoxManager
import com.mogo.eagle.core.function.hmi.R
import com.mogo.eagle.core.utilcode.util.ClickUtils
import com.mogo.eagle.core.utilcode.util.JsonParser
import com.mogo.eagle.core.utilcode.util.ThreadUtils
import com.mogo.eagle.core.utilcode.util.TimeUtils
@@ -159,41 +161,59 @@ class WorkOrderView @JvmOverloads constructor(
//问题描述录音
iv_describe_audio.setOnClickListener {
audioStatus = !audioStatus
if (audioStatus) {
iv_describe_audio.setImageDrawable(
ContextCompat.getDrawable(
context,
R.drawable.icon_reason_audio_pressed
)
)
} else {
iv_describe_audio.setImageDrawable(
ContextCompat.getDrawable(
context,
R.drawable.icon_reason_audio_normal
)
)
}
setAudio(audioStatus)
}
//上报
tv_work_order_report.setOnClickListener {
//工单问题类型必选,没有选择,进行提示
if(workOrderType.isEmpty()){
ToastUtils.showShort("请选择问题类型")
return@setOnClickListener
}
if(et_describe_input.text.toString().isEmpty()){
ToastUtils.showShort("请填写问题描述")
return@setOnClickListener
}
GlobalScope.launch(Dispatchers.IO){
val msgBoxList = CallerMsgBoxManager.queryFMInfoList(context,
workOrderOccurrenceTime-120000,workOrderOccurrenceTime+120000)
val faultList = ArrayList<FaultInfo>()
msgBoxList?.forEach { msgBoxBean ->
val fmInfoMsg = msgBoxBean.bean as FMInfoMsg
fmInfoMsg.fmInfoList?.forEach { fault ->
val faultBean = FaultInfo(false,fault.faultId,fault.faultName,
fault.faultTime.toString(), FaultDetailInfo(fault.faultDesc)
)
faultList.add(faultBean)
}
if(ClickUtils.isFastClick()){
//工单问题类型必选,没有选择,进行提示
if(workOrderType.isEmpty()){
ToastUtils.showShort("请选择问题类型")
return@setOnClickListener
}
val workOrderReportInfo = WorkOrderReportInfo(workOrderType,workOrderOccurrenceTime.toString(),
et_describe_input.text.toString(), CallerChassisLocationWGS84ListenerManager.getChassisLocationWGS84().longitude.toString(),
CallerChassisLocationWGS84ListenerManager.getChassisLocationWGS84().latitude.toString(),
AppConfigInfo.plateNumber, SharedPrefsMgr.getInstance().getString("och_account","") ,
BadCaseConfig.dockerVersion ?:"",faultList)
CallerDevaToolsManager.workOrderReport(workOrderReportInfo)
if(et_describe_input.text.toString().isEmpty()){
ToastUtils.showShort("请填写问题描述")
return@setOnClickListener
}
GlobalScope.launch(Dispatchers.IO){
val msgBoxList = CallerMsgBoxManager.queryFMInfoList(context,
workOrderOccurrenceTime-120000,workOrderOccurrenceTime+120000)
val faultList = ArrayList<FaultInfo>()
msgBoxList?.forEach { msgBoxBean ->
val fmInfoMsg = msgBoxBean.bean as FMInfoMsg
fmInfoMsg.fmInfoList?.forEach { fault ->
val faultBean = FaultInfo(false,fault.faultId,fault.faultName,
fault.faultTime.toString(), FaultDetailInfo(fault.faultDesc)
)
faultList.add(faultBean)
}
}
val workOrderReportInfo = WorkOrderReportInfo(workOrderType,workOrderOccurrenceTime.toString(),
et_describe_input.text.toString(), CallerChassisLocationWGS84ListenerManager.getChassisLocationWGS84().longitude.toString(),
CallerChassisLocationWGS84ListenerManager.getChassisLocationWGS84().latitude.toString(),
AppConfigInfo.plateNumber, SharedPrefsMgr.getInstance().getString("och_account","") ,
BadCaseConfig.dockerVersion ?:"",faultList)
CallerDevaToolsManager.workOrderReport(workOrderReportInfo)
}
}else{
ToastUtils.showShort("请勿连续上报,稍后再试")
}
}
//取消
@@ -321,4 +341,28 @@ class WorkOrderView @JvmOverloads constructor(
this.clickListener = clickListener
}
override fun onVisibilityChanged(changedView: View, visibility: Int) {
super.onVisibilityChanged(changedView, visibility)
if(visibility == View.VISIBLE){
//弹窗展示时间
tv_work_order_time.text =
millis2String(System.currentTimeMillis(), TimeUtils.getHourMinSecondFormat())
//问题类型
wrap_radio_group.clearCheck()
//发生时间
workOrderOccurrenceTime = System.currentTimeMillis()
tv_occurrence_time.text = millis2String(workOrderOccurrenceTime, TimeUtils.getHourMinFormat())
et_describe_input.setText("")
//问题描述录音
iv_describe_audio.setImageDrawable(
ContextCompat.getDrawable(
context,
R.drawable.icon_reason_audio_normal
)
)
setAudio(false)
}
}
}

View File

@@ -19,6 +19,7 @@ import androidx.preference.SwitchPreferenceCompat
import androidx.preference.TwoStatePreference
import androidx.preference.forEach
import androidx.recyclerview.widget.RecyclerView
import com.mogo.eagle.core.data.app.AppConfigInfo
import com.mogo.eagle.core.data.config.FunctionBuildConfig
import com.mogo.eagle.core.data.config.HmiBuildConfig
import com.mogo.eagle.core.data.multidisplay.TelematicConstant
@@ -52,6 +53,7 @@ import com.mogo.eagle.core.function.hmi.ui.utils.SOPAnalyticsManager.clickEventA
import com.mogo.eagle.core.utilcode.kotlin.onClick
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.Logger
import com.mogo.eagle.core.utilcode.mogo.vehicle.SweeperVehicleConfigUtils
import com.mogo.eagle.core.utilcode.rv.divider.CommonDividerItemDecoration
import com.mogo.eagle.core.utilcode.util.AppStateManager
@@ -960,7 +962,12 @@ class OperatePanelLayout : LinearLayout {
private const val KEY_OVERTAKE_SPEED_THRESHOLDSS = "overtake_speed_thresholds"
}
private var prevCheckedKeyForFusionMode: String? = null
override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View {
if (AppConfigInfo.isConnectAutopilot) {
CallerAutoPilotControlManager.getCarConfig()
}
CallerAutopilotCarConfigListenerManager.addListener(TAG, this)
CallerSopSettingManager.addListener(TAG, this)
CallerHmiViewControlListenerManager.addListener(TAG, this)
@@ -1038,19 +1045,39 @@ class OperatePanelLayout : LinearLayout {
return FunctionBuildConfig.isFaultSlowDown
}
KEY_ALL_MERGE_MODE -> {
return FunctionBuildConfig.fusionMode == 1
val checked = FunctionBuildConfig.fusionMode == 1
if (checked) {
prevCheckedKeyForFusionMode = KEY_ALL_MERGE_MODE
}
return checked
}
KEY_BLIND_AREA_MODE -> {
return FunctionBuildConfig.fusionMode == 2
val checked = FunctionBuildConfig.fusionMode == 2
if (checked) {
prevCheckedKeyForFusionMode = KEY_BLIND_AREA_MODE
}
return checked
}
KEY_BEYOND_VISUAL_RANGE_MODE -> {
return FunctionBuildConfig.fusionMode == 3
val checked = FunctionBuildConfig.fusionMode == 3
if (checked) {
prevCheckedKeyForFusionMode = KEY_BEYOND_VISUAL_RANGE_MODE
}
return checked
}
KEY_TRANSPARENT_TRANSFER_MODE -> {
return FunctionBuildConfig.fusionMode == 4
val checked = FunctionBuildConfig.fusionMode == 4
if (checked) {
prevCheckedKeyForFusionMode = KEY_TRANSPARENT_TRANSFER_MODE
}
return checked
}
KEY_PURE_OBU_MODE -> {
return FunctionBuildConfig.fusionMode == 5
val checked = FunctionBuildConfig.fusionMode == 5
if (checked) {
prevCheckedKeyForFusionMode = KEY_PURE_OBU_MODE
}
return checked
}
KEY_AUTO_PILOT_SPEED_THRESHOLDS -> {
return listOf("0.0", "60.0", "${FunctionBuildConfig.maxSpeedLimit}", "5.0")
@@ -1066,10 +1093,11 @@ class OperatePanelLayout : LinearLayout {
}
override fun onPreferenceClick(preference: Preference): Boolean {
Log.d(TAG, "-- onPreferenceClick --:pref -> $preference")
Logger.d(TAG, "-- onPreferenceClick --:pref -> ${preference.key}")
when (preference.key) {
KEY_AUTO_PILOT_SPEED_THRESHOLDS -> {
FunctionBuildConfig.maxSpeedLimit = preference.extras.getDouble(PreferenceWithSpeedSetting.KEY_BUNDLE_CURRENT_VALUE, FunctionBuildConfig.maxSpeedLimit)
val currentValue = preference.extras.getDouble(PreferenceWithSpeedSetting.KEY_BUNDLE_CURRENT_VALUE, FunctionBuildConfig.maxSpeedLimit)
FunctionBuildConfig.maxSpeedLimit = currentValue
val isSuccess = CallerAutoPilotControlManager.setAutoPilotSpeed(FunctionBuildConfig.maxSpeedLimit.toInt())
when {
isSuccess -> {
@@ -1180,39 +1208,84 @@ class OperatePanelLayout : LinearLayout {
return true
}
KEY_ALL_MERGE_MODE -> {
FunctionBuildConfig.fusionMode = 1
hmiAction("SOP 融合模式, ", FunctionBuildConfig.fusionMode)
clickEventAnalytics("融合模式", true)
CallerAutoPilotControlManager.sendFusionMode(FunctionBuildConfig.fusionMode)
return true
val isChecked = newValue as? Boolean ?: false
if (isChecked) {
FunctionBuildConfig.fusionMode = 1
prevCheckedKeyForFusionMode?.takeIf { it != KEY_ALL_MERGE_MODE }?.let {
preferenceScreen.findPreferenceReal<TwoStatePreference>(it)
}?.also {
prevCheckedKeyForFusionMode = KEY_ALL_MERGE_MODE
changeValue(it, false)
}
hmiAction("SOP 融合模式, ", FunctionBuildConfig.fusionMode)
clickEventAnalytics("融合模式", true)
CallerAutoPilotControlManager.sendFusionMode(FunctionBuildConfig.fusionMode)
}
return isChecked
}
KEY_BLIND_AREA_MODE -> {
FunctionBuildConfig.fusionMode = 2
hmiAction("SOP 融合模式, ", FunctionBuildConfig.fusionMode)
clickEventAnalytics("融合模式", true)
CallerAutoPilotControlManager.sendFusionMode(FunctionBuildConfig.fusionMode)
return true
val isChecked = newValue as? Boolean ?: false
if (isChecked) {
FunctionBuildConfig.fusionMode = 2
prevCheckedKeyForFusionMode?.takeIf { it != KEY_BLIND_AREA_MODE }?.let {
preferenceScreen.findPreferenceReal<TwoStatePreference>(it)
}?.also {
prevCheckedKeyForFusionMode = KEY_BLIND_AREA_MODE
changeValue(it, false)
}
hmiAction("SOP 融合模式, ", FunctionBuildConfig.fusionMode)
clickEventAnalytics("融合模式", true)
CallerAutoPilotControlManager.sendFusionMode(FunctionBuildConfig.fusionMode)
}
return isChecked
}
KEY_BEYOND_VISUAL_RANGE_MODE -> {
FunctionBuildConfig.fusionMode = 3
hmiAction("SOP 融合模式, ", FunctionBuildConfig.fusionMode)
clickEventAnalytics("融合模式", true)
CallerAutoPilotControlManager.sendFusionMode(FunctionBuildConfig.fusionMode)
return true
val isChecked = newValue as? Boolean ?: false
if (isChecked) {
FunctionBuildConfig.fusionMode = 3
prevCheckedKeyForFusionMode?.takeIf { it != KEY_BEYOND_VISUAL_RANGE_MODE }?.let {
preferenceScreen.findPreferenceReal<TwoStatePreference>(it)
}?.also {
prevCheckedKeyForFusionMode = KEY_BEYOND_VISUAL_RANGE_MODE
changeValue(it, false)
}
hmiAction("SOP 融合模式, ", FunctionBuildConfig.fusionMode)
clickEventAnalytics("融合模式", true)
CallerAutoPilotControlManager.sendFusionMode(FunctionBuildConfig.fusionMode)
}
return isChecked
}
KEY_TRANSPARENT_TRANSFER_MODE -> {
FunctionBuildConfig.fusionMode = 4
hmiAction("SOP 融合模式, ", FunctionBuildConfig.fusionMode)
clickEventAnalytics("融合模式", true)
CallerAutoPilotControlManager.sendFusionMode(FunctionBuildConfig.fusionMode)
return true
val isChecked = newValue as? Boolean ?: false
if (isChecked) {
FunctionBuildConfig.fusionMode = 4
prevCheckedKeyForFusionMode?.takeIf { it != KEY_TRANSPARENT_TRANSFER_MODE }?.let {
preferenceScreen.findPreferenceReal<TwoStatePreference>(it)
}?.also {
prevCheckedKeyForFusionMode = KEY_TRANSPARENT_TRANSFER_MODE
changeValue(it, false)
}
hmiAction("SOP 融合模式, ", FunctionBuildConfig.fusionMode)
clickEventAnalytics("融合模式", true)
CallerAutoPilotControlManager.sendFusionMode(FunctionBuildConfig.fusionMode)
}
return isChecked
}
KEY_PURE_OBU_MODE -> {
FunctionBuildConfig.fusionMode = 5
hmiAction("SOP 融合模式, ", FunctionBuildConfig.fusionMode)
clickEventAnalytics("融合模式", true)
CallerAutoPilotControlManager.sendFusionMode(FunctionBuildConfig.fusionMode)
return true
val isChecked = newValue as? Boolean ?: false
if (isChecked) {
FunctionBuildConfig.fusionMode = 5
prevCheckedKeyForFusionMode?.takeIf { it != KEY_PURE_OBU_MODE }?.let {
preferenceScreen.findPreferenceReal<TwoStatePreference>(it)
}?.also {
prevCheckedKeyForFusionMode = KEY_PURE_OBU_MODE
changeValue(it, false)
}
hmiAction("SOP 融合模式, ", FunctionBuildConfig.fusionMode)
clickEventAnalytics("融合模式", true)
CallerAutoPilotControlManager.sendFusionMode(FunctionBuildConfig.fusionMode)
}
return isChecked
}
}
return super.onPreferenceChange(preference, newValue)

View File

@@ -4,131 +4,122 @@
android:layout_width="@dimen/dp_960"
android:layout_height="match_parent">
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/clBoneTabChild"
android:layout_width="match_parent"
android:layout_height="match_parent"
<com.mogo.eagle.core.function.hmi.bone.tab.CarInfoTabView
android:id="@+id/carInfoTabView"
android:layout_width="@dimen/dp_960"
android:layout_height="@dimen/dp_1214"
android:layout_marginStart="@dimen/dp_40"
android:visibility="gone"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent">
app:layout_constraintTop_toTopOf="parent" />
<com.mogo.eagle.core.function.hmi.bone.tab.CarInfoTabView
android:id="@+id/carInfoTabView"
android:layout_width="@dimen/dp_960"
android:layout_height="@dimen/dp_1214"
android:layout_marginStart="@dimen/dp_40"
android:visibility="gone"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<com.mogo.eagle.core.function.hmi.bone.tab.MsgBoxTabView
android:id="@+id/msgBoxTabView"
android:layout_width="@dimen/dp_960"
android:layout_height="@dimen/dp_1214"
android:layout_marginStart="@dimen/dp_40"
android:visibility="gone"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent"
/>
<com.mogo.eagle.core.function.hmi.bone.tab.MsgBoxTabView
android:id="@+id/msgBoxTabView"
android:layout_width="@dimen/dp_960"
android:layout_height="@dimen/dp_1214"
android:layout_marginStart="@dimen/dp_40"
android:visibility="gone"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent"
/>
<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_marginStart="@dimen/dp_40"
android:visibility="gone"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent"
/>
<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_marginStart="@dimen/dp_40"
android:visibility="gone"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent"
/>
<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_marginStart="@dimen/dp_40"
android:visibility="gone"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent"
/>
<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_marginStart="@dimen/dp_40"
android:visibility="gone"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent"
/>
<com.mogo.eagle.core.function.hmi.bone.tab.ToolKitTabView
android:id="@+id/toolKitTabView"
android:layout_width="@dimen/dp_960"
android:layout_height="@dimen/dp_1214"
android:layout_marginStart="@dimen/dp_40"
android:visibility="gone"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<com.mogo.eagle.core.function.hmi.bone.tab.ToolKitTabView
android:id="@+id/toolKitTabView"
android:layout_width="@dimen/dp_960"
android:layout_height="@dimen/dp_1214"
android:layout_marginStart="@dimen/dp_40"
android:visibility="gone"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<com.mogo.eagle.core.function.hmi.bone.tab.ReportTypeView
android:id="@+id/reportTypeView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:visibility="gone"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
android:layout_marginStart="@dimen/dp_270"
android:layout_marginBottom="@dimen/dp_102"
android:elevation="@dimen/dp_1000"
/>
<com.mogo.eagle.core.function.hmi.bone.tab.ReportTypeView
android:id="@+id/reportTypeView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:visibility="gone"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
android:layout_marginStart="@dimen/dp_270"
android:layout_marginBottom="@dimen/dp_170"
android:elevation="@dimen/dp_100"
/>
</androidx.constraintlayout.widget.ConstraintLayout>
<androidx.constraintlayout.widget.ConstraintLayout
<View
android:id="@+id/viewBottomContainer"
android:layout_width="@dimen/dp_960"
android:layout_height="@dimen/dp_216"
android:background="@drawable/bg_tab_switch"
app:layout_constraintBottom_toBottomOf="parent"
android:layout_marginStart="@dimen/dp_20"
app:layout_constraintLeft_toLeftOf="parent">
app:layout_constraintLeft_toLeftOf="parent"
/>
<com.mogo.eagle.core.function.hmi.bone.TabSwitchView
android:id="@+id/tabSwitchCarInfo"
android:layout_width="@dimen/dp_220"
android:layout_height="@dimen/dp_140"
android:layout_marginStart="@dimen/dp_40"
android:layout_marginTop="@dimen/dp_20"
app:clickRes="@drawable/icon_tab_car_info_click"
app:defaultRes="@drawable/icon_tab_car_info"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<com.mogo.eagle.core.function.hmi.bone.TabSwitchView
android:id="@+id/tabSwitchCarInfo"
android:layout_width="@dimen/dp_220"
android:layout_height="@dimen/dp_140"
android:layout_marginStart="@dimen/dp_40"
android:layout_marginTop="@dimen/dp_20"
app:clickRes="@drawable/icon_tab_car_info_click"
app:defaultRes="@drawable/icon_tab_car_info"
app:layout_constraintLeft_toLeftOf="@id/viewBottomContainer"
app:layout_constraintTop_toTopOf="@id/viewBottomContainer" />
<com.mogo.eagle.core.function.hmi.bone.TabSwitchView
android:id="@+id/tabSwitchMsgBox"
android:layout_width="@dimen/dp_220"
android:layout_height="@dimen/dp_140"
android:layout_marginTop="@dimen/dp_20"
app:clickRes="@drawable/icon_tab_msg_box_click"
app:defaultRes="@drawable/icon_tab_msg_box"
app:layout_constraintLeft_toRightOf="@+id/tabSwitchCarInfo"
app:layout_constraintTop_toTopOf="parent" />
<com.mogo.eagle.core.function.hmi.bone.TabSwitchView
android:id="@+id/tabSwitchMsgBox"
android:layout_width="@dimen/dp_220"
android:layout_height="@dimen/dp_140"
android:layout_marginTop="@dimen/dp_20"
app:clickRes="@drawable/icon_tab_msg_box_click"
app:defaultRes="@drawable/icon_tab_msg_box"
app:layout_constraintLeft_toRightOf="@+id/tabSwitchCarInfo"
app:layout_constraintTop_toTopOf="@id/viewBottomContainer" />
<com.mogo.eagle.core.function.hmi.bone.TabSwitchView
android:id="@+id/tabSwitchReport"
android:layout_width="@dimen/dp_220"
android:layout_height="@dimen/dp_140"
android:layout_marginTop="@dimen/dp_20"
app:clickRes="@drawable/icon_tab_report_click"
app:defaultRes="@drawable/icon_tab_report"
app:layout_constraintLeft_toRightOf="@+id/tabSwitchMsgBox"
app:layout_constraintTop_toTopOf="parent" />
<com.mogo.eagle.core.function.hmi.bone.TabSwitchView
android:id="@+id/tabSwitchReport"
android:layout_width="@dimen/dp_220"
android:layout_height="@dimen/dp_140"
android:layout_marginTop="@dimen/dp_20"
app:clickRes="@drawable/icon_tab_report_click"
app:defaultRes="@drawable/icon_tab_report"
app:layout_constraintLeft_toRightOf="@+id/tabSwitchMsgBox"
app:layout_constraintTop_toTopOf="@id/viewBottomContainer" />
<com.mogo.eagle.core.function.hmi.bone.TabSwitchView
android:id="@+id/tabSwitchMore"
android:layout_width="@dimen/dp_220"
android:layout_height="@dimen/dp_140"
android:layout_marginTop="@dimen/dp_20"
app:clickRes="@drawable/icon_tab_more_click"
app:defaultRes="@drawable/icon_tab_more"
app:layout_constraintLeft_toRightOf="@+id/tabSwitchReport"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
<com.mogo.eagle.core.function.hmi.bone.TabSwitchView
android:id="@+id/tabSwitchMore"
android:layout_width="@dimen/dp_220"
android:layout_height="@dimen/dp_140"
android:layout_marginTop="@dimen/dp_20"
app:clickRes="@drawable/icon_tab_more_click"
app:defaultRes="@drawable/icon_tab_more"
app:layout_constraintLeft_toRightOf="@+id/tabSwitchReport"
app:layout_constraintTop_toTopOf="@id/viewBottomContainer" />
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@@ -94,7 +94,7 @@
app:layout_constraintTop_toBottomOf="@id/tvFaultType"
app:layout_constraintStart_toStartOf="parent"
android:layout_marginStart="@dimen/dp_103"
android:layout_marginTop="@dimen/dp_30"
android:layout_marginTop="@dimen/dp_33"
/>
<TextView
@@ -136,7 +136,7 @@
app:layout_constraintTop_toBottomOf="@id/tvFaultReason"
app:layout_constraintStart_toStartOf="parent"
android:layout_marginStart="@dimen/dp_103"
android:layout_marginTop="@dimen/dp_30"
android:layout_marginTop="@dimen/dp_33"
/>
<TextView
@@ -144,7 +144,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/fault_time"
android:textSize="@dimen/sp_32"
android:textSize="@dimen/sp_38"
android:textColor="@color/white"
android:textStyle="bold"
app:layout_constraintTop_toTopOf="@id/viewFaultTimeLabel"
@@ -207,7 +207,7 @@
app:layout_constraintTop_toBottomOf="@id/viewTimeBg"
app:layout_constraintStart_toStartOf="parent"
android:layout_marginStart="@dimen/dp_103"
android:layout_marginTop="@dimen/dp_30"
android:layout_marginTop="@dimen/dp_33"
/>
<TextView

View File

@@ -254,13 +254,13 @@
<ImageView
android:id="@+id/iv_describe_audio"
android:layout_width="@dimen/dp_45"
android:layout_height="@dimen/dp_59"
android:src="@drawable/icon_work_order_audio"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/icon_reason_audio_normal"
app:layout_constraintTop_toTopOf="@id/et_describe_input"
app:layout_constraintBottom_toBottomOf="@id/et_describe_input"
app:layout_constraintEnd_toEndOf="@id/et_describe_input"
android:layout_marginEnd="@dimen/dp_30"
android:padding="@dimen/dp_30"
android:contentDescription="@string/take_over_note_audio"
/>

View File

@@ -31,10 +31,10 @@
android:key="mofang"
android:layout="@layout/layout_operate_panel_preference_header"
android:title="蘑方" />
<Preference
android:fragment="com.mogo.eagle.core.function.hmi.ui.operate.OperatePanelLayout$WelcomeWordsPreferenceCompat"
android:key="welcome_words"
android:layout="@layout/layout_operate_panel_preference_header"
android:title="欢迎语"/>
<!-- <Preference-->
<!-- android:fragment="com.mogo.eagle.core.function.hmi.ui.operate.OperatePanelLayout$WelcomeWordsPreferenceCompat"-->
<!-- android:key="welcome_words"-->
<!-- android:layout="@layout/layout_operate_panel_preference_header"-->
<!-- android:title="欢迎语"/>-->
</androidx.preference.PreferenceScreen>

View File

@@ -227,6 +227,7 @@ class TravelRealityView @JvmOverloads constructor(
@Volatile
private var isSmallMap: Boolean = true
private var iconRes = R.drawable.small_map_car
@Volatile
private var globalPathResp: MessagePad.GlobalPathResp? = null
private val mCoordinatesLatLng: MutableList<LatLng> = ArrayList()
private var mSmallCarMarker: Marker? = null
@@ -324,13 +325,22 @@ class TravelRealityView @JvmOverloads constructor(
}
// 显示小地图样式
changeMapSettings(true)
globalPathResp?.let {
if (it.wayPointsList.size > 0) {
drawRotting()
}
}
} else {
clearPolyline()
hideSmallCarMarker()
// 显示行程总览地图样式
changeMapSettings(false)
val globalPath = reqData
if (!globalPath.isNullOrEmpty()) {
requestData(globalPath as ArrayList<Point>)
}
if (!isRoadTrackReq) {
handleRoadTrajectories(roadTrackList, null)
handleRoadTrajectories(roadTrackList, globalPath)
}
}
}
@@ -559,10 +569,6 @@ class TravelRealityView @JvmOverloads constructor(
super.onVisibilityChanged(changedView, visibility)
if (visibility == VISIBLE) {
Log.d(TAG, "onVisibilityChanged:VISIBLE!")
val globalPath: List<Point>? = reqData
if (!globalPath.isNullOrEmpty()) {
requestData(globalPath as ArrayList<Point>)
}
}
}
@@ -585,6 +591,7 @@ class TravelRealityView @JvmOverloads constructor(
// 注册定位监听
CallerChassisLocationGCJ02ListenerManager.removeListener("${TAG}${this.hashCode()}")
CallerPlanningRottingListenerManager.removeListener("${TAG}${this.hashCode()}")
CallerAutoPilotStatusListenerManager.removeListener("${TAG}${this.hashCode()}")
nonFrequentHandler?.looper?.quitSafely()
nonFrequentHandler = null
travelNetWorkModel.cancelAllRequest()
@@ -1446,6 +1453,16 @@ class TravelRealityView @JvmOverloads constructor(
}
}
override fun onAutopilotRouteLineId(lineId: Long) {
super.onAutopilotRouteLineId(lineId)
if (lineId == 0L) {
this.globalPathResp = null
UiThreadHandler.post {
clearPolyline()
}
}
}
private fun drawRotting() {
globalPathResp?.let {
val latLngList: MutableList<MogoLatLng> = ArrayList()