Merge branch 'dev_robotaxi-d_240807_6.6.0' into tmp_6.7.0_arrow
This commit is contained in:
@@ -22,7 +22,6 @@ import com.mogo.och.biz.BuildConfig
|
||||
import com.mogo.och.biz.R
|
||||
import com.mogo.och.biz.login.callback.ILoginViewCallback
|
||||
import com.mogo.och.biz.login.presenter.LoginPresenter
|
||||
import kotlinx.android.synthetic.main.biz_login_view.bg_start_bar
|
||||
import kotlinx.android.synthetic.main.biz_login_view.biz_acbtn_login
|
||||
import kotlinx.android.synthetic.main.biz_login_view.biz_ace_login_phone_value
|
||||
import kotlinx.android.synthetic.main.biz_login_view.biz_acet_phone_code_value
|
||||
@@ -79,11 +78,6 @@ class LoginFragment : MvpFragment<LoginFragment?, LoginPresenter?>(), ILoginView
|
||||
}
|
||||
|
||||
private fun initBg() {
|
||||
bg_start_bar.post {
|
||||
val params: ViewGroup.LayoutParams = bg_start_bar.getLayoutParams()
|
||||
params.height = BarUtils.getStatusBarHeight()
|
||||
bg_start_bar.layoutParams = params
|
||||
}
|
||||
}
|
||||
|
||||
private fun initListener() {
|
||||
@@ -124,8 +118,11 @@ class LoginFragment : MvpFragment<LoginFragment?, LoginPresenter?>(), ILoginView
|
||||
true
|
||||
}
|
||||
}else{
|
||||
context?.let {
|
||||
ToggleDebugView.toggleDebugView.toggle(it)
|
||||
biz_actv_login_show_sn.setOnLongClickListener {
|
||||
context?.let {
|
||||
ToggleDebugView.toggleDebugView.toggle(it)
|
||||
}
|
||||
true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -67,8 +67,11 @@ class LoginPassengerFragment : MvpFragment<LoginPassengerFragment?, LoginPasseng
|
||||
true
|
||||
}
|
||||
}else{
|
||||
context?.let {
|
||||
ToggleDebugView.toggleDebugView.toggle(it)
|
||||
actv_app_version?.setOnLongClickListener {
|
||||
context?.let {
|
||||
ToggleDebugView.toggleDebugView.toggle(it)
|
||||
}
|
||||
true
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -23,14 +23,6 @@
|
||||
android:layout_width="1071dp"
|
||||
android:layout_height="wrap_content"/>
|
||||
|
||||
<View
|
||||
android:id="@+id/bg_start_bar"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
android:background="@color/biz_login_171D2B"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_72"/>
|
||||
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/biz_actv_welcome_login_title"
|
||||
android:layout_width="wrap_content"
|
||||
|
||||
@@ -7,6 +7,7 @@ import com.mogo.eagle.core.function.api.map.angle.Scene
|
||||
import com.mogo.eagle.core.function.call.map.CallerVisualAngleManager
|
||||
import com.mogo.map.uicontroller.VisualAngleMode
|
||||
import com.mogo.eagle.core.function.angle.scenes.Default
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
|
||||
import com.mogo.eagle.core.utilcode.util.UiThreadHandler
|
||||
|
||||
class VisualViewModel : ViewModel(),
|
||||
@@ -32,6 +33,7 @@ class VisualViewModel : ViewModel(),
|
||||
}
|
||||
|
||||
override fun onSceneChanged(scene: Scene) {
|
||||
CallerLogger.d(TAG,"scene:${scene}")
|
||||
if (scene.isCanSwitch()) {// 可切换
|
||||
when (scene.getVisualAngleMode()) {
|
||||
VisualAngleMode.MODE_MEDIUM_SIGHT -> {
|
||||
|
||||
@@ -17,6 +17,7 @@ import com.mogo.eagle.core.data.config.FunctionBuildConfig
|
||||
import com.mogo.eagle.core.function.api.base.IMoGoFunctionProvider
|
||||
import com.mogo.eagle.core.function.call.devatools.CallerDevaToolsManager
|
||||
import com.mogo.eagle.core.function.call.hmi.CallerHmiManager
|
||||
import com.mogo.eagle.core.function.call.order.CallerOrderListenerManager
|
||||
import com.mogo.eagle.core.function.hmi.ui.setting.SopView
|
||||
import com.mogo.eagle.core.function.hmi.ui.setting.ToggleDebugView
|
||||
import com.mogo.eagle.core.function.hmi.ui.widget.StatusBarView
|
||||
@@ -61,15 +62,16 @@ abstract class FacadeProvider : IMoGoFunctionProvider, ILoginCallback {
|
||||
val fragment = if (LoginStatusManager.isLogin()) {
|
||||
val fragment = getFragment()
|
||||
LoginStatusManager.resetFragment()
|
||||
injectStatusBar()
|
||||
fragment
|
||||
} else {
|
||||
CallerHmiManager.hideToolsView()
|
||||
ToggleDebugView.toggleDebugView.dismiss()
|
||||
SopView.sopView.dismiss()
|
||||
commonService?.resetFragment()
|
||||
removeStatusBar()
|
||||
LoginStatusManager.getFragment()
|
||||
}
|
||||
injectStatusBar()
|
||||
|
||||
d(TAG, "切换 fragment:${fragment}")
|
||||
|
||||
@@ -167,6 +169,14 @@ abstract class FacadeProvider : IMoGoFunctionProvider, ILoginCallback {
|
||||
|
||||
override fun onStatusChange(currentStatus: LoginStatusEnum) {
|
||||
d(TAG, "登录状态发生改变 $currentStatus")
|
||||
when (currentStatus) {
|
||||
LoginStatusEnum.Login -> {
|
||||
CallerOrderListenerManager.invokeLoginStatusUpdate(true)
|
||||
}
|
||||
else -> {
|
||||
CallerOrderListenerManager.invokeLoginStatusUpdate(false)
|
||||
}
|
||||
}
|
||||
UiThreadHandler.post {
|
||||
showFragment()
|
||||
}
|
||||
@@ -203,6 +213,8 @@ abstract class FacadeProvider : IMoGoFunctionProvider, ILoginCallback {
|
||||
CallerHmiManager.hideToolsView()
|
||||
ToggleDebugView.toggleDebugView.dismiss()
|
||||
SopView.sopView.dismiss()
|
||||
CallerHmiManager.dismissFSMStatusDetailWindow()
|
||||
CallerHmiManager.hideStatusSummaryDialog()
|
||||
commonService?.resetFragment()
|
||||
val fragment = LoginStatusManager.getFragment()
|
||||
val supportFragmentManager: FragmentManager? = activity?.supportFragmentManager
|
||||
@@ -211,6 +223,7 @@ abstract class FacadeProvider : IMoGoFunctionProvider, ILoginCallback {
|
||||
back.replace(containerId, fragment, fragment.tag)
|
||||
back.commitAllowingStateLoss()
|
||||
}
|
||||
removeStatusBar()
|
||||
} else {
|
||||
onBusinessChange(businessEnum)
|
||||
val supportFragmentManager: FragmentManager? = activity?.supportFragmentManager
|
||||
@@ -222,8 +235,8 @@ abstract class FacadeProvider : IMoGoFunctionProvider, ILoginCallback {
|
||||
back.replace(containerId, fragment, fragment.tag)
|
||||
back.commitAllowingStateLoss()
|
||||
}
|
||||
injectStatusBar()
|
||||
}
|
||||
injectStatusBar()
|
||||
}
|
||||
|
||||
private fun injectStatusBar() {
|
||||
|
||||
@@ -12,6 +12,8 @@ import com.mogo.eagle.core.utilcode.mogo.logger.Logger
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant
|
||||
import com.mogo.eagle.core.utilcode.util.GsonUtils
|
||||
import com.mogo.eagle.core.utilcode.util.StringUtils
|
||||
import com.mogo.och.common.module.biz.lansocket.IOchLanPassengerStatusListener
|
||||
import com.mogo.och.common.module.biz.lansocket.LoginLanPassengerSocket
|
||||
import com.mogo.och.common.module.manager.autopilot.autopilot.IOchAutopilotStatusListener
|
||||
import com.mogo.och.common.module.manager.autopilot.autopilot.OchAutoPilotStatusListenerManager
|
||||
import com.mogo.och.common.module.manager.autopilot.location.OchLocationManager
|
||||
@@ -171,6 +173,8 @@ object BusPassengerModel {
|
||||
|
||||
AbnormalFactorsLoopManager.startLoopAbnormalFactors(mContext!!)
|
||||
TrajectoryAndDistanceManager.addDistanceListener(TAG, trajectoryListener)
|
||||
|
||||
LoginLanPassengerSocket.addListener(TAG,connectDriverListener)
|
||||
}
|
||||
|
||||
private fun releaseListeners() {
|
||||
@@ -185,6 +189,16 @@ object BusPassengerModel {
|
||||
LanSocketManager.unRegisterSocketMessageListener(DPMsgType.TYPE_TASK_DETAILS.type, typeTaskDetails)
|
||||
|
||||
AbnormalFactorsLoopManager.stopLoopAbnormalFactors()
|
||||
LoginLanPassengerSocket.removeListener(TAG)
|
||||
}
|
||||
|
||||
private val connectDriverListener = object : IOchLanPassengerStatusListener{
|
||||
override fun onDriverConnectChangeListener(isConnect: Boolean) {
|
||||
super.onDriverConnectChangeListener(isConnect)
|
||||
if(isConnect){
|
||||
queryDriverByLocalDriver()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private val commonListener = object : ILanMessageListener<AppConnectMsg> {
|
||||
|
||||
@@ -140,6 +140,12 @@
|
||||
"dali": {
|
||||
"b1passenger": {
|
||||
"medias": [
|
||||
{
|
||||
"fileUrl": "https://img.zhidaozhixing.com/fileServer/defaultPath/e6b517469d016169621298c18f7e5bbe/dl.mp4",
|
||||
"fileType": 2,
|
||||
"coverImageUrl": "https://img.zhidaozhixing.com/fileServer/defaultPath/9ed23266ead3e9243611160ffad758d1/poster.png",
|
||||
"title": "0"
|
||||
},
|
||||
{
|
||||
"fileUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1676357256102/1.jpg",
|
||||
"fileType": 1,
|
||||
@@ -164,6 +170,12 @@
|
||||
"coverImageUrl": "",
|
||||
"title": "4"
|
||||
},
|
||||
{
|
||||
"fileUrl": "https://img.zhidaozhixing.com/fileServer/defaultPath/e6b517469d016169621298c18f7e5bbe/dl.mp4",
|
||||
"fileType": 2,
|
||||
"coverImageUrl": "https://img.zhidaozhixing.com/fileServer/defaultPath/9ed23266ead3e9243611160ffad758d1/poster.png",
|
||||
"title": "3"
|
||||
},
|
||||
{
|
||||
"fileUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1676357834634/5.m4v",
|
||||
"fileType": 2,
|
||||
|
||||
@@ -177,9 +177,9 @@ class DevaToolsProvider : IDevaToolsProvider, IAppStateListener {
|
||||
BadCaseManager.init(mContext!!)
|
||||
if (DebugConfig.isDebug()) {
|
||||
SdtManager.init(mContext!!, true, DetectResultImpl())
|
||||
// 监听弱网
|
||||
WeakNetworkStrategy.startListen()
|
||||
}
|
||||
// 监听弱网
|
||||
WeakNetworkStrategy.startListen()
|
||||
lookAroundDataProvider.init(mContext!!)
|
||||
(mContext as? Application)?.also {
|
||||
mofangProvider.init(it)
|
||||
@@ -237,34 +237,34 @@ class DevaToolsProvider : IDevaToolsProvider, IAppStateListener {
|
||||
/**
|
||||
* 检查上传崩溃日志
|
||||
*/
|
||||
override fun checkUploadCrashLog() {
|
||||
mContext?.let {
|
||||
val crashDir = File(it.getExternalFilesDir(null), "crash")
|
||||
if(crashDir.exists() && crashDir.canExecute() && crashDir.listFiles()?.isNotEmpty() == true){
|
||||
it.lifeCycleScope.launch(Dispatchers.IO){
|
||||
val startTime = crashDir.lastModified() - 60*1000
|
||||
val endTime = if(System.currentTimeMillis() - crashDir.lastModified()>60*1000){
|
||||
crashDir.lastModified() + 60*1000
|
||||
}else{
|
||||
System.currentTimeMillis()
|
||||
}
|
||||
var isUploadSuccess = false
|
||||
try {
|
||||
MoGoLogRecordProviderImpl.isUploadExtraFile = false
|
||||
CallerDevaToolsManager.logcat()?.upload(startTime, endTime)
|
||||
isUploadSuccess = true
|
||||
} catch (t: Throwable) {
|
||||
t.printStackTrace()
|
||||
} finally {
|
||||
MoGoLogRecordProviderImpl.isUploadExtraFile = true
|
||||
}
|
||||
if(isUploadSuccess){
|
||||
crashDir.deleteRecursively()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// override fun checkUploadCrashLog() {
|
||||
// mContext?.let {
|
||||
// val crashDir = File(it.getExternalFilesDir(null), "crash")
|
||||
// if(crashDir.exists() && crashDir.canExecute() && crashDir.listFiles()?.isNotEmpty() == true){
|
||||
// it.lifeCycleScope.launch(Dispatchers.IO){
|
||||
// val startTime = crashDir.lastModified() - 60*1000
|
||||
// val endTime = if(System.currentTimeMillis() - crashDir.lastModified()>60*1000){
|
||||
// crashDir.lastModified() + 60*1000
|
||||
// }else{
|
||||
// System.currentTimeMillis()
|
||||
// }
|
||||
// var isUploadSuccess = false
|
||||
// try {
|
||||
// MoGoLogRecordProviderImpl.isUploadExtraFile = false
|
||||
// CallerDevaToolsManager.logcat()?.upload(startTime, endTime)
|
||||
// isUploadSuccess = true
|
||||
// } catch (t: Throwable) {
|
||||
// t.printStackTrace()
|
||||
// } finally {
|
||||
// MoGoLogRecordProviderImpl.isUploadExtraFile = true
|
||||
// }
|
||||
// if(isUploadSuccess){
|
||||
// crashDir.deleteRecursively()
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
||||
/**
|
||||
* 受channel业务影响的功能,需要更新,todo 建议有流程
|
||||
|
||||
@@ -52,7 +52,6 @@ import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotStatisticsList
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationGCJ02ListenerManager
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationWGS84ListenerManager
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerChassisStatesListenerManager
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerFsm2024ListenerManager
|
||||
import com.mogo.eagle.core.function.call.devatools.CallerDevaToolsListenerManager
|
||||
import com.mogo.eagle.core.function.call.map.CallerMapScreenListenerManager
|
||||
import com.mogo.eagle.core.function.call.map.CallerMapUIServiceManager
|
||||
@@ -127,7 +126,7 @@ internal object BadCaseManager : LifecycleEventObserver, IMoGoAutopilotRecordLis
|
||||
MogoStatusManager.getInstance()
|
||||
.registerStatusChangedListener(TAG, StatusDescriptor.CLOUD_SOCKET, this)
|
||||
if(ProjectUtils.isSaas()){
|
||||
CallerFsm2024ListenerManager.addListener(TAG,this)
|
||||
// CallerFsm2024ListenerManager.addListener(TAG,this)
|
||||
CallerAutopilotStatisticsListenerManager.addListener(TAG,this)
|
||||
CallerOrderListenerManager.addListener(TAG,this)
|
||||
CallerAutoPilotStatusListenerManager.addListener("RecordViewManager",this)
|
||||
@@ -570,36 +569,36 @@ internal object BadCaseManager : LifecycleEventObserver, IMoGoAutopilotRecordLis
|
||||
*/
|
||||
override fun onFSM2024State(fsmState: Fsm2024.FSMStateMsg) {
|
||||
Log.i(TAG,"onFSM2024State fsmState.pilotStandbyFlag="+fsmState.pilotStandbyFlag+" pilotNotStandbyReason="+ fsmState.pilotNotStandbyReason)
|
||||
if(fsmState.pilotStandbyFlag){
|
||||
BadCaseConfig.fsmAlreadyStandby = true
|
||||
}
|
||||
if(BadCaseConfig.fsmAlreadyStandby){
|
||||
if(!fsmState.pilotStandbyFlag){
|
||||
//pilotStandbyFlag == false代表自动驾驶无法启动
|
||||
if(!BadCaseConfig.alreadyShowOneReport){
|
||||
//触发一键上报
|
||||
ThreadUtils.runOnUiThread {
|
||||
val activity = AppStateManager.currentActivity()
|
||||
if (activity !is AppCompatActivity) {
|
||||
return@runOnUiThread
|
||||
}
|
||||
if(reportTypeWindow == null){
|
||||
reportTypeWindow = ReportTypeWindow(activity)
|
||||
reportTypeWindow?.setClickListener(object: ReportTypeWindow.ClickListener{
|
||||
override fun closeWindow() {
|
||||
reportTypeWindow?.hideFloatWindow()
|
||||
reportTypeWindow = null
|
||||
}
|
||||
})
|
||||
}
|
||||
reportTypeWindow?.showOneClickReportWindow(xPosition,yPosition)
|
||||
BadCaseConfig.alreadyShowOneReport = true
|
||||
}
|
||||
}
|
||||
}else{
|
||||
BadCaseConfig.alreadyShowOneReport = false
|
||||
}
|
||||
}
|
||||
// if(fsmState.pilotStandbyFlag){
|
||||
// BadCaseConfig.fsmAlreadyStandby = true
|
||||
// }
|
||||
// if(BadCaseConfig.fsmAlreadyStandby){
|
||||
// if(!fsmState.pilotStandbyFlag){
|
||||
// //pilotStandbyFlag == false代表自动驾驶无法启动
|
||||
// if(!BadCaseConfig.alreadyShowOneReport){
|
||||
// //触发一键上报
|
||||
// ThreadUtils.runOnUiThread {
|
||||
// val activity = AppStateManager.currentActivity()
|
||||
// if (activity !is AppCompatActivity) {
|
||||
// return@runOnUiThread
|
||||
// }
|
||||
// if(reportTypeWindow == null){
|
||||
// reportTypeWindow = ReportTypeWindow(activity)
|
||||
// reportTypeWindow?.setClickListener(object: ReportTypeWindow.ClickListener{
|
||||
// override fun closeWindow() {
|
||||
// reportTypeWindow?.hideFloatWindow()
|
||||
// reportTypeWindow = null
|
||||
// }
|
||||
// })
|
||||
// }
|
||||
// reportTypeWindow?.showOneClickReportWindow(xPosition,yPosition)
|
||||
// BadCaseConfig.alreadyShowOneReport = true
|
||||
// }
|
||||
// }
|
||||
// }else{
|
||||
// BadCaseConfig.alreadyShowOneReport = false
|
||||
// }
|
||||
// }
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -702,4 +701,14 @@ internal object BadCaseManager : LifecycleEventObserver, IMoGoAutopilotRecordLis
|
||||
BadCaseConfig.tenantId = tenantId
|
||||
}
|
||||
|
||||
/**
|
||||
* 监听登录登出状态
|
||||
*/
|
||||
override fun onLoginStatusUpdate(isLogin: Boolean) {
|
||||
if(reportTypeWindow?.getWindowShowStatus() == true){
|
||||
reportTypeWindow?.hideFloatWindow()
|
||||
reportTypeWindow = null
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -62,9 +62,9 @@ object BadCaseConfig {
|
||||
//本次问题是否已经触发一键上报
|
||||
@JvmField
|
||||
var alreadyShowOneReport: Boolean = false
|
||||
//FSM是否已经变为可以启自驾
|
||||
@JvmField
|
||||
var fsmAlreadyStandby: Boolean = false
|
||||
// //FSM是否已经变为可以启自驾
|
||||
// @JvmField
|
||||
// var fsmAlreadyStandby: Boolean = false
|
||||
//租户ID
|
||||
@JvmField
|
||||
var tenantId: Long = 0
|
||||
|
||||
@@ -12,6 +12,10 @@ import android.view.WindowManager
|
||||
import android.widget.ImageView
|
||||
import android.widget.TextView
|
||||
import android.widget.ToggleButton
|
||||
import com.mogo.eagle.core.data.config.HmiBuildConfig
|
||||
import com.mogo.eagle.core.data.config.HmiBuildConfig.coDriverStatus
|
||||
import com.mogo.eagle.core.data.config.HmiBuildConfig.mainDriverStatus
|
||||
import com.mogo.eagle.core.data.config.HmiBuildConfig.rearRowStatus
|
||||
import com.mogo.eagle.core.data.enums.EventTypeEnumNew
|
||||
import com.mogo.eagle.core.data.msgbox.AutopilotMsg
|
||||
import com.mogo.eagle.core.data.msgbox.MsgBoxBean
|
||||
@@ -223,6 +227,35 @@ class ExamControlWindow constructor(activity: Activity): View.OnTouchListener{
|
||||
ivEmergencyStop.setOnClickListener {
|
||||
CallerAutoPilotControlManager.sendPlanningPullOverCmd(3)
|
||||
}
|
||||
|
||||
//主驾
|
||||
tbSeatMainDriver.isChecked = mainDriverStatus
|
||||
tbSeatMainDriver.setOnCheckedChangeListener{compoundButton, isChecked ->
|
||||
if(!compoundButton.isPressed){
|
||||
return@setOnCheckedChangeListener
|
||||
}
|
||||
mainDriverStatus = isChecked
|
||||
CallerAutoPilotControlManager.sendSeatPressure(mainDriverStatus,coDriverStatus,rearRowStatus)
|
||||
}
|
||||
//副驾
|
||||
tbSeatPassenger.isChecked = coDriverStatus
|
||||
tbSeatPassenger.setOnCheckedChangeListener{compoundButton, isChecked ->
|
||||
if(!compoundButton.isPressed){
|
||||
return@setOnCheckedChangeListener
|
||||
}
|
||||
coDriverStatus = isChecked
|
||||
CallerAutoPilotControlManager.sendSeatPressure(mainDriverStatus,coDriverStatus,rearRowStatus)
|
||||
}
|
||||
//后排
|
||||
tbSeatRear.isChecked = rearRowStatus
|
||||
tbSeatRear.setOnCheckedChangeListener{compoundButton, isChecked ->
|
||||
if(!compoundButton.isPressed){
|
||||
return@setOnCheckedChangeListener
|
||||
}
|
||||
rearRowStatus = isChecked
|
||||
CallerAutoPilotControlManager.sendSeatPressure(mainDriverStatus,coDriverStatus,rearRowStatus)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@SuppressLint("ClickableViewAccessibility")
|
||||
|
||||
@@ -27,8 +27,12 @@ import com.mogo.core.log.record.model.UploadError
|
||||
import com.mogo.eagle.core.data.app.AppConfigInfo
|
||||
import com.mogo.eagle.core.function.api.devatools.logcat.*
|
||||
import com.mogo.eagle.core.utilcode.download.DownloadUtils
|
||||
import com.mogo.eagle.core.utilcode.util.ThreadUtils
|
||||
import com.zhidao.cosupload.callback.CosStatusCallback
|
||||
import com.zhidao.cosupload.callback.CosStatusCallbackManager
|
||||
import com.zhidao.cosupload.model.CallbackData
|
||||
import com.zhidao.loglib.bean.RemoteLogPushContent
|
||||
import com.zhjt.mogo_core_function_devatools.BuildConfig
|
||||
import com.zhidao.loglib.upload.UploadManager
|
||||
import com.zhjt.mogo_core_function_devatools.logcat.checker.AnrLogChecker
|
||||
import com.zhjt.mogo_core_function_devatools.logcat.config.LogRecordConfig
|
||||
import com.zhjt.mogo_core_function_devatools.logcat.uploader.*
|
||||
@@ -37,6 +41,7 @@ import java.io.*
|
||||
import java.util.concurrent.TimeUnit
|
||||
import java.util.concurrent.TimeUnit.MINUTES
|
||||
import java.util.concurrent.atomic.AtomicBoolean
|
||||
import java.util.concurrent.atomic.AtomicInteger
|
||||
import java.util.concurrent.atomic.AtomicLong
|
||||
|
||||
internal class MoGoLogRecordProviderImpl: IMoGoLogRecordProvider,
|
||||
@@ -142,7 +147,7 @@ internal class MoGoLogRecordProviderImpl: IMoGoLogRecordProvider,
|
||||
builder.crashConfig(
|
||||
CrashConfig.Builder()
|
||||
.enabled(true)
|
||||
.uploader(CrashLogUploader(context))
|
||||
.uploader(CrashLogUploader())
|
||||
.crashDir(File(context.getExternalFilesDir(null), "crash"))
|
||||
.expireDuration(TimeUnit.DAYS.toMillis(3))
|
||||
.javaCrash(true)
|
||||
@@ -243,32 +248,97 @@ internal class MoGoLogRecordProviderImpl: IMoGoLogRecordProvider,
|
||||
SystemClock.sleep(15000)
|
||||
}
|
||||
|
||||
private class CrashLogUploader(private val mContext: Context): ICrashFileUploader {
|
||||
private class CrashLogUploader : ICrashFileUploader {
|
||||
|
||||
override suspend fun upload(
|
||||
type: CrashType,
|
||||
crashTime: String,
|
||||
file: File,
|
||||
extra: Map<String, String>?
|
||||
): Boolean {
|
||||
try {
|
||||
val keyMessage = when(type) {
|
||||
JavaCrash -> extra?.get("java stacktrace") ?: extra?.get("backtrace") ?: "#"
|
||||
NativeCrash -> extra?.get("backtrace") ?: "#"
|
||||
ANRCrash -> extra?.get("backtrace") ?: "#"
|
||||
}
|
||||
val typeStr = when(type){
|
||||
JavaCrash -> "JavaCrash"
|
||||
NativeCrash -> "NativeCrash"
|
||||
ANRCrash -> "ANRCrash"
|
||||
}
|
||||
CrashLogAnalyticsManager.crashLogAnalytics(typeStr,keyMessage)
|
||||
return true
|
||||
} catch (t: Throwable) {
|
||||
return false
|
||||
}
|
||||
companion object {
|
||||
private const val TAG = "CrashLogUploader"
|
||||
}
|
||||
|
||||
}
|
||||
override suspend fun upload(type: CrashType, crashTime: String, file: File, extra: Map<String, String>?): Boolean = suspendCancellableCoroutine {
|
||||
val isStartUpload = AtomicBoolean(false)
|
||||
val isInvoked = AtomicBoolean(false)
|
||||
val retry = AtomicInteger(0)
|
||||
CosStatusCallbackManager.getInstance().register(object : CosStatusCallback {
|
||||
override fun onStartUpload(data: CallbackData?) {
|
||||
if (data?.localPath == file.absolutePath) {
|
||||
isStartUpload.set(true)
|
||||
Log.d(TAG, "---- onStartUpload ---: $data")
|
||||
}
|
||||
}
|
||||
|
||||
override fun uploadCosCompleted(data: CallbackData?) {
|
||||
if (data?.localPath == file.absolutePath && isInvoked.compareAndSet(false, true)) {
|
||||
try {
|
||||
isStartUpload.set(true)
|
||||
Log.d(TAG, "---- uploadCosCompleted ---: $data")
|
||||
CosStatusCallbackManager.getInstance().unregister(this)
|
||||
} finally {
|
||||
try {
|
||||
val keyMessage = when (type) {
|
||||
JavaCrash -> extra?.get("java stacktrace") ?: extra?.get("backtrace") ?: "#"
|
||||
NativeCrash -> extra?.get("backtrace") ?: "#"
|
||||
ANRCrash -> extra?.get("backtrace") ?: "#"
|
||||
}
|
||||
val typeStr = when (type) {
|
||||
JavaCrash -> "JavaCrash"
|
||||
NativeCrash -> "NativeCrash"
|
||||
ANRCrash -> "ANRCrash"
|
||||
}
|
||||
CrashLogAnalyticsManager.crashLogAnalytics(typeStr, keyMessage)
|
||||
} catch (e: Throwable) {
|
||||
e.printStackTrace()
|
||||
} finally {
|
||||
it.resumeWith(Result.success(true))
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
override fun uploadCosFailed(data: CallbackData?) {
|
||||
if (data?.localPath == file.absolutePath && isInvoked.compareAndSet(false, true)) {
|
||||
try {
|
||||
Log.d(TAG, "---- uploadCosFailed ---: $data")
|
||||
isStartUpload.set(true)
|
||||
CosStatusCallbackManager.getInstance().unregister(this)
|
||||
} finally {
|
||||
it.resumeWith(Result.failure(IllegalStateException(data?.exception ?: "上传崩溃文件失败")))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
override fun onProgress(data: CallbackData?) {
|
||||
if (data?.localPath == file.absolutePath) {
|
||||
isStartUpload.set(true)
|
||||
Log.d(TAG, "---- onProgress ---: $data")
|
||||
}
|
||||
}
|
||||
})
|
||||
ThreadUtils.getIoPool().execute {
|
||||
try {
|
||||
while (retry.get() < 3 && !isStartUpload.get()) {
|
||||
try {
|
||||
Log.d(TAG, "---- 上传开始 ---: ${retry.get()}")
|
||||
UploadManager.getInstance().uploadSingleFile(file.absolutePath)
|
||||
} catch (t: Throwable) {
|
||||
t.printStackTrace()
|
||||
}
|
||||
SystemClock.sleep(5000)
|
||||
retry.addAndGet(1)
|
||||
}
|
||||
if (!isStartUpload.get() && isInvoked.compareAndSet(false, true)) {
|
||||
it.resumeWith(Result.failure(IllegalStateException("重试3次,还没有开始上传, 真无语...")))
|
||||
return@execute
|
||||
}
|
||||
if (retry.get() > 3 && isInvoked.compareAndSet(false, true)) {
|
||||
it.resumeWith(Result.failure(IllegalStateException("重试3次,没有收到结果回调,真无语...")))
|
||||
return@execute
|
||||
}
|
||||
} catch (t: Throwable) {
|
||||
if (isInvoked.compareAndSet(false, true)) {
|
||||
it.resumeWith(Result.failure(t))
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -171,6 +171,8 @@ object StatusManager {
|
||||
}
|
||||
listeners.clear()
|
||||
flows.clear()
|
||||
model.resetData()
|
||||
last.set(null)
|
||||
}
|
||||
|
||||
fun addListener(tag: String, listener: IStatusListener) {
|
||||
@@ -178,6 +180,10 @@ object StatusManager {
|
||||
return
|
||||
}
|
||||
listeners[tag] = listener
|
||||
try {
|
||||
val all = model.status.value?.second ?: emptyList()
|
||||
listener.onStatusChanged(all, all)
|
||||
} catch (ignore: Throwable) {}
|
||||
}
|
||||
|
||||
fun removeListener(tag: String) {
|
||||
|
||||
@@ -4,10 +4,13 @@ import android.content.Context
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotStatusListener
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoFsm2024Listener
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoNodeStateListener
|
||||
import com.mogo.eagle.core.function.api.order.IOrderListener
|
||||
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.CallerFsm2024ListenerManager
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerNodeStateListenerManager
|
||||
import com.mogo.eagle.core.function.call.hmi.CallerHmiManager
|
||||
import com.mogo.eagle.core.function.call.order.CallerOrderListenerManager
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_DEVA
|
||||
import com.zhjt.mogo.adas.data.AdasConstants
|
||||
@@ -21,7 +24,7 @@ import kotlinx.coroutines.launch
|
||||
import java.util.concurrent.atomic.AtomicReference
|
||||
|
||||
internal class FSMImpl(ctx: Context) : IFlow<FSMStatus>(ctx), IMoGoAutopilotStatusListener,
|
||||
IMoGoFsm2024Listener, IMoGoNodeStateListener {
|
||||
IMoGoFsm2024Listener, IMoGoNodeStateListener, IOrderListener {
|
||||
|
||||
companion object {
|
||||
const val TAG = "FSMImpl"
|
||||
@@ -73,8 +76,8 @@ internal class FSMImpl(ctx: Context) : IFlow<FSMStatus>(ctx), IMoGoAutopilotStat
|
||||
CallerAutoPilotStatusListenerManager.addListener(TAG, this)
|
||||
CallerFsm2024ListenerManager.addListener(TAG, this)
|
||||
CallerNodeStateListenerManager.addNodeStateListener(TAG, setOf(AdasConstants.NodeName.FSM2024), this)
|
||||
CallerOrderListenerManager.addListener(TAG, this)
|
||||
}
|
||||
|
||||
override fun onAutopilotIpcConnectStatusChanged(
|
||||
status: AdasConstants.IpcConnectionStatus,
|
||||
reason: String?
|
||||
@@ -124,11 +127,20 @@ internal class FSMImpl(ctx: Context) : IFlow<FSMStatus>(ctx), IMoGoAutopilotStat
|
||||
}
|
||||
}
|
||||
|
||||
override fun onLoginStatusUpdate(isLogin: Boolean) {
|
||||
super.onLoginStatusUpdate(isLogin)
|
||||
if (!isLogin) {
|
||||
CallerLogger.d(TAG, "onLoginStatusUpdate isLogin=$isLogin")
|
||||
CallerHmiManager.dismissFSMStatusDetailWindow()
|
||||
}
|
||||
}
|
||||
|
||||
override fun onDestroy() {
|
||||
super.onDestroy()
|
||||
CallerLogger.d("$M_DEVA$TAG", "-- onDestroy --")
|
||||
CallerAutoPilotStatusListenerManager.removeListener(TAG)
|
||||
CallerFsm2024ListenerManager.removeListener(TAG)
|
||||
CallerNodeStateListenerManager.removeNodeStateListener(TAG)
|
||||
CallerOrderListenerManager.removeListener(TAG)
|
||||
}
|
||||
}
|
||||
@@ -50,6 +50,11 @@ internal class StatusModel : ViewModel() {
|
||||
}
|
||||
}
|
||||
|
||||
fun resetData() {
|
||||
status.value = DEFAULTS
|
||||
old.set(null)
|
||||
}
|
||||
|
||||
private fun getExceptionStatus(l: ArrayList<Status>): Status? {
|
||||
return l.find { it.isException() }
|
||||
}
|
||||
|
||||
@@ -34,6 +34,21 @@ internal class StatusView(private val model: StatusModel, ctx: Context): Constra
|
||||
init()
|
||||
}
|
||||
|
||||
override fun onAttachedToWindow() {
|
||||
super.onAttachedToWindow()
|
||||
val adapter = model.status.value?.let { data -> StatusAdapter(context, data.second.filter { (it !is IAutopilotPreLaunchStatus) || (it is FSMStatus)}) }?.also { adapter -> rv.adapter = adapter }
|
||||
adapter?.let { _ ->
|
||||
observer?.also { model.status.removeObserver(it) }
|
||||
model.status.observeForever(Observer<Pair<Status?, ArrayList<Status>>> { data ->
|
||||
val old = adapter.data
|
||||
val update = data.second.filter { (it !is IAutopilotPreLaunchStatus) || (it is FSMStatus) }
|
||||
val result = DiffUtil.calculateDiff(StatusDiffCallback(old, update))
|
||||
adapter.data = update
|
||||
result.dispatchUpdatesTo(adapter)
|
||||
}.also { observer = it })
|
||||
}
|
||||
}
|
||||
|
||||
private fun init() {
|
||||
rv.also { itx ->
|
||||
itx.itemAnimator?.run {
|
||||
@@ -49,16 +64,6 @@ internal class StatusView(private val model: StatusModel, ctx: Context): Constra
|
||||
.horizontalInnerSpace(10.PX)
|
||||
.build()
|
||||
)
|
||||
val adapter = model.status.value?.let { data -> StatusAdapter(context, data.second.filter { (it !is IAutopilotPreLaunchStatus) || (it is FSMStatus)}) }?.also { adapter -> itx.adapter = adapter }
|
||||
adapter?.let { _ ->
|
||||
model.status.observeForever(Observer<Pair<Status?, ArrayList<Status>>> { data ->
|
||||
val old = adapter.data
|
||||
val update = data.second.filter { (it !is IAutopilotPreLaunchStatus) || (it is FSMStatus) }
|
||||
val result = DiffUtil.calculateDiff(StatusDiffCallback(old, update))
|
||||
adapter.data = update
|
||||
result.dispatchUpdatesTo(adapter)
|
||||
}.also { observer = it })
|
||||
}
|
||||
}
|
||||
|
||||
// onDetach {
|
||||
|
||||
@@ -3,6 +3,7 @@ package com.zhjt.mogo_core_function_devatools.weaknetwork
|
||||
import android.util.Log
|
||||
import com.mogo.cloud.network.WeakNetworkManager
|
||||
import com.mogo.cloud.network.WeakNetworkManager.setListener
|
||||
import com.mogo.commons.utils.MogoAnalyticUtils
|
||||
import com.mogo.eagle.core.data.deva.chain.ChainConstant
|
||||
import com.mogo.eagle.core.utilcode.util.ThreadUtils
|
||||
import com.mogo.eagle.core.utilcode.util.ToastUtils
|
||||
@@ -10,6 +11,7 @@ import com.mogo.weak.network.SdtManager
|
||||
import com.zhjt.service.chain.ChainLog
|
||||
import java.util.concurrent.locks.ReentrantReadWriteLock
|
||||
|
||||
|
||||
object WeakNetworkStrategy {
|
||||
|
||||
private const val TAG = "WeakNetworkStrategy"
|
||||
@@ -19,7 +21,8 @@ object WeakNetworkStrategy {
|
||||
|
||||
private const val WEAK_HTTP_RTT = 1300
|
||||
|
||||
private const val VERY_CONSUMING_TIME_URL = "/yycp-launcherSnapshot/launcherSnapshot/querySnapshotSync"
|
||||
private const val VERY_CONSUMING_TIME_URL =
|
||||
"/yycp-launcherSnapshot/launcherSnapshot/querySnapshotSync"
|
||||
|
||||
private var lastOutputTime = 0L
|
||||
|
||||
@@ -41,16 +44,37 @@ object WeakNetworkStrategy {
|
||||
setListener(object : WeakNetworkManager.OnWeakHttpListener {
|
||||
override fun onHttpRttReceived(hashCode: Int, url: String, timeStamp: Long) {
|
||||
if (VERY_CONSUMING_TIME_URL in url) return
|
||||
outputLog(url, timeStamp)
|
||||
//outputLog(url, timeStamp)
|
||||
}
|
||||
|
||||
override fun onFailEvent(hashCode: Int, url: String, timeStamp: Long, currentFailCount: Long) {
|
||||
outputLog(url, timeStamp, true)
|
||||
override fun onFailEvent(
|
||||
hashCode: Int,
|
||||
url: String,
|
||||
timeStamp: Long,
|
||||
currentFailCount: Long
|
||||
) {
|
||||
//outputLog(url, timeStamp, true)
|
||||
}
|
||||
|
||||
override fun onWeakNetworkEvent() {
|
||||
// // 大而全接口干扰,需排除掉
|
||||
// Log.d(TAG, "收到弱网事件!")
|
||||
// 大而全接口干扰,需排除掉
|
||||
//Log.d(TAG, "收到弱网事件!")
|
||||
}
|
||||
|
||||
override fun logMethod(name: String, startTime: Long) {
|
||||
// 网络耗时大于5秒的提示
|
||||
// if ((startTime / 1000000000.0) > 5) {
|
||||
// ToastUtils.showShort("当前网络质量差!")
|
||||
// }
|
||||
|
||||
// 网络质量差的请求上报埋点
|
||||
val elapsedTime: Long = System.nanoTime() - startTime
|
||||
val properties: MutableMap<String, Any> = HashMap()
|
||||
properties["http_request"] = name
|
||||
properties["http_request_start_time"] = startTime
|
||||
properties["http_request_elapsed_time"] = elapsedTime
|
||||
|
||||
MogoAnalyticUtils.track("http_net_status", properties)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
@@ -162,7 +162,7 @@ class TakeOverRecordView @JvmOverloads constructor(
|
||||
// takeOverListAdapter?.notifyRecordItemRemoved(removeRecord)
|
||||
iterator.remove()
|
||||
}
|
||||
recordList = CallerTakeOverManager.getAllRecord(context)
|
||||
recordList = CallerTakeOverManager.getAllRecord(context).asReversed()
|
||||
ThreadUtils.runOnUiThread {
|
||||
if(recordList.isNullOrEmpty()){
|
||||
tvRecordNoData.visibility = View.VISIBLE
|
||||
@@ -188,7 +188,7 @@ class TakeOverRecordView @JvmOverloads constructor(
|
||||
*/
|
||||
private fun refreshList(){
|
||||
scope.launch(Dispatchers.IO){
|
||||
recordList = CallerTakeOverManager.getAllRecord(context)
|
||||
recordList = CallerTakeOverManager.getAllRecord(context).asReversed()
|
||||
ThreadUtils.runOnUiThread {
|
||||
if(recordList.isNullOrEmpty()){
|
||||
tvRecordNoData.visibility = View.VISIBLE
|
||||
@@ -196,7 +196,7 @@ class TakeOverRecordView @JvmOverloads constructor(
|
||||
}else{
|
||||
tvRecordNoData.visibility = View.GONE
|
||||
recordGroup.visibility = View.VISIBLE
|
||||
//更新列表
|
||||
//更新列表,倒序显示
|
||||
takeOverListAdapter?.setData(recordList!!)
|
||||
}
|
||||
|
||||
|
||||
@@ -361,6 +361,10 @@ class MoGoHmiProvider : IMoGoHmiProvider {
|
||||
context?.let { StatusView.statusView.toggle(it) }
|
||||
}
|
||||
|
||||
override fun hideStatusSummaryDialog() {
|
||||
context?.let { StatusView.statusView.toggle(it) }
|
||||
}
|
||||
|
||||
/**
|
||||
* 展示红绿灯
|
||||
*/
|
||||
|
||||
@@ -48,7 +48,7 @@ class FSMStatusDetailWindowManager private constructor() {
|
||||
offsetY = AutoSizeUtils.dp2px(context, 112f),
|
||||
offsetX = AutoSizeUtils.dp2px(context, (214f) * -1L)
|
||||
)
|
||||
.setImmersionStatusBar(true)
|
||||
.setImmersionStatusBar(false)
|
||||
.slideDel(false)
|
||||
.setWindowHeight(WindowManager.LayoutParams.WRAP_CONTENT)
|
||||
.setWindowWidth(AutoSizeUtils.dp2px(context, 538f))
|
||||
|
||||
@@ -8,6 +8,8 @@ import android.view.WindowManager
|
||||
import android.view.animation.OvershootInterpolator
|
||||
import com.mogo.eagle.core.data.enums.SidePattern
|
||||
import com.mogo.eagle.core.data.status.StatusSummaryEntity
|
||||
import com.mogo.eagle.core.function.api.order.IOrderListener
|
||||
import com.mogo.eagle.core.function.call.order.CallerOrderListenerManager
|
||||
import com.mogo.eagle.core.function.hmi.notification.WarningFloat
|
||||
import com.mogo.eagle.core.function.hmi.notification.anim.DefaultAnimator
|
||||
import com.mogo.eagle.core.utilcode.util.BarUtils
|
||||
@@ -22,12 +24,25 @@ class StatusView private constructor() {
|
||||
private var mStatusSummaryViewFloat: WarningFloat.Builder? = null
|
||||
private var mStatusSummaryView: StatusSummaryView? = null
|
||||
|
||||
|
||||
companion object {
|
||||
const val TAG = "StatusSummaryView"
|
||||
val statusView by lazy(LazyThreadSafetyMode.SYNCHRONIZED) {
|
||||
StatusView()
|
||||
}
|
||||
}
|
||||
|
||||
init {
|
||||
CallerOrderListenerManager.addListener(TAG, object : IOrderListener{
|
||||
override fun onLoginStatusUpdate(isLogin: Boolean) {
|
||||
super.onLoginStatusUpdate(isLogin)
|
||||
if (!isLogin) {
|
||||
dismiss()
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
fun toggle(context: Context, gravity: Int = Gravity.RIGHT, sidePattern: SidePattern = SidePattern.RIGHT) {
|
||||
if (mStatusSummaryViewFloat != null) {
|
||||
dismiss()
|
||||
|
||||
@@ -208,7 +208,7 @@ open class MainActivity : MvpActivity<MainView?, MainPresenter?>(), MainView,
|
||||
startLeakMonitor()
|
||||
}
|
||||
CallerDevaToolsManager.checkMonitorDb()
|
||||
CallerDevaToolsManager.checkUploadCrashLog()
|
||||
// CallerDevaToolsManager.checkUploadCrashLog()
|
||||
}
|
||||
|
||||
private fun startLeakMonitor() {
|
||||
|
||||
@@ -17,7 +17,7 @@ class CrossRoad(private val delayTime: Long = 0, unit: TimeUnit = TimeUnit.SECON
|
||||
Scene(delayTime, unit) {
|
||||
|
||||
override fun getVisualAngleMode(): VisualAngleMode {
|
||||
if (AppIdentityModeUtils.isB2(FunctionBuildConfig.appIdentityMode)) {
|
||||
if (AppIdentityModeUtils.isB2(FunctionBuildConfig.appIdentityMode) && AppIdentityModeUtils.isPassenger(FunctionBuildConfig.appIdentityMode)) {
|
||||
return VisualAngleMode.MAP_STYLE_VR_ANGLE_CROSS
|
||||
}
|
||||
return MAP_STYLE_VR_ANGLE_CROSS_NEW
|
||||
@@ -36,7 +36,7 @@ class CrossRoad(private val delayTime: Long = 0, unit: TimeUnit = TimeUnit.SECON
|
||||
}
|
||||
|
||||
override fun getScreenToOriginDis(): ScreenToOriginDis {
|
||||
if (AppIdentityModeUtils.isB2(FunctionBuildConfig.appIdentityMode)) {
|
||||
if (AppIdentityModeUtils.isB2(FunctionBuildConfig.appIdentityMode) && AppIdentityModeUtils.isPassenger(FunctionBuildConfig.appIdentityMode)) {
|
||||
return NONE
|
||||
}
|
||||
return DOWN
|
||||
|
||||
@@ -16,7 +16,7 @@ class Default(val delayTime: Long = 0, val unit: TimeUnit = TimeUnit.SECONDS, va
|
||||
|
||||
override fun getVisualAngleMode(): VisualAngleMode {
|
||||
Log.d("Default", "---- 1 --------------")
|
||||
if (AppIdentityModeUtils.isB2(FunctionBuildConfig.appIdentityMode)) {
|
||||
if (AppIdentityModeUtils.isB2(FunctionBuildConfig.appIdentityMode) && AppIdentityModeUtils.isPassenger(FunctionBuildConfig.appIdentityMode)) {
|
||||
Log.d("Default", "---- 2 --------------")
|
||||
return VisualAngleMode.MAP_STYLE_VR_ERHAI_B2
|
||||
}
|
||||
|
||||
@@ -51,6 +51,13 @@ object HmiBuildConfig {
|
||||
@Volatile
|
||||
var isShowRouteStrategy = !AppIdentityModeUtils.isBus(FunctionBuildConfig.appIdentityMode)
|
||||
|
||||
/**
|
||||
* 是否展示路沿、车道线
|
||||
*/
|
||||
@JvmField
|
||||
@Volatile
|
||||
var isShowLaneMark: Boolean = false
|
||||
|
||||
/**
|
||||
* 是否展示obu的弱势交通
|
||||
*/
|
||||
@@ -107,4 +114,25 @@ object HmiBuildConfig {
|
||||
@Volatile
|
||||
var isShowBusStationStrategyBorderPoint = false
|
||||
|
||||
/**
|
||||
* 主驾是否有人,默认没人
|
||||
*/
|
||||
@JvmField
|
||||
@Volatile
|
||||
var mainDriverStatus = false
|
||||
|
||||
/**
|
||||
* 副驾是否有人,默认没人
|
||||
*/
|
||||
@JvmField
|
||||
@Volatile
|
||||
var coDriverStatus = false
|
||||
|
||||
/**
|
||||
* 后排是否有人,默认没人
|
||||
*/
|
||||
@JvmField
|
||||
@Volatile
|
||||
var rearRowStatus = false
|
||||
|
||||
}
|
||||
@@ -261,7 +261,7 @@ enum class EventTypeEnumNew(
|
||||
"绿波通行",
|
||||
poiTypeSrcVr = R.drawable.icon_warning_v2x_traffic_lights_green,
|
||||
content = "建议车速 %s KM/H",
|
||||
tts = "建议车速 %s KM/H"
|
||||
tts = "建议车速 %s 千米每小时"
|
||||
),
|
||||
//-------------红绿灯 end ---------->
|
||||
|
||||
|
||||
@@ -39,7 +39,7 @@ interface IDevaToolsProvider : IProvider {
|
||||
/**
|
||||
* 检查上传崩溃日志
|
||||
*/
|
||||
fun checkUploadCrashLog()
|
||||
// fun checkUploadCrashLog()
|
||||
|
||||
/**
|
||||
* App 业务记录 更新
|
||||
|
||||
@@ -169,6 +169,8 @@ interface IMoGoHmiProvider :IProvider{
|
||||
|
||||
fun showStatusSummaryDialog()
|
||||
|
||||
fun hideStatusSummaryDialog()
|
||||
|
||||
/**
|
||||
* 展示红绿灯
|
||||
*/
|
||||
|
||||
@@ -27,7 +27,7 @@ abstract class Scene(private val delay: Long, private val unit: TimeUnit = TimeU
|
||||
* 单位:(毫秒)
|
||||
* 表示多长时间之后切换到当前视角场景
|
||||
*/
|
||||
final fun getDelay(): Long = unit.toMillis(delay)
|
||||
fun getDelay(): Long = unit.toMillis(delay)
|
||||
|
||||
/**
|
||||
* 单位:(毫秒)
|
||||
|
||||
@@ -29,4 +29,10 @@ interface IOrderListener {
|
||||
* @param tenantId 租户id
|
||||
*/
|
||||
fun onTenantIdUpdate(tenantId: Long){}
|
||||
|
||||
/**
|
||||
* 登录状态变化通知
|
||||
* @param isLogin 是否已登录
|
||||
*/
|
||||
fun onLoginStatusUpdate(isLogin: Boolean) {}
|
||||
}
|
||||
@@ -1,7 +1,7 @@
|
||||
package com.mogo.eagle.core.function.api.setting
|
||||
|
||||
/**
|
||||
* 座椅压力事件监听回调接口
|
||||
* 接管请求事件监听回调接口
|
||||
*/
|
||||
interface ITakeOverEventListener {
|
||||
|
||||
|
||||
@@ -46,9 +46,9 @@ object CallerDevaToolsManager {
|
||||
/**
|
||||
* 检查上传崩溃日志
|
||||
*/
|
||||
fun checkUploadCrashLog(){
|
||||
devaToolsProviderApi?.checkUploadCrashLog()
|
||||
}
|
||||
// fun checkUploadCrashLog(){
|
||||
// devaToolsProviderApi?.checkUploadCrashLog()
|
||||
// }
|
||||
|
||||
/**
|
||||
* 更新AppChannel
|
||||
|
||||
@@ -16,6 +16,8 @@ import com.mogo.eagle.core.function.api.hmi.warning.IMoGoWarningStatusListener
|
||||
import com.mogo.eagle.core.function.api.hmi.xiaozhi.event.Event
|
||||
import com.mogo.eagle.core.function.api.hmi.xiaozhi.listener.OnXiaoZhiStateChangeListener
|
||||
import com.mogo.eagle.core.function.api.hmi.xiaozhi.state.State
|
||||
import com.mogo.eagle.core.function.call.order.CallerOrderListenerManager
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
|
||||
|
||||
/**
|
||||
* @author xiaoyuzhou
|
||||
@@ -25,6 +27,9 @@ import com.mogo.eagle.core.function.api.hmi.xiaozhi.state.State
|
||||
*
|
||||
*/
|
||||
object CallerHmiManager {
|
||||
|
||||
const val TAG = "CallerHmiManager"
|
||||
|
||||
private val hmiProviderApi
|
||||
get() = ARouter.getInstance().build(MogoServicePaths.PATH_FRAGMENT_HMI)
|
||||
.navigation() as? IMoGoHmiProvider
|
||||
@@ -234,7 +239,12 @@ object CallerHmiManager {
|
||||
* 展示 FSM 状态详情弹框
|
||||
*/
|
||||
fun showFSMStatusDetailWindow(title: String, titleColor:String, content: String) {
|
||||
hmiProviderApi?.showFSMStatusDetailWindow(title, titleColor, content)
|
||||
// if (!CallerOrderListenerManager.isLoginStatus()) {
|
||||
// CallerLogger.i(TAG, "showFSMStatusDetailWindow isLogin=false dismiss")
|
||||
// dismissFSMStatusDetailWindow()
|
||||
// return
|
||||
// }
|
||||
hmiProviderApi?.showFSMStatusDetailWindow(title, titleColor, content)
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -248,6 +258,10 @@ object CallerHmiManager {
|
||||
hmiProviderApi?.showStatusSummaryDialog()
|
||||
}
|
||||
|
||||
fun hideStatusSummaryDialog() {
|
||||
hmiProviderApi?.hideStatusSummaryDialog()
|
||||
}
|
||||
|
||||
/**
|
||||
* 展示红绿灯
|
||||
*/
|
||||
|
||||
@@ -2,6 +2,8 @@ package com.mogo.eagle.core.function.call.order
|
||||
|
||||
import com.mogo.eagle.core.function.api.order.IOrderListener
|
||||
import com.mogo.eagle.core.function.call.base.CallerBase
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
|
||||
import java.util.concurrent.atomic.AtomicBoolean
|
||||
|
||||
/**
|
||||
* @author XuXinChao
|
||||
@@ -10,6 +12,13 @@ import com.mogo.eagle.core.function.call.base.CallerBase
|
||||
*/
|
||||
object CallerOrderListenerManager: CallerBase<IOrderListener>() {
|
||||
|
||||
const val TAG = "CallerOrderListenerManager"
|
||||
|
||||
/**
|
||||
* 是否登录状态
|
||||
*/
|
||||
private val isLoginStatus by lazy { AtomicBoolean(false) }
|
||||
|
||||
fun invokeOrderStatus(inOrder: Boolean){
|
||||
M_LISTENERS.forEach{
|
||||
val listener = it.value
|
||||
@@ -46,4 +55,24 @@ object CallerOrderListenerManager: CallerBase<IOrderListener>() {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 登录状态变化通知
|
||||
* @param isLogin 是否已登录
|
||||
*/
|
||||
fun invokeLoginStatusUpdate(isLogin: Boolean) {
|
||||
CallerLogger.i(TAG, "invokeLoginStatusUpdate isLogin=$isLogin")
|
||||
isLoginStatus.set(isLogin)
|
||||
M_LISTENERS.forEach{
|
||||
val listener = it.value
|
||||
listener.onLoginStatusUpdate(isLogin)
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询是否是登录状态
|
||||
*/
|
||||
fun isLoginStatus(): Boolean {
|
||||
return isLoginStatus.get()
|
||||
}
|
||||
|
||||
}
|
||||
@@ -64,21 +64,21 @@ bytex.ASM_API=ASM7
|
||||
LOGLIB_VERSION=1.10.18
|
||||
######## MogoAiCloudSDK Version ########
|
||||
# 网络请求LOGLIB_VERSION
|
||||
MOGO_NETWORK_VERSION=1.4.7.33
|
||||
MOGO_NETWORK_VERSION=1.4.7.38
|
||||
# 鉴权
|
||||
MOGO_PASSPORT_VERSION=1.4.7.33
|
||||
MOGO_PASSPORT_VERSION=1.4.7.38
|
||||
# 长链接
|
||||
MOGO_SOCKET_VERSION=1.4.7.33
|
||||
MOGO_SOCKET_VERSION=1.4.7.38
|
||||
# 数据采集
|
||||
MOGO_REALTIME_VERSION=1.4.7.33
|
||||
MOGO_REALTIME_VERSION=1.4.7.38
|
||||
# 直播推流
|
||||
MOGO_LIVE_VERSION=1.4.7.33
|
||||
MOGO_LIVE_VERSION=1.4.7.38
|
||||
# 直播拉流
|
||||
MOGO_TRAFFICLIVE_VERSION=1.4.7.33
|
||||
MOGO_TRAFFICLIVE_VERSION=1.4.7.38
|
||||
# 定位服务
|
||||
MOGO_LOCATION_VERSION=1.4.7.33
|
||||
MOGO_LOCATION_VERSION=1.4.7.38
|
||||
# 远程通讯模块
|
||||
MOGO_TELEMATIC_VERSION=1.4.7.33
|
||||
MOGO_TELEMATIC_VERSION=1.4.7.38
|
||||
######## MogoAiCloudSDK Version ########
|
||||
# 自研地图
|
||||
MAP_SDK_VERSION=3.4.1.2
|
||||
|
||||
@@ -57,8 +57,8 @@ class GDLocationClient private constructor() : AMapLocationListener,
|
||||
mLocationClient.setLocationListener(this)
|
||||
//设置定位模式为高精度模式,Battery_Saving为低功耗模式,Device_Sensors是仅设备模式
|
||||
mLocationOption.locationMode = AMapLocationClientOption.AMapLocationMode.Hight_Accuracy
|
||||
//设置定位间隔,单位毫秒,默认为2000ms
|
||||
mLocationOption.interval = 1000
|
||||
//设置定位间隔,单位毫秒,默认为2000ms,使用默认值
|
||||
// mLocationOption.interval = 1000
|
||||
//设置定位参数
|
||||
mLocationClient.setLocationOption(mLocationOption)
|
||||
} catch (e: Exception) {
|
||||
|
||||
Reference in New Issue
Block a user