[6.2.4]merge
This commit is contained in:
@@ -11,6 +11,7 @@ import android.os.Build
|
||||
import android.os.Process
|
||||
import android.text.Html
|
||||
import android.util.AttributeSet
|
||||
import android.util.Log
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import androidx.annotation.RequiresApi
|
||||
@@ -21,6 +22,7 @@ import androidx.core.view.MenuCompat
|
||||
import androidx.core.view.isVisible
|
||||
import androidx.lifecycle.lifecycleScope
|
||||
import chassis.Chassis
|
||||
import com.mogo.cloud.network.cronet.NetworkQualityListener
|
||||
import com.mogo.cloud.network.cronet.QuicConfig
|
||||
import com.mogo.cloud.passport.MoGoAiCloudClient
|
||||
import com.mogo.cloud.passport.MoGoAiCloudClientConfig
|
||||
@@ -86,6 +88,7 @@ import com.mogo.eagle.core.utilcode.util.*
|
||||
import com.mogo.map.MogoData.Companion.mogoMapData
|
||||
import com.mogo.map.uicontroller.VisualAngleMode
|
||||
import com.mogo.map.uicontroller.VisualAngleMode.*
|
||||
import com.zhjt.service.chain.ChainLog
|
||||
import kotlinx.android.synthetic.main.view_debug_setting.view.*
|
||||
import kotlinx.coroutines.*
|
||||
import mogo.telematics.pad.MessagePad
|
||||
@@ -773,7 +776,35 @@ internal class DebugSettingView @JvmOverloads constructor(
|
||||
FunctionBuildConfig.isObuWarningFusionUnion = isChecked
|
||||
}
|
||||
tbCronet.setOnCheckedChangeListener { _, isChecked ->
|
||||
if (!isChecked) {
|
||||
CallerDevaToolsManager.setNetworkMode(true)
|
||||
}
|
||||
QuicConfig.setEnable(context, isChecked)
|
||||
QuicConfig.setNetworkListener(object : NetworkQualityListener {
|
||||
override fun onLatencyObservation(rttMs: Int, url: String?) {
|
||||
invokeCronetResult("****** Cronet Request Completed, the latency is $rttMs ms;url is $url")
|
||||
}
|
||||
|
||||
override fun onFailed(error: String?, url: String?) {
|
||||
invokeCronetResult("****** Cronet Request onFailed, error is $error;url is $url")
|
||||
}
|
||||
|
||||
override fun onCanceled(url: String?) {
|
||||
invokeCronetResult("****** Cronet Request onFailed, url is: $url")
|
||||
}
|
||||
|
||||
override fun onRttObservation(rttMs: Int, whenMs: Long, source: Int) {
|
||||
invokeCronetResult("rttMs is:$rttMs ms,source is:$source")
|
||||
}
|
||||
|
||||
override fun onThroughputObservation(
|
||||
throughputKbps: Int,
|
||||
whenMs: Long,
|
||||
source: Int
|
||||
) {
|
||||
invokeCronetResult("downstream throughput is:$throughputKbps,source is:$source")
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
//重启工控机所有节点
|
||||
@@ -2310,4 +2341,13 @@ internal class DebugSettingView @JvmOverloads constructor(
|
||||
}
|
||||
}
|
||||
|
||||
@ChainLog(
|
||||
linkChainLog = ChainConstant.CHAIN_TYPE_WEAK_NETWORK,
|
||||
linkCode = ChainConstant.CHAIN_SOURCE_WEAK_NETWORK,
|
||||
nodeAliasCode = ChainConstant.CHAIN_CODE_RECORD_WEAK_NETWORK,
|
||||
paramIndexes = [0]
|
||||
)
|
||||
private fun invokeCronetResult(json: String) {
|
||||
Log.d("CronetNetwork", json)
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,9 @@
|
||||
package com.mogo.eagle.core.function.hmi.ui.utils
|
||||
|
||||
import com.mogo.eagle.core.data.deva.chain.ChainCommon
|
||||
import com.mogo.eagle.core.data.deva.chain.ChainConstant
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationGCJ02ListenerManager
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_HMI
|
||||
import com.zhjt.service.chain.ChainLog
|
||||
@@ -9,14 +12,34 @@ class HmiActionLog {
|
||||
|
||||
companion object {
|
||||
|
||||
fun hmiAction(data: Any, data1: Any, param: Boolean = false) {
|
||||
CallerLogger.d(M_HMI + data.toString(), data1)
|
||||
if (param) {
|
||||
val cal = CallerChassisLocationGCJ02ListenerManager.getChassisLocationGCJ02()
|
||||
val lineId = CallerAutoPilotStatusListenerManager.getLineId()
|
||||
realParamAction(data, data1, ChainCommon(cal.latitude, cal.longitude, lineId))
|
||||
} else {
|
||||
realAction(data, data1)
|
||||
}
|
||||
}
|
||||
|
||||
@ChainLog(
|
||||
linkChainLog = ChainConstant.CHAIN_TYPE_STATUS,
|
||||
linkCode = ChainConstant.CHAIN_SOURCE_HMI,
|
||||
nodeAliasCode = ChainConstant.CHAIN_CODE_HMI_ACTIONS,
|
||||
paramIndexes = [0, 1]
|
||||
)
|
||||
fun hmiAction(data: Any, data1: Any) {
|
||||
CallerLogger.d(M_HMI + data.toString(), data1)
|
||||
private fun realAction(data: Any, data1: Any) {
|
||||
|
||||
}
|
||||
|
||||
@ChainLog(
|
||||
linkChainLog = ChainConstant.CHAIN_TYPE_STATUS,
|
||||
linkCode = ChainConstant.CHAIN_SOURCE_HMI,
|
||||
nodeAliasCode = ChainConstant.CHAIN_CODE_HMI_ACTIONS,
|
||||
paramIndexes = [0, 1, 2]
|
||||
)
|
||||
private fun realParamAction(data: Any, data1: Any, chainCommon: ChainCommon) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,7 +6,6 @@ import android.annotation.SuppressLint
|
||||
import android.content.Context
|
||||
import android.graphics.Color
|
||||
import android.util.AttributeSet
|
||||
import android.util.Log
|
||||
import android.view.LayoutInflater
|
||||
import android.view.animation.LinearInterpolator
|
||||
import android.widget.ImageView
|
||||
@@ -22,6 +21,9 @@ import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListener
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerParallelDrivingActionsListenerManager
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerParallelDrivingListenerManager
|
||||
import com.mogo.eagle.core.function.hmi.R
|
||||
import com.mogo.eagle.core.function.hmi.ui.utils.HmiActionLog
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_HMI
|
||||
import com.mogo.eagle.core.utilcode.util.ThreadUtils
|
||||
import com.mogo.eagle.core.utilcode.util.ToastUtils
|
||||
import com.zhjt.mogo.adas.data.bean.UnableLaunchReason
|
||||
@@ -74,9 +76,9 @@ class ParallelDriveView @JvmOverloads constructor(
|
||||
override fun onAttachedToWindow() {
|
||||
super.onAttachedToWindow()
|
||||
initView()
|
||||
CallerAutoPilotStatusListenerManager.addListener(TAG, this)
|
||||
CallerParallelDrivingListenerManager.addListener(TAG, this)
|
||||
CallerParallelDrivingActionsListenerManager.addListener(TAG, this)
|
||||
CallerAutoPilotStatusListenerManager.addListener("$M_HMI$TAG", this)
|
||||
CallerParallelDrivingListenerManager.addListener("$M_HMI$TAG", this)
|
||||
CallerParallelDrivingActionsListenerManager.addListener("$M_HMI$TAG", this)
|
||||
}
|
||||
|
||||
private fun initView() {
|
||||
@@ -88,7 +90,7 @@ class ParallelDriveView @JvmOverloads constructor(
|
||||
when (state) {
|
||||
0 -> {
|
||||
state = APP_REQUESTING
|
||||
Log.d(TAG, "Click-开始请求平行驾驶")
|
||||
HmiActionLog.hmiAction(TAG,"Click-开始请求平行驾驶")
|
||||
updateUI(APP_REQUESTING)
|
||||
reqParaDrive()
|
||||
listener?.onReqClick()
|
||||
@@ -96,18 +98,18 @@ class ParallelDriveView @JvmOverloads constructor(
|
||||
|
||||
APP_REQUESTING -> {
|
||||
cancelParaDrive()
|
||||
Log.d(TAG, "Click-请求已取消")
|
||||
HmiActionLog.hmiAction(TAG,"Click-请求已取消")
|
||||
ToastUtils.showShort("请求已取消!")
|
||||
checkAvailableAndUpdateUI()
|
||||
}
|
||||
|
||||
AD_REQUESTING -> {
|
||||
Log.d(TAG, "Click-自动驾驶正在请求平行驾驶")
|
||||
HmiActionLog.hmiAction(TAG,"Click-自动驾驶正在请求平行驾驶")
|
||||
ToastUtils.showShort("自动驾驶正在请求平行驾驶")
|
||||
}
|
||||
|
||||
UNAVAILABLE -> {
|
||||
Log.d(TAG, "Click-请P档驻车并松开油门刹车后请求")
|
||||
HmiActionLog.hmiAction(TAG,"Click-请P档驻车并松开油门刹车后请求")
|
||||
ToastUtils.showShort("请P档驻车并松开油门刹车后请求")
|
||||
}
|
||||
}
|
||||
@@ -124,7 +126,6 @@ class ParallelDriveView @JvmOverloads constructor(
|
||||
when (state) {
|
||||
7 -> {
|
||||
isAutoDriving = false
|
||||
Log.d(TAG, "onAutopilotStatusResponse-7")
|
||||
ThreadUtils.runOnUiThread({
|
||||
this.state = PARALLEL_DRIVING
|
||||
updateUI(PARALLEL_DRIVING)
|
||||
@@ -133,7 +134,6 @@ class ParallelDriveView @JvmOverloads constructor(
|
||||
|
||||
2 -> {
|
||||
isAutoDriving = true
|
||||
Log.d(TAG, "onAutopilotStatusResponse-2")
|
||||
if (this.autopilotState == 7) {
|
||||
ThreadUtils.runOnUiThread({
|
||||
checkAvailableAndUpdateUI()
|
||||
@@ -143,7 +143,6 @@ class ParallelDriveView @JvmOverloads constructor(
|
||||
|
||||
else -> {
|
||||
isAutoDriving = false
|
||||
Log.d(TAG, "onAutopilotStatusResponse-else")
|
||||
if (this.autopilotState == 7) {
|
||||
ThreadUtils.runOnUiThread({
|
||||
checkAvailableAndUpdateUI()
|
||||
@@ -158,14 +157,14 @@ class ParallelDriveView @JvmOverloads constructor(
|
||||
isParallelDrivingAbility: Boolean
|
||||
) {
|
||||
if (!isParallelDrivingAbility) {
|
||||
Log.d(TAG, "onParallelDrivingAbility-UNAVAILABLE")
|
||||
CallerLogger.d("$M_HMI$TAG", "onParallelDrivingAbility-UNAVAILABLE")
|
||||
ThreadUtils.runOnUiThread({
|
||||
if (state == PARALLEL_DRIVING) return@runOnUiThread
|
||||
state = UNAVAILABLE
|
||||
updateUI(UNAVAILABLE)
|
||||
}, ThreadUtils.MODE.QUEUE)
|
||||
} else {
|
||||
Log.d(TAG, "onParallelDrivingAbility-AVAILABLE")
|
||||
CallerLogger.d("$M_HMI$TAG", "onParallelDrivingAbility-AVAILABLE")
|
||||
ThreadUtils.runOnUiThread({
|
||||
if (state == PARALLEL_DRIVING) return@runOnUiThread
|
||||
state = 0
|
||||
@@ -176,8 +175,8 @@ class ParallelDriveView @JvmOverloads constructor(
|
||||
|
||||
override fun onParallelDrivingResp(parallelTaskProcessNotice: ParallelTaskProcessNoticeOuterClass.ParallelTaskProcessNotice?) {
|
||||
parallelTaskProcessNotice?.let {
|
||||
CallerLogger.d("$M_HMI$TAG", "onParallelDrivingResp-code:${it.code}")
|
||||
ThreadUtils.runOnUiThread({
|
||||
Log.d(TAG, "onParallelDrivingResp-code:${it.code}")
|
||||
when (it.code) {
|
||||
"START_SYNC" -> {// 同步中
|
||||
state = SYNCHRONIZING
|
||||
@@ -452,9 +451,9 @@ class ParallelDriveView @JvmOverloads constructor(
|
||||
|
||||
override fun onDetachedFromWindow() {
|
||||
super.onDetachedFromWindow()
|
||||
CallerAutoPilotStatusListenerManager.removeListener(TAG)
|
||||
CallerParallelDrivingListenerManager.removeListener(TAG)
|
||||
CallerParallelDrivingActionsListenerManager.removeListener(TAG)
|
||||
CallerAutoPilotStatusListenerManager.removeListener("$M_HMI$TAG")
|
||||
CallerParallelDrivingListenerManager.removeListener("$M_HMI$TAG")
|
||||
CallerParallelDrivingActionsListenerManager.removeListener("$M_HMI$TAG")
|
||||
}
|
||||
|
||||
interface ClickEventListener {
|
||||
|
||||
@@ -96,7 +96,6 @@ class SteeringWheelView : ConstraintLayout, IMoGoChassisSteeringStateListener,
|
||||
object : IMoGoAutopilotStatusListener {
|
||||
override fun onAutopilotStatusResponse(state: Int) {
|
||||
ThreadUtils.runOnUiThread {
|
||||
d("$M_BUS_P$TAG", "state = %s", state)
|
||||
if (autopilotIV != null) {
|
||||
if (state == IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_RUNNING) {
|
||||
if (!isBus(FunctionBuildConfig.appIdentityMode)) {
|
||||
|
||||
@@ -136,10 +136,7 @@ class SystemVersionView @JvmOverloads constructor(
|
||||
}
|
||||
|
||||
ivHDCache.setOnClickListener {
|
||||
hmiAction(
|
||||
"$M_HMI$TAG",
|
||||
"HD map view click , isHDCached:$isHDCached , lon:${getChassisLocationWGS84().longitude} , lat:${getChassisLocationWGS84().latitude}"
|
||||
)
|
||||
hmiAction("$M_HMI$TAG", mapOf("isHDCached" to isHDCached))
|
||||
if (isHDCached) {// 已缓存
|
||||
ToastUtils.showShort(resources.getString(R.string.offline_had_downloaded))
|
||||
} else {// 未缓存
|
||||
|
||||
@@ -41,7 +41,6 @@ import com.mogo.eagle.core.function.hmi.ui.widget.StatusBarView
|
||||
import com.mogo.eagle.core.function.main.modules.MogoModulesManager
|
||||
import com.mogo.eagle.core.function.main.windowview.FloatingViewHandler
|
||||
import com.mogo.eagle.core.utilcode.mogo.AppLaunchTimeUtils
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger.d
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger.i
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant
|
||||
@@ -59,10 +58,6 @@ import java.io.File
|
||||
|
||||
|
||||
/**
|
||||
* @author congtaowang
|
||||
* @since 2019-12-23
|
||||
*
|
||||
*
|
||||
* 描述:加载各个模块
|
||||
*/
|
||||
open class MainActivity : MvpActivity<MainView?, MainPresenter?>(), MainView,
|
||||
@@ -76,7 +71,8 @@ open class MainActivity : MvpActivity<MainView?, MainPresenter?>(), MainView,
|
||||
private var isFirst = false
|
||||
private var mConnAdapter: ConnInfoAdapter? = null
|
||||
private val dataList: List<AutopilotStatusInfo> = ArrayList()
|
||||
private var mLastStatus = 0x00
|
||||
// private var mLastStatus = 0x00
|
||||
private var mLastStatus = 0x01
|
||||
private var isFloatingLayerHidden = false
|
||||
|
||||
override fun getLayoutId(): Int {
|
||||
@@ -327,11 +323,11 @@ open class MainActivity : MvpActivity<MainView?, MainPresenter?>(), MainView,
|
||||
MogoStatusManager.getInstance().setMainPageIsBackgroundStatus(TAG, true)
|
||||
}
|
||||
|
||||
override fun onAutopilotStatusResponse(autoPilotStatusInfo: AutopilotStatusInfo) {
|
||||
override fun onAutopilotIpcConnectStatusChanged(status: Int, reason: String?) {
|
||||
super.onAutopilotIpcConnectStatusChanged(status, reason)
|
||||
UiThreadHandler.post {
|
||||
val status = autoPilotStatusInfo.ipcConnStatus
|
||||
if (mLastStatus != status) {
|
||||
val statusInfo = autoPilotStatusInfo.clone()
|
||||
if(mLastStatus != status){
|
||||
val statusInfo = CallerAutoPilotStatusListenerManager.getAutoPilotStatusInfo().clone()
|
||||
rvConnectInfo.post { updateConnectInfoView(statusInfo) }
|
||||
mLastStatus = status
|
||||
}
|
||||
|
||||
@@ -2372,7 +2372,7 @@
|
||||
android:padding="@dimen/dp_20"
|
||||
android:background="@drawable/radio_button_normal_background_right"
|
||||
android:textColor="#000"
|
||||
android:textOff="开启QUIC协议(服务器暂不支持)"
|
||||
android:textOff="开启QUIC协议(目前QA环境可用)"
|
||||
android:textOn="关闭QUIC协议"
|
||||
android:textSize="@dimen/dp_24" />
|
||||
</LinearLayout>
|
||||
|
||||
Reference in New Issue
Block a user