From f78a32bbbcc7b9ac9848aad7352b1ddcf562e572 Mon Sep 17 00:00:00 2001 From: chenfufeng Date: Wed, 22 Feb 2023 14:44:21 +0800 Subject: [PATCH 01/10] =?UTF-8?q?[Opt3.0][Update]=E6=96=B0=E5=A2=9Eplannin?= =?UTF-8?q?g=E5=91=BD=E4=BB=A4=E7=9A=84=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../datacenter/autopilot/MoGoAutopilotControlProvider.kt | 4 ++++ .../function/api/autopilot/IMoGoAutopilotControlProvider.kt | 2 ++ .../function/call/autopilot/CallerAutoPilotControlManager.kt | 4 ++++ 3 files changed, 10 insertions(+) diff --git a/core/function-impl/mogo-core-function-datacenter/src/main/java/com/mogo/eagle/core/function/datacenter/autopilot/MoGoAutopilotControlProvider.kt b/core/function-impl/mogo-core-function-datacenter/src/main/java/com/mogo/eagle/core/function/datacenter/autopilot/MoGoAutopilotControlProvider.kt index fa5f14ed05..e68500d7c7 100644 --- a/core/function-impl/mogo-core-function-datacenter/src/main/java/com/mogo/eagle/core/function/datacenter/autopilot/MoGoAutopilotControlProvider.kt +++ b/core/function-impl/mogo-core-function-datacenter/src/main/java/com/mogo/eagle/core/function/datacenter/autopilot/MoGoAutopilotControlProvider.kt @@ -769,4 +769,8 @@ class MoGoAutopilotControlProvider : override fun sendRoboBusJinlvM1TaskCmd(roboBusJinlvM1Cmd: SpecialVehicleTaskCmdOuterClass.RoboBusJinlvM1Cmd): Boolean { return AdasManager.getInstance().sendRoboBusJinlvM1TaskCmd(roboBusJinlvM1Cmd) } + + override fun sendPlanningCmd(cmd: Int): Boolean { + return AdasManager.getInstance().sendPlanningCmd(cmd) + } } \ No newline at end of file diff --git a/core/mogo-core-function-api/src/main/java/com/mogo/eagle/core/function/api/autopilot/IMoGoAutopilotControlProvider.kt b/core/mogo-core-function-api/src/main/java/com/mogo/eagle/core/function/api/autopilot/IMoGoAutopilotControlProvider.kt index 5559e67b9f..e1c50cce6c 100644 --- a/core/mogo-core-function-api/src/main/java/com/mogo/eagle/core/function/api/autopilot/IMoGoAutopilotControlProvider.kt +++ b/core/mogo-core-function-api/src/main/java/com/mogo/eagle/core/function/api/autopilot/IMoGoAutopilotControlProvider.kt @@ -312,4 +312,6 @@ interface IMoGoAutopilotControlProvider : IMoGoFunctionServerProvider { fun sendRoboBusJinlvM1SmallLampCmd(switchCmd: Int): Boolean fun sendRoboBusJinlvM1TaskCmd(roboBusJinlvM1Cmd: SpecialVehicleTaskCmdOuterClass.RoboBusJinlvM1Cmd): Boolean + + fun sendPlanningCmd(cmd: Int): Boolean } \ No newline at end of file diff --git a/core/mogo-core-function-call/src/main/java/com/mogo/eagle/core/function/call/autopilot/CallerAutoPilotControlManager.kt b/core/mogo-core-function-call/src/main/java/com/mogo/eagle/core/function/call/autopilot/CallerAutoPilotControlManager.kt index 1980bf91db..1140e23f39 100644 --- a/core/mogo-core-function-call/src/main/java/com/mogo/eagle/core/function/call/autopilot/CallerAutoPilotControlManager.kt +++ b/core/mogo-core-function-call/src/main/java/com/mogo/eagle/core/function/call/autopilot/CallerAutoPilotControlManager.kt @@ -450,4 +450,8 @@ object CallerAutoPilotControlManager { fun sendRoboBusJinlvM1TaskCmd(roboBusJinlvM1Cmd: SpecialVehicleTaskCmdOuterClass.RoboBusJinlvM1Cmd): Boolean { return providerApi?.sendRoboBusJinlvM1TaskCmd(roboBusJinlvM1Cmd) ?: false } + + fun sendPlanningCmd(cmd: Int): Boolean { + return providerApi?.sendPlanningCmd(cmd) ?: false + } } \ No newline at end of file From aa3205ef1e2c569494d17877782cb64aa1be1301 Mon Sep 17 00:00:00 2001 From: yangyakun Date: Wed, 22 Feb 2023 15:37:52 +0800 Subject: [PATCH 02/10] =?UTF-8?q?[m1]=20[1.0.2]=20[=E5=88=A0=E9=99=A4adas?= =?UTF-8?q?=20=E7=9A=84=E7=9B=B4=E6=8E=A5=E4=BE=9D=E8=B5=96]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- OCH/mogo-och-bus-passenger/build.gradle | 1 - .../och/bus/passenger/MogoOCHBusPassenger.kt | 9 +++----- .../request/BusPassengerQueryLineRequest.java | 3 --- ...BusPassengerAutopilotPlanningCallback.java | 2 -- .../BusPassengerFunctionDevicePresenter.kt | 15 ++++++------ .../BusPassengerFunctionSoftPresenter.kt | 23 +++++++++---------- .../presenter/BusPassengerPresenter.kt | 17 +++++++++----- .../ui/BusPassengerFunctionDeviceFragment.kt | 6 ----- ...teFragment.kt => MainPassengerFragment.kt} | 4 ++-- .../src/m1/res/layout/bus_p_fragment.xml | 4 +++- 10 files changed, 37 insertions(+), 47 deletions(-) rename OCH/mogo-och-bus-passenger/src/m1/java/com/mogo/och/bus/passenger/ui/{BusPassengerRouteFragment.kt => MainPassengerFragment.kt} (98%) diff --git a/OCH/mogo-och-bus-passenger/build.gradle b/OCH/mogo-och-bus-passenger/build.gradle index 108b34a4f2..0818ec952e 100644 --- a/OCH/mogo-och-bus-passenger/build.gradle +++ b/OCH/mogo-och-bus-passenger/build.gradle @@ -75,7 +75,6 @@ dependencies { implementation rootProject.ext.dependencies.amapnavi3dmap implementation project(":OCH:mogo-och-common-module") compileOnly project(":libraries:mogo-map") - compileOnly project(':libraries:mogo-adas') implementation project(':core:mogo-core-res') testImplementation 'junit:junit:4.12' diff --git a/OCH/mogo-och-bus-passenger/src/m1/java/com/mogo/och/bus/passenger/MogoOCHBusPassenger.kt b/OCH/mogo-och-bus-passenger/src/m1/java/com/mogo/och/bus/passenger/MogoOCHBusPassenger.kt index d6ede055ab..284a3f357c 100644 --- a/OCH/mogo-och-bus-passenger/src/m1/java/com/mogo/och/bus/passenger/MogoOCHBusPassenger.kt +++ b/OCH/mogo-och-bus-passenger/src/m1/java/com/mogo/och/bus/passenger/MogoOCHBusPassenger.kt @@ -4,15 +4,12 @@ import android.content.Context import androidx.fragment.app.Fragment import androidx.fragment.app.FragmentActivity import com.alibaba.android.arouter.facade.annotation.Route -import com.mogo.commons.module.status.IMogoStatusChangedListener -import com.mogo.commons.module.status.MogoStatusManager -import com.mogo.commons.module.status.StatusDescriptor import com.mogo.eagle.core.function.call.map.CallerMapUIServiceManager.getMapUIController import com.mogo.eagle.core.function.call.setting.CallerMoGoUiSettingManager.stepInDayMode import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger.d import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant import com.mogo.och.bus.passenger.constant.BusPassengerConst -import com.mogo.och.bus.passenger.ui.BusPassengerRouteFragment +import com.mogo.och.bus.passenger.ui.MainPassengerFragment /** * 网约车-Bus-乘客端 @@ -23,7 +20,7 @@ import com.mogo.och.bus.passenger.ui.BusPassengerRouteFragment class MogoOCHBusPassenger : IMogoOCH { private var mActivity: FragmentActivity? = null private var mContainerId = 0 - private var mPassengerFragment: BusPassengerRouteFragment? = null + private var mPassengerFragment: MainPassengerFragment? = null override fun createCoverage(activity: FragmentActivity, containerId: Int) {} override fun createCoverage(activity: FragmentActivity?, containerId: Int?): Fragment? { mActivity = activity @@ -56,7 +53,7 @@ class MogoOCHBusPassenger : IMogoOCH { private fun showFragment() { if (mPassengerFragment == null) { d(SceneConstant.M_TAXI_P + TAG, "准备add fragment======") - mPassengerFragment = BusPassengerRouteFragment() + mPassengerFragment = MainPassengerFragment() mActivity!!.supportFragmentManager.beginTransaction() .add(mContainerId, mPassengerFragment!!).commitAllowingStateLoss() return diff --git a/OCH/mogo-och-bus-passenger/src/m1/java/com/mogo/och/bus/passenger/bean/request/BusPassengerQueryLineRequest.java b/OCH/mogo-och-bus-passenger/src/m1/java/com/mogo/och/bus/passenger/bean/request/BusPassengerQueryLineRequest.java index 7a682db6a1..bfa44d6d49 100644 --- a/OCH/mogo-och-bus-passenger/src/m1/java/com/mogo/och/bus/passenger/bean/request/BusPassengerQueryLineRequest.java +++ b/OCH/mogo-och-bus-passenger/src/m1/java/com/mogo/och/bus/passenger/bean/request/BusPassengerQueryLineRequest.java @@ -2,9 +2,6 @@ package com.mogo.och.bus.passenger.bean.request; public /** - * @author congtaowang - * @since 2021/3/22 - * * 根据车机行驶线路站点信息 */ class BusPassengerQueryLineRequest { diff --git a/OCH/mogo-och-bus-passenger/src/m1/java/com/mogo/och/bus/passenger/callback/IBusPassengerAutopilotPlanningCallback.java b/OCH/mogo-och-bus-passenger/src/m1/java/com/mogo/och/bus/passenger/callback/IBusPassengerAutopilotPlanningCallback.java index 786264650f..28e451dced 100644 --- a/OCH/mogo-och-bus-passenger/src/m1/java/com/mogo/och/bus/passenger/callback/IBusPassengerAutopilotPlanningCallback.java +++ b/OCH/mogo-och-bus-passenger/src/m1/java/com/mogo/och/bus/passenger/callback/IBusPassengerAutopilotPlanningCallback.java @@ -4,8 +4,6 @@ import com.amap.api.maps.model.LatLng; import java.util.List; -import mogo.telematics.pad.MessagePad; - /** * Created on 2022/3/31 */ diff --git a/OCH/mogo-och-bus-passenger/src/m1/java/com/mogo/och/bus/passenger/presenter/BusPassengerFunctionDevicePresenter.kt b/OCH/mogo-och-bus-passenger/src/m1/java/com/mogo/och/bus/passenger/presenter/BusPassengerFunctionDevicePresenter.kt index 737338b83d..96ac4a4976 100644 --- a/OCH/mogo-och-bus-passenger/src/m1/java/com/mogo/och/bus/passenger/presenter/BusPassengerFunctionDevicePresenter.kt +++ b/OCH/mogo-och-bus-passenger/src/m1/java/com/mogo/och/bus/passenger/presenter/BusPassengerFunctionDevicePresenter.kt @@ -3,14 +3,13 @@ package com.mogo.och.bus.passenger.presenter import androidx.lifecycle.LifecycleOwner import com.mogo.eagle.core.data.map.MogoLocation import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotStatusListener +import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotControlManager import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager -import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger import com.mogo.eagle.core.utilcode.util.ToastUtils import com.mogo.och.bus.passenger.callback.IBusPassengerControllerStatusCallback import com.mogo.och.bus.passenger.model.BusPassengerModel import com.mogo.och.bus.passenger.ui.BusPassengerFunctionDeviceFragment import com.mogo.och.common.module.manager.OCHM1LightAirconditionDoorStatusManager -import com.zhidao.support.adas.high.AdasManager import io.reactivex.disposables.Disposable class BusPassengerFunctionDevicePresenter(view: BusPassengerFunctionDeviceFragment?) : @@ -68,9 +67,9 @@ class BusPassengerFunctionDevicePresenter(view: BusPassengerFunctionDeviceFragme } disposeSubscribe(subscribe) subscribe = createSubscribe(1000) { - AdasManager.getInstance().sendRoboBusJinlvM1FrontDoorCmd(0) + CallerAutoPilotControlManager.sendRoboBusJinlvM1FrontDoorCmd(0) } - AdasManager.getInstance().sendRoboBusJinlvM1FrontDoorCmd(1) + CallerAutoPilotControlManager.sendRoboBusJinlvM1FrontDoorCmd(1) disposeSubscribe(subscribeDoorStatus) subscribeDoorStatus = createSubscribe { if (!OCHM1LightAirconditionDoorStatusManager.doorStatus.isOpen) { @@ -87,9 +86,9 @@ class BusPassengerFunctionDevicePresenter(view: BusPassengerFunctionDeviceFragme } disposeSubscribe(subscribe) subscribe = createSubscribe(1000) { - AdasManager.getInstance().sendRoboBusJinlvM1FrontDoorCmd(0) + CallerAutoPilotControlManager.sendRoboBusJinlvM1FrontDoorCmd(0) } - AdasManager.getInstance().sendRoboBusJinlvM1FrontDoorCmd(2) + CallerAutoPilotControlManager.sendRoboBusJinlvM1FrontDoorCmd(2) disposeSubscribe(subscribeDoorStatus) subscribeDoorStatus = createSubscribe { if (OCHM1LightAirconditionDoorStatusManager.doorStatus.isOpen) { @@ -117,7 +116,7 @@ class BusPassengerFunctionDevicePresenter(view: BusPassengerFunctionDeviceFragme } IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_RUNNING -> { // 靠边停车 - AdasManager.getInstance().sendPlanningCmd(1) + CallerAutoPilotControlManager.sendPlanningCmd(1) } IMoGoAutopilotStatusListener.STATUS_PARALLEL_DRIVING -> { ToastUtils.showShort("因车辆正在平行驾驶中无法靠边停车,请稍后再试") @@ -137,7 +136,7 @@ class BusPassengerFunctionDevicePresenter(view: BusPassengerFunctionDeviceFragme } IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_RUNNING -> { // 重新起步 - AdasManager.getInstance().sendPlanningCmd(2) + CallerAutoPilotControlManager.sendPlanningCmd(2) } IMoGoAutopilotStatusListener.STATUS_PARALLEL_DRIVING -> { ToastUtils.showShort("因车辆正在平行驾驶中无法靠边停车,请稍后再试") 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 fcec461be1..333fd42640 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 @@ -1,14 +1,13 @@ package com.mogo.och.bus.passenger.presenter import androidx.lifecycle.LifecycleOwner -import com.mogo.commons.mvp.Presenter +import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotControlManager import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant import com.mogo.eagle.core.utilcode.util.ToastUtils import com.mogo.eagle.core.utilcode.util.UiThreadHandler import com.mogo.och.bus.passenger.ui.BusPassengerFunctionSoftFragment import com.mogo.och.common.module.manager.OCHM1LightAirconditionDoorStatusManager -import com.zhidao.support.adas.high.AdasManager import io.reactivex.disposables.Disposable class BusPassengerFunctionSoftPresenter(view: BusPassengerFunctionSoftFragment?) : @@ -135,7 +134,7 @@ class BusPassengerFunctionSoftPresenter(view: BusPassengerFunctionSoftFragment?) fun openAndSetAircondition(modeCmd: Int, windSpeedCmd: Int, temperatureCmd: Int) { CallerLogger.d(SceneConstant.M_BUS_P + TAG, "" + "打开空调,模式$modeCmd--档位${windSpeedCmd}--温度:$temperatureCmd") - AdasManager.getInstance().sendRoboBusJinlvM1AirConditionerCmd(1,modeCmd,windSpeedCmd,temperatureCmd) + CallerAutoPilotControlManager.sendRoboBusJinlvM1AirConditionerCmd(1,modeCmd,windSpeedCmd,temperatureCmd) disposeSubscribe(airconditionDisposable) airconditionDisposable = createSubscribe(5000){ if (!OCHM1LightAirconditionDoorStatusManager.airconditionStatus.isOpen&& @@ -148,7 +147,7 @@ class BusPassengerFunctionSoftPresenter(view: BusPassengerFunctionSoftFragment?) } fun closeAircondition() { CallerLogger.d(SceneConstant.M_BUS_P + TAG, "关闭空调") - AdasManager.getInstance().sendRoboBusJinlvM1AirConditionerCmd(2,0,0,0) + CallerAutoPilotControlManager.sendRoboBusJinlvM1AirConditionerCmd(2,0,0,0) disposeSubscribe(airconditionDisposable) airconditionDisposable = createSubscribe(2000){ if (OCHM1LightAirconditionDoorStatusManager.airconditionStatus.isOpen) { @@ -161,7 +160,7 @@ class BusPassengerFunctionSoftPresenter(view: BusPassengerFunctionSoftFragment?) */ fun openAndSetHeader(windSpeedCmd: Int) { CallerLogger.d(SceneConstant.M_BUS_P + TAG, "打开暖风机、档位${windSpeedCmd}") - AdasManager.getInstance().sendRoboBusJinlvM1HeaderCmd(1,windSpeedCmd) + CallerAutoPilotControlManager.sendRoboBusJinlvM1HeaderCmd(1,windSpeedCmd) disposeSubscribe(heaterDisposable) heaterDisposable = createSubscribe(2000){ if (!OCHM1LightAirconditionDoorStatusManager.heaterStatue.isOpen&& @@ -173,7 +172,7 @@ class BusPassengerFunctionSoftPresenter(view: BusPassengerFunctionSoftFragment?) fun closeHeader(){ CallerLogger.d(SceneConstant.M_BUS_P + TAG, "关闭暖风机") - AdasManager.getInstance().sendRoboBusJinlvM1HeaderCmd(2,0) + CallerAutoPilotControlManager.sendRoboBusJinlvM1HeaderCmd(2,0) disposeSubscribe(heaterDisposable) heaterDisposable = createSubscribe(2000){ if (!OCHM1LightAirconditionDoorStatusManager.heaterStatue.isOpen) { @@ -186,14 +185,14 @@ class BusPassengerFunctionSoftPresenter(view: BusPassengerFunctionSoftFragment?) CallerLogger.d(SceneConstant.M_BUS_P + TAG, "顶灯2:$leftLight") disposeSubscribe(subscribeLightTop1) if(leftLight){ - AdasManager.getInstance().sendRoboBusJinlvM1MainLamp1Cmd(1) + CallerAutoPilotControlManager.sendRoboBusJinlvM1MainLamp1Cmd(1) subscribeLightTop1 = createSubscribe{ if (!OCHM1LightAirconditionDoorStatusManager.lightStatus.isOpenLight1) { ToastUtils.showShort("操作未生效,请稍后重试吧~") } } }else{ - AdasManager.getInstance().sendRoboBusJinlvM1MainLamp1Cmd(2) + CallerAutoPilotControlManager.sendRoboBusJinlvM1MainLamp1Cmd(2) subscribeLightTop1 = createSubscribe{ if (OCHM1LightAirconditionDoorStatusManager.lightStatus.isOpenLight1) { ToastUtils.showShort("操作未生效,请稍后重试吧~") @@ -205,14 +204,14 @@ class BusPassengerFunctionSoftPresenter(view: BusPassengerFunctionSoftFragment?) CallerLogger.d(SceneConstant.M_BUS_P + TAG, "顶灯1:$rightLight") disposeSubscribe(subscribeLightTop2) if(rightLight){ - AdasManager.getInstance().sendRoboBusJinlvM1MainLamp2Cmd(1) + CallerAutoPilotControlManager.sendRoboBusJinlvM1MainLamp2Cmd(1) subscribeLightTop2 = createSubscribe{ if (!OCHM1LightAirconditionDoorStatusManager.lightStatus.isOpenLight2) { ToastUtils.showShort("操作未生效,请稍后重试吧~") } } }else{ - AdasManager.getInstance().sendRoboBusJinlvM1MainLamp2Cmd(2) + CallerAutoPilotControlManager.sendRoboBusJinlvM1MainLamp2Cmd(2) subscribeLightTop2 = createSubscribe{ if (OCHM1LightAirconditionDoorStatusManager.lightStatus.isOpenLight2) { ToastUtils.showShort("操作未生效,请稍后重试吧~") @@ -224,14 +223,14 @@ class BusPassengerFunctionSoftPresenter(view: BusPassengerFunctionSoftFragment?) CallerLogger.d(SceneConstant.M_BUS_P + TAG, "氛围灯:$atmosphereLight") disposeSubscribe(subscribeLightAtmosphere) if (atmosphereLight) { - AdasManager.getInstance().sendRoboBusJinlvM1SmallLampCmd(1) + CallerAutoPilotControlManager.sendRoboBusJinlvM1SmallLampCmd(1) subscribeLightAtmosphere = createSubscribe{ if (!OCHM1LightAirconditionDoorStatusManager.lightStatus.isOpenatmosphere) { ToastUtils.showShort("操作未生效,请稍后重试吧~") } } } else { - AdasManager.getInstance().sendRoboBusJinlvM1SmallLampCmd(2) + CallerAutoPilotControlManager.sendRoboBusJinlvM1SmallLampCmd(2) subscribeLightAtmosphere = createSubscribe{ if (OCHM1LightAirconditionDoorStatusManager.lightStatus.isOpenatmosphere) { ToastUtils.showShort("操作未生效,请稍后重试吧~") diff --git a/OCH/mogo-och-bus-passenger/src/m1/java/com/mogo/och/bus/passenger/presenter/BusPassengerPresenter.kt b/OCH/mogo-och-bus-passenger/src/m1/java/com/mogo/och/bus/passenger/presenter/BusPassengerPresenter.kt index 9ad9fdfb8a..de3913b30b 100644 --- a/OCH/mogo-och-bus-passenger/src/m1/java/com/mogo/och/bus/passenger/presenter/BusPassengerPresenter.kt +++ b/OCH/mogo-och-bus-passenger/src/m1/java/com/mogo/och/bus/passenger/presenter/BusPassengerPresenter.kt @@ -3,16 +3,17 @@ package com.mogo.och.bus.passenger.presenter import androidx.lifecycle.LifecycleOwner import com.amap.api.maps.model.LatLng import com.mogo.eagle.core.data.map.MogoLocation +import com.mogo.eagle.core.utilcode.util.UiThreadHandler import com.mogo.och.bus.passenger.callback.IBusPassengerAutopilotPlanningCallback import com.mogo.och.bus.passenger.callback.IBusPassengerControllerStatusCallback import com.mogo.och.bus.passenger.model.BusPassengerModel -import com.mogo.och.bus.passenger.ui.BusPassengerRouteFragment +import com.mogo.och.bus.passenger.ui.MainPassengerFragment import com.mogo.och.common.module.utils.DateTimeUtil import com.mogo.och.common.module.utils.NumberFormatUtil import java.util.* -class BusPassengerPresenter(view: BusPassengerRouteFragment?) : - BusBasePassengerFunctionDevicePresenter(view), +class BusPassengerPresenter(view: MainPassengerFragment?) : + BusBasePassengerFunctionDevicePresenter(view), IBusPassengerControllerStatusCallback, IBusPassengerAutopilotPlanningCallback { override fun onCreate(owner: LifecycleOwner) { super.onCreate(owner) @@ -28,11 +29,15 @@ class BusPassengerPresenter(view: BusPassengerRouteFragment?) : BusPassengerModel.setControllerStatusCallback(TAG,null) } private fun setSpeed(speed:Float){ - val speedKM =(Math.abs(speed) * 3.6f).toInt() - mView?.setSpeed(speedKM.toString()) + UiThreadHandler.post { + val speedKM =(Math.abs(speed) * 3.6f).toInt() + mView?.setSpeed(speedKM.toString()) + } } private fun setDistanceAndTime(distance: String,distanceUnit: String,sumTime:String,arrivedTime:String){ - mView?.setDistanceAndTime(distance,distanceUnit,sumTime,arrivedTime) + UiThreadHandler.post { + mView?.setDistanceAndTime(distance, distanceUnit, sumTime, arrivedTime) + } } companion object{ private const val TAG = "BusPassengerPresenter" diff --git a/OCH/mogo-och-bus-passenger/src/m1/java/com/mogo/och/bus/passenger/ui/BusPassengerFunctionDeviceFragment.kt b/OCH/mogo-och-bus-passenger/src/m1/java/com/mogo/och/bus/passenger/ui/BusPassengerFunctionDeviceFragment.kt index 714ea70064..20f53c6359 100644 --- a/OCH/mogo-och-bus-passenger/src/m1/java/com/mogo/och/bus/passenger/ui/BusPassengerFunctionDeviceFragment.kt +++ b/OCH/mogo-och-bus-passenger/src/m1/java/com/mogo/och/bus/passenger/ui/BusPassengerFunctionDeviceFragment.kt @@ -6,12 +6,7 @@ import com.mogo.eagle.core.utilcode.kotlin.onClick import com.mogo.och.bus.passenger.R import com.mogo.och.bus.passenger.presenter.BusPassengerFunctionDevicePresenter import com.mogo.och.common.module.utils.SoundPoolHelper -import com.zhidao.support.adas.high.AdasManager -import io.reactivex.Observable -import io.reactivex.android.schedulers.AndroidSchedulers -import io.reactivex.disposables.Disposable import kotlinx.android.synthetic.m1.bus_p_function_setting_devices_fragment.* -import java.util.concurrent.TimeUnit /** * @author: yangyakun @@ -38,7 +33,6 @@ class BusPassengerFunctionDeviceFragment : } tv_car_setting_stopside.setOnClickListener { // 执行靠边停车 AdasManager.getInstance().sendPlanningCmd(1); - AdasManager.getInstance().sendPlanningCmd(1); mPresenter?.startStopSide() SoundPoolHelper.getSoundPoolHelper().playSoundWithRedId(context, R.raw.bus_di) } diff --git a/OCH/mogo-och-bus-passenger/src/m1/java/com/mogo/och/bus/passenger/ui/BusPassengerRouteFragment.kt b/OCH/mogo-och-bus-passenger/src/m1/java/com/mogo/och/bus/passenger/ui/MainPassengerFragment.kt similarity index 98% rename from OCH/mogo-och-bus-passenger/src/m1/java/com/mogo/och/bus/passenger/ui/BusPassengerRouteFragment.kt rename to OCH/mogo-och-bus-passenger/src/m1/java/com/mogo/och/bus/passenger/ui/MainPassengerFragment.kt index d87a929715..c9e2b1c664 100644 --- a/OCH/mogo-och-bus-passenger/src/m1/java/com/mogo/och/bus/passenger/ui/BusPassengerRouteFragment.kt +++ b/OCH/mogo-och-bus-passenger/src/m1/java/com/mogo/och/bus/passenger/ui/MainPassengerFragment.kt @@ -21,8 +21,8 @@ import java.lang.ref.WeakReference * @author: wangmingjun * @date: 2022/4/12 */ -class BusPassengerRouteFragment : - MvpFragment() { +class MainPassengerFragment : + MvpFragment() { private var bpFunctionGroupDialogFragment: WeakReference? = null 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 77eabef580..a015255ed1 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 @@ -42,7 +42,6 @@ android:layout_marginTop="@dimen/dp_74" android:layout_marginStart="@dimen/dp_29" android:layout_width="@dimen/dp_152" - android:gravity="center" android:background="@drawable/bus_p_car_speed" android:orientation="vertical" android:layout_height="@dimen/dp_152"> @@ -52,12 +51,15 @@ android:text="0" android:textSize="@dimen/dp_60" android:gravity="center" + android:layout_marginTop="@dimen/dp_12" android:textColor="@color/bus_p_m1_f5fbff" android:layout_width="match_parent" android:layout_height="wrap_content"/> From 69e90738919707ddafa29de53d3e142611de5301 Mon Sep 17 00:00:00 2001 From: yangyakun Date: Wed, 22 Feb 2023 15:42:51 +0800 Subject: [PATCH 03/10] =?UTF-8?q?[m1]=20[1.0.2]=20[=E6=9A=96=E9=A3=8E?= =?UTF-8?q?=E6=9C=BA=E8=B6=85=E6=97=B6=E6=97=B6=E9=97=B4=E5=8F=98=E6=9B=B4?= =?UTF-8?q?]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../presenter/BusPassengerFunctionSoftPresenter.kt | 10 +++++----- 1 file changed, 5 insertions(+), 5 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 333fd42640..5509d06e44 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 @@ -149,7 +149,7 @@ class BusPassengerFunctionSoftPresenter(view: BusPassengerFunctionSoftFragment?) CallerLogger.d(SceneConstant.M_BUS_P + TAG, "关闭空调") CallerAutoPilotControlManager.sendRoboBusJinlvM1AirConditionerCmd(2,0,0,0) disposeSubscribe(airconditionDisposable) - airconditionDisposable = createSubscribe(2000){ + airconditionDisposable = createSubscribe(5000){ if (OCHM1LightAirconditionDoorStatusManager.airconditionStatus.isOpen) { ToastUtils.showShort("空调操作未生效,请稍后重试吧~") } @@ -162,10 +162,10 @@ class BusPassengerFunctionSoftPresenter(view: BusPassengerFunctionSoftFragment?) CallerLogger.d(SceneConstant.M_BUS_P + TAG, "打开暖风机、档位${windSpeedCmd}") CallerAutoPilotControlManager.sendRoboBusJinlvM1HeaderCmd(1,windSpeedCmd) disposeSubscribe(heaterDisposable) - heaterDisposable = createSubscribe(2000){ + heaterDisposable = createSubscribe(5000){ if (!OCHM1LightAirconditionDoorStatusManager.heaterStatue.isOpen&& OCHM1LightAirconditionDoorStatusManager.heaterStatue.windSpeed!=windSpeedCmd) { - ToastUtils.showShort("操作未生效,请稍后重试吧~") + ToastUtils.showShort("暖风机操作未生效,请稍后重试吧~") } } } @@ -174,9 +174,9 @@ class BusPassengerFunctionSoftPresenter(view: BusPassengerFunctionSoftFragment?) CallerLogger.d(SceneConstant.M_BUS_P + TAG, "关闭暖风机") CallerAutoPilotControlManager.sendRoboBusJinlvM1HeaderCmd(2,0) disposeSubscribe(heaterDisposable) - heaterDisposable = createSubscribe(2000){ + heaterDisposable = createSubscribe(5000){ if (!OCHM1LightAirconditionDoorStatusManager.heaterStatue.isOpen) { - ToastUtils.showShort("操作未生效,请稍后重试吧~") + ToastUtils.showShort("暖风机操作未生效,请稍后重试吧~") } } } From 5d3c974fbbe3ae0b228947f8dba5609d987add72 Mon Sep 17 00:00:00 2001 From: yangyakun Date: Wed, 22 Feb 2023 17:31:49 +0800 Subject: [PATCH 04/10] =?UTF-8?q?[m1]=20[1.0.2]=20[=E4=B8=8D=E5=9C=A8?= =?UTF-8?q?=E5=88=A4=E6=96=AD=E9=80=89=E4=B8=AD=E7=8A=B6=E6=80=81]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ui/BusPassengerFunctionSoftFragment.kt | 26 +++++++------------ 1 file changed, 10 insertions(+), 16 deletions(-) diff --git a/OCH/mogo-och-bus-passenger/src/m1/java/com/mogo/och/bus/passenger/ui/BusPassengerFunctionSoftFragment.kt b/OCH/mogo-och-bus-passenger/src/m1/java/com/mogo/och/bus/passenger/ui/BusPassengerFunctionSoftFragment.kt index 081bf8dcfd..7609d3c5b6 100644 --- a/OCH/mogo-och-bus-passenger/src/m1/java/com/mogo/och/bus/passenger/ui/BusPassengerFunctionSoftFragment.kt +++ b/OCH/mogo-och-bus-passenger/src/m1/java/com/mogo/och/bus/passenger/ui/BusPassengerFunctionSoftFragment.kt @@ -106,24 +106,18 @@ class BusPassengerFunctionSoftFragment : if(!buttonView.isPressed){ return@setOnCheckedChangeListener } - if(isChecked){ - tv_aircondition_switch.setText("关闭空调") - }else{ - tv_aircondition_switch.setText("打开空调") - } SoundPoolHelper.getSoundPoolHelper().playSoundWithRedId(context, R.raw.bus_di) - if (rg_setting_pattern.checkedRadioButtonId == R.id.rb_pattern_heating) { - if (isChecked) {// 打开暖风机 - openHeater() - } else {// 关闭暖风机 - closeHeater() - } - } else { - if (isChecked) {// 打开空调 - openAircondition() - } else {//关闭空调 - closeAircondition() + if(isChecked){//打开 + tv_aircondition_switch.setText("关闭空调") + if (rg_setting_pattern.checkedRadioButtonId == R.id.rb_pattern_heating) { + openHeater()// 打开暖风机 + } else { + openAircondition()// 打开空调 } + }else{// 关闭 + tv_aircondition_switch.setText("打开空调") + closeHeater()// 关闭暖风机 + closeAircondition()//关闭空调 } } // 模式调节 From 1a8d42024f25fbaf02ee19fce7f5009acc99a287 Mon Sep 17 00:00:00 2001 From: yangyakun Date: Wed, 22 Feb 2023 21:31:38 +0800 Subject: [PATCH 05/10] =?UTF-8?q?[m1]=20[1.0.2]=20[=E6=B7=BB=E5=8A=A0loadi?= =?UTF-8?q?ng]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ui/BusPassengerFunctionSoftFragment.kt | 28 ++++++++++++++++++ .../src/m1/res/anim/bus_p_loading_rotate.xml | 8 +++++ .../m1/res/drawable-nodpi/bus_p_loading.png | Bin 0 -> 2560 bytes 3 files changed, 36 insertions(+) create mode 100644 OCH/mogo-och-bus-passenger/src/m1/res/anim/bus_p_loading_rotate.xml create mode 100644 OCH/mogo-och-bus-passenger/src/m1/res/drawable-nodpi/bus_p_loading.png diff --git a/OCH/mogo-och-bus-passenger/src/m1/java/com/mogo/och/bus/passenger/ui/BusPassengerFunctionSoftFragment.kt b/OCH/mogo-och-bus-passenger/src/m1/java/com/mogo/och/bus/passenger/ui/BusPassengerFunctionSoftFragment.kt index 7609d3c5b6..c68675ac85 100644 --- a/OCH/mogo-och-bus-passenger/src/m1/java/com/mogo/och/bus/passenger/ui/BusPassengerFunctionSoftFragment.kt +++ b/OCH/mogo-och-bus-passenger/src/m1/java/com/mogo/och/bus/passenger/ui/BusPassengerFunctionSoftFragment.kt @@ -10,6 +10,9 @@ import android.media.AudioManager import android.os.Bundle import android.view.Gravity import android.view.View +import android.view.animation.Animation +import android.view.animation.AnimationUtils +import android.view.animation.LinearInterpolator import android.widget.RadioButton import android.widget.SeekBar import android.widget.SeekBar.OnSeekBarChangeListener @@ -39,6 +42,7 @@ import kotlinx.android.synthetic.m1.bus_p_function_setting_soft_fragment.* import me.jessyan.autosize.utils.AutoSizeUtils import java.util.concurrent.TimeUnit + /** * @author: yangyakun * @date: 2023/1/28 @@ -55,8 +59,14 @@ class BusPassengerFunctionSoftFragment : private var subscribeLightTop1: Disposable? = null private var subscribeLightTop2: Disposable? = null private var subscribeAtmosphere: Disposable? = null + private var subscribeAnimator: Disposable? = null private var animator1: ObjectAnimator? = null + private val loadingAni = ObjectAnimator.ofFloat(iv_loading, "rotation", 0f, 90f ,180f, 270f, 360f).apply { + repeatCount = -1 + interpolator = LinearInterpolator() + duration = 1000 + } override fun initViews() { @@ -66,16 +76,21 @@ class BusPassengerFunctionSoftFragment : g_aircondition_setting.visibility = View.VISIBLE g_light_setting.visibility = View.GONE g_voice_setting.visibility = View.GONE + if(loadingAni.isRunning){ + iv_loading.visibility = View.VISIBLE + } } R.id.tv_setting_lighting -> { g_light_setting.visibility = View.VISIBLE g_voice_setting.visibility = View.GONE g_aircondition_setting.visibility = View.GONE + iv_loading.visibility = View.GONE } R.id.tv_setting_voice -> { g_voice_setting.visibility = View.VISIBLE g_aircondition_setting.visibility = View.GONE g_light_setting.visibility = View.GONE + iv_loading.visibility = View.GONE } else -> {} } @@ -100,6 +115,18 @@ class BusPassengerFunctionSoftFragment : } } + fun showAni(){ + iv_loading.visibility = View.VISIBLE + loadingAni.start() + g_aircondition_setting.visibility = View.GONE + subscribeAnimator = Observable.timer(5000, TimeUnit.MILLISECONDS) + .observeOn(AndroidSchedulers.mainThread()) + .subscribe { + loadingAni.cancel() + iv_loading.visibility = View.GONE + g_aircondition_setting.visibility = View.VISIBLE + } + } private fun setAirconditionListener() { // 开关空调或暖风机 tv_aircondition_switch.setOnCheckedChangeListener { buttonView, isChecked -> @@ -114,6 +141,7 @@ class BusPassengerFunctionSoftFragment : } else { openAircondition()// 打开空调 } + showAni() }else{// 关闭 tv_aircondition_switch.setText("打开空调") closeHeater()// 关闭暖风机 diff --git a/OCH/mogo-och-bus-passenger/src/m1/res/anim/bus_p_loading_rotate.xml b/OCH/mogo-och-bus-passenger/src/m1/res/anim/bus_p_loading_rotate.xml new file mode 100644 index 0000000000..a0d7903789 --- /dev/null +++ b/OCH/mogo-och-bus-passenger/src/m1/res/anim/bus_p_loading_rotate.xml @@ -0,0 +1,8 @@ + + \ No newline at end of file diff --git a/OCH/mogo-och-bus-passenger/src/m1/res/drawable-nodpi/bus_p_loading.png b/OCH/mogo-och-bus-passenger/src/m1/res/drawable-nodpi/bus_p_loading.png new file mode 100644 index 0000000000000000000000000000000000000000..ca42ea6abbec17ebeb3aa20400f96c1fdf45c095 GIT binary patch literal 2560 zcmV+b3jg(qP)Px#L}ge>W=%~1DgXcg2mk?xX#fNO00031000^Q000001E2u_0{{R30RRC20H6W@ z1ONa40RR91N1y`$1ONa40RR91NdN!<0Bh4+iU0r!YDq*vRCodHTzzm<)fGSI?QXI_ z#Y6&$It9io5fV&H(-x`iKw7E{P8t6w)}bXsizc9T94Ku^`$3?cehhw1og${rBpC-s z8=bM!I!;khtJ5liPy-E+>=F~ilAwGDD@k_W?eA{golW+A-1pecZkT;DJMZ0d&pG#; z-@BjZ-nT?KbgdA=Q#ByUt{oJY<$_t93r3Wm5I4e(Uyz`BK~x}Zf?@r5-cejizuL?1t%axp%|cF1B49#Ml%9{nSz38b!Y~^X_TKyT2{e9jd@H6TC3pT1+SNCkCgBs z1>Ur=7{0BvX}3@`=Y;sCA}~^mKN6uf*(X`3OnX+=z=;w);Lw`|@1CR;4rMNiJuBc; zoD^51kEwQSxlYR*%Upy&R=|lyX_gzC(Q(gqBj;8oE8uuM6merP3mS1F=T^q+MzG?r zD2ZO6WiYl9!>k`oq+e*XGgQr;D*Chn3R0AGv*FuR2h$PLybNSG8p`X0@SW| z;WK73W9dqW!uVBAfRTluxvY`~jxBI(x~G(%^l4Nj!NhML1O~vsaw&~gFn9r!JG%sxRd&%#2)%D7cz8M=2ajzn zv(ppLmoH_`52!4jPQDLCs1)gQ$uzTPrJ94rRBWceiXK7#W0jw&y!o5SCv=l8U_@~M zfN@ITpw*l1CCePxL?aqwCS`Dee!+ljNKyg^&FT$9X)7Yr(IeOL2UaYZ z%425P+ohDv8i}iPl1*6YQUXW#s2u<~n({;O6G|3jh^eQQ2mM|;s`)4^mn#74?DQh) zdaaF>YYu!?yD*&p4x`pjmAIJ>VMzGmdo_Gsi9bh~lxmK&{d+ZZKf1W5Z2drULSOT( zi4KhPQ@Q5EK`DPvG+`vzg!Gkhn!LxF9aF2XfbKgqk3UMzo2bu@!I6$G7Q*{MCw(QV zQzcN5tMa}n8okpSBalZRkHEx4AY~{IJS@JTM`;6s=ZoNyT=t*A z!gC*as5P{K?I(c~69+@96X4W6E_|oY;-mx7eE`Ea&cpOVp@;75TF)OEYP-aU32@4{ zigtj~VCx@KudkS@53k`*Yq4jzu19RnxupjfW!^p`l% z?v8L~OK>AM+41Fa{^Dlg{qQI)K&YWAZYTVTV7C8uPdgu!G);yS0nDRu29-N@AsQ4FM6`l(36c2}ZPHsvriw7lC?Fasno0xzdYC_r z>q&sK@F6j2FiO9{fq{E55lYbGjPefR>sVKO|L~9bXfpj$eNF+P;vw-h#D+J*VT6il zDj0^b=d%x0u(f9cwa5*#OBD=9e#zS8NFdLgM<9Mq89Ox zO3aD;_>`sZiplh5N74jJRZlMSIR>Y`QLKbRTM#5GPj(FRpD=*h?)TH?7a!%b$$1m? zSs5G|G5mTHZO6UQ+F9ZI4LBl9G!GNl5=>p+$Jbi#23xsbwPa;* z>hBc46eKpQDdzpNucn1<&FZJ9)by%xUAImYhd-qsVs-uHWC=JM1yCKex6soax3S@w z!DN1=!%IuoirEnQS+bz@v$($ZINfc{lbKu@-VBH7{;|Nw(y;FFAj)_9-WTXLmC}{K z8P;hvY7G{yj;^fiPV5NLGOP(>0dg~I(Zs$}(SQ%)Y%V2mfc7FAJ*nA3%(=Nyj5__5 z%9MTz+De_BR#}508rkliD1n2*MM#tfZz!WaTPxGdfY?))l1ktIL!nl@#s>z*N-*s}SAWk~ zvQ-)p{HJ7)+KMNhcTJevjSA5f5;`4ap%OP9^nqR&ZG=-hJ{>1-`^Vr?X*NA`^p>8|A zL_X8A0LOOgD8ZkG2ZOh7uXX3P*y8Pv_MGM%T7+tB7dJ`b7%{I;N{-8;Qiq%gOQNj) z#ayg>r~GL!I&0uyLIgOsEyT!{J4TN++EFc(on9U3OV<|YI!!Q(fL9@bspTt=L{LgiTFQN WIIpd9g&i0G0000 Date: Thu, 23 Feb 2023 09:45:16 +0800 Subject: [PATCH 06/10] =?UTF-8?q?[m1]=20[1.0.2]=20[=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E5=8A=A8=E7=94=BB]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../passenger/ui/BusPassengerFunctionSoftFragment.kt | 7 ++++++- .../layout/bus_p_function_setting_soft_fragment.xml | 11 +++++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/OCH/mogo-och-bus-passenger/src/m1/java/com/mogo/och/bus/passenger/ui/BusPassengerFunctionSoftFragment.kt b/OCH/mogo-och-bus-passenger/src/m1/java/com/mogo/och/bus/passenger/ui/BusPassengerFunctionSoftFragment.kt index c68675ac85..7b62e380f0 100644 --- a/OCH/mogo-och-bus-passenger/src/m1/java/com/mogo/och/bus/passenger/ui/BusPassengerFunctionSoftFragment.kt +++ b/OCH/mogo-och-bus-passenger/src/m1/java/com/mogo/och/bus/passenger/ui/BusPassengerFunctionSoftFragment.kt @@ -117,6 +117,7 @@ class BusPassengerFunctionSoftFragment : fun showAni(){ iv_loading.visibility = View.VISIBLE + loadingAni.target = iv_loading loadingAni.start() g_aircondition_setting.visibility = View.GONE subscribeAnimator = Observable.timer(5000, TimeUnit.MILLISECONDS) @@ -124,7 +125,9 @@ class BusPassengerFunctionSoftFragment : .subscribe { loadingAni.cancel() iv_loading.visibility = View.GONE - g_aircondition_setting.visibility = View.VISIBLE + if(tv_setting_aircondition.isChecked){ + g_aircondition_setting.visibility = View.VISIBLE + } } } private fun setAirconditionListener() { @@ -625,6 +628,8 @@ class BusPassengerFunctionSoftFragment : mPresenter?.disposeSubscribe(subscribeLightTop1) mPresenter?.disposeSubscribe(subscribeLightTop2) mPresenter?.disposeSubscribe(subscribeAtmosphere) + mPresenter?.disposeSubscribe(subscribeAnimator) + super.onDestroy() } diff --git a/OCH/mogo-och-bus-passenger/src/m1/res/layout/bus_p_function_setting_soft_fragment.xml b/OCH/mogo-och-bus-passenger/src/m1/res/layout/bus_p_function_setting_soft_fragment.xml index 58b2aa14d7..47d7a64006 100644 --- a/OCH/mogo-och-bus-passenger/src/m1/res/layout/bus_p_function_setting_soft_fragment.xml +++ b/OCH/mogo-och-bus-passenger/src/m1/res/layout/bus_p_function_setting_soft_fragment.xml @@ -287,6 +287,17 @@ android:textSize="@dimen/dp_24" /> + + Date: Thu, 23 Feb 2023 10:39:59 +0800 Subject: [PATCH 07/10] =?UTF-8?q?[m1]=20[1.0.2]=20[=E6=B7=BB=E5=8A=A0loadi?= =?UTF-8?q?ng=20=E5=AF=BC=E8=87=B4=E7=9A=84=E9=A1=B5=E9=9D=A2=E6=B7=B7?= =?UTF-8?q?=E4=B9=B1]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ui/BusPassengerFunctionSoftFragment.kt | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/OCH/mogo-och-bus-passenger/src/m1/java/com/mogo/och/bus/passenger/ui/BusPassengerFunctionSoftFragment.kt b/OCH/mogo-och-bus-passenger/src/m1/java/com/mogo/och/bus/passenger/ui/BusPassengerFunctionSoftFragment.kt index 7b62e380f0..8f7137cde6 100644 --- a/OCH/mogo-och-bus-passenger/src/m1/java/com/mogo/och/bus/passenger/ui/BusPassengerFunctionSoftFragment.kt +++ b/OCH/mogo-och-bus-passenger/src/m1/java/com/mogo/och/bus/passenger/ui/BusPassengerFunctionSoftFragment.kt @@ -73,11 +73,13 @@ class BusPassengerFunctionSoftFragment : rg_select_function.setOnCheckedChangeListener { group, checkedId -> when (checkedId) { R.id.tv_setting_aircondition -> { - g_aircondition_setting.visibility = View.VISIBLE g_light_setting.visibility = View.GONE g_voice_setting.visibility = View.GONE if(loadingAni.isRunning){ iv_loading.visibility = View.VISIBLE + g_aircondition_setting.visibility = View.GONE + }else{ + g_aircondition_setting.visibility = View.VISIBLE } } R.id.tv_setting_lighting -> { @@ -94,6 +96,9 @@ class BusPassengerFunctionSoftFragment : } else -> {} } + if(rb_pattern_heating.isChecked){ + iv_temperature_select.visibility = View.GONE + } } rg_select_function.check(R.id.tv_setting_aircondition) setAirconditionListener() @@ -127,6 +132,9 @@ class BusPassengerFunctionSoftFragment : iv_loading.visibility = View.GONE if(tv_setting_aircondition.isChecked){ g_aircondition_setting.visibility = View.VISIBLE + if(rb_pattern_heating.isChecked){ + iv_temperature_select.visibility = View.GONE + } } } } @@ -187,6 +195,9 @@ class BusPassengerFunctionSoftFragment : openAircondition() } } + if(tv_aircondition_switch.isChecked) { + showAni() + } } // 风速调节 From 1784fcccbcca3e021fbe925c0d1df8a799c471bd Mon Sep 17 00:00:00 2001 From: yangyakun Date: Thu, 23 Feb 2023 11:28:01 +0800 Subject: [PATCH 08/10] =?UTF-8?q?[m1]=20[1.0.2]=20[=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E9=A2=91=E7=8E=87=E9=99=90=E5=88=B6=E3=80=81=E5=88=87=E6=8D=A2?= =?UTF-8?q?=E4=B8=BB=E7=BA=BF=E7=A8=8B]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../och/bus/passenger/view/statusbar/StatusBarView.kt | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/OCH/mogo-och-bus-passenger/src/m1/java/com/mogo/och/bus/passenger/view/statusbar/StatusBarView.kt b/OCH/mogo-och-bus-passenger/src/m1/java/com/mogo/och/bus/passenger/view/statusbar/StatusBarView.kt index e71d7625cc..8808463784 100644 --- a/OCH/mogo-och-bus-passenger/src/m1/java/com/mogo/och/bus/passenger/view/statusbar/StatusBarView.kt +++ b/OCH/mogo-och-bus-passenger/src/m1/java/com/mogo/och/bus/passenger/view/statusbar/StatusBarView.kt @@ -18,6 +18,7 @@ import com.mogo.eagle.core.function.call.devatools.CallerDevaToolsManager import com.mogo.eagle.core.function.call.hmi.CallerHmiViewControlListenerManager import com.mogo.eagle.core.function.call.setting.CallerSkinModeListenerManager import com.mogo.eagle.core.function.hmi.ui.widget.DemoModeView +import com.mogo.eagle.core.utilcode.util.UiThreadHandler import com.mogo.och.bus.passenger.R import kotlinx.android.synthetic.m1.bus_p_m1_view_status_bar.view.* import me.jessyan.autosize.utils.AutoSizeUtils @@ -47,6 +48,7 @@ class StatusBarView @JvmOverloads constructor( } //添加view控制 CallerHmiViewControlListenerManager.addListener(TAG,this) + CallerHmiViewControlListenerManager.setListenerHz(TAG,5) // 添加换肤监听 CallerSkinModeListenerManager.addListener(TAG, this) @@ -82,9 +84,11 @@ class StatusBarView @JvmOverloads constructor( } override fun onBatteryManagementSystemStates(states: ChassisStatesOuterClass.BMSSystemStates) { - val bmsSoc = states.bmsSoc - progress.progress = bmsSoc.toInt() - tv_power_cos.text = "${bmsSoc.roundToInt()}%" + UiThreadHandler.post { + val bmsSoc = states.bmsSoc + progress.progress = bmsSoc.toInt() + tv_power_cos.text = "${bmsSoc.roundToInt()}%" + } } } From e892bbdbab01ec80e156de1254479b4359c4c8b6 Mon Sep 17 00:00:00 2001 From: yangyakun Date: Thu, 23 Feb 2023 14:43:20 +0800 Subject: [PATCH 09/10] =?UTF-8?q?[m1]=20[1.0.2]=20[=E7=A9=BA=E8=B0=83?= =?UTF-8?q?=E5=92=8C=E6=9A=96=E9=A3=8E=E6=9C=BA=E7=AD=89=E5=BE=85=E6=97=B6?= =?UTF-8?q?=E9=97=B4=E6=94=BE=E5=A4=A7=E5=88=B015s]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../presenter/BusPassengerFunctionSoftPresenter.kt | 12 ++++++------ .../passenger/ui/BusPassengerFunctionSoftFragment.kt | 2 +- 2 files changed, 7 insertions(+), 7 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 5509d06e44..cfb76d85a3 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 @@ -136,7 +136,7 @@ class BusPassengerFunctionSoftPresenter(view: BusPassengerFunctionSoftFragment?) "打开空调,模式$modeCmd--档位${windSpeedCmd}--温度:$temperatureCmd") CallerAutoPilotControlManager.sendRoboBusJinlvM1AirConditionerCmd(1,modeCmd,windSpeedCmd,temperatureCmd) disposeSubscribe(airconditionDisposable) - airconditionDisposable = createSubscribe(5000){ + airconditionDisposable = createSubscribe(15000){ if (!OCHM1LightAirconditionDoorStatusManager.airconditionStatus.isOpen&& OCHM1LightAirconditionDoorStatusManager.airconditionStatus.windSpeed!=windSpeedCmd&& OCHM1LightAirconditionDoorStatusManager.airconditionStatus.temperature!=temperatureCmd&& @@ -149,7 +149,7 @@ class BusPassengerFunctionSoftPresenter(view: BusPassengerFunctionSoftFragment?) CallerLogger.d(SceneConstant.M_BUS_P + TAG, "关闭空调") CallerAutoPilotControlManager.sendRoboBusJinlvM1AirConditionerCmd(2,0,0,0) disposeSubscribe(airconditionDisposable) - airconditionDisposable = createSubscribe(5000){ + airconditionDisposable = createSubscribe(15000){ if (OCHM1LightAirconditionDoorStatusManager.airconditionStatus.isOpen) { ToastUtils.showShort("空调操作未生效,请稍后重试吧~") } @@ -162,7 +162,7 @@ class BusPassengerFunctionSoftPresenter(view: BusPassengerFunctionSoftFragment?) CallerLogger.d(SceneConstant.M_BUS_P + TAG, "打开暖风机、档位${windSpeedCmd}") CallerAutoPilotControlManager.sendRoboBusJinlvM1HeaderCmd(1,windSpeedCmd) disposeSubscribe(heaterDisposable) - heaterDisposable = createSubscribe(5000){ + heaterDisposable = createSubscribe(15000){ if (!OCHM1LightAirconditionDoorStatusManager.heaterStatue.isOpen&& OCHM1LightAirconditionDoorStatusManager.heaterStatue.windSpeed!=windSpeedCmd) { ToastUtils.showShort("暖风机操作未生效,请稍后重试吧~") @@ -174,9 +174,9 @@ class BusPassengerFunctionSoftPresenter(view: BusPassengerFunctionSoftFragment?) CallerLogger.d(SceneConstant.M_BUS_P + TAG, "关闭暖风机") CallerAutoPilotControlManager.sendRoboBusJinlvM1HeaderCmd(2,0) disposeSubscribe(heaterDisposable) - heaterDisposable = createSubscribe(5000){ - if (!OCHM1LightAirconditionDoorStatusManager.heaterStatue.isOpen) { - ToastUtils.showShort("暖风机操作未生效,请稍后重试吧~") + heaterDisposable = createSubscribe(15000){ + if (OCHM1LightAirconditionDoorStatusManager.heaterStatue.isOpen) { + ToastUtils.showShort("暖风机操作未生效,请稍后重试吧~")//还是开着的 } } } diff --git a/OCH/mogo-och-bus-passenger/src/m1/java/com/mogo/och/bus/passenger/ui/BusPassengerFunctionSoftFragment.kt b/OCH/mogo-och-bus-passenger/src/m1/java/com/mogo/och/bus/passenger/ui/BusPassengerFunctionSoftFragment.kt index 8f7137cde6..04359a9e16 100644 --- a/OCH/mogo-och-bus-passenger/src/m1/java/com/mogo/och/bus/passenger/ui/BusPassengerFunctionSoftFragment.kt +++ b/OCH/mogo-och-bus-passenger/src/m1/java/com/mogo/och/bus/passenger/ui/BusPassengerFunctionSoftFragment.kt @@ -125,7 +125,7 @@ class BusPassengerFunctionSoftFragment : loadingAni.target = iv_loading loadingAni.start() g_aircondition_setting.visibility = View.GONE - subscribeAnimator = Observable.timer(5000, TimeUnit.MILLISECONDS) + subscribeAnimator = Observable.timer(15000, TimeUnit.MILLISECONDS) .observeOn(AndroidSchedulers.mainThread()) .subscribe { loadingAni.cancel() From 0a9f7cf7484b437b11bcaafad8666f52950c803d Mon Sep 17 00:00:00 2001 From: yangyakun Date: Thu, 23 Feb 2023 14:47:54 +0800 Subject: [PATCH 10/10] =?UTF-8?q?[m1]=20[1.0.2]=20[=E7=A9=BA=E8=B0=83?= =?UTF-8?q?=E5=92=8C=E6=9A=96=E9=A3=8E=E6=9C=BA=E7=AD=89=E5=BE=85=E6=97=B6?= =?UTF-8?q?=E9=97=B4=E7=BC=A9=E5=B0=8F=E5=88=B010s]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../presenter/BusPassengerFunctionSoftPresenter.kt | 8 ++++---- .../bus/passenger/ui/BusPassengerFunctionSoftFragment.kt | 2 +- 2 files changed, 5 insertions(+), 5 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 cfb76d85a3..d69b123522 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 @@ -136,7 +136,7 @@ class BusPassengerFunctionSoftPresenter(view: BusPassengerFunctionSoftFragment?) "打开空调,模式$modeCmd--档位${windSpeedCmd}--温度:$temperatureCmd") CallerAutoPilotControlManager.sendRoboBusJinlvM1AirConditionerCmd(1,modeCmd,windSpeedCmd,temperatureCmd) disposeSubscribe(airconditionDisposable) - airconditionDisposable = createSubscribe(15000){ + airconditionDisposable = createSubscribe(10000){ if (!OCHM1LightAirconditionDoorStatusManager.airconditionStatus.isOpen&& OCHM1LightAirconditionDoorStatusManager.airconditionStatus.windSpeed!=windSpeedCmd&& OCHM1LightAirconditionDoorStatusManager.airconditionStatus.temperature!=temperatureCmd&& @@ -149,7 +149,7 @@ class BusPassengerFunctionSoftPresenter(view: BusPassengerFunctionSoftFragment?) CallerLogger.d(SceneConstant.M_BUS_P + TAG, "关闭空调") CallerAutoPilotControlManager.sendRoboBusJinlvM1AirConditionerCmd(2,0,0,0) disposeSubscribe(airconditionDisposable) - airconditionDisposable = createSubscribe(15000){ + airconditionDisposable = createSubscribe(10000){ if (OCHM1LightAirconditionDoorStatusManager.airconditionStatus.isOpen) { ToastUtils.showShort("空调操作未生效,请稍后重试吧~") } @@ -162,7 +162,7 @@ class BusPassengerFunctionSoftPresenter(view: BusPassengerFunctionSoftFragment?) CallerLogger.d(SceneConstant.M_BUS_P + TAG, "打开暖风机、档位${windSpeedCmd}") CallerAutoPilotControlManager.sendRoboBusJinlvM1HeaderCmd(1,windSpeedCmd) disposeSubscribe(heaterDisposable) - heaterDisposable = createSubscribe(15000){ + heaterDisposable = createSubscribe(10000){ if (!OCHM1LightAirconditionDoorStatusManager.heaterStatue.isOpen&& OCHM1LightAirconditionDoorStatusManager.heaterStatue.windSpeed!=windSpeedCmd) { ToastUtils.showShort("暖风机操作未生效,请稍后重试吧~") @@ -174,7 +174,7 @@ class BusPassengerFunctionSoftPresenter(view: BusPassengerFunctionSoftFragment?) CallerLogger.d(SceneConstant.M_BUS_P + TAG, "关闭暖风机") CallerAutoPilotControlManager.sendRoboBusJinlvM1HeaderCmd(2,0) disposeSubscribe(heaterDisposable) - heaterDisposable = createSubscribe(15000){ + heaterDisposable = createSubscribe(10000){ if (OCHM1LightAirconditionDoorStatusManager.heaterStatue.isOpen) { ToastUtils.showShort("暖风机操作未生效,请稍后重试吧~")//还是开着的 } diff --git a/OCH/mogo-och-bus-passenger/src/m1/java/com/mogo/och/bus/passenger/ui/BusPassengerFunctionSoftFragment.kt b/OCH/mogo-och-bus-passenger/src/m1/java/com/mogo/och/bus/passenger/ui/BusPassengerFunctionSoftFragment.kt index 04359a9e16..5538749c31 100644 --- a/OCH/mogo-och-bus-passenger/src/m1/java/com/mogo/och/bus/passenger/ui/BusPassengerFunctionSoftFragment.kt +++ b/OCH/mogo-och-bus-passenger/src/m1/java/com/mogo/och/bus/passenger/ui/BusPassengerFunctionSoftFragment.kt @@ -125,7 +125,7 @@ class BusPassengerFunctionSoftFragment : loadingAni.target = iv_loading loadingAni.start() g_aircondition_setting.visibility = View.GONE - subscribeAnimator = Observable.timer(15000, TimeUnit.MILLISECONDS) + subscribeAnimator = Observable.timer(10000, TimeUnit.MILLISECONDS) .observeOn(AndroidSchedulers.mainThread()) .subscribe { loadingAni.cancel()