[m1]
[v2x+通知]
This commit is contained in:
@@ -20,12 +20,16 @@ import com.mogo.och.bus.passenger.model.CharterPassengerModel
|
|||||||
import com.mogo.och.bus.passenger.model.IOrderStatusChangeListener
|
import com.mogo.och.bus.passenger.model.IOrderStatusChangeListener
|
||||||
import com.mogo.och.bus.passenger.model.OrderStatusEnum
|
import com.mogo.och.bus.passenger.model.OrderStatusEnum
|
||||||
import com.mogo.och.bus.passenger.ui.MainFragment
|
import com.mogo.och.bus.passenger.ui.MainFragment
|
||||||
|
import com.mogo.och.common.module.bean.dpmsg.BaseDPMsg
|
||||||
import com.mogo.och.common.module.bean.dpmsg.ChangeDestMsg
|
import com.mogo.och.common.module.bean.dpmsg.ChangeDestMsg
|
||||||
|
import com.mogo.och.common.module.bean.dpmsg.DPCommonOperationMsg
|
||||||
import com.mogo.och.common.module.bean.dpmsg.DPMsgType
|
import com.mogo.och.common.module.bean.dpmsg.DPMsgType
|
||||||
|
import com.mogo.och.common.module.biz.common.socketmessage.OCHSocketMessageManager
|
||||||
import com.mogo.och.common.module.biz.constant.OchCommonConst
|
import com.mogo.och.common.module.biz.constant.OchCommonConst
|
||||||
import com.mogo.och.common.module.manager.OCHM1LightAirconditionDoorStatusManager
|
import com.mogo.och.common.module.manager.OCHM1LightAirconditionDoorStatusManager
|
||||||
import com.mogo.och.common.module.utils.DateTimeUtil
|
import com.mogo.och.common.module.utils.DateTimeUtil
|
||||||
import com.mogo.och.common.module.utils.NumberFormatUtil
|
import com.mogo.och.common.module.utils.NumberFormatUtil
|
||||||
|
import com.mogo.och.common.module.utils.SoundPoolHelper
|
||||||
import io.reactivex.disposables.Disposable
|
import io.reactivex.disposables.Disposable
|
||||||
import java.util.*
|
import java.util.*
|
||||||
|
|
||||||
@@ -86,21 +90,40 @@ class BusPassengerPresenter(view: MainFragment?) :
|
|||||||
if (type == OchCommonConst.BUSINESS_STRING) {
|
if (type == OchCommonConst.BUSINESS_STRING) {
|
||||||
val msg = GsonUtils.fromJson(
|
val msg = GsonUtils.fromJson(
|
||||||
String(byteArray),
|
String(byteArray),
|
||||||
ChangeDestMsg::class.java
|
BaseDPMsg::class.java
|
||||||
) as ChangeDestMsg
|
) as BaseDPMsg
|
||||||
if (msg.type == DPMsgType.TYPE_OPEN_CLOSE_DOOR.type) {
|
when (msg.type) {
|
||||||
val doorStatus = OCHM1LightAirconditionDoorStatusManager.doorStatus
|
DPMsgType.TYPE_OPEN_CLOSE_DOOR.type -> {
|
||||||
if(doorStatus.isOpen){
|
val doorStatus = OCHM1LightAirconditionDoorStatusManager.doorStatus
|
||||||
closeDoor()
|
if(doorStatus.isOpen){
|
||||||
}else{
|
closeDoor()
|
||||||
openDoor()
|
}else{
|
||||||
|
openDoor()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
DPMsgType.TYPE_COMMON.type -> {
|
||||||
|
val msg = GsonUtils.fromJson(
|
||||||
|
String(byteArray),
|
||||||
|
DPCommonOperationMsg::class.java
|
||||||
|
) as DPCommonOperationMsg
|
||||||
|
pushOperationalToMsgBox(DateTimeUtil.getCurrentTimeStamp(),msg.msg)
|
||||||
|
}
|
||||||
|
else -> {}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fun pushOperationalToMsgBox(time : Long,content : String,type: Int = -1){
|
||||||
|
playDI()
|
||||||
|
OCHSocketMessageManager.pushAppOperationalMsgBox(time, content, type)
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun playDI(){
|
||||||
|
SoundPoolHelper.getSoundPoolHelper().playSoundWithRedId(context, R.raw.m1_voice_di)
|
||||||
|
}
|
||||||
|
|
||||||
fun openDoor() {
|
fun openDoor() {
|
||||||
val canOpenOrCloseDoor = canOpenOrCloseDoor()
|
val canOpenOrCloseDoor = canOpenOrCloseDoor()
|
||||||
if(!canOpenOrCloseDoor.isNullOrEmpty()){
|
if(!canOpenOrCloseDoor.isNullOrEmpty()){
|
||||||
|
|||||||
@@ -37,6 +37,20 @@
|
|||||||
app:layout_constraintTop_toTopOf="@+id/mapBizView"
|
app:layout_constraintTop_toTopOf="@+id/mapBizView"
|
||||||
app:layout_constraintBottom_toBottomOf="@+id/mapBizView" />
|
app:layout_constraintBottom_toBottomOf="@+id/mapBizView" />
|
||||||
|
|
||||||
|
<!--浓雾预警动画-->
|
||||||
|
<com.mogo.eagle.core.function.hmi.ui.widget.V2XFogEventView
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"/>
|
||||||
|
|
||||||
|
<!--V2X预警红色边框-->
|
||||||
|
<com.mogo.eagle.core.function.hmi.ui.widget.V2XWarningView
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
<!--pnc行为决策-->
|
<!--pnc行为决策-->
|
||||||
<com.mogo.eagle.core.function.hmi.ui.vehicle.PncActionsView
|
<com.mogo.eagle.core.function.hmi.ui.vehicle.PncActionsView
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
|
|||||||
BIN
OCH/mogo-och-charter-passenger/src/m1/res/raw/m1_voice_di.mp3
Normal file
BIN
OCH/mogo-och-charter-passenger/src/m1/res/raw/m1_voice_di.mp3
Normal file
Binary file not shown.
Reference in New Issue
Block a user