Merge branch 'refs/heads/dev_robotaxi-d_240912_6.7.0' into dev_robotaxi-d_240912_6.7.2_local
This commit is contained in:
@@ -14,6 +14,7 @@ import com.mogo.eagle.core.utilcode.util.ThreadUtils
|
||||
import com.mogo.eagle.core.utilcode.util.ToastUtils
|
||||
import com.mogo.eagle.core.utilcode.util.UiThreadHandler
|
||||
import com.mogo.och.common.module.manager.autopilot.location.OchLocationManager
|
||||
import com.mogo.och.common.module.manager.loop.BizLoopManager
|
||||
import com.mogo.och.common.module.map.AmapNaviToDestinationModel
|
||||
import com.mogo.och.common.module.map.ICommonNaviChangedCallback
|
||||
import com.mogo.och.unmanned.taxi.R
|
||||
@@ -302,9 +303,13 @@ class RoutingRunningView: ConstraintLayout, RoutingRunningModel.RoutingRuningCal
|
||||
}
|
||||
|
||||
override fun onArrivedStation(currentGrayId: Long?) {
|
||||
currentGrayId?.let {
|
||||
showFeedbackDialog(it)
|
||||
}
|
||||
BizLoopManager.runInMainThread(object :Runnable{
|
||||
override fun run() {
|
||||
currentGrayId?.let {
|
||||
showFeedbackDialog(it)
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -1,8 +1,13 @@
|
||||
package com.mogo.eagle.core.function.hmi.ui.operate.preferences
|
||||
|
||||
import android.annotation.SuppressLint
|
||||
import android.content.Context
|
||||
import android.text.Editable
|
||||
import android.util.AttributeSet
|
||||
import android.widget.EditText
|
||||
import android.widget.TextView
|
||||
import androidx.core.widget.doBeforeTextChanged
|
||||
import androidx.core.widget.doOnTextChanged
|
||||
import androidx.preference.Preference
|
||||
import androidx.preference.PreferenceViewHolder
|
||||
import com.mogo.eagle.core.function.hmi.R
|
||||
@@ -39,7 +44,7 @@ class PreferenceWithSpeedSetting : Preference {
|
||||
notifyChanged()
|
||||
}
|
||||
|
||||
override fun onBindViewHolder(holder: PreferenceViewHolder) {
|
||||
@SuppressLint("SetTextI18n") override fun onBindViewHolder(holder: PreferenceViewHolder) {
|
||||
super.onBindViewHolder(holder)
|
||||
val speedData = mSpeedData ?: return
|
||||
if (speedData !is List<*> || speedData.size != 5) {
|
||||
@@ -67,7 +72,27 @@ class PreferenceWithSpeedSetting : Preference {
|
||||
if (cache.containsKey(key)) {
|
||||
cur = max(cur, cache[key] ?: 0.0)
|
||||
}
|
||||
speedLimit?.text = cur.toString()
|
||||
if (speedLimit is EditText) {
|
||||
speedLimit.setText(cur.toString())
|
||||
speedLimit.doOnTextChanged { text, _, _, _ ->
|
||||
val current = text?.let { runCatching { it.toString().toDouble() }.getOrNull() }
|
||||
if (current == null) {
|
||||
return@doOnTextChanged
|
||||
}
|
||||
if (current > max) {
|
||||
ToastUtils.showShort("阈值最大为${BigDecimal.valueOf(max).setScale(1)}$unit")
|
||||
return@doOnTextChanged
|
||||
}
|
||||
cur = current
|
||||
btnOk.isEnabled = true
|
||||
ll.isSelected = true
|
||||
cache[key] = cur
|
||||
enabled[key] = true
|
||||
holder.itemView.isEnabled = false
|
||||
}
|
||||
} else {
|
||||
speedLimit?.text = cur.toString()
|
||||
}
|
||||
val minus = holder.findViewById(R.id.iv_speed_minus)
|
||||
btnOk.isEnabled = enabled[key] ?: false
|
||||
holder.itemView.isEnabled = enabled[key] ?: false
|
||||
@@ -85,7 +110,11 @@ class PreferenceWithSpeedSetting : Preference {
|
||||
cache[key] = cur
|
||||
enabled[key] = true
|
||||
holder.itemView.isEnabled = false
|
||||
speedLimit?.text = minusAfter.toString()
|
||||
if (speedLimit is EditText) {
|
||||
speedLimit.setText(minusAfter.toString())
|
||||
} else {
|
||||
speedLimit?.text = minusAfter.toString()
|
||||
}
|
||||
}
|
||||
val add = holder.findViewById(R.id.iv_speed_add)
|
||||
add.setOnClickListener(null)
|
||||
@@ -101,7 +130,12 @@ class PreferenceWithSpeedSetting : Preference {
|
||||
ll.isSelected = true
|
||||
btnOk.isEnabled = true
|
||||
enabled[key] = true
|
||||
speedLimit?.text = addAfter.toString()
|
||||
if (speedLimit is EditText) {
|
||||
speedLimit.setText("")
|
||||
speedLimit.setText(addAfter.toString())
|
||||
} else {
|
||||
speedLimit?.text = addAfter.toString()
|
||||
}
|
||||
}
|
||||
btnOk.setOnClickListener(null)
|
||||
btnOk.onClick {
|
||||
|
||||
@@ -24,12 +24,15 @@
|
||||
android:src="@drawable/icon_operate_panel_minus"
|
||||
tools:ignore="ContentDescription,RtlSymmetry" />
|
||||
|
||||
<TextView
|
||||
<EditText
|
||||
android:id="@+id/tv_speed_limit"
|
||||
android:layout_width="0dip"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_weight="1"
|
||||
android:inputType="number"
|
||||
android:digits="0123456789."
|
||||
android:background="@null"
|
||||
android:gravity="center"
|
||||
android:textColor="#ffffff"
|
||||
android:textSize="@dimen/dp_32"
|
||||
|
||||
@@ -0,0 +1,73 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:layout_marginTop="@dimen/dp_20"
|
||||
tools:background="#83000000">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_speed"
|
||||
android:layout_width="@dimen/dp_214"
|
||||
android:layout_height="@dimen/dp_60"
|
||||
android:background="@drawable/bg_operate_panel_edit"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_speed_minus"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:paddingStart="@dimen/dp_15"
|
||||
android:src="@drawable/icon_operate_panel_minus"
|
||||
tools:ignore="ContentDescription,RtlSymmetry" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_speed_limit"
|
||||
android:layout_width="0dip"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center"
|
||||
android:textColor="#ffffff"
|
||||
android:textSize="@dimen/dp_32"
|
||||
tools:ignore="SpUsage"
|
||||
tools:text="65" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_speed_add"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:paddingEnd="@dimen/dp_15"
|
||||
android:src="@drawable/icon_operate_panel_add"
|
||||
tools:ignore="ContentDescription,RtlSymmetry" />
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_speed_unit"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_marginStart="@dimen/dp_10"
|
||||
tools:text="km/h"
|
||||
android:textColor="#ffffff"
|
||||
android:textSize="@dimen/dp_30"
|
||||
tools:ignore="HardcodedText,SpUsage" />
|
||||
|
||||
<Space
|
||||
android:layout_width="0dip"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_weight="1" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/bt_ok"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:background="@drawable/bg_operate_panel_edit_button"
|
||||
android:enabled="false" />
|
||||
</LinearLayout>
|
||||
@@ -86,12 +86,12 @@
|
||||
android:title="变道速度阈值"
|
||||
android:persistent="false"
|
||||
android:layout="@layout/layout_operate_panel_preference_with_title_above"
|
||||
android:widgetLayout="@layout/layout_operate_panel_preference_widget_edit_with_button" />
|
||||
android:widgetLayout="@layout/layout_operate_panel_preference_widget_text_with_button" />
|
||||
<com.mogo.eagle.core.function.hmi.ui.operate.preferences.PreferenceWithSpeedSetting
|
||||
android:key="overtake_speed_thresholds"
|
||||
android:title="超车速度阈值"
|
||||
android:persistent="false"
|
||||
android:layout="@layout/layout_operate_panel_preference_with_title_above"
|
||||
android:widgetLayout="@layout/layout_operate_panel_preference_widget_edit_with_button" />
|
||||
android:widgetLayout="@layout/layout_operate_panel_preference_widget_text_with_button" />
|
||||
</PreferenceCategory>
|
||||
</androidx.preference.PreferenceScreen>
|
||||
Reference in New Issue
Block a user