调试窗
去除车速设置
This commit is contained in:
@@ -48,16 +48,12 @@ import com.mogo.eagle.core.function.call.telematic.CallerTelematicManager
|
||||
import com.mogo.eagle.core.function.hmi.R
|
||||
import com.mogo.eagle.core.function.hmi.ui.logcatch.ILogViewListener
|
||||
import com.mogo.eagle.core.function.hmi.ui.logcatch.LogInfoView
|
||||
import com.mogo.eagle.core.function.hmi.ui.tools.AdUpgradeDialog
|
||||
import com.mogo.eagle.core.function.hmi.ui.tools.DockerRebootDialog
|
||||
import com.mogo.eagle.core.function.hmi.ui.upgrade.UpgradeListAdapter
|
||||
import com.mogo.eagle.core.utilcode.kotlin.onClick
|
||||
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.LogLevel
|
||||
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.mogo.logger.scene.SceneConstant.Companion.M_HMI
|
||||
import com.mogo.eagle.core.utilcode.mogo.storage.SharedPrefsMgr
|
||||
import com.mogo.eagle.core.utilcode.mogo.toast.TipToast
|
||||
import com.mogo.eagle.core.utilcode.util.*
|
||||
@@ -65,7 +61,6 @@ import com.mogo.map.MogoMap
|
||||
import com.mogo.map.uicontroller.VisualAngleMode
|
||||
import com.mogo.map.uicontroller.VisualAngleMode.*
|
||||
import com.zhidao.easysocket.utils.L
|
||||
import com.zhjt.mogo_core_function_devatools.trace.TraceManager
|
||||
import kotlinx.android.synthetic.main.view_debug_setting.view.*
|
||||
import mogo.telematics.pad.MessagePad
|
||||
import mogo_msg.MogoReportMsg
|
||||
@@ -116,7 +111,7 @@ class DebugSettingView @JvmOverloads constructor(
|
||||
|
||||
//日志过滤标签集合
|
||||
private val sceneMap = mutableMapOf<String, SceneModule>()
|
||||
|
||||
|
||||
//OBU连接状态
|
||||
private var obuConnectStatus: Boolean = false
|
||||
|
||||
@@ -668,41 +663,6 @@ class DebugSettingView @JvmOverloads constructor(
|
||||
CallerAutoPilotManager.disconnectIpc()
|
||||
}
|
||||
|
||||
updateSpeedSettingViews()
|
||||
|
||||
/**
|
||||
* 设置最大速度
|
||||
*/
|
||||
btnSetAutopilotSpeed.onClick {
|
||||
if (AppConfigInfo.isConnectAutopilot) {
|
||||
val speedStr = etInputSpeed.text?.toString()
|
||||
try {
|
||||
if (speedStr.isNullOrEmpty()) {
|
||||
ToastUtils.showShort("请输入最大车速")
|
||||
}
|
||||
val speed = speedStr?.toInt()
|
||||
if (speed != null && speed > 0 && speed < 60) {
|
||||
// 设置自动驾驶速度
|
||||
val isSuccess = CallerAutoPilotManager.setAutoPilotSpeed(speed)
|
||||
when {
|
||||
isSuccess -> {
|
||||
ToastUtils.showShort("车速设置成功,立即生效")
|
||||
}
|
||||
else -> {
|
||||
ToastUtils.showShort("设置车速失败,请启动域控制器")
|
||||
}
|
||||
}
|
||||
} else {
|
||||
ToastUtils.showShort("最大车速应大于0且小于60")
|
||||
}
|
||||
} catch (e: Exception) {
|
||||
ToastUtils.showShort("车速设置失败,请正确设置车速")
|
||||
}
|
||||
} else {
|
||||
ToastUtils.showShort("设置车速失败,请启动域控制器")
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 录制Bag包
|
||||
*/
|
||||
@@ -725,23 +685,6 @@ class DebugSettingView @JvmOverloads constructor(
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Bus不可设置自动驾驶速度,而Taxi可以
|
||||
*/
|
||||
private fun updateSpeedSettingViews() {
|
||||
when {
|
||||
AppIdentityModeUtils.isBus(FunctionBuildConfig.appIdentityMode) -> {
|
||||
btnSetAutopilotSpeed.visibility = View.GONE
|
||||
llSpeedLayout.visibility = View.GONE
|
||||
}
|
||||
else -> {
|
||||
btnSetAutopilotSpeed.visibility = View.VISIBLE
|
||||
llSpeedLayout.visibility = View.VISIBLE
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 设置Hmi点击监听
|
||||
*/
|
||||
|
||||
@@ -479,7 +479,7 @@
|
||||
style="@style/DebugSettingText"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:minLines="6"
|
||||
android:minLines="7"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<View
|
||||
@@ -539,61 +539,6 @@
|
||||
android:background="#F0F0F0"
|
||||
app:layout_constraintTop_toBottomOf="@id/btnSetAutopilotIP" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/btnSetAutopilotSpeed"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:padding="@dimen/dp_5"
|
||||
android:text="设置最大速度"
|
||||
android:textSize="@dimen/dp_24"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/autopilotIPDivider" />
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:id="@+id/llSpeedLayout"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginStart="@dimen/dp_30"
|
||||
android:layout_marginTop="@dimen/dp_10"
|
||||
android:layout_marginEnd="@dimen/dp_30"
|
||||
android:layout_marginBottom="@dimen/dp_10"
|
||||
android:background="@drawable/debug_setting_edit_bg"
|
||||
android:focusable="true"
|
||||
android:focusableInTouchMode="true"
|
||||
android:orientation="horizontal"
|
||||
app:layout_constraintBottom_toBottomOf="@id/btnSetAutopilotSpeed"
|
||||
app:layout_constraintLeft_toRightOf="@id/btnSetAutopilotSpeed"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@id/btnSetAutopilotSpeed">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatEditText
|
||||
android:id="@+id/etInputSpeed"
|
||||
style="@style/DebugSettingText"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginStart="90px"
|
||||
android:layout_weight="1"
|
||||
android:background="@null"
|
||||
android:gravity="center"
|
||||
tools:ignore="SpeakableTextPresentCheck" />
|
||||
|
||||
<TextView
|
||||
style="@style/DebugSettingText"
|
||||
android:layout_width="93px"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center_vertical"
|
||||
android:text="km/h" />
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
<View
|
||||
android:id="@+id/autopilotSpeedDivider"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:background="#F0F0F0"
|
||||
app:layout_constraintTop_toBottomOf="@id/btnSetAutopilotSpeed" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/btnRecordPackage"
|
||||
android:layout_width="wrap_content"
|
||||
@@ -603,7 +548,7 @@
|
||||
android:text="录制Bag包"
|
||||
android:textSize="@dimen/dp_24"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/autopilotSpeedDivider" />
|
||||
app:layout_constraintTop_toBottomOf="@id/autopilotIPDivider" />
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="0dp"
|
||||
|
||||
Reference in New Issue
Block a user