diff --git a/core/function-impl/mogo-core-function-autopilot/src/main/java/com/mogo/eagle/core/function/autopilot/MoGoAutopilotProvider.kt b/core/function-impl/mogo-core-function-autopilot/src/main/java/com/mogo/eagle/core/function/autopilot/MoGoAutopilotProvider.kt
index e60e35f76a..7ebf5cdf0f 100644
--- a/core/function-impl/mogo-core-function-autopilot/src/main/java/com/mogo/eagle/core/function/autopilot/MoGoAutopilotProvider.kt
+++ b/core/function-impl/mogo-core-function-autopilot/src/main/java/com/mogo/eagle/core/function/autopilot/MoGoAutopilotProvider.kt
@@ -67,6 +67,8 @@ class MoGoAutopilotProvider :
private var mContext: Context? = null
@Volatile
private var isFirstDisc = true
+ @Volatile
+ private var wrTimeStamp = 0L
override val functionName: String
get() = TAG
@@ -189,6 +191,7 @@ class MoGoAutopilotProvider :
AdasManager.getInstance().setOnMultiDeviceListener { bytes ->
// 发送数据给乘客端
if (NSDNettyManager.getInstance().isServerStart) {
+ synWriteTime()
NSDNettyManager.getInstance()
.sendMsgToAllClients(MogoProtocolMsg(NORMAL_DATA, bytes.size, bytes))
} else {
@@ -477,6 +480,7 @@ class MoGoAutopilotProvider :
when (it.protocolType) {
NORMAL_DATA -> {
try {
+ synWriteTime()
AdasManager.getInstance().decoderRaw(it.body)
} catch (e: Exception) {
e.printStackTrace()
@@ -552,4 +556,17 @@ class MoGoAutopilotProvider :
private fun invokeNettyConnResult(status: String) {
CallerLogger.d("$M_ADAS_IMPL$TAG", status)
}
+
+ /**
+ * 记录最新的司机屏发送数据的时间戳
+ * 或乘客屏解析数据的时间戳
+ */
+ @Synchronized
+ private fun synWriteTime() {
+ wrTimeStamp = System.currentTimeMillis()
+ }
+
+ override fun getTeleTimeStamp(): Long {
+ return wrTimeStamp
+ }
}
\ No newline at end of file
diff --git a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/setting/DebugSettingView.kt b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/setting/DebugSettingView.kt
index d9e31975a5..3ffa267298 100644
--- a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/setting/DebugSettingView.kt
+++ b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/setting/DebugSettingView.kt
@@ -67,6 +67,7 @@ import com.zhidao.easysocket.utils.L
import kotlinx.android.synthetic.main.view_debug_setting.view.*
import mogo.telematics.pad.MessagePad
import mogo_msg.MogoReportMsg
+import java.text.SimpleDateFormat
import java.util.*
import kotlin.collections.ArrayList
import kotlin.math.abs
@@ -1336,6 +1337,7 @@ class DebugSettingView @JvmOverloads constructor(
else -> {
}
}
+ AppConfigInfo.teleTimeStamp = CallerAutoPilotManager.getTeleTimeStamp()
/**
* 设备绑定关系
@@ -1477,6 +1479,17 @@ class DebugSettingView @JvmOverloads constructor(
}"
)
+ tvTelematicTimeStamp.text = Html.fromHtml(
+ "${
+ when {
+ AppConfigInfo.isDriver -> {
+ "司机屏发送数据"
+ }
+ else -> "乘客屏接收数据"
+ }
+ }的最新时间为:${SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(Date(AppConfigInfo.teleTimeStamp))}"
+ )
+
tvLocationEnabled.text = Html.fromHtml(
"Pad定位服务开启状态:${
if (DeviceUtils.isLocationEnabled()) {
diff --git a/core/function-impl/mogo-core-function-hmi/src/main/res/layout/view_debug_setting.xml b/core/function-impl/mogo-core-function-hmi/src/main/res/layout/view_debug_setting.xml
index bad0df9dd3..67f4f1cbcc 100644
--- a/core/function-impl/mogo-core-function-hmi/src/main/res/layout/view_debug_setting.xml
+++ b/core/function-impl/mogo-core-function-hmi/src/main/res/layout/view_debug_setting.xml
@@ -486,6 +486,17 @@
android:layout_height="1dp"
android:background="#F0F0F0" />
+
+
+
+
-------------------应用信息--------------------
" +
"应用名称:${appName}
" +
diff --git a/core/mogo-core-function-api/src/main/java/com/mogo/eagle/core/function/api/autopilot/IMoGoAutopilotProvider.kt b/core/mogo-core-function-api/src/main/java/com/mogo/eagle/core/function/api/autopilot/IMoGoAutopilotProvider.kt
index 1e3d65fd13..2737da0c8f 100644
--- a/core/mogo-core-function-api/src/main/java/com/mogo/eagle/core/function/api/autopilot/IMoGoAutopilotProvider.kt
+++ b/core/mogo-core-function-api/src/main/java/com/mogo/eagle/core/function/api/autopilot/IMoGoAutopilotProvider.kt
@@ -165,4 +165,10 @@ interface IMoGoAutopilotProvider : IMoGoFunctionServerProvider {
* @param actionCode 上报字段code
*/
fun getReportActionDesc(actionCode:String): String
+
+ /**
+ * 记录最新的司机屏发送数据的时间戳
+ * 或乘客屏解析数据的时间戳
+ */
+ fun getTeleTimeStamp(): Long
}
\ No newline at end of file
diff --git a/core/mogo-core-function-call/src/main/java/com/mogo/eagle/core/function/call/autopilot/CallerAutoPilotManager.kt b/core/mogo-core-function-call/src/main/java/com/mogo/eagle/core/function/call/autopilot/CallerAutoPilotManager.kt
index 9d5e36e582..13e19f76d9 100644
--- a/core/mogo-core-function-call/src/main/java/com/mogo/eagle/core/function/call/autopilot/CallerAutoPilotManager.kt
+++ b/core/mogo-core-function-call/src/main/java/com/mogo/eagle/core/function/call/autopilot/CallerAutoPilotManager.kt
@@ -220,5 +220,11 @@ object CallerAutoPilotManager {
return providerApi?.getReportActionDesc(actionCode)
}
-
+ /**
+ * 记录最新的司机屏发送数据的时间戳
+ * 或乘客屏解析数据的时间戳
+ */
+ fun getTeleTimeStamp(): Long {
+ return providerApi?.getTeleTimeStamp() ?: 0L
+ }
}
\ No newline at end of file