diff --git a/OCH/mogo-och-bus-passenger/src/m1/java/com/mogo/och/bus/passenger/presenter/BusPassengerFunctionSoftPresenter.kt b/OCH/mogo-och-bus-passenger/src/m1/java/com/mogo/och/bus/passenger/presenter/BusPassengerFunctionSoftPresenter.kt
index 75204caf2d..f26b01bb23 100644
--- a/OCH/mogo-och-bus-passenger/src/m1/java/com/mogo/och/bus/passenger/presenter/BusPassengerFunctionSoftPresenter.kt
+++ b/OCH/mogo-och-bus-passenger/src/m1/java/com/mogo/och/bus/passenger/presenter/BusPassengerFunctionSoftPresenter.kt
@@ -21,6 +21,9 @@ class BusPassengerFunctionSoftPresenter(view: BusPassengerFunctionSoftFragment?)
private var subscribeLightTop2: Disposable?=null
private var subscribeLightAtmosphere: Disposable?=null
+ private var airconditionDisposable: Disposable?=null
+ private var heaterDisposable: Disposable?=null
+
override fun onCreate(owner: LifecycleOwner) {
super.onCreate(owner)
OCHM1LightAirconditionDoorStatusManager.addListener(TAG, this)
@@ -81,10 +84,25 @@ class BusPassengerFunctionSoftPresenter(view: BusPassengerFunctionSoftFragment?)
CallerLogger.d(SceneConstant.M_BUS_P + TAG, "" +
"打开空调,模式$modeCmd--档位${windSpeedCmd}--温度:$temperatureCmd")
AdasManager.getInstance().sendRoboBusJinlvM1AirConditionerCmd(1,modeCmd,windSpeedCmd,temperatureCmd)
+ disposeSubscribe(airconditionDisposable)
+ airconditionDisposable = createSubscribe(2000){
+ if (!OCHM1LightAirconditionDoorStatusManager.airconditionStatus.isOpen&&
+ OCHM1LightAirconditionDoorStatusManager.airconditionStatus.windSpeed!=windSpeedCmd&&
+ OCHM1LightAirconditionDoorStatusManager.airconditionStatus.temperature!=temperatureCmd&&
+ OCHM1LightAirconditionDoorStatusManager.airconditionStatus.pattert!=modeCmd) {
+ ToastUtils.showShort("操作未生效,请稍后重试吧~")
+ }
+ }
}
fun closeAircondition() {
CallerLogger.d(SceneConstant.M_BUS_P + TAG, "关闭空调")
AdasManager.getInstance().sendRoboBusJinlvM1AirConditionerCmd(2,0,0,0)
+ disposeSubscribe(airconditionDisposable)
+ airconditionDisposable = createSubscribe(2000){
+ if (OCHM1LightAirconditionDoorStatusManager.airconditionStatus.isOpen) {
+ ToastUtils.showShort("操作未生效,请稍后重试吧~")
+ }
+ }
}
/**
* 设置暖风
@@ -92,11 +110,24 @@ class BusPassengerFunctionSoftPresenter(view: BusPassengerFunctionSoftFragment?)
fun openAndSetHeader(windSpeedCmd: Int) {
CallerLogger.d(SceneConstant.M_BUS_P + TAG, "打开暖风机、档位${windSpeedCmd}")
AdasManager.getInstance().sendRoboBusJinlvM1HeaderCmd(1,windSpeedCmd)
+ disposeSubscribe(heaterDisposable)
+ heaterDisposable = createSubscribe(2000){
+ if (!OCHM1LightAirconditionDoorStatusManager.heaterStatue.isOpen&&
+ OCHM1LightAirconditionDoorStatusManager.heaterStatue.windSpeed!=windSpeedCmd&&) {
+ ToastUtils.showShort("操作未生效,请稍后重试吧~")
+ }
+ }
}
fun closeHeader(){
CallerLogger.d(SceneConstant.M_BUS_P + TAG, "关闭暖风机")
AdasManager.getInstance().sendRoboBusJinlvM1HeaderCmd(2,0)
+ disposeSubscribe(heaterDisposable)
+ heaterDisposable = createSubscribe(2000){
+ if (!OCHM1LightAirconditionDoorStatusManager.heaterStatue.isOpen) {
+ ToastUtils.showShort("操作未生效,请稍后重试吧~")
+ }
+ }
}
fun setLightData1(leftLight: Boolean){
diff --git a/OCH/mogo-och-bus-passenger/src/m1/res/layout/bus_p_fragment.xml b/OCH/mogo-och-bus-passenger/src/m1/res/layout/bus_p_fragment.xml
index e7d0726719..3975ad329c 100644
--- a/OCH/mogo-och-bus-passenger/src/m1/res/layout/bus_p_fragment.xml
+++ b/OCH/mogo-och-bus-passenger/src/m1/res/layout/bus_p_fragment.xml
@@ -44,11 +44,10 @@
android:layout_height="@dimen/dp_152">