diff --git a/OCH/mogo-och-bus-passenger/src/m1/assets/m1_style.data b/OCH/mogo-och-bus-passenger/src/m1/assets/m1_style.data new file mode 100644 index 0000000000..4e4bb6709d Binary files /dev/null and b/OCH/mogo-och-bus-passenger/src/m1/assets/m1_style.data differ diff --git a/OCH/mogo-och-bus-passenger/src/m1/assets/m1_style_extra.data b/OCH/mogo-och-bus-passenger/src/m1/assets/m1_style_extra.data new file mode 100644 index 0000000000..3ce2c92d11 Binary files /dev/null and b/OCH/mogo-och-bus-passenger/src/m1/assets/m1_style_extra.data differ diff --git a/OCH/mogo-och-bus-passenger/src/m1/java/com/mogo/och/bus/passenger/bean/response/BusPassengerRoutesResult.java b/OCH/mogo-och-bus-passenger/src/m1/java/com/mogo/och/bus/passenger/bean/response/BusPassengerRoutesResult.java index 69bbd34a5d..30d95bdd37 100644 --- a/OCH/mogo-och-bus-passenger/src/m1/java/com/mogo/och/bus/passenger/bean/response/BusPassengerRoutesResult.java +++ b/OCH/mogo-och-bus-passenger/src/m1/java/com/mogo/och/bus/passenger/bean/response/BusPassengerRoutesResult.java @@ -18,6 +18,20 @@ public class BusPassengerRoutesResult { private String runningDur; //运营时间 private long taskTime; //线路时间班次 + //线路轨迹相关字段 + public String csvFileUrl = ""; //轨迹文件下载的cos url,默认“” + public String csvFileMd5 = ""; //轨迹文件md5,默认“” + public String txtFileUrl = ""; //打点文件下载的cos url,默认“” + public String txtFileMd5 = ""; //轨迹文件md5,默认“” + public long contrailSaveTime; //上传轨迹完成时间戳ms:用于MEC本地手动导入轨迹验证时不会被云端轨迹覆盖 + public String carModel = ""; //[optional] 车型号(如红旗H9),默认“”,暂不加入校验逻辑、用于人工排查问题 + public String csvFileUrlDPQP = ""; //轨迹文件下载的cos url,默认“” + public String csvFileMd5DPQP = ""; //轨迹文件md5,默认“” + public String txtFileUrlDPQP = ""; //打点文件下载的cos url,默认“” + public String txtFileMd5DPQP = ""; //轨迹文件md5,默认“” + public long contrailSaveTimeDPQP; //上传轨迹完成时间戳ms:用于MEC本地手动导入轨迹验证时不会被云端轨迹覆盖 + + public List getSites() { return sites; } diff --git a/OCH/mogo-och-bus-passenger/src/m1/java/com/mogo/och/bus/passenger/model/BusPassengerModel.kt b/OCH/mogo-och-bus-passenger/src/m1/java/com/mogo/och/bus/passenger/model/BusPassengerModel.kt index b4376da0f7..ffd5e88188 100644 --- a/OCH/mogo-och-bus-passenger/src/m1/java/com/mogo/och/bus/passenger/model/BusPassengerModel.kt +++ b/OCH/mogo-och-bus-passenger/src/m1/java/com/mogo/och/bus/passenger/model/BusPassengerModel.kt @@ -10,12 +10,16 @@ import com.mogo.commons.AbsMogoApplication import com.mogo.commons.debug.DebugConfig import com.mogo.commons.module.intent.IMogoIntentListener import com.mogo.commons.module.intent.IntentManager +import com.mogo.eagle.core.data.autopilot.AutopilotControlParameters +import com.mogo.eagle.core.data.autopilot.AutopilotControlParameters.AutoPilotLine +import com.mogo.eagle.core.data.autopilot.AutopilotControlParameters.AutoPilotLonLat import com.mogo.eagle.core.data.autopilot.AutopilotStatusInfo import com.mogo.eagle.core.data.config.FunctionBuildConfig import com.mogo.eagle.core.data.map.MogoLocation import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotStatusListener import com.mogo.eagle.core.function.api.autopilot.IMoGoChassisLocationGCJ02Listener import com.mogo.eagle.core.function.api.autopilot.IMoGoPlanningRottingListener +import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotControlManager import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationGCJ02ListenerManager import com.mogo.eagle.core.function.call.autopilot.CallerPlanningRottingListenerManager @@ -39,7 +43,9 @@ import com.mogo.och.bus.passenger.net.BusPassengerServiceManager import com.mogo.och.common.module.biz.network.OchCommonServiceCallback import com.mogo.och.common.module.manager.AbnormalFactorsLoopManager.startLoopAbnormalFactors import com.mogo.och.common.module.manager.AbnormalFactorsLoopManager.stopLoopAbnormalFactors +import com.mogo.och.common.module.manager.OCHAdasAbilityManager import com.mogo.och.common.module.utils.CoordinateCalculateRouteUtil +import com.mogo.och.common.module.utils.PinYinUtil import mogo.telematics.pad.MessagePad import mogo_msg.MogoReportMsg import system_master.SystemStatusInfo @@ -53,6 +59,7 @@ object BusPassengerModel { private const val TAG = "BusPassengerModel" private const val MSG_QUERY_BUS_P_STATION = 1001 + private const val VEHICLE_TYPE = 10 // 线路所有的轨迹点 private val mRoutePoints: MutableList = ArrayList() @@ -97,7 +104,6 @@ object BusPassengerModel { fun init(){ AbsMogoApplication.getApp().also { this.mContext = it } initListeners() - // TODO: 2022/3/31 // 启动轮询查询司机登录状态 queryDriverOperationStatus() // 轮询获取车辆线路信息 @@ -496,4 +502,99 @@ object BusPassengerModel { BusPassengerModelLoopManager.getInstance().stopQueryDriverLineLoop() } } + + +// private fun initAutopilotControlParameters(leaveIndex: Int): AutopilotControlParameters? { +// var currentStation: BusPassengerStation +// var nextStation: BusPassengerStation +// if (leaveIndex < 0) { +// if (mPreRouteIndex + 1 > mStations.size - 1) { +// CallerLogger.e(SceneConstant.M_BUS + TAG, "行程日志-mismatch condition1.") +// return null +// } +// currentStation = mStations[mPreRouteIndex] +// nextStation = mStations[mPreRouteIndex + 1] +// } else { +// if (leaveIndex + 1 > mStations.size - 1) { +// CallerLogger.e(SceneConstant.M_BUS + TAG, "行程日志-mismatch condition2.") +// return null +// } +// currentStation = mStations[leaveIndex] +// nextStation = mStations[leaveIndex + 1] +// } +// val parameters = AutopilotControlParameters() +// routesResult?.let { +// parameters.routeID = it.lineId +// parameters.routeName = it.name +// parameters.startName = PinYinUtil.getPinYinHeadChar(currentStation.name) +// parameters.endName = PinYinUtil.getPinYinHeadChar(nextStation.name) +// parameters.startLatLon = AutoPilotLonLat(currentStation.lat, currentStation.lon) +// parameters.endLatLon = AutoPilotLonLat(nextStation.lat, nextStation.lon) +// parameters.vehicleType = VEHICLE_TYPE +// if (parameters.autoPilotLine == null) { +// parameters.autoPilotLine = AutoPilotLine( +// it.lineId.toLong(), +// it.csvFileUrl, it.csvFileMd5, +// it.txtFileUrl, it.txtFileMd5, +// it.contrailSaveTime, it.carModel, +// it.csvFileUrlDPQP, it.csvFileMd5DPQP, +// it.txtFileUrlDPQP, it.txtFileMd5DPQP, +// it.contrailSaveTimeDPQP +// ) +// } +// } +// +// return parameters +// } +// +// /** +// * 开启自动驾驶 +// * +// * @param isRestart +// */ +// private fun startAutopilot(isRestart: Boolean, leaveIndex: Int) { +// if (!FunctionBuildConfig.isDemoMode && !OCHAdasAbilityManager.getInstance().autopilotAbilityStatus) { +// ToastUtils.showLong( +// OCHAdasAbilityManager.getInstance().autopilotUnAbilityReason + +// ", 请稍候重试" +// ) +// triggerUnableStartAPReasonEvent() +// return +// } +// triggerStartServiceEvent(isRestart, false) +// val parameters = initAutopilotControlParameters(leaveIndex) +// if (null == parameters) { +// CallerLogger.e(SceneConstant.M_BUS + TAG, "行程日志-AutopilotControlParameters is empty.") +// return +// } +// CallerAutoPilotControlManager.startAutoPilot(parameters) +// CallerLogger.d( +// SceneConstant.M_BUS + TAG, +// "行程日志-开启自动驾驶====" + com.elegant.network.utils.GsonUtil.jsonFromObject(parameters) +// + " startLatLon=" + parameters.startName + ",endLatLon=" + parameters.endName + +// "isRestart = " + isRestart +// ) +// } +// fun triggerUnableStartAPReasonEvent() { +// if (mStations == null || mPreRouteIndex >= mStations.size - 1) { +// return +// } +// val currentStation: BusPassengerStation = mStations.get(mPreRouteIndex) +// val nextStation: BusPassengerStation = mStations.get(mPreRouteIndex + 1) +// BusAnalyticsManager.getInstance().triggerUnableStartAPReasonEvent( +// currentStation.getName(), nextStation.getName(), routesResult?.lineId, +// OCHAdasAbilityManager.getInstance().autopilotUnAbilityReason +// ) +// } +// fun triggerStartServiceEvent(isRestart: Boolean, send: Boolean) { +// if (mStations == null || mPreRouteIndex >= mStations.size - 1) { +// return +// } +// val currentStation: BusPassengerStation = mStations.get(mPreRouteIndex) +// val nextStation: BusPassengerStation = mStations.get(mPreRouteIndex + 1) +// BusAnalyticsManager.getInstance().triggerStartAutopilotEvent( +// isRestart, send, +// currentStation.getName(), nextStation.getName(), routesResult?.lineId +// ) +// } } \ No newline at end of file diff --git a/OCH/mogo-och-bus-passenger/src/m1/java/com/mogo/och/bus/passenger/presenter/BusBasePassengerFunctionDevicePresenter.kt b/OCH/mogo-och-bus-passenger/src/m1/java/com/mogo/och/bus/passenger/presenter/BusBasePassengerFunctionDevicePresenter.kt index 949bde9277..b0b02a1b8a 100644 --- a/OCH/mogo-och-bus-passenger/src/m1/java/com/mogo/och/bus/passenger/presenter/BusBasePassengerFunctionDevicePresenter.kt +++ b/OCH/mogo-och-bus-passenger/src/m1/java/com/mogo/och/bus/passenger/presenter/BusBasePassengerFunctionDevicePresenter.kt @@ -2,7 +2,30 @@ package com.mogo.och.bus.passenger.presenter import com.mogo.commons.mvp.IView import com.mogo.commons.mvp.Presenter -import com.mogo.och.bus.passenger.ui.BusPassengerFunctionDeviceFragment +import io.reactivex.Observable +import io.reactivex.android.schedulers.AndroidSchedulers +import io.reactivex.disposables.Disposable +import java.util.concurrent.TimeUnit abstract class BusBasePassengerFunctionDevicePresenter(view: V) : - Presenter(view) \ No newline at end of file + Presenter(view) { + fun disposeSubscribe(subscribe: Disposable?) { + subscribe?.let { + if (!it.isDisposed) { + it.dispose() + } + } + } + + fun createSubscribe(delay: Long=2000, function: () -> Unit): Disposable? { + return Observable.timer(delay, TimeUnit.MILLISECONDS) + .observeOn(AndroidSchedulers.mainThread()) + .subscribe { + function.invoke() + } + } + + companion object{ + const val DEVICE_ACTION_TIMEOUT=2000 + } +} \ No newline at end of file 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 7cdde046fa..6bb3556ce7 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 @@ -16,80 +16,61 @@ class BusPassengerFunctionDevicePresenter(view: BusPassengerFunctionDeviceFragme BusBasePassengerFunctionDevicePresenter(view), OCHM1LightAirconditionDoorStatusManager.OCHM1LightAirconditionDoorCallback { - private var subscribe: Disposable?=null - private var subscribeDoorStatus: Disposable?=null - companion object{ + private var subscribe: Disposable? = null + private var subscribeDoorStatus: Disposable? = null + + companion object { private const val TAG = "BusPassengerFunctionDevicePresenter" } + override fun onCreate(owner: LifecycleOwner) { super.onCreate(owner) - OCHM1LightAirconditionDoorStatusManager.addListener(TAG,this) + OCHM1LightAirconditionDoorStatusManager.addListener(TAG, this) } override fun onDestroy(owner: LifecycleOwner) { super.onDestroy(owner) OCHM1LightAirconditionDoorStatusManager.removeListener(TAG) + disposeSubscribe(subscribe) + disposeSubscribe(subscribeDoorStatus) } override fun onDoorStatusCallback(isOpen: Boolean) { - if(isOpen){ + if (isOpen) { ToastUtils.showShort("已开启车门") - }else{ + } else { ToastUtils.showShort("已关门车门") } } - fun openDoor(){ - subscribe?.let { - if (!it.isDisposed) { - it.dispose() - } + fun openDoor() { + disposeSubscribe(subscribe) + subscribe = createSubscribe(1000) { + AdasManager.getInstance().sendRoboBusJinlvM1FrontDoorCmd(0) } - subscribe = Observable.timer(1000, TimeUnit.MILLISECONDS) - .observeOn(AndroidSchedulers.mainThread()) - .subscribe { - AdasManager.getInstance().sendRoboBusJinlvM1FrontDoorCmd(0) - } AdasManager.getInstance().sendRoboBusJinlvM1FrontDoorCmd(1) - subscribeDoorStatus?.let { - if (!it.isDisposed) { - it.dispose() + disposeSubscribe(subscribeDoorStatus) + subscribeDoorStatus = createSubscribe { + if (!OCHM1LightAirconditionDoorStatusManager.doorStatus.isOpen) { + ToastUtils.showShort("车门无法开启,请使用车内物理按钮") } } - subscribeDoorStatus = Observable.timer(2000, TimeUnit.MILLISECONDS) - .observeOn(AndroidSchedulers.mainThread()) - .subscribe { - if (!OCHM1LightAirconditionDoorStatusManager.doorStatus.isOpen) { - ToastUtils.showShort("车门无法开启,请使用车内物理按钮") - } - } } - fun closeDoor(){ - subscribe?.let { - if (!it.isDisposed) { - it.dispose() - } + fun closeDoor() { + disposeSubscribe(subscribe) + subscribe = createSubscribe(1000) { + AdasManager.getInstance().sendRoboBusJinlvM1FrontDoorCmd(0) } - subscribe = Observable.timer(1000, TimeUnit.MILLISECONDS) - .observeOn(AndroidSchedulers.mainThread()) - .subscribe { - AdasManager.getInstance().sendRoboBusJinlvM1FrontDoorCmd(0) - } AdasManager.getInstance().sendRoboBusJinlvM1FrontDoorCmd(2) - subscribeDoorStatus?.let { - if (!it.isDisposed) { - it.dispose() + disposeSubscribe(subscribeDoorStatus) + subscribeDoorStatus = createSubscribe { + if (OCHM1LightAirconditionDoorStatusManager.doorStatus.isOpen) { + ToastUtils.showShort("车门无法关闭,请使用车内物理按钮") } } - subscribeDoorStatus = Observable.timer(2000, TimeUnit.MILLISECONDS) - .observeOn(AndroidSchedulers.mainThread()) - .subscribe { - if (OCHM1LightAirconditionDoorStatusManager.doorStatus.isOpen) { - ToastUtils.showShort("车门无法关闭,请使用车内物理按钮") - } - } } + // 靠边停车 fun startStopSide() { when (CallerAutoPilotStatusListenerManager.getAutoPilotStatusInfo().state) { 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 e751066beb..75204caf2d 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 @@ -4,9 +4,11 @@ import androidx.lifecycle.LifecycleOwner import com.mogo.commons.mvp.Presenter 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.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?) : BusBasePassengerFunctionDevicePresenter(view), @@ -15,6 +17,10 @@ class BusPassengerFunctionSoftPresenter(view: BusPassengerFunctionSoftFragment?) private const val TAG = "BusPassengerFunctionSoftPresenter" } + private var subscribeLightTop1: Disposable?=null + private var subscribeLightTop2: Disposable?=null + private var subscribeLightAtmosphere: Disposable?=null + override fun onCreate(owner: LifecycleOwner) { super.onCreate(owner) OCHM1LightAirconditionDoorStatusManager.addListener(TAG, this) @@ -95,26 +101,59 @@ class BusPassengerFunctionSoftPresenter(view: BusPassengerFunctionSoftFragment?) fun setLightData1(leftLight: Boolean){ CallerLogger.d(SceneConstant.M_BUS_P + TAG, "顶灯2:$leftLight") + disposeSubscribe(subscribeLightTop1) if(leftLight){ AdasManager.getInstance().sendRoboBusJinlvM1MainLamp1Cmd(1) + subscribeLightTop1 = createSubscribe{ + if (!OCHM1LightAirconditionDoorStatusManager.lightStatus.isOpenLight1) { + ToastUtils.showShort("操作未生效,请稍后重试吧~") + } + } }else{ AdasManager.getInstance().sendRoboBusJinlvM1MainLamp1Cmd(2) + subscribeLightTop1 = createSubscribe{ + if (OCHM1LightAirconditionDoorStatusManager.lightStatus.isOpenLight1) { + ToastUtils.showShort("操作未生效,请稍后重试吧~") + } + } } } fun setLightData2(rightLight: Boolean){ CallerLogger.d(SceneConstant.M_BUS_P + TAG, "顶灯1:$rightLight") + disposeSubscribe(subscribeLightTop2) if(rightLight){ AdasManager.getInstance().sendRoboBusJinlvM1MainLamp2Cmd(1) + subscribeLightTop2 = createSubscribe{ + if (!OCHM1LightAirconditionDoorStatusManager.lightStatus.isOpenLight2) { + ToastUtils.showShort("操作未生效,请稍后重试吧~") + } + } }else{ AdasManager.getInstance().sendRoboBusJinlvM1MainLamp2Cmd(2) + subscribeLightTop2 = createSubscribe{ + if (OCHM1LightAirconditionDoorStatusManager.lightStatus.isOpenLight2) { + ToastUtils.showShort("操作未生效,请稍后重试吧~") + } + } } } fun setAtmosphereLightData2(atmosphereLight: Boolean){ CallerLogger.d(SceneConstant.M_BUS_P + TAG, "氛围灯:$atmosphereLight") + disposeSubscribe(subscribeLightAtmosphere) if (atmosphereLight) { AdasManager.getInstance().sendRoboBusJinlvM1SmallLampCmd(1) + subscribeLightAtmosphere = createSubscribe{ + if (!OCHM1LightAirconditionDoorStatusManager.lightStatus.isOpenatmosphere) { + ToastUtils.showShort("操作未生效,请稍后重试吧~") + } + } } else { AdasManager.getInstance().sendRoboBusJinlvM1SmallLampCmd(2) + subscribeLightAtmosphere = createSubscribe{ + if (OCHM1LightAirconditionDoorStatusManager.lightStatus.isOpenatmosphere) { + ToastUtils.showShort("操作未生效,请稍后重试吧~") + } + } } } } \ No newline at end of file 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 62df50f569..9ad9fdfb8a 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 @@ -69,7 +69,7 @@ class BusPassengerPresenter(view: BusPassengerRouteFragment?) : val beforeTime = Calendar.getInstance() beforeTime.add(Calendar.MINUTE, surplusTime) //到达时间 - val arriveTime = DateTimeUtil.formatCalendarToString(beforeTime, DateTimeUtil.TAXI_HH_mm) + val arriveTime = DateTimeUtil.formatCalendarToString(beforeTime, DateTimeUtil.HH_mm) setDistanceAndTime(dis.toString(),disUnit,surplusTime.toString(),arriveTime) } 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 10608d4807..680746a882 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 @@ -100,23 +100,11 @@ class BusPassengerFunctionSoftFragment : CallerLogger.d(SceneConstant.M_BUS_P + TAG, "调节模式") when (checkedId) { R.id.rb_pattern_heating -> { - if(!rb_pattern_heating.isPressed){ - return@setOnCheckedChangeListener - } SoundPoolHelper.getSoundPoolHelper().playSoundWithRedId(context, R.raw.bus_di) - if (!tv_aircondition_switch.isChecked) { - return@setOnCheckedChangeListener - } openHeater() } R.id.rb_pattern_automatic->{ - if(!rb_pattern_automatic.isPressed){ - return@setOnCheckedChangeListener - } SoundPoolHelper.getSoundPoolHelper().playSoundWithRedId(context, R.raw.bus_di) - if (!tv_aircondition_switch.isChecked) { - return@setOnCheckedChangeListener - } openAircondition() } R.id.rb_pattern_refrigeration->{ @@ -124,9 +112,6 @@ class BusPassengerFunctionSoftFragment : return@setOnCheckedChangeListener } SoundPoolHelper.getSoundPoolHelper().playSoundWithRedId(context, R.raw.bus_di) - if (!tv_aircondition_switch.isChecked) { - return@setOnCheckedChangeListener - } openAircondition() } R.id.rb_pattern_ventilate->{ @@ -134,9 +119,6 @@ class BusPassengerFunctionSoftFragment : return@setOnCheckedChangeListener } SoundPoolHelper.getSoundPoolHelper().playSoundWithRedId(context, R.raw.bus_di) - if (!tv_aircondition_switch.isChecked) { - return@setOnCheckedChangeListener - } openAircondition() } else -> { @@ -166,9 +148,6 @@ class BusPassengerFunctionSoftFragment : else -> {} } SoundPoolHelper.getSoundPoolHelper().playSoundWithRedId(context, R.raw.bus_di) - if (!tv_aircondition_switch.isChecked) { - return@setOnCheckedChangeListener - } if (rg_setting_pattern.checkedRadioButtonId == R.id.rb_pattern_heating) {//暖风机 openHeater() } else { @@ -206,9 +185,6 @@ class BusPassengerFunctionSoftFragment : SoundPoolHelper.getSoundPoolHelper() .playSoundWithRedId(context, R.raw.bus_di) } - if (!tv_aircondition_switch.isChecked) { - return@setOnScrollStopListener - } openAircondition() } @@ -268,6 +244,9 @@ class BusPassengerFunctionSoftFragment : R.id.rb_wind_speed_high -> windSpeedCmd = 3 // 3档 else -> {} } + if (!tv_aircondition_switch.isChecked) { + return + } mPresenter?.openAndSetAircondition(modeCmd, windSpeedCmd, temperatureCmd) } @@ -329,6 +308,9 @@ class BusPassengerFunctionSoftFragment : private fun closeHeater() { CallerLogger.d(SceneConstant.M_BUS_P + TAG, "关闭暖风") heaterAirEnable(true) + if (!tv_aircondition_switch.isChecked) { + return + } mPresenter?.closeHeader() } @@ -348,6 +330,9 @@ class BusPassengerFunctionSoftFragment : private fun openHeater() { CallerLogger.d(SceneConstant.M_BUS_P + TAG, "打开暖风") heaterAirEnable(false) + if (!tv_aircondition_switch.isChecked) { + return + } closeAircondition()//关闭空调 when (rg_setting_windspeed.checkedRadioButtonId) { R.id.rb_wind_speed_low -> { 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/BusPassengerRouteFragment.kt index a0f96fb8d7..43519e473c 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/BusPassengerRouteFragment.kt @@ -51,6 +51,7 @@ class BusPassengerRouteFragment : ToggleDebugView.toggleDebugView.toggle(requireContext()) true } + omvOverMap.hideResetView() } private fun openSettingPage(tab:String) { 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 35d7fe68b6..25a2792236 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 @@ -14,6 +14,8 @@ app:layout_constraintBottom_toBottomOf="parent"/>