[6.2.0][Feat]调试面板新增无人化演练任务拉取时间
This commit is contained in:
@@ -1,8 +1,6 @@
|
||||
package com.mogo.eagle.core.function.hmi.ui.setting
|
||||
|
||||
import android.content.Context
|
||||
import android.text.Editable
|
||||
import android.text.TextWatcher
|
||||
import android.util.AttributeSet
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
@@ -30,11 +28,10 @@ import com.mogo.eagle.core.function.call.map.CallerMapUIServiceManager
|
||||
import com.mogo.eagle.core.function.call.obu.CallerObuApiManager
|
||||
import com.mogo.eagle.core.function.call.setting.CallerSopSettingManager
|
||||
import com.mogo.eagle.core.function.call.telematic.CallerTelematicManager
|
||||
import com.mogo.eagle.core.function.call.unmanned.CallerUnmannedListenerManager
|
||||
import com.mogo.eagle.core.function.hmi.R
|
||||
import com.mogo.eagle.core.function.hmi.ui.utils.HmiActionLog.Companion.hmiAction
|
||||
import com.mogo.eagle.core.utilcode.mogo.AppIdentityModeUtils
|
||||
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.AdasConstants
|
||||
@@ -493,6 +490,22 @@ internal class SOPSettingView @JvmOverloads constructor(
|
||||
hmiAction("SOP 融合模式, ", FunctionBuildConfig.fusionMode)
|
||||
CallerAutoPilotControlManager.sendFusionMode(FunctionBuildConfig.fusionMode)
|
||||
}
|
||||
rgPullTime.setOnCheckedChangeListener { _, checkedId ->
|
||||
when (checkedId) {
|
||||
R.id.rbFortyFive -> {
|
||||
CallerUnmannedListenerManager.dispatchPullTime(45)
|
||||
}
|
||||
R.id.rbThirty -> {
|
||||
CallerUnmannedListenerManager.dispatchPullTime(30)
|
||||
}
|
||||
R.id.rbFifteen -> {
|
||||
CallerUnmannedListenerManager.dispatchPullTime(15)
|
||||
}
|
||||
R.id.rbFive -> {
|
||||
CallerUnmannedListenerManager.dispatchPullTime(5)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private var overTakeEditText: String = ""
|
||||
|
||||
@@ -544,11 +544,66 @@
|
||||
android:scaleX="1.2"
|
||||
android:scaleY="1.2"
|
||||
android:text="录包弹窗"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="@id/otherGuideLine"
|
||||
app:layout_constraintTop_toBottomOf="@id/scIPCReport" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvPullTimeTitle"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_10"
|
||||
android:layout_marginTop="@dimen/dp_10"
|
||||
android:text="@string/pull_time_title"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="32dp"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/scShowBagRecordWindow" />
|
||||
|
||||
<RadioGroup
|
||||
android:id="@+id/rgPullTime"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_40"
|
||||
android:layout_marginTop="@dimen/dp_10"
|
||||
android:orientation="horizontal"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/tvPullTimeTitle">
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/rbFortyFive"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="10dp"
|
||||
android:checked="true"
|
||||
android:text="45s"
|
||||
android:textSize="32dp" />
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/rbThirty"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="10dp"
|
||||
android:text="30s"
|
||||
android:textSize="32dp" />
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/rbFifteen"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="10dp"
|
||||
android:text="15s"
|
||||
android:textSize="32dp" />
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/rbFive"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="10dp"
|
||||
android:text="5s"
|
||||
android:textSize="32dp" />
|
||||
</RadioGroup>
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
@@ -91,4 +91,6 @@
|
||||
<string name="parallel_drive_synchronizing">同步中...</string>
|
||||
<string name="parallel_drive_failure">请求失败</string>
|
||||
<string name="parallel_drive_exception">异常</string>
|
||||
|
||||
<string name="pull_time_title">Taxi无人化演练任务拉取时间间隔</string>
|
||||
</resources>
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
package com.mogo.eagle.core.function.api.unmanned
|
||||
|
||||
interface IUnmannedListener {
|
||||
/**
|
||||
* 单位: 秒(s)
|
||||
*/
|
||||
fun onPullTimeUpdate(time: Int)
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
package com.mogo.eagle.core.function.call.unmanned
|
||||
|
||||
import android.util.Log
|
||||
import com.mogo.eagle.core.function.api.unmanned.IUnmannedListener
|
||||
import com.mogo.eagle.core.function.call.base.CallerBase
|
||||
|
||||
/**
|
||||
* 无人化功能状态监听、回调管理者
|
||||
*/
|
||||
object CallerUnmannedListenerManager:CallerBase<IUnmannedListener>() {
|
||||
private const val TAG = "CallerUnmannedListenerManager"
|
||||
|
||||
private var time: Int = 45
|
||||
|
||||
override fun doSomeAfterAddListener(tag: String, listener: IUnmannedListener) {
|
||||
super.doSomeAfterAddListener(tag, listener)
|
||||
listener.onPullTimeUpdate(time)
|
||||
}
|
||||
|
||||
fun dispatchPullTime(time: Int) {
|
||||
this.time = time
|
||||
M_LISTENERS.forEach {
|
||||
val listener = it.value
|
||||
try {
|
||||
listener.onPullTimeUpdate(time)
|
||||
} catch (e: Exception) {
|
||||
Log.e(TAG, "转发消息出现异常:${e.message}")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user