From 784d255c213bbf5a9ab9f2016b7cc653b69c1add Mon Sep 17 00:00:00 2001 From: yangyakun Date: Mon, 6 Mar 2023 17:19:54 +0800 Subject: [PATCH] =?UTF-8?q?[m1]=20[1.1.2]=20[=E5=85=B3=E9=97=AD=E7=A9=BA?= =?UTF-8?q?=E8=B0=83=E4=B8=8D=E4=BF=AE=E6=94=B9=E7=8A=B6=E6=80=81]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../BusPassengerFunctionSoftPresenter.kt | 4 ++-- .../och/bus/passenger/ui/M1SoftFragment.kt | 18 +++++++++++++++++- 2 files changed, 19 insertions(+), 3 deletions(-) diff --git a/OCH/mogo-och-charter-passenger/src/m1/java/com/mogo/och/bus/passenger/presenter/BusPassengerFunctionSoftPresenter.kt b/OCH/mogo-och-charter-passenger/src/m1/java/com/mogo/och/bus/passenger/presenter/BusPassengerFunctionSoftPresenter.kt index a14cf56233..c5f1600d00 100644 --- a/OCH/mogo-och-charter-passenger/src/m1/java/com/mogo/och/bus/passenger/presenter/BusPassengerFunctionSoftPresenter.kt +++ b/OCH/mogo-och-charter-passenger/src/m1/java/com/mogo/och/bus/passenger/presenter/BusPassengerFunctionSoftPresenter.kt @@ -145,9 +145,9 @@ class BusPassengerFunctionSoftPresenter(view: M1SoftFragment?) : } } } - fun closeAircondition() { + fun closeAircondition(modeCmd: Int, windSpeedCmd: Int, temperatureCmd: Int) { CallerLogger.d(SceneConstant.M_BUS_P + TAG, "关闭空调") - CallerAutoPilotControlManager.sendRoboBusJinlvM1AirConditionerCmd(2,0,0,0) + CallerAutoPilotControlManager.sendRoboBusJinlvM1AirConditionerCmd(2,modeCmd,windSpeedCmd,temperatureCmd) disposeSubscribe(airconditionDisposable) airconditionDisposable = createSubscribe(10000){ if (OCHM1LightAirconditionDoorStatusManager.airconditionStatus.isOpen) { diff --git a/OCH/mogo-och-charter-passenger/src/m1/java/com/mogo/och/bus/passenger/ui/M1SoftFragment.kt b/OCH/mogo-och-charter-passenger/src/m1/java/com/mogo/och/bus/passenger/ui/M1SoftFragment.kt index 59548bb634..1d66516f06 100644 --- a/OCH/mogo-och-charter-passenger/src/m1/java/com/mogo/och/bus/passenger/ui/M1SoftFragment.kt +++ b/OCH/mogo-och-charter-passenger/src/m1/java/com/mogo/och/bus/passenger/ui/M1SoftFragment.kt @@ -290,7 +290,23 @@ class M1SoftFragment : */ private fun closeAircondition() { CallerLogger.d(SceneConstant.M_BUS_P + TAG, "关闭空调") - mPresenter?.closeAircondition() + var modeCmd = 0 + var windSpeedCmd = 0 + val temperatureCmd = currentTemperature?.value ?: 26 + closeHeater()//关闭暖风 + when (rg_setting_pattern.checkedRadioButtonId) { + R.id.rb_pattern_automatic -> modeCmd = 1 // 自动 + R.id.rb_pattern_refrigeration -> modeCmd = 2 // 制冷 + R.id.rb_pattern_ventilate -> modeCmd = 3 // 通风 + else -> {} + } + when (rg_setting_windspeed.checkedRadioButtonId) { + R.id.rb_wind_speed_low -> windSpeedCmd = 1 // 1档 + R.id.rb_wind_speed_middle -> windSpeedCmd = 2 // 2档 + R.id.rb_wind_speed_high -> windSpeedCmd = 3 // 3档 + else -> {} + } + mPresenter?.closeAircondition(modeCmd, windSpeedCmd, temperatureCmd) } /**