diff --git a/OCH/mogo-och-taxi-passenger/src/main/res/layout/taxi_p_base_fragment.xml b/OCH/mogo-och-taxi-passenger/src/main/res/layout/taxi_p_base_fragment.xml
index c23c84fd25..4e8829db31 100644
--- a/OCH/mogo-och-taxi-passenger/src/main/res/layout/taxi_p_base_fragment.xml
+++ b/OCH/mogo-och-taxi-passenger/src/main/res/layout/taxi_p_base_fragment.xml
@@ -85,12 +85,23 @@
android:id="@+id/traffic_light_view"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:layout_marginTop="@dimen/dp_95"
+ android:layout_marginTop="@dimen/dp_100"
android:layout_marginRight="@dimen/taxi_p_traffic_light_layout_margin_right"
android:visibility="gone"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent" />
+
+
+
{
+ LayoutInflater.from(context)
+ .inflate(R.layout.view_turn_light_status_taxi_p, this, true)
+ }
+ }
+ }else{
+ if (dayLight) {
+ LayoutInflater.from(context)
+ .inflate(R.layout.view_turn_light_status_daytime, this, true)
+ } else {
+ LayoutInflater.from(context).inflate(R.layout.view_turn_light_status, this, true)
+ }
}
visible = typedArray.getBoolean(R.styleable.TurnLightView_visible, false)
if (visible) {
@@ -59,18 +73,33 @@ open class TurnLightViewStatus @JvmOverloads constructor(
override fun onAttachedToWindow() {
super.onAttachedToWindow()
CallerChassisLamplightListenerManager.addListener(TAG, this)
+ CallerTurnLightListenerManager.addListener(TAG,this)
}
override fun onDetachedFromWindow() {
super.onDetachedFromWindow()
CallerChassisLamplightListenerManager.removeListener(TAG)
+ CallerTurnLightListenerManager.removeListener(TAG)
+ }
+
+ override fun hideTurnLightView() {
+ ThreadUtils.runOnUiThread{
+ if (!isDisappear) {
+ isDisappear = true
+ isLeftLight = false
+ isRightLight = false
+ animationDisappear()
+ }
+ }
}
override fun onAutopilotLightSwitchData(lightSwitch: Chassis.LightSwitch?) {
super.onAutopilotLightSwitchData(lightSwitch)
- lightSwitch?.let {
- ThreadUtils.runOnUiThread {
- setTurnLight(it)
+ if(HmiBuildConfig.isShowTurnLightView){
+ lightSwitch?.let {
+ ThreadUtils.runOnUiThread {
+ setTurnLight(it)
+ }
}
}
}
diff --git a/core/function-impl/mogo-core-function-hmi/src/main/res/drawable-xhdpi/module_arrow_left_nor_taxi_p.png b/core/function-impl/mogo-core-function-hmi/src/main/res/drawable-xhdpi/module_arrow_left_nor_taxi_p.png
new file mode 100644
index 0000000000..77a52782c2
Binary files /dev/null and b/core/function-impl/mogo-core-function-hmi/src/main/res/drawable-xhdpi/module_arrow_left_nor_taxi_p.png differ
diff --git a/core/function-impl/mogo-core-function-hmi/src/main/res/drawable-xhdpi/module_arrow_left_select_nor_taxi_p.png b/core/function-impl/mogo-core-function-hmi/src/main/res/drawable-xhdpi/module_arrow_left_select_nor_taxi_p.png
new file mode 100644
index 0000000000..856e10ad4b
Binary files /dev/null and b/core/function-impl/mogo-core-function-hmi/src/main/res/drawable-xhdpi/module_arrow_left_select_nor_taxi_p.png differ
diff --git a/core/function-impl/mogo-core-function-hmi/src/main/res/drawable-xhdpi/module_arrow_right_nor_taxi_p.png b/core/function-impl/mogo-core-function-hmi/src/main/res/drawable-xhdpi/module_arrow_right_nor_taxi_p.png
new file mode 100644
index 0000000000..0c117098fd
Binary files /dev/null and b/core/function-impl/mogo-core-function-hmi/src/main/res/drawable-xhdpi/module_arrow_right_nor_taxi_p.png differ
diff --git a/core/function-impl/mogo-core-function-hmi/src/main/res/drawable-xhdpi/module_arrow_right_select_nor_taxi_p.png b/core/function-impl/mogo-core-function-hmi/src/main/res/drawable-xhdpi/module_arrow_right_select_nor_taxi_p.png
new file mode 100644
index 0000000000..9eb5e23e3d
Binary files /dev/null and b/core/function-impl/mogo-core-function-hmi/src/main/res/drawable-xhdpi/module_arrow_right_select_nor_taxi_p.png differ
diff --git a/core/function-impl/mogo-core-function-hmi/src/main/res/drawable/turn_light_background_taxi_p.xml b/core/function-impl/mogo-core-function-hmi/src/main/res/drawable/turn_light_background_taxi_p.xml
new file mode 100644
index 0000000000..282410a3ec
--- /dev/null
+++ b/core/function-impl/mogo-core-function-hmi/src/main/res/drawable/turn_light_background_taxi_p.xml
@@ -0,0 +1,5 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/core/function-impl/mogo-core-function-hmi/src/main/res/layout/view_turn_light_status_taxi_p.xml b/core/function-impl/mogo-core-function-hmi/src/main/res/layout/view_turn_light_status_taxi_p.xml
new file mode 100644
index 0000000000..5636c0fdf1
--- /dev/null
+++ b/core/function-impl/mogo-core-function-hmi/src/main/res/layout/view_turn_light_status_taxi_p.xml
@@ -0,0 +1,53 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/core/function-impl/mogo-core-function-hmi/src/main/res/values/attr.xml b/core/function-impl/mogo-core-function-hmi/src/main/res/values/attr.xml
index 71ab960a6e..edfb6e9642 100644
--- a/core/function-impl/mogo-core-function-hmi/src/main/res/values/attr.xml
+++ b/core/function-impl/mogo-core-function-hmi/src/main/res/values/attr.xml
@@ -72,6 +72,9 @@
+
+
+
diff --git a/core/function-impl/mogo-core-function-hmi/src/main/res/values/color.xml b/core/function-impl/mogo-core-function-hmi/src/main/res/values/color.xml
index 72ea2d92b5..4db8ecf5b7 100644
--- a/core/function-impl/mogo-core-function-hmi/src/main/res/values/color.xml
+++ b/core/function-impl/mogo-core-function-hmi/src/main/res/values/color.xml
@@ -52,6 +52,7 @@
#000000
#E6FFFFFF
+ #FFCEDCF7
#FFFFA28B
#FFDA1100
diff --git a/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/config/HmiBuildConfig.kt b/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/config/HmiBuildConfig.kt
index e86241a695..38e4c34485 100644
--- a/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/config/HmiBuildConfig.kt
+++ b/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/config/HmiBuildConfig.kt
@@ -77,5 +77,11 @@ object HmiBuildConfig {
@Volatile
var isShowRunRedLightView = false
+ /**
+ * 是否展示转向灯
+ */
+ @JvmField
+ @Volatile
+ var isShowTurnLightView = true
}
\ No newline at end of file
diff --git a/core/mogo-core-function-api/src/main/java/com/mogo/eagle/core/function/api/datacenter/union/IMoGoTurnLightListener.kt b/core/mogo-core-function-api/src/main/java/com/mogo/eagle/core/function/api/datacenter/union/IMoGoTurnLightListener.kt
new file mode 100644
index 0000000000..b4d69330f4
--- /dev/null
+++ b/core/mogo-core-function-api/src/main/java/com/mogo/eagle/core/function/api/datacenter/union/IMoGoTurnLightListener.kt
@@ -0,0 +1,9 @@
+package com.mogo.eagle.core.function.api.datacenter.union
+
+/**
+ * 转向灯监听接口
+ */
+interface IMoGoTurnLightListener {
+
+ fun hideTurnLightView(){}
+}
\ No newline at end of file
diff --git a/core/mogo-core-function-api/src/main/java/com/mogo/eagle/core/function/api/hmi/warning/IMoGoHmiProvider.kt b/core/mogo-core-function-api/src/main/java/com/mogo/eagle/core/function/api/hmi/warning/IMoGoHmiProvider.kt
index 171fd86b84..b24a274343 100644
--- a/core/mogo-core-function-api/src/main/java/com/mogo/eagle/core/function/api/hmi/warning/IMoGoHmiProvider.kt
+++ b/core/mogo-core-function-api/src/main/java/com/mogo/eagle/core/function/api/hmi/warning/IMoGoHmiProvider.kt
@@ -159,4 +159,14 @@ interface IMoGoHmiProvider :IProvider{
* 隐藏红绿灯
*/
fun hideTrafficLightView()
+
+ /**
+ * 展示转向灯
+ */
+ fun showTurnLightView()
+
+ /**
+ * 隐藏转向灯
+ */
+ fun hideTurnLightView()
}
\ No newline at end of file
diff --git a/core/mogo-core-function-call/src/main/java/com/mogo/eagle/core/function/call/hmi/CallerHmiManager.kt b/core/mogo-core-function-call/src/main/java/com/mogo/eagle/core/function/call/hmi/CallerHmiManager.kt
index 29a017aeca..1dcc6dbb61 100644
--- a/core/mogo-core-function-call/src/main/java/com/mogo/eagle/core/function/call/hmi/CallerHmiManager.kt
+++ b/core/mogo-core-function-call/src/main/java/com/mogo/eagle/core/function/call/hmi/CallerHmiManager.kt
@@ -238,4 +238,18 @@ object CallerHmiManager {
hmiProviderApi?.hideTrafficLightView()
}
+ /**
+ * 展示转向灯
+ */
+ fun showTurnLightView(){
+ hmiProviderApi?.showTurnLightView()
+ }
+
+ /**
+ * 隐藏转向灯
+ */
+ fun hideTurnLightView(){
+ hmiProviderApi?.hideTurnLightView()
+ }
+
}
\ No newline at end of file
diff --git a/core/mogo-core-function-call/src/main/java/com/mogo/eagle/core/function/call/v2x/CallerTurnLightListenerManager.kt b/core/mogo-core-function-call/src/main/java/com/mogo/eagle/core/function/call/v2x/CallerTurnLightListenerManager.kt
new file mode 100644
index 0000000000..3f61fdbd7a
--- /dev/null
+++ b/core/mogo-core-function-call/src/main/java/com/mogo/eagle/core/function/call/v2x/CallerTurnLightListenerManager.kt
@@ -0,0 +1,20 @@
+package com.mogo.eagle.core.function.call.v2x
+
+import com.mogo.eagle.core.function.api.datacenter.union.IMoGoTurnLightListener
+import com.mogo.eagle.core.function.call.base.CallerBase
+
+/**
+ * 转向灯事件管理
+ */
+object CallerTurnLightListenerManager: CallerBase() {
+
+ /**
+ * 隐藏转向灯
+ */
+ fun invokeHideTurnLightView(){
+ M_LISTENERS.forEach {
+ val listener = it.value
+ listener.hideTurnLightView()
+ }
+ }
+}
\ No newline at end of file