From 00204b31edb046a689da43af160a4924406d32c5 Mon Sep 17 00:00:00 2001 From: yangyakun Date: Wed, 15 Feb 2023 16:40:21 +0800 Subject: [PATCH] =?UTF-8?q?[m1]=20[1.0.2]=20[=E9=BB=98=E8=AE=A4=E9=80=9F?= =?UTF-8?q?=E5=BA=A6=E3=80=81=E7=A9=BA=E8=B0=832s=E5=90=8E=E8=BF=9B?= =?UTF-8?q?=E8=A1=8C=E5=A4=B1=E8=B4=A5=E6=8F=90=E7=A4=BA]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../BusPassengerFunctionSoftPresenter.kt | 31 +++++++++++++++++++ .../src/m1/res/layout/bus_p_fragment.xml | 5 ++- 2 files changed, 33 insertions(+), 3 deletions(-) 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">