Merge remote-tracking branch 'origin/dev_robotaxi-d_241112_6.8.0' into dev_robotaxi-d_241112_6.8.0
# Conflicts: # OCH/common/common/src/main/java/com/mogo/och/common/module/manager/scnner/ScannerManager.kt
This commit is contained in:
@@ -216,7 +216,12 @@ class StartAutoPilotStatusView @JvmOverloads constructor(
|
||||
if (isAnyOneError) R.drawable.icon_no_fsm_status_bg_error
|
||||
else R.drawable.icon_no_fsm_status_bg_normal
|
||||
)
|
||||
notifyStatus(isAnyOneError)
|
||||
if (!hasFSM.get()) {
|
||||
notifyStatus(isAnyOneError)
|
||||
Logger.d(TAG, "--- handleWithoutFSM --- do update")
|
||||
} else {
|
||||
Logger.d(TAG, "--- handleWithoutFSM --- do not update")
|
||||
}
|
||||
}
|
||||
|
||||
private fun notifyStatus(isError: Boolean) {
|
||||
|
||||
@@ -29,6 +29,7 @@ import com.iflytek.cloud.RecognizerListener
|
||||
import com.iflytek.cloud.RecognizerResult
|
||||
import com.iflytek.cloud.SpeechError
|
||||
import com.iflytek.cloud.SpeechRecognizer
|
||||
import com.mogo.commons.env.ProjectUtils
|
||||
import com.mogo.commons.storage.SharedPrefsMgr
|
||||
import com.mogo.eagle.core.data.app.AppConfigInfo
|
||||
import com.mogo.eagle.core.data.deva.report.CategoryInfo
|
||||
@@ -173,7 +174,9 @@ class FaultReasonView @JvmOverloads constructor(
|
||||
iconDown?.setBounds(0, 0, iconDown.minimumWidth, iconDown.minimumHeight)
|
||||
iconUp?.setBounds(0, 0, iconUp.minimumWidth, iconUp.minimumHeight)
|
||||
//获取一级分类
|
||||
CallerDevaToolsManager.getCategories(BadCaseConfig.tenantId, 1, 0, type, 0)
|
||||
if(ProjectUtils.isSaas()){
|
||||
CallerDevaToolsManager.getCategories(BadCaseConfig.tenantId, 1, 0, type, 0)
|
||||
}
|
||||
//弹窗展示时间
|
||||
tvFaultTime.text =
|
||||
millis2String(System.currentTimeMillis(), TimeUtils.getHourMinSecondFormat())
|
||||
@@ -538,7 +541,9 @@ class FaultReasonView @JvmOverloads constructor(
|
||||
|
||||
override fun getCategoriesError(msg: String) {
|
||||
super.getCategoriesError(msg)
|
||||
ToastUtils.showShort("故障列表获取失败:$msg")
|
||||
if(ProjectUtils.isSaas()){
|
||||
ToastUtils.showShort("故障列表获取失败:$msg")
|
||||
}
|
||||
}
|
||||
|
||||
override fun onVisibilityAggregated(isVisible: Boolean) {
|
||||
@@ -546,7 +551,9 @@ class FaultReasonView @JvmOverloads constructor(
|
||||
if(visibility == View.VISIBLE){
|
||||
CallerDevaToolsListenerManager.addListener(TAG, this)
|
||||
//获取一级分类
|
||||
CallerDevaToolsManager.getCategories(BadCaseConfig.tenantId, 1, 0, type, 0)
|
||||
if(ProjectUtils.isSaas()){
|
||||
CallerDevaToolsManager.getCategories(BadCaseConfig.tenantId, 1, 0, type, 0)
|
||||
}
|
||||
//弹窗展示时间
|
||||
tvFaultTime.text =
|
||||
millis2String(System.currentTimeMillis(), TimeUtils.getHourMinSecondFormat())
|
||||
|
||||
@@ -191,6 +191,8 @@ class ReportTypeView @JvmOverloads constructor(
|
||||
}
|
||||
}
|
||||
oneClickTimer?.start()
|
||||
//请求一键上报故障码
|
||||
CallerDevaToolsManager.getCategories(BadCaseConfig.tenantId,level,0,4,1)
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -296,9 +298,11 @@ class ReportTypeView @JvmOverloads constructor(
|
||||
Log.i(TAG,"onAutopilotStatistics status = "+ it.status)
|
||||
if(it.status == AutopilotStatistics.AUTOPILOT_START_STATUS.FAILED){
|
||||
//触发一键上报
|
||||
ThreadUtils.runOnUiThread {
|
||||
if(!typeSelectStatus){
|
||||
showOneCLickReportView()
|
||||
if(ProjectUtils.isSaas()){
|
||||
ThreadUtils.runOnUiThread {
|
||||
if(!typeSelectStatus){
|
||||
showOneCLickReportView()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -31,6 +31,7 @@ import com.mogo.eagle.core.function.api.hmi.view.IViewControlListener
|
||||
import com.mogo.eagle.core.function.api.hmi.view.IViewControlListener.Companion.FUNC_MODE_DEMO
|
||||
import com.mogo.eagle.core.function.api.hmi.view.IViewControlListener.Companion.FUNC_MODE_RAIN
|
||||
import com.mogo.eagle.core.function.api.setting.ISopSettingListener
|
||||
import com.mogo.eagle.core.function.api.telematic.IReceivedMsgListener
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotControlManager
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotCarConfigListenerManager
|
||||
@@ -41,6 +42,7 @@ import com.mogo.eagle.core.function.call.hmi.CallerHmiViewControlListenerManager
|
||||
import com.mogo.eagle.core.function.call.map.CallerMapUIServiceManager
|
||||
import com.mogo.eagle.core.function.call.obu.CallerObuApiManager
|
||||
import com.mogo.eagle.core.function.call.setting.CallerSopSettingManager
|
||||
import com.mogo.eagle.core.function.call.telematic.CallerTelematicListenerManager
|
||||
import com.mogo.eagle.core.function.call.telematic.CallerTelematicManager
|
||||
import com.mogo.eagle.core.function.call.unmanned.CallerUnmannedListenerManager
|
||||
import com.mogo.eagle.core.function.call.vehicle.CallerSweeperModeListenerManager
|
||||
@@ -59,11 +61,13 @@ 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
|
||||
import com.mogo.eagle.core.utilcode.util.GsonUtils
|
||||
import com.mogo.eagle.core.utilcode.util.GsonUtils.*
|
||||
import com.mogo.eagle.core.utilcode.util.ToastUtils
|
||||
import com.zhjt.mogo.adas.data.AdasConstants
|
||||
import com.zhjt.mogo.adas.data.bean.AdasParam
|
||||
import kotlinx.android.synthetic.main.layout_operate_panel.view.iv_operate_panel_close
|
||||
import kotlinx.android.synthetic.main.layout_operate_panel_preference_widget_switch_compat.switchWidget
|
||||
import kotlinx.coroutines.launch
|
||||
import me.jessyan.autosize.utils.AutoSizeUtils
|
||||
import mogo.telematics.pad.MessagePad
|
||||
@@ -669,9 +673,10 @@ class OperatePanelLayout : LinearLayout {
|
||||
}
|
||||
}
|
||||
|
||||
class BusinessPreferenceFragmentCompat : OperatePanelDetailBase() {
|
||||
class BusinessPreferenceFragmentCompat : OperatePanelDetailBase(), IReceivedMsgListener {
|
||||
|
||||
companion object {
|
||||
private const val TAG = "BusinessPreferenceFragmentCompat"
|
||||
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"
|
||||
@@ -680,6 +685,22 @@ class OperatePanelLayout : LinearLayout {
|
||||
private const val KEY_UNMANNED_DEMO_PULL_INTERVAL = "unmanned_demo_pull_interval"
|
||||
private const val KEY_SWEEPER_CLOUD_CONTROL = "sweeper_cloud_control"
|
||||
private const val KEY_LOOK_AROUND_360 = "look_around_360"
|
||||
private const val KEY_DRIVE_SEAT_VIDEO_STREAM = "drive_seat_video_stream"
|
||||
}
|
||||
|
||||
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
||||
super.onViewCreated(view, savedInstanceState)
|
||||
CallerTelematicListenerManager.addListener(TAG, this)
|
||||
lifecycleScope.launchWhenResumed {
|
||||
preferenceScreen.findPreferenceReal<SwitchPreferenceCompat>(KEY_DRIVE_SEAT_VIDEO_STREAM)?.also {
|
||||
it.isEnabled = CallerDevaToolsManager.driveSeatVideoProvider()?.requestVideoInfo()?.livePlayUrl?.isNotEmpty() ?: false
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
override fun onDestroyView() {
|
||||
super.onDestroyView()
|
||||
CallerTelematicListenerManager.removeListener(TAG)
|
||||
}
|
||||
|
||||
override fun getDefaultVal(pref: Preference): Any? {
|
||||
@@ -758,6 +779,30 @@ class OperatePanelLayout : LinearLayout {
|
||||
return super.onPreferenceClick(preference)
|
||||
}
|
||||
|
||||
override fun onReceivedMsg(type: Int, byteArray: ByteArray) {
|
||||
if (type == TelematicConstant.DRIVE_SEAT_VIDEO_STREAM_RSP) {
|
||||
val s = String(byteArray)
|
||||
clickEventAnalytics("视频流驾驶位开头-RSP->$s", false)
|
||||
lifecycleScope.launchWhenResumed {
|
||||
when(s) {
|
||||
"01" -> {
|
||||
//关闭成功
|
||||
FunctionBuildConfig.isDriveSeatVideoStream = false
|
||||
preferenceScreen.findPreferenceReal<SwitchPreferenceCompat>(KEY_DRIVE_SEAT_VIDEO_STREAM)?.also { changeValue(it, false) }
|
||||
}
|
||||
"11" -> {
|
||||
//打开成功
|
||||
FunctionBuildConfig.isDriveSeatVideoStream = true
|
||||
preferenceScreen.findPreferenceReal<SwitchPreferenceCompat>(KEY_DRIVE_SEAT_VIDEO_STREAM)?.also { changeValue(it, true) }
|
||||
}
|
||||
else -> {
|
||||
//关闭失败或打开失败
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
override fun onPreferenceChange(preference: Preference, newValue: Any?): Boolean {
|
||||
when (preference.key) {
|
||||
KEY_FAULT_REPORT_TIP -> {
|
||||
@@ -848,6 +893,15 @@ class OperatePanelLayout : LinearLayout {
|
||||
clickEventAnalytics("清扫云控业务", isChecked)
|
||||
return true
|
||||
}
|
||||
KEY_DRIVE_SEAT_VIDEO_STREAM -> {
|
||||
val isChecked = newValue as? Boolean ?: false
|
||||
clickEventAnalytics("视频流驾驶位开关", isChecked)
|
||||
val map = HashMap<String, String>()
|
||||
map["open"] = if (isChecked) "1" else "0"
|
||||
map["playUrl"] = CallerDevaToolsManager.driveSeatVideoProvider()?.getLastData()?.livePlayUrl ?: ""
|
||||
CallerTelematicManager.sendMsgToAllClients(TelematicConstant.DRIVE_SEAT_VIDEO_STREAM_REQ, toJson(map).toByteArray())
|
||||
return false
|
||||
}
|
||||
}
|
||||
return super.onPreferenceChange(preference, newValue)
|
||||
}
|
||||
|
||||
@@ -21,6 +21,7 @@ import android.view.ViewGroup
|
||||
import android.widget.BaseAdapter
|
||||
import android.widget.TextView
|
||||
import androidx.annotation.RequiresApi
|
||||
import androidx.appcompat.app.AlertDialog
|
||||
import androidx.appcompat.widget.ListPopupWindow
|
||||
import androidx.appcompat.widget.PopupMenu
|
||||
import androidx.constraintlayout.widget.ConstraintLayout
|
||||
@@ -135,6 +136,8 @@ import com.mogo.map.uicontroller.VisualAngleMode.MAP_STYLE_VR_ANGLE_CROSS
|
||||
import com.mogo.map.uicontroller.VisualAngleMode.MAP_STYLE_VR_ANGLE_TOP
|
||||
import com.mogo.map.uicontroller.VisualAngleMode.MODE_LONG_SIGHT
|
||||
import com.mogo.tts.base.IMogoTTSCallback
|
||||
import com.mogo.support.device.DevicesManager
|
||||
import com.mogo.support.device.IBindStateChangeListener
|
||||
import com.zhjt.mogo.adas.data.AdasConstants
|
||||
import com.zhjt.service.chain.ChainLog
|
||||
import kotlinx.android.synthetic.main.view_debug_setting.view.appVersionInfoLayout
|
||||
@@ -276,6 +279,7 @@ import kotlinx.android.synthetic.main.view_debug_setting.view.tvDriverServerStar
|
||||
import kotlinx.android.synthetic.main.view_debug_setting.view.tvGearInfo
|
||||
import kotlinx.android.synthetic.main.view_debug_setting.view.tvGitBranchInfo
|
||||
import kotlinx.android.synthetic.main.view_debug_setting.view.tvHDCityCode
|
||||
import kotlinx.android.synthetic.main.view_debug_setting.view.tvHardwareDeviceBindState
|
||||
import kotlinx.android.synthetic.main.view_debug_setting.view.tvIPCMac
|
||||
import kotlinx.android.synthetic.main.view_debug_setting.view.tvIdentifyInfo
|
||||
import kotlinx.android.synthetic.main.view_debug_setting.view.tvIdentifyInfoCopy
|
||||
@@ -357,7 +361,7 @@ internal class DebugSettingView @JvmOverloads constructor(
|
||||
IMoGoChassisStatesListener,
|
||||
IMoGoSweeperFutianCleanSystemListener,
|
||||
IMoGoObuInfoListener,
|
||||
ISopSettingListener, IViewControlListener, IMoGoCloudListener {
|
||||
ISopSettingListener, IViewControlListener, IMoGoCloudListener, IBindStateChangeListener {
|
||||
|
||||
companion object {
|
||||
private const val TAG = "DebugSettingView"
|
||||
@@ -480,6 +484,7 @@ internal class DebugSettingView @JvmOverloads constructor(
|
||||
}
|
||||
|
||||
CallerObuInfoListenerManager.addListener(TAG, this)
|
||||
DevicesManager.addBindStateChangeListener(TAG,this)
|
||||
}
|
||||
|
||||
override fun onDetachedFromWindow() {
|
||||
@@ -509,7 +514,7 @@ internal class DebugSettingView @JvmOverloads constructor(
|
||||
CallerSopSettingManager.removeListener(TAG)
|
||||
|
||||
CallerHmiViewControlListenerManager.removeListener(TAG)
|
||||
|
||||
DevicesManager.removeBindStateChangeListener(TAG)
|
||||
// 移除 业务配置监听
|
||||
CallerDevaToolsFuncConfigListenerManager.unRegisterDevaToolsFuncConfigListener(
|
||||
FuncBizConfig.FOUNDATION,
|
||||
@@ -1329,6 +1334,40 @@ internal class DebugSettingView @JvmOverloads constructor(
|
||||
}
|
||||
CallerHmiManager.toggleHdMapVisualAngleAdjust(isChecked)
|
||||
}
|
||||
|
||||
//硬件服务绑定状态以及版本
|
||||
tvHardwareDeviceBindState.setOnClickListener {
|
||||
val state = when (DevicesManager.getServiceBindState()) {
|
||||
0 -> {
|
||||
"绑定成功"
|
||||
}
|
||||
|
||||
1 -> {
|
||||
"绑定失败:未安装“硬件服务”APP"
|
||||
}
|
||||
|
||||
2 -> {
|
||||
"绑定失败:没有绑定权限或找不到服务"
|
||||
}
|
||||
|
||||
3 -> {
|
||||
"服务被异常销毁"
|
||||
}
|
||||
|
||||
else -> {
|
||||
"未知"
|
||||
}
|
||||
}
|
||||
var msg = "客户端SDK版本:${DevicesManager.getSDKVersion() ?: "未知"}\n"
|
||||
msg += "客户端SDK AIDL版本:${DevicesManager.getSDKAIDLVersion() ?: "未知"}\n"
|
||||
msg += "硬件服务端APP版本:${DevicesManager.getServerVersion() ?: "未知"}\n"
|
||||
msg += "硬件服务端APP AIDL版本:${DevicesManager.getServerAIDLVersion() ?: ""}"
|
||||
AlertDialog.Builder(context)
|
||||
.setTitle("硬件服务绑定状态: $state")
|
||||
.setMessage(msg)
|
||||
.setPositiveButton("确定", null)
|
||||
.create().show()
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -2725,4 +2764,31 @@ internal class DebugSettingView @JvmOverloads constructor(
|
||||
private fun invokeCronetResult(json: String) {
|
||||
CallerLogger.d(SceneConstant.M_HMI + "CronetNetwork", json)
|
||||
}
|
||||
|
||||
override fun onServiceState(state: Int) {
|
||||
val stateMsg = when (state) {
|
||||
0 -> {
|
||||
"绑定成功"
|
||||
}
|
||||
|
||||
1 -> {
|
||||
"绑定失败:未安装“硬件服务”APP"
|
||||
}
|
||||
|
||||
2 -> {
|
||||
"绑定失败:没有绑定权限或找不到服务"
|
||||
}
|
||||
|
||||
3 -> {
|
||||
"服务被异常销毁"
|
||||
}
|
||||
|
||||
else -> {
|
||||
"未知"
|
||||
}
|
||||
}
|
||||
UiThreadHandler.post {
|
||||
tvHardwareDeviceBindState.text = "硬件服务绑定状态: $stateMsg"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -681,6 +681,23 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:background="#F0F0F0" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvHardwareDeviceBindState"
|
||||
style="@style/DebugSettingText"
|
||||
android:text="硬件服务绑定状态: 未知"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:background="#F0F0F0" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvBackgroundOperation"
|
||||
style="@style/DebugSettingText"
|
||||
|
||||
@@ -51,5 +51,12 @@
|
||||
android:title="360环视"
|
||||
android:persistent="false"
|
||||
android:widgetLayout="@layout/layout_operate_panel_preference_widget_switch_compat" />
|
||||
<SwitchPreferenceCompat
|
||||
android:key="drive_seat_video_stream"
|
||||
android:layout="@layout/layout_operate_panel_preference_switch_compat"
|
||||
android:title="驾驶位视频流"
|
||||
android:persistent="false"
|
||||
android:enabled="false"
|
||||
android:widgetLayout="@layout/layout_operate_panel_preference_widget_switch_compat" />
|
||||
</PreferenceCategory>
|
||||
</androidx.preference.PreferenceScreen>
|
||||
Reference in New Issue
Block a user