Merge branch 'dev_arch_opt_3.0' into dev_robosweeper-d_app-module_221230_1.1.0
# Conflicts: # OCH/mogo-och-sweeper/build.gradle # OCH/mogo-och-sweeper/src/main/java/com/mogo/och/sweeper/SweeperProvider.java # OCH/mogo-och-sweeper/src/main/java/com/mogo/och/sweeper/fragment/BaseSweeperTabFragment.java # OCH/mogo-och-sweeper/src/main/java/com/mogo/och/sweeper/fragment/SweeperFragment.java # OCH/mogo-och-sweeper/src/main/java/com/mogo/och/sweeper/model/SweeperOrderModel.java # OCH/mogo-och-sweeper/src/main/java/com/mogo/och/sweeper/presenter/SweeperPresenter.java # OCH/mogo-och-sweeper/src/main/java/com/mogo/och/sweeper/ui/SweeperOperatePanelView.java # OCH/mogo-och-sweeper/src/main/res/layout/sweeper_base_fragment.xml
This commit is contained in:
@@ -13,7 +13,9 @@ import com.mogo.eagle.core.data.deva.scene.SceneModule
|
||||
import com.mogo.eagle.core.data.deva.scene.SceneTAG
|
||||
import com.mogo.eagle.core.data.msgbox.MsgBoxBean
|
||||
import com.mogo.eagle.core.function.api.devatools.IDevaToolsProvider
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
|
||||
import com.zhjt.mogo_core_function_devatools.badcase.BadCaseManager
|
||||
import com.zhjt.mogo_core_function_devatools.badcase.consts.BadCaseConfig
|
||||
import com.zhjt.mogo_core_function_devatools.env.EnvChangeManager
|
||||
import com.zhjt.mogo_core_function_devatools.binding.BindingCarManager.Companion.bindingCarManager
|
||||
import com.zhjt.mogo_core_function_devatools.funcconfig.FuncConfigCenter.Companion.bizConfigCenter
|
||||
@@ -21,6 +23,8 @@ import com.zhjt.mogo_core_function_devatools.funcconfig.FuncConfigImpl
|
||||
import com.zhjt.mogo_core_function_devatools.logcatch.MogoLogCatchManager
|
||||
import com.zhjt.mogo_core_function_devatools.mofang.MoFangManager.Companion.moFangManager
|
||||
import com.zhjt.mogo_core_function_devatools.monitor.MonitorManager
|
||||
import com.zhjt.mogo_core_function_devatools.monitor.db.MonitorDb
|
||||
import com.zhjt.mogo_core_function_devatools.monitor.db.MonitorDb.Companion.getDb
|
||||
import com.zhjt.mogo_core_function_devatools.report.IPCReportManager.Companion.iPCReportManager
|
||||
import com.zhjt.mogo_core_function_devatools.scene.SceneManager.Companion.sceneManager
|
||||
import com.zhjt.mogo_core_function_devatools.status.StatusManager
|
||||
@@ -55,6 +59,27 @@ class DevaToolsProvider : IDevaToolsProvider {
|
||||
bindingCarManager.init(mContext!!)
|
||||
}
|
||||
|
||||
override fun checkMonitorDb() {
|
||||
mContext?.let {
|
||||
Thread {
|
||||
val limitId: Long = 50001
|
||||
val file = it.getDatabasePath(MonitorDb.INTERNAL_DB_NAME)
|
||||
try {
|
||||
if (file != null && file.exists()) {
|
||||
val cpuList = getDb(it).monitorDao().getAllCPUById(limitId)
|
||||
val memList = getDb(it).monitorDao().getAllMemById(limitId)
|
||||
// 大于5w条清除
|
||||
if (cpuList.isNotEmpty() || memList.isNotEmpty()) {
|
||||
it.deleteDatabase(MonitorDb.INTERNAL_DB_NAME)
|
||||
}
|
||||
}
|
||||
} catch (e: Exception) {
|
||||
CallerLogger.e(TAG, e.message)
|
||||
}
|
||||
}.start()
|
||||
}
|
||||
}
|
||||
|
||||
override fun startLogCatch() {
|
||||
MogoLogCatchManager.startCatchLog()
|
||||
}
|
||||
@@ -148,6 +173,26 @@ class DevaToolsProvider : IDevaToolsProvider {
|
||||
return EnvChangeManager.getEnvConfig()
|
||||
}
|
||||
|
||||
override fun getEnvCityName(): String {
|
||||
return EnvChangeManager.getCityName()
|
||||
}
|
||||
|
||||
override fun getEnvNetMode(): String {
|
||||
return EnvChangeManager.getNetMode()
|
||||
}
|
||||
|
||||
override fun envConfigReset() {
|
||||
EnvChangeManager.reset()
|
||||
}
|
||||
|
||||
override fun envConfigChange(cityCode: String, netMode: Int) {
|
||||
EnvChangeManager.changeTo(cityCode, netMode)
|
||||
}
|
||||
|
||||
override fun dockerVersion(dockerVersion: String?) {
|
||||
BadCaseConfig.dockerVersion = dockerVersion
|
||||
}
|
||||
|
||||
override fun modifyCarInfo(callBack: (ModifyBindingcarInfo) -> Unit) {
|
||||
bindingCarManager.modifyCarInfo(callBack)
|
||||
}
|
||||
|
||||
@@ -10,11 +10,12 @@ import android.widget.RadioButton
|
||||
import android.widget.TextView
|
||||
import com.mogo.cloud.passport.MoGoAiCloudClientConfig
|
||||
import com.mogo.eagle.core.data.app.AppConfigInfo
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoChassisLocationWGS84Listener
|
||||
import com.mogo.eagle.core.data.map.MogoLocation
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotRecordListener
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotManager
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationWGS84ListenerManager
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoChassisLocationWGS84Listener
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotControlManager
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotRecordListenerManager
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationWGS84ListenerManager
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_DEVA
|
||||
import com.mogo.eagle.core.utilcode.mogo.toast.TipToast
|
||||
@@ -27,7 +28,6 @@ import com.zhjt.mogo_core_function_devatools.R
|
||||
import com.zhjt.mogo_core_function_devatools.badcase.consts.BadCaseConfig
|
||||
import kotlinx.coroutines.GlobalScope
|
||||
import kotlinx.coroutines.launch
|
||||
import mogo.telematics.pad.MessagePad
|
||||
import record_cache.RecordPanelOuterClass
|
||||
import java.util.*
|
||||
|
||||
@@ -119,7 +119,7 @@ class AIDataCollectWindow constructor(activity: Activity) : View.OnTouchListener
|
||||
// 添加 ADAS车辆状态&定位 监听
|
||||
CallerChassisLocationWGS84ListenerManager.addListener(this.hashCode().toString(), this)
|
||||
//开始录制AI数据采集Bag包
|
||||
CallerAutoPilotManager.recordPackage(
|
||||
CallerAutoPilotControlManager.recordPackage(
|
||||
99,
|
||||
Random(SystemClock.elapsedRealtime()).nextInt(),
|
||||
20,
|
||||
@@ -353,7 +353,7 @@ class AIDataCollectWindow constructor(activity: Activity) : View.OnTouchListener
|
||||
fun closeWindow()
|
||||
}
|
||||
|
||||
override fun onChassisLocationWGS84(gnssInfo: MessagePad.GnssInfo) {
|
||||
override fun onChassisLocationWGS84(gnssInfo: MogoLocation) {
|
||||
latitude = gnssInfo.latitude
|
||||
longitude = gnssInfo.longitude
|
||||
}
|
||||
|
||||
@@ -11,7 +11,7 @@ import androidx.recyclerview.widget.GridLayoutManager
|
||||
import com.mogo.eagle.core.data.badcase.RecordTypeEntity
|
||||
import com.mogo.eagle.core.data.badcase.TopicEntity
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotRecordListener
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotManager
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotControlManager
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotRecordListenerManager
|
||||
import com.mogo.eagle.core.utilcode.util.ThreadUtils
|
||||
import com.mogo.eagle.core.utilcode.util.ToastUtils
|
||||
@@ -206,7 +206,7 @@ internal class BadCaseConfigView @JvmOverloads constructor(
|
||||
super.onAttachedToWindow()
|
||||
CallerAutopilotRecordListenerManager.addListener(TAG, this)
|
||||
//获取数据采集录制模式配置列表
|
||||
CallerAutoPilotManager.getBadCaseConfig(0, 0, listOf())
|
||||
CallerAutoPilotControlManager.getBadCaseConfig(0, 0, listOf())
|
||||
recordTypesList.add(RecordTypeEntity(0,"自定义", arrayListOf()))
|
||||
}
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@ import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.mogo.eagle.core.data.badcase.RecordCaseEntity;
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotRecordListener;
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotManager;
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotControlManager;
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotRecordListenerManager;
|
||||
import com.mogo.eagle.core.utilcode.util.ThreadUtils;
|
||||
import com.zhjt.mogo_core_function_devatools.R;
|
||||
@@ -77,7 +77,7 @@ public class CaseListDialog extends Dialog implements IMoGoAutopilotRecordListen
|
||||
super.onAttachedToWindow();
|
||||
CallerAutopilotRecordListenerManager.INSTANCE.addListener(TAG, this);
|
||||
//获取数据采集录制模式配置列表
|
||||
CallerAutoPilotManager.INSTANCE.getBadCaseConfig(0, 0,new ArrayList<>());
|
||||
CallerAutoPilotControlManager.INSTANCE.getBadCaseConfig(0, 0,new ArrayList<>());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -17,7 +17,7 @@ import androidx.recyclerview.widget.RecyclerView;
|
||||
import com.mogo.eagle.core.data.badcase.RecordTypeEntity;
|
||||
import com.mogo.eagle.core.data.badcase.TopicEntity;
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotRecordListener;
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotManager;
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotControlManager;
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotRecordListenerManager;
|
||||
import com.mogo.eagle.core.utilcode.util.ThreadUtils;
|
||||
import com.mogo.eagle.core.utilcode.util.ToastUtils;
|
||||
@@ -69,7 +69,7 @@ public class CaseTopicListDialog extends Dialog implements IMoGoAutopilotRecordL
|
||||
init();
|
||||
initEvent();
|
||||
//获取所有Topic
|
||||
CallerAutoPilotManager.INSTANCE.getBadCaseConfig(1, 0, new ArrayList<>());
|
||||
CallerAutoPilotControlManager.INSTANCE.getBadCaseConfig(1, 0, new ArrayList<>());
|
||||
if (recordType != null) {
|
||||
tvCaseName.setText(recordType.getDesc());
|
||||
if (recordType.getTopicsList().size() > 0) {
|
||||
@@ -160,7 +160,7 @@ public class CaseTopicListDialog extends Dialog implements IMoGoAutopilotRecordL
|
||||
});
|
||||
tvSave.setOnClickListener(v -> {
|
||||
if (recordType != null) {
|
||||
Boolean success = CallerAutoPilotManager.INSTANCE.getBadCaseConfig(2, recordType.getId(), addTopicList);
|
||||
Boolean success = CallerAutoPilotControlManager.INSTANCE.getBadCaseConfig(2, recordType.getId(), addTopicList);
|
||||
if (Boolean.TRUE.equals(success)) {
|
||||
ToastUtils.showShort("Topic设置成功");
|
||||
if (recordType.getId() == 0) {
|
||||
|
||||
@@ -14,11 +14,12 @@ import android.widget.TextView
|
||||
import com.mogo.cloud.passport.MoGoAiCloudClientConfig
|
||||
import com.mogo.eagle.core.data.app.AppConfigInfo
|
||||
import com.mogo.eagle.core.data.badcase.RecordCaseEntity
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoChassisLocationWGS84Listener
|
||||
import com.mogo.eagle.core.data.map.MogoLocation
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotRecordListener
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotManager
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationWGS84ListenerManager
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoChassisLocationWGS84Listener
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotControlManager
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotRecordListenerManager
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationWGS84ListenerManager
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_DEVA
|
||||
import com.mogo.eagle.core.utilcode.mogo.toast.TipToast
|
||||
@@ -35,7 +36,6 @@ import com.zhjt.mogo_core_function_devatools.badcase.consts.BadCaseConfig
|
||||
import com.zhjt.mogo_core_function_devatools.badcase.record.RecordManager
|
||||
import kotlinx.coroutines.GlobalScope
|
||||
import kotlinx.coroutines.launch
|
||||
import mogo.telematics.pad.MessagePad
|
||||
import record_cache.RecordPanelOuterClass
|
||||
import java.io.File
|
||||
import java.util.*
|
||||
@@ -347,7 +347,7 @@ class InitiativeBadCaseWindow constructor(activity: Activity) : View.OnTouchList
|
||||
mWindowManager!!.addView(mFloatLayout, mWindowParams)
|
||||
//开启录包
|
||||
if (recordCaseEntity != null) {
|
||||
CallerAutoPilotManager.recordPackage(
|
||||
CallerAutoPilotControlManager.recordPackage(
|
||||
recordCaseEntity.caseId,
|
||||
Random(SystemClock.elapsedRealtime()).nextInt(),
|
||||
BadCaseConfig.totalDuration,
|
||||
@@ -355,7 +355,7 @@ class InitiativeBadCaseWindow constructor(activity: Activity) : View.OnTouchList
|
||||
recordCaseEntity.topicList
|
||||
)
|
||||
} else {
|
||||
CallerAutoPilotManager.recordPackage(
|
||||
CallerAutoPilotControlManager.recordPackage(
|
||||
BadCaseConfig.type, Random(SystemClock.elapsedRealtime()).nextInt(),
|
||||
BadCaseConfig.totalDuration, BadCaseConfig.previousDuration
|
||||
)
|
||||
@@ -394,7 +394,7 @@ class InitiativeBadCaseWindow constructor(activity: Activity) : View.OnTouchList
|
||||
fun closeWindow()
|
||||
}
|
||||
|
||||
override fun onChassisLocationWGS84(gnssInfo: MessagePad.GnssInfo) {
|
||||
override fun onChassisLocationWGS84(gnssInfo: MogoLocation) {
|
||||
latitude = gnssInfo.latitude
|
||||
longitude = gnssInfo.longitude
|
||||
}
|
||||
|
||||
@@ -15,6 +15,7 @@ import android.widget.TextView
|
||||
import com.google.android.flexbox.FlexboxLayout
|
||||
import com.mogo.cloud.passport.MoGoAiCloudClientConfig
|
||||
import com.mogo.eagle.core.data.app.AppConfigInfo
|
||||
import com.mogo.eagle.core.data.map.MogoLocation
|
||||
import com.mogo.eagle.core.data.msgbox.MsgBoxBean
|
||||
import com.mogo.eagle.core.data.msgbox.RecordBagMsg
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoChassisLocationWGS84Listener
|
||||
@@ -34,7 +35,6 @@ import com.zhjt.mogo_core_function_devatools.badcase.record.RecordManager
|
||||
import kotlinx.coroutines.GlobalScope
|
||||
import kotlinx.coroutines.launch
|
||||
import me.jessyan.autosize.utils.AutoSizeUtils
|
||||
import mogo.telematics.pad.MessagePad
|
||||
import org.greenrobot.eventbus.EventBus
|
||||
import java.io.File
|
||||
|
||||
@@ -380,9 +380,9 @@ class PassiveBadCaseWindow constructor(activity: Activity) : View.OnTouchListene
|
||||
fun closeWindow()
|
||||
}
|
||||
|
||||
override fun onChassisLocationWGS84(gnssInfo: MessagePad.GnssInfo) {
|
||||
latitude = gnssInfo?.latitude
|
||||
longitude = gnssInfo?.longitude
|
||||
override fun onChassisLocationWGS84(gnssInfo: MogoLocation) {
|
||||
latitude = gnssInfo.latitude
|
||||
longitude = gnssInfo.longitude
|
||||
}
|
||||
|
||||
}
|
||||
@@ -7,9 +7,9 @@ import com.mogo.eagle.core.data.bindingcar.BindingCarInfo
|
||||
import com.mogo.eagle.core.data.bindingcar.BindingCarRequest
|
||||
import com.mogo.eagle.core.data.bindingcar.ModifyBindingcarInfo
|
||||
import com.mogo.eagle.core.data.config.HdMapBuildConfig
|
||||
import com.mogo.eagle.core.function.call.hmi.CallerHmiManager.showBindingcarDialog
|
||||
import com.mogo.eagle.core.function.call.hmi.CallerHmiManager.showModifyBindingcarDialog
|
||||
import com.mogo.eagle.core.function.call.map.CallerHDMapManager.changeCurrentIcon
|
||||
import com.mogo.eagle.core.function.call.hmi.CallerHmiManager.showBindingCarDialog
|
||||
import com.mogo.eagle.core.function.call.hmi.CallerHmiManager.showModifyBindingCarDialog
|
||||
import com.mogo.eagle.core.function.call.map.CallerMapUIServiceManager
|
||||
import com.mogo.eagle.core.network.MoGoRetrofitFactory
|
||||
import com.mogo.eagle.core.network.utils.GsonUtil
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger.d
|
||||
@@ -79,8 +79,8 @@ class BindingCarNetWorkManager private constructor() {
|
||||
//根据车辆类型切换不同的车辆模型,只针对红旗做处理
|
||||
updateCarVrIconRes(info.getData().brandId)
|
||||
when (info.getData().compare) {
|
||||
"0" -> showBindingcarDialog()
|
||||
"3" -> showModifyBindingcarDialog()
|
||||
"0" -> showBindingCarDialog()
|
||||
"3" -> showModifyBindingCarDialog()
|
||||
"null" -> TipToast.shortTip("当前工控机没有入库")
|
||||
}
|
||||
SharedPrefsMgr.getInstance(context!!).putString(
|
||||
@@ -156,19 +156,19 @@ class BindingCarNetWorkManager private constructor() {
|
||||
d(SceneConstant.M_BINDING + TAG, "updateCarVrIconRes : $brandId")
|
||||
when (brandId) {
|
||||
"1" -> {
|
||||
changeCurrentIcon(R.raw.chuzuche)
|
||||
CallerMapUIServiceManager.getMapUIController()?.changeCurrentIcon(R.raw.chuzuche)
|
||||
HdMapBuildConfig.currentCarVrIconRes = R.raw.chuzuche
|
||||
}
|
||||
"2" -> {
|
||||
changeCurrentIcon(R.raw.hq_h9)
|
||||
CallerMapUIServiceManager.getMapUIController()?.changeCurrentIcon(R.raw.hq_h9)
|
||||
HdMapBuildConfig.currentCarVrIconRes = R.raw.hq_h9
|
||||
}
|
||||
"3" -> {
|
||||
changeCurrentIcon(R.raw.xiaobache)
|
||||
CallerMapUIServiceManager.getMapUIController()?.changeCurrentIcon(R.raw.xiaobache)
|
||||
HdMapBuildConfig.currentCarVrIconRes = R.raw.xiaobache
|
||||
}
|
||||
else -> {
|
||||
changeCurrentIcon(R.raw.chuzuche)
|
||||
CallerMapUIServiceManager.getMapUIController()?.changeCurrentIcon(R.raw.chuzuche)
|
||||
HdMapBuildConfig.currentCarVrIconRes = R.raw.chuzuche
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,12 +2,12 @@ package com.zhjt.mogo_core_function_devatools.env
|
||||
|
||||
import android.content.Context.MODE_PRIVATE
|
||||
import android.os.Process
|
||||
import com.mogo.commons.constants.*
|
||||
import com.mogo.commons.debug.*
|
||||
import com.mogo.commons.constants.SharedPrefsConstants
|
||||
import com.mogo.commons.debug.DebugConfig
|
||||
import com.mogo.eagle.core.data.EnvConfig
|
||||
import com.mogo.eagle.core.function.call.map.*
|
||||
import com.mogo.eagle.core.utilcode.mogo.storage.*
|
||||
import com.mogo.eagle.core.utilcode.util.*
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationGCJ02ListenerManager
|
||||
import com.mogo.eagle.core.utilcode.mogo.storage.SharedPrefsMgr
|
||||
import com.mogo.eagle.core.utilcode.util.Utils
|
||||
|
||||
|
||||
object EnvChangeManager {
|
||||
@@ -34,7 +34,7 @@ object EnvChangeManager {
|
||||
fun getCityName(): String {
|
||||
val cache = getConfig()
|
||||
return if (cache == null) {
|
||||
when(CallerMapLocationListenerManager.getCurrentLocation()?.cityCode ?: SharedPrefsMgr.getInstance(Utils.getApp()).getString(SharedPrefsConstants.LOCATION_CITY_CODE) ?: "010") {
|
||||
when(CallerChassisLocationGCJ02ListenerManager.getChassisLocationGCJ02()?.cityCode ?: SharedPrefsMgr.getInstance(Utils.getApp()).getString(SharedPrefsConstants.LOCATION_CITY_CODE) ?: "010") {
|
||||
"010" -> "北京"
|
||||
"0734" -> "衡阳"
|
||||
else -> "未知"
|
||||
|
||||
@@ -15,7 +15,7 @@ import com.mogo.eagle.core.data.constants.MoGoConfig
|
||||
import com.mogo.eagle.core.data.deva.bizconfig.FuncBizConfig.Companion.BIZ_FULL_LOG
|
||||
import com.mogo.eagle.core.data.deva.bizconfig.FuncBizConfig.Companion.FOUNDATION
|
||||
import com.mogo.eagle.core.function.api.map.deva.IMoGoMapDevaProvider
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotManager
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotControlManager
|
||||
import com.mogo.eagle.core.function.call.devatools.CallerDevaToolsListenerManager
|
||||
import com.mogo.eagle.core.function.call.map.CallerMapDevaListenerManager
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
|
||||
@@ -220,7 +220,7 @@ object MogoLogCatchManager : IMogoOnMessageListener<RemoteLogPushContent>, Handl
|
||||
Logger.init(LogLevel.DEBUG)
|
||||
MoGoAiCloudClient.getInstance().aiCloudClientConfig.isShowDebugLog = true
|
||||
MoGoAiCloudClient.getInstance().aiCloudClientConfig.isShowNetDebugLog = true
|
||||
CallerAutoPilotManager.setEnableLog(true)
|
||||
CallerAutoPilotControlManager.setEnableLog(true)
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -230,7 +230,7 @@ object MogoLogCatchManager : IMogoOnMessageListener<RemoteLogPushContent>, Handl
|
||||
Logger.init(if (DebugConfig.isDebug()) LogLevel.DEBUG else LogLevel.OFF)
|
||||
MoGoAiCloudClient.getInstance().aiCloudClientConfig.isShowDebugLog = false
|
||||
MoGoAiCloudClient.getInstance().aiCloudClientConfig.isShowNetDebugLog = false
|
||||
CallerAutoPilotManager.setEnableLog(false)
|
||||
CallerAutoPilotControlManager.setEnableLog(false)
|
||||
}
|
||||
|
||||
override fun onError(errorCount: Int) {
|
||||
|
||||
@@ -42,7 +42,7 @@ internal class CanImpl(ctx: Context) :
|
||||
private val state: AtomicInteger by lazy { AtomicInteger(Int.MIN_VALUE) }
|
||||
|
||||
override fun onCreate() {
|
||||
send(CanStatus(CallerAutoPilotManager.isConnected()))
|
||||
send(CanStatus(CallerAutoPilotControlManager.isConnected()))
|
||||
|
||||
CallerChassisAccStateListenerManager.addListener(TAG, this)
|
||||
CallerChassisBrakeStateListenerManager.addListener(TAG, this)
|
||||
@@ -61,7 +61,7 @@ internal class CanImpl(ctx: Context) :
|
||||
|
||||
private fun isCanEnabled(): Boolean {
|
||||
val code = CallerAutoPilotStatusListenerManager.getAutoPilotReportMessageCode()
|
||||
return CallerAutoPilotManager.isConnected() && code != "EHW_CAN" && (state.get() == Int.MIN_VALUE || state.get() == 0)
|
||||
return CallerAutoPilotControlManager.isConnected() && code != "EHW_CAN" && (state.get() == Int.MIN_VALUE || state.get() == 0)
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -28,7 +28,7 @@ internal class IpcImpl(ctx: Context): IFlow<IpcStatus>(ctx), IMoGoAutopilotStatu
|
||||
}
|
||||
|
||||
private fun checkAndSend() {
|
||||
send(IpcStatus(CallerAutoPilotManager.isConnected()))
|
||||
send(IpcStatus(CallerAutoPilotControlManager.isConnected()))
|
||||
}
|
||||
|
||||
override fun onDestroy() {
|
||||
|
||||
@@ -2,9 +2,10 @@ package com.zhjt.mogo_core_function_devatools.status.flow.rtk
|
||||
|
||||
import android.content.Context
|
||||
import android.util.Log
|
||||
import com.mogo.eagle.core.data.map.MogoLocation
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotStatusListener
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoChassisLocationWGS84Listener
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotManager
|
||||
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.CallerChassisLocationWGS84ListenerManager
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
|
||||
@@ -15,7 +16,6 @@ import kotlinx.coroutines.Dispatchers
|
||||
import kotlinx.coroutines.Job
|
||||
import kotlinx.coroutines.delay
|
||||
import kotlinx.coroutines.launch
|
||||
import mogo.telematics.pad.MessagePad.GnssInfo
|
||||
import system_master.SystemStatusInfo.HealthInfo
|
||||
import system_master.SystemStatusInfo.StatusInfo
|
||||
import java.util.concurrent.atomic.AtomicBoolean
|
||||
@@ -42,7 +42,7 @@ internal class RTKImpl(ctx: Context): IFlow<RTKStatus>(ctx), IMoGoAutopilotStatu
|
||||
CallerLogger.d("$M_DEVA$TAG", "-- onCreate --")
|
||||
CallerAutoPilotStatusListenerManager.addListener(TAG, this)
|
||||
CallerChassisLocationWGS84ListenerManager.addListener(TAG, this)
|
||||
if (CallerAutoPilotManager.isConnected()) {
|
||||
if (CallerAutoPilotControlManager.isConnected()) {
|
||||
check()
|
||||
}
|
||||
}
|
||||
@@ -53,7 +53,7 @@ internal class RTKImpl(ctx: Context): IFlow<RTKStatus>(ctx), IMoGoAutopilotStatu
|
||||
}
|
||||
check?.takeIf { it.isActive }?.cancel()
|
||||
launch(Dispatchers.Unconfined) {
|
||||
CallerAutoPilotManager.sendStatusQueryReq()
|
||||
CallerAutoPilotControlManager.sendStatusQueryReq()
|
||||
delay(5000)
|
||||
isOldVersion.set(true)
|
||||
}.also {
|
||||
@@ -74,18 +74,18 @@ internal class RTKImpl(ctx: Context): IFlow<RTKStatus>(ctx), IMoGoAutopilotStatu
|
||||
|
||||
override fun onAutopilotIpcConnectStatusChanged(status: Int, reason: String?) {
|
||||
super.onAutopilotIpcConnectStatusChanged(status, reason)
|
||||
if (!CallerAutoPilotManager.isConnected()) {
|
||||
if (!CallerAutoPilotControlManager.isConnected()) {
|
||||
CallerLogger.d("$M_DEVA$TAG", "工控机断开了....")
|
||||
healthInfo.set(null)
|
||||
send(RTKStatus("", -1))
|
||||
}
|
||||
|
||||
if (CallerAutoPilotManager.isConnected() && check == null && !isOldVersion.get()) {
|
||||
if (CallerAutoPilotControlManager.isConnected() && check == null && !isOldVersion.get()) {
|
||||
check()
|
||||
}
|
||||
}
|
||||
|
||||
override fun onChassisLocationWGS84(gnssInfo: GnssInfo) {
|
||||
override fun onChassisLocationWGS84(gnssInfo: MogoLocation) {
|
||||
if (isOldVersion.get()) {
|
||||
if (isRTKEnabled()) {
|
||||
send(RTKStatus("RTK", 0))
|
||||
@@ -103,7 +103,7 @@ internal class RTKImpl(ctx: Context): IFlow<RTKStatus>(ctx), IMoGoAutopilotStatu
|
||||
private fun isRTKEnabled(): Boolean {
|
||||
val code = CallerAutoPilotStatusListenerManager.getAutoPilotReportMessageCode()
|
||||
val gnssInfo = CallerChassisLocationWGS84ListenerManager.getChassisLocationWGS84()
|
||||
return CallerAutoPilotManager.isConnected() && (
|
||||
return CallerAutoPilotControlManager.isConnected() && (
|
||||
code != "EHW_RTK" &&
|
||||
code != "EHW_GNSS" &&
|
||||
code != "ESYS_RTK_STATUS_FAULT" &&
|
||||
|
||||
@@ -40,7 +40,7 @@ internal class TracingImpl(ctx: Context): IFlow<TracingStatus>(ctx), IMoGoAutopi
|
||||
|
||||
override fun onAutopilotIpcConnectStatusChanged(status: Int, reason: String?) {
|
||||
super.onAutopilotIpcConnectStatusChanged(status, reason)
|
||||
if (!CallerAutoPilotManager.isConnected()) {
|
||||
if (!CallerAutoPilotControlManager.isConnected()) {
|
||||
old = UNKNOWN
|
||||
send(TracingStatus(UNKNOWN))
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@ internal class StatusModel : ViewModel() {
|
||||
|
||||
const val TAG = "StatusModel"
|
||||
val DEFAULTS = Pair(null, ArrayList<Status>().also {
|
||||
it += IpcStatus(CallerAutoPilotManager.isConnected())
|
||||
it += IpcStatus(CallerAutoPilotControlManager.isConnected())
|
||||
it += CanStatus(false)
|
||||
it += TracingStatus(UNKNOWN)
|
||||
it += RTKStatus("", -1)
|
||||
|
||||
@@ -7,7 +7,7 @@ import com.mogo.commons.module.status.MogoStatusManager
|
||||
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
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotManager
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotControlManager
|
||||
import com.mogo.eagle.core.function.call.telematic.CallerTelematicManager
|
||||
import com.mogo.eagle.core.utilcode.mogo.AppIdentityModeUtils
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
|
||||
@@ -51,7 +51,7 @@ object SyncConfig {
|
||||
else -> {
|
||||
}
|
||||
}
|
||||
AppConfigInfo.teleTimeStamp = CallerAutoPilotManager.getTeleTimeStamp()
|
||||
AppConfigInfo.teleTimeStamp = CallerAutoPilotControlManager.getTeleTimeStamp()
|
||||
logOutConfig(AppConfigInfo)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user