Merge branch 'dev_arch_opt_3.0' of gitlab.zhidaoauto.com:zhjt/AndroidApp/MoGoEagleEye into dev_arch_opt_3.0
This commit is contained in:
@@ -51,7 +51,7 @@
|
||||
<!--pnc行为决策-->
|
||||
<com.mogo.eagle.core.function.hmi.ui.vehicle.PncActionsView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_height="@dimen/dp_100"
|
||||
android:layout_marginBottom="@dimen/dp_110"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
|
||||
@@ -63,7 +63,7 @@
|
||||
<!--pnc行为决策-->
|
||||
<com.mogo.eagle.core.function.hmi.ui.vehicle.PncActionsView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_height="@dimen/dp_100"
|
||||
android:layout_marginBottom="@dimen/dp_110"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
|
||||
@@ -251,7 +251,7 @@
|
||||
<!--pnc行为决策-->
|
||||
<com.mogo.eagle.core.function.hmi.ui.vehicle.PncActionsView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_height="@dimen/dp_100"
|
||||
android:layout_marginBottom="@dimen/dp_110"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
|
||||
@@ -58,7 +58,7 @@
|
||||
<!--pnc行为决策-->
|
||||
<com.mogo.eagle.core.function.hmi.ui.vehicle.PncActionsView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_height="@dimen/dp_100"
|
||||
android:layout_marginBottom="@dimen/dp_110"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
|
||||
@@ -49,7 +49,7 @@
|
||||
<!--pnc行为决策-->
|
||||
<com.mogo.eagle.core.function.hmi.ui.vehicle.PncActionsView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_height="@dimen/dp_100"
|
||||
android:layout_marginBottom="@dimen/dp_110"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
|
||||
@@ -120,7 +120,7 @@
|
||||
<!--pnc行为决策-->
|
||||
<com.mogo.eagle.core.function.hmi.ui.vehicle.PncActionsView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_height="@dimen/dp_100"
|
||||
android:layout_marginBottom="@dimen/dp_110"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
|
||||
@@ -2,7 +2,9 @@ package com.mogo.eagle.core.function.hmi.ui.vehicle
|
||||
|
||||
import android.content.Context
|
||||
import android.util.AttributeSet
|
||||
import android.util.TypedValue.COMPLEX_UNIT_PX
|
||||
import android.view.LayoutInflater
|
||||
import android.view.ViewGroup
|
||||
import androidx.appcompat.content.res.AppCompatResources
|
||||
import androidx.constraintlayout.widget.ConstraintLayout
|
||||
import com.mogo.eagle.core.data.autopilot.AutopilotStatusInfo
|
||||
@@ -23,6 +25,8 @@ import com.mogo.eagle.core.function.hmi.R
|
||||
import com.mogo.eagle.core.utilcode.util.UiThreadHandler
|
||||
import com.zhjt.service_biz.BizConfig
|
||||
import kotlinx.android.synthetic.main.view_pnc_actions.view.*
|
||||
import me.jessyan.autosize.AutoSize
|
||||
import me.jessyan.autosize.utils.AutoSizeUtils
|
||||
import mogo.telematics.pad.MessagePad
|
||||
|
||||
class PncActionsView @JvmOverloads constructor(
|
||||
@@ -41,12 +45,24 @@ class PncActionsView @JvmOverloads constructor(
|
||||
|
||||
private var mAutoPilotStatusInfo: AutopilotStatusInfo? = null
|
||||
|
||||
private val bgResources: Int
|
||||
private val topMargin: Int
|
||||
private val txtSize: Int
|
||||
|
||||
init {
|
||||
LayoutInflater.from(context).inflate(R.layout.view_pnc_actions, this, true)
|
||||
val a = context.obtainStyledAttributes(attrs, R.styleable.PncActionsView, defStyleAttr, 0)
|
||||
bgResources = a.getResourceId(R.styleable.PncActionsView_background_resource, R.drawable.pnc_actions_bg)
|
||||
topMargin = a.getResourceId(R.styleable.PncActionsView_pnc_top_margin,resources.getDimension(R.dimen.dp_30).toInt())
|
||||
txtSize = a.getResourceId(R.styleable.PncActionsView_pnc_size,resources.getDimension(R.dimen.dp_34).toInt())
|
||||
a.recycle()
|
||||
}
|
||||
|
||||
override fun onAttachedToWindow() {
|
||||
super.onAttachedToWindow()
|
||||
(tvHmiPncActions.layoutParams as MarginLayoutParams).topMargin = topMargin
|
||||
tvHmiPncActions.setTextSize(COMPLEX_UNIT_PX,txtSize.toFloat())
|
||||
|
||||
CallerAutoPilotStatusListenerManager.addListener(TAG, this)
|
||||
CallerPlanningActionsListenerManager.addListener(TAG, this)
|
||||
CallerTrafficLightListenerManager.addListener(TAG, this)
|
||||
@@ -78,14 +94,21 @@ class PncActionsView @JvmOverloads constructor(
|
||||
var actions: String? = null
|
||||
planningActionMsg.actionMsg?.let { it ->
|
||||
try {
|
||||
actions = PncActionsHelper.getAction(it.drivingState.number, it.drivingAction.number)
|
||||
} catch (e:Exception){
|
||||
actions = PncActionsHelper.getAction(
|
||||
it.drivingState.number,
|
||||
it.drivingAction.number
|
||||
)
|
||||
} catch (e: Exception) {
|
||||
e.printStackTrace()
|
||||
}
|
||||
//如果是存在云端红绿灯数据条件下,设置云端数据
|
||||
if (PncActionsHelper.isWaitingTrafficlight(it.drivingState.number, it.drivingAction.number)
|
||||
if (PncActionsHelper.isWaitingTrafficlight(
|
||||
it.drivingState.number,
|
||||
it.drivingAction.number
|
||||
)
|
||||
&& mTrafficLightResult != null
|
||||
&& getWaitTrafficLightTime().isNotBlank()) {
|
||||
&& getWaitTrafficLightTime().isNotBlank()
|
||||
) {
|
||||
actions += ",预计${getWaitTrafficLightTime()}秒后通过"
|
||||
} else {
|
||||
mTrafficLightResult = null
|
||||
@@ -96,7 +119,8 @@ class PncActionsView @JvmOverloads constructor(
|
||||
this.background = null
|
||||
tvHmiPncActions.text = ""
|
||||
} else {
|
||||
this.background = AppCompatResources.getDrawable(context, R.drawable.pnc_actions_bg)
|
||||
this.background =
|
||||
AppCompatResources.getDrawable(context, bgResources)
|
||||
tvHmiPncActions.text = actions
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,17 +2,14 @@
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="@dimen/dp_100">
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvHmiPncActions"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:paddingStart="@dimen/dp_68"
|
||||
android:paddingEnd="@dimen/dp_68"
|
||||
android:textColor="#FFFFFF"
|
||||
android:textSize="@dimen/dp_34"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
|
||||
@@ -73,4 +73,10 @@
|
||||
<attr name="day_light_mode" format="boolean"/>
|
||||
</declare-styleable>
|
||||
|
||||
<declare-styleable name="PncActionsView">
|
||||
<attr name="background_resource" format="reference"/>
|
||||
<attr name="pnc_top_margin" format="reference"/>
|
||||
<attr name="pnc_size" format="reference"/>
|
||||
</declare-styleable>
|
||||
|
||||
</resources>
|
||||
@@ -28,11 +28,8 @@ import java.util.concurrent.atomic.*
|
||||
@Route(path = MogoServicePaths.PATH_VISUAL_ANGLE)
|
||||
class MoGoVisualAngleChangeProvider: IMoGoVisualAngleChangeProvider {
|
||||
|
||||
override val functionName: String
|
||||
get() = "VisualAngleChange"
|
||||
|
||||
companion object {
|
||||
const val TAG = "VisualAngleChange"
|
||||
private const val TAG = "VisualAngleChange"
|
||||
}
|
||||
|
||||
private val triggerLocation = AtomicReference<MogoLocation>()
|
||||
@@ -147,11 +144,6 @@ class MoGoVisualAngleChangeProvider: IMoGoVisualAngleChangeProvider {
|
||||
return CoroutineScope(Handler(Looper.getMainLooper()).asCoroutineDispatcher("change-visual-angle") + SupervisorJob())
|
||||
}
|
||||
|
||||
|
||||
override fun onDestroy() {
|
||||
CallerMapRoadListenerManager.unRegisterRoadListener("VisualAngleChange")
|
||||
}
|
||||
|
||||
@Volatile
|
||||
private var mLevel:Boolean = false
|
||||
|
||||
|
||||
@@ -111,8 +111,12 @@ class HttpDnsStartUp : AndroidStartup<Boolean>() {
|
||||
clientConfig.isUseOriginSocket = true
|
||||
// 设置是否输出网络日志
|
||||
clientConfig.isShowNetDebugLog = false
|
||||
// clientConfig.passportUrl //todo yakun
|
||||
// clientConfig.socketBaseUrl
|
||||
// clientConfig.socketTechUrl
|
||||
// 设置是否是直播推流的主播
|
||||
clientConfig.isAnchor = true
|
||||
clientConfig.loopCheckDelay = (60 * 60 * 2 * 1000).toLong() //todo arrow
|
||||
when (DebugConfig.getCarMachineType()) {
|
||||
DebugConfig.CAR_MACHINE_TYPE_LENOVO -> clientConfig.thirdPartyAppKey = "pfieouqg"
|
||||
else -> clientConfig.thirdPartyAppKey = "wbvpzgar"
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
package com.mogo.eagle.core.function.api.map.angle
|
||||
|
||||
import com.mogo.eagle.core.function.api.base.*
|
||||
import com.alibaba.android.arouter.facade.template.IProvider
|
||||
|
||||
interface IMoGoVisualAngleChangeProvider: IMoGoFunctionServerProvider {
|
||||
interface IMoGoVisualAngleChangeProvider: IProvider {
|
||||
|
||||
fun updateLongSightLevel(level: Boolean)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user