[m1]
[1.0.0] [和硬件交互2s超时、地图样式]
This commit is contained in:
BIN
OCH/mogo-och-bus-passenger/src/m1/assets/m1_style.data
Normal file
BIN
OCH/mogo-och-bus-passenger/src/m1/assets/m1_style.data
Normal file
Binary file not shown.
BIN
OCH/mogo-och-bus-passenger/src/m1/assets/m1_style_extra.data
Normal file
BIN
OCH/mogo-och-bus-passenger/src/m1/assets/m1_style_extra.data
Normal file
Binary file not shown.
@@ -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<BusPassengerStation> getSites() {
|
||||
return sites;
|
||||
}
|
||||
|
||||
@@ -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<MogoLocation> = 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
|
||||
// )
|
||||
// }
|
||||
}
|
||||
@@ -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<V : IView?>(view: V) :
|
||||
Presenter<V>(view)
|
||||
Presenter<V>(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
|
||||
}
|
||||
}
|
||||
@@ -16,80 +16,61 @@ class BusPassengerFunctionDevicePresenter(view: BusPassengerFunctionDeviceFragme
|
||||
BusBasePassengerFunctionDevicePresenter<BusPassengerFunctionDeviceFragment?>(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) {
|
||||
|
||||
@@ -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<BusPassengerFunctionSoftFragment?>(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("操作未生效,请稍后重试吧~")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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)
|
||||
}
|
||||
|
||||
|
||||
@@ -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 -> {
|
||||
|
||||
@@ -51,6 +51,7 @@ class BusPassengerRouteFragment :
|
||||
ToggleDebugView.toggleDebugView.toggle(requireContext())
|
||||
true
|
||||
}
|
||||
omvOverMap.hideResetView()
|
||||
}
|
||||
|
||||
private fun openSettingPage(tab:String) {
|
||||
|
||||
@@ -14,6 +14,8 @@
|
||||
app:layout_constraintBottom_toBottomOf="parent"/>
|
||||
<com.mogo.eagle.core.function.view.OverMapView
|
||||
android:id="@+id/omvOverMap"
|
||||
app:mapStylePath="m1_style.data"
|
||||
app:mapStyleExtraPath="m1_style_extra.data"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
@@ -72,7 +74,7 @@
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintBottom_toTopOf="@+id/tv_distance_unit"
|
||||
app:layout_constraintVertical_chainStyle="packed"
|
||||
android:text="23.64"
|
||||
android:text="--"
|
||||
android:textSize="@dimen/dp_37"
|
||||
android:textColor="@color/bus_p_m1_203555"
|
||||
android:layout_width="wrap_content"
|
||||
@@ -107,7 +109,7 @@
|
||||
app:layout_constraintVertical_chainStyle="packed"
|
||||
app:layout_constraintBottom_toTopOf="@+id/tv_distance_surplus_time_unit"
|
||||
app:layout_constraintHorizontal_chainStyle="packed"
|
||||
android:text="12"
|
||||
android:text="--"
|
||||
android:textSize="@dimen/dp_37"
|
||||
android:textColor="@color/bus_p_m1_203555"
|
||||
android:layout_width="wrap_content"
|
||||
@@ -141,7 +143,7 @@
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintVertical_chainStyle="packed"
|
||||
android:text="11:48"
|
||||
android:text="--"
|
||||
android:textSize="@dimen/dp_37"
|
||||
android:textColor="@color/bus_p_m1_203555"
|
||||
android:layout_width="wrap_content"
|
||||
|
||||
Reference in New Issue
Block a user