Merge branch 'dev_robotaxi-d_241202_6.8.2' of gitlab.zhidaoauto.com:SCA/L4HA/AndroidApp/MoGoEagleEye into dev_robotaxi-d_241202_6.8.2

This commit is contained in:
aibingbing
2024-12-06 17:47:13 +08:00
30 changed files with 261 additions and 85 deletions

View File

@@ -106,6 +106,7 @@ object LoginModel {
OchChainLogManager.writeChainLog("登录页面","获取验证码 mContext${mContext}")
}else {
mContext?.let {
OchChainLogManager.writeChainLog("登录页面","网络请求去获取验证码")
OchCommonServiceManager.getPhoneCode(it, phone,
object : OchCommonServiceCallback<BaseData> {
override fun onSuccess(data: BaseData?) {

View File

@@ -49,7 +49,9 @@ class LoginPresenter(view: LoginFragment?) : Presenter<LoginFragment?>(view), IT
fun getPhoneCode(phone:String){
OchChainLogManager.writeChainLog("登录页面","获取验证码${phone}")
if(!LoginModel.hasInit()){
OchChainLogManager.writeChainLog("登录页面","LoginModel没有初始化去初始化")
initListeners()
}
if (!RegexUtils.isMobileExact(phone)) {

View File

@@ -136,6 +136,7 @@ class LoginFragment : MvpFragment<LoginFragment?, LoginPresenter?>(), ILoginView
continuousClick()
}
biz_actv_login_get_code.setOnClickListener {
OchChainLogManager.writeChainLog("登录页面","点击获取验证码")
if(mPresenter==null){
OchChainLogManager.writeChainLog("司机登录页面","mPresenter=${mPresenter}")
}else{

View File

@@ -60,14 +60,16 @@ object OchAutoPilotStatusListenerManager : CallerBase<IOchAutopilotStatusListene
private var _autopilotState: Int by Delegates.observable(0) { _, oldValue, newValue ->
if (oldValue != newValue) {
if (AppIdentityModeUtils.isDriver(FunctionBuildConfig.appIdentityMode)) {
if(oldValue==IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_RUNNING){
if(newValue==IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_ENABLE){
ToastUtils.showLong(R.string.common_change2_autopilot2_manual)
}
}else if(oldValue==IMoGoAutopilotStatusListener.STATUS_PARALLEL_DRIVING){
if(newValue==IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_ENABLE){
ToastUtils.showLong(R.string.common_change2_pxjs_manual)
if (!FunctionBuildConfig.isDemoMode) {
if (AppIdentityModeUtils.isDriver(FunctionBuildConfig.appIdentityMode)) {
if (oldValue == IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_RUNNING) {
if (newValue == IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_ENABLE) {
ToastUtils.showLong(R.string.common_change2_autopilot2_manual)
}
} else if (oldValue == IMoGoAutopilotStatusListener.STATUS_PARALLEL_DRIVING) {
if (newValue == IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_ENABLE) {
ToastUtils.showLong(R.string.common_change2_pxjs_manual)
}
}
}
}

View File

@@ -2,21 +2,59 @@ package com.mogo.och.common.module.manager.autopilot.line;
public interface ILineCallback {
/**
* 清除高精地图的轨迹线成功
*/
default void clearLineSuccess(){}
/**
* 高精地图上绘制轨迹线成功
*/
default void drawLineSuccess(){}
/**
* 高精地图上绘制轨迹线失败
*/
default void drawLineFail(){}
/**
* och 已向eye 发送启动自驾参数
*/
default void sendStartAutopilotSuccess(){}
/**
* 因为起始站点、自驾轨迹参数、线路信息变化导致的自驾orderId的变化
*/
default void onAutopilotIdChange(String oldId,String newId){}
/**
* 启动自驾15s超时
*/
default void startAutopilotTimeOut(){}
/**
* 底盘收到启动自驾的指令
*/
default void sendStartAutopilotSuccessAck(){}
/**
* 底盘告知启动自驾失败
* @param startFailedCode 错误码
* @param startFailedMessage 错误信息
*/
default void startAutopilotFailure(String startFailedCode,String startFailedMessage){}
default void startAutopilotSuccess(){}
/**
* 自驾启动成功
* @param source 自驾成功来源
* @param autopilotId 当前启动自驾的id
*/
default void startAutopilotSuccess(int source, String autopilotId){}
/**
* 距离站点小于15m后向底盘查询是否到站底盘反馈 已到站
*/
default void arrivedStationSuccessBySearch(){}
}

View File

@@ -81,6 +81,9 @@ object LineManager : CallerBase<ILineCallback>() {
private var autopilotId: String by Delegates.observable("") { _, oldValue, newValue ->
if (oldValue != newValue) {
CallerEagleBaseFunctionCall4OchManager.setOchAutopilotOrderId(newValue)
M_LISTENERS.forEach {
it.value.onAutopilotIdChange(oldValue,newValue)
}
if(!AppIdentityModeUtils.isBus(FunctionBuildConfig.appIdentityMode)&&!AppIdentityModeUtils.isShuttle(FunctionBuildConfig.appIdentityMode)){
val (start, end) = getStations()
if(start!=null&&end!=null){
@@ -252,11 +255,11 @@ object LineManager : CallerBase<ILineCallback>() {
}
private fun setAutopilotControlParameters(){
getStationsWithLineAndContrai { start, end, lineInfo, contrai ->
val parameters = LineManager.initAutopilotControlParameters()
getStationsWithLine { start, end, lineInfo ->
val parameters = initAutopilotControlParameters()
if (null == parameters) {
e(M_BUS + TAG, "AutopilotControlParameters is empty.")
return@getStationsWithLineAndContrai
return@getStationsWithLine
}
d(M_BUS + TAG, "AutopilotControlParameters is update.")
CallerAutoPilotStatusListenerManager.updateAutopilotControlParameters(parameters)
@@ -315,6 +318,9 @@ object LineManager : CallerBase<ILineCallback>() {
fun initAutopilotControlParameters(): AutopilotControlParameters? {
var parameters: AutopilotControlParameters? = null
getStationsWithLine { start, end, lineInfo ->
this.autopilotId = "${lineInfo.lineId}_${start.siteId}_${end.siteId}_${lineInfo.orderId}"
}
getStationsWithLineAndContrai { start, end, lineInfo, contrai ->
parameters = AutopilotControlParameters()
parameters?.routeID = lineInfo.lineId.toInt()
@@ -324,7 +330,6 @@ object LineManager : CallerBase<ILineCallback>() {
parameters?.startLatLon = AutoPilotLonLat(start.lat, start.lon)
parameters?.endLatLon = AutoPilotLonLat(end.lat, end.lon)
parameters?.vehicleType = 10
this.autopilotId = "${lineInfo.lineId}_${start.siteId}_${end.siteId}_${lineInfo.orderId}"
parameters?.orderId = this.autopilotId
parameters?.firstAutopilotFlag = isFirstStartAutopilot
@@ -518,6 +523,11 @@ object LineManager : CallerBase<ILineCallback>() {
}
}
/**
* @param source 0: och 通过自驾状态变化确定启动自驾成功
* 1: 通过can消息发送自驾状态确定启动自驾成功
* 2通过FSM 反馈确定启动自驾成功
*/
fun triggerStartServiceEvent(send: Boolean,source:Int,type:String) {
getStationsWithLine { start, end, lineInfo ->
OchAutopilotAnalytics.triggerStartAutopilotEvent(
@@ -531,6 +541,11 @@ object LineManager : CallerBase<ILineCallback>() {
type,
source
)
if(send){
M_LISTENERS.forEach {
it.value.startAutopilotSuccess(source,autopilotId)
}
}
}
}

View File

@@ -133,7 +133,7 @@ object TrajectoryManager : IMoGoPlanningRottingListener {
}
private fun writeTrajectoryLog(message:String){
writeChainLog("轨迹监控", "再次发起下载", true, OchChainLogManager.EVENT_KEY_INFE_WITH_TRAJECTORY)
writeChainLog("轨迹监控", message, true, OchChainLogManager.EVENT_KEY_INFE_WITH_TRAJECTORY)
}
}

View File

@@ -1,6 +1,7 @@
package com.mogo.och.common.module.wigets.autopilot
import androidx.lifecycle.ViewModel
import com.mogo.eagle.core.data.config.FunctionBuildConfig
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotStatusListener
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotControlManager
import com.mogo.eagle.core.utilcode.util.UiThreadHandler
@@ -10,6 +11,8 @@ import com.mogo.och.common.module.manager.autopilot.autopilot.IOchAutopilotStatu
import com.mogo.och.common.module.manager.autopilot.autopilot.OchAutoPilotStatusListenerManager
import com.mogo.och.common.module.manager.autopilot.line.ILineCallback
import com.mogo.och.common.module.manager.autopilot.line.LineManager
import com.mogo.och.common.module.manager.beautifymode.BeautifyManager
import com.mogo.och.common.module.manager.beautifymode.IBeautifyModeCallback
import com.mogo.och.common.module.manager.logchainanalytic.OchChainLogManager
import com.mogo.och.common.module.manager.loop.BizLoopManager
import com.mogo.och.common.module.utils.RxUtils
@@ -21,7 +24,7 @@ import java.util.concurrent.atomic.AtomicBoolean
* @since: 2022/12/15
*/
class AutopilotStateModel : ViewModel(), IOchAutopilotStatusListener, ILineCallback,
IOchDebugAutopilotStatusListener {
IOchDebugAutopilotStatusListener, IBeautifyModeCallback {
private val TAG = AutopilotStateModel::class.java.simpleName
@@ -29,12 +32,16 @@ class AutopilotStateModel : ViewModel(), IOchAutopilotStatusListener, ILineCall
private val isPalyStartAni = AtomicBoolean(false)
// autopilotId 这个自驾id 启动成功过
private var lineId:String? = null
override fun onCleared() {
this.viewCallback = null
AutopilotStateDebug.removeListener(TAG)
OchAutoPilotStatusListenerManager.removeListener(TAG)
LineManager.removeListener(TAG)
BeautifyManager.setStatusChangeListener(TAG,null)
}
fun setViewCallback(viewCallback:AutopilotStateCallback){
@@ -42,6 +49,7 @@ class AutopilotStateModel : ViewModel(), IOchAutopilotStatusListener, ILineCall
AutopilotStateDebug.addListener(TAG,this)
OchAutoPilotStatusListenerManager.addListener(TAG,this)
LineManager.addListener(TAG,this)
BeautifyManager.setStatusChangeListener(TAG,this)
}
override fun debugStatusChange(debugStatus: Boolean) {
@@ -90,39 +98,126 @@ class AutopilotStateModel : ViewModel(), IOchAutopilotStatusListener, ILineCall
autopilotStateChange()
}
private fun autopilotStateChange(){
// 正在起自驾过程中
// 自驾状态变化为非自驾状态
// 或者
// FSM 状态改为不能启动自驾
// 按照启动自驾失败计算
if(isPalyStartAni.get() &&
(!CallerAutoPilotControlManager.isCanStartAutopilot(false)
|| OchAutoPilotStatusListenerManager.autopilotState!=IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_RUNNING)){
OchChainLogManager.writeChainLog("自驾信息","正在起自驾过程中、自驾状态变化切为非自驾状态或者FSM 状态改为不能启动自驾")
startAutopilotFail()
override fun dispatchStatus(typeEnum: BeautifyManager.ChangeTypeEnum) {
OchChainLogManager.writeChainLog("美化模式","美化模式发生变化:${typeEnum}")
autopilotStateChange()
}
override fun startAutopilotSuccess(
source: Int,
autopilotId: String?
) {
LineManager.getLineInfo {
this.lineId = it.lineId.toString()
}
autopilotStateChange()
this.viewCallback?.startAutopilotSuccess()
}
override fun onAutopilotIdChange(oldId: String?, newId: String?) {
if(LineManager.lineInfos?.lineId.toString()==this.lineId){
return
}
BizLoopManager.runInMainThread{
OchChainLogManager.writeChainLog("自驾信息","自驾状态:${OchAutoPilotStatusListenerManager.autopilotState} 能否启动自驾:${CallerAutoPilotControlManager.isCanStartAutopilot(false)}")
when (OchAutoPilotStatusListenerManager.autopilotState) {
IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_DISABLE-> {// 不可用 不可启动自驾
this.viewCallback?.autopilotDisable()
}
IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_ENABLE-> {
if (CallerAutoPilotControlManager.isCanStartAutopilot(false) && OchAutoPilotStatusListenerManager.canStartAutopilotFromFSM) {// 不可用
this.viewCallback?.canStartAutopilot()
} else {// 部分可用
this.viewCallback?.autopilotDisable()
this.lineId = null
autopilotStateChange()
}
/**
* 1、自驾状态发生变化
* 2、能否启动自驾变化
* 3、FSM能否启动自驾变化
* 4、美化模式发生变化
* 5、启动自驾成功
* 6、自驾orderid发生变化
* 7、启动自驾超时失败
* 8、底盘明确告知启动自驾失败
* 9、启动自驾失败展示3s 失败后恢复新的状态
*/
private fun autopilotStateChange(){
if (FunctionBuildConfig.isDemoMode) {
BizLoopManager.runInMainThread {
OchChainLogManager.writeChainLog(
"自驾信息",
"自驾状态:${OchAutoPilotStatusListenerManager.autopilotState} 能否启动自驾:${
CallerAutoPilotControlManager.isCanStartAutopilot(false)
}"
)
if(lineId.isNullOrEmpty()){// 没有启动成功过
when (OchAutoPilotStatusListenerManager.autopilotState) {
IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_DISABLE -> {// 不可用 不可启动自驾
this.viewCallback?.canStartAutopilot()
}
IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_ENABLE -> {
if (CallerAutoPilotControlManager.isCanStartAutopilot(false) && OchAutoPilotStatusListenerManager.canStartAutopilotFromFSM) {// 不可用
this.viewCallback?.canStartAutopilot()
} else {// 部分可用
this.viewCallback?.canStartAutopilot()
}
}
IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_RUNNING -> {// 自驾中
this.viewCallback?.stopAutopilotAnimation()
this.viewCallback?.inAutopilot()
}
IMoGoAutopilotStatusListener.STATUS_PARALLEL_DRIVING -> {// 平行驾驶中
this.viewCallback?.stopAutopilotAnimation()
this.viewCallback?.inAutopilot()
}
}
}
IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_RUNNING-> {// 自驾中
this.viewCallback?.stopAutopilotAnimation()
}else{
this.viewCallback?.inAutopilot()
}
IMoGoAutopilotStatusListener.STATUS_PARALLEL_DRIVING-> {// 平行驾驶中
this.viewCallback?.stopAutopilotAnimation()
this.viewCallback?.inRemoteDriver()
}
}else {
// 正在起自驾过程中
// 自驾状态变化为非自驾状态
// 或者
// FSM 状态改为不能启动自驾
// 按照启动自驾失败计算
if (isPalyStartAni.get() &&
(!CallerAutoPilotControlManager.isCanStartAutopilot(false)
|| OchAutoPilotStatusListenerManager.autopilotState != IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_RUNNING)
) {
OchChainLogManager.writeChainLog(
"自驾信息",
"正在起自驾过程中、自驾状态变化切为非自驾状态或者FSM 状态改为不能启动自驾"
)
startAutopilotFail()
return
}
BizLoopManager.runInMainThread {
OchChainLogManager.writeChainLog(
"自驾信息",
"自驾状态:${OchAutoPilotStatusListenerManager.autopilotState} 能否启动自驾:${
CallerAutoPilotControlManager.isCanStartAutopilot(false)
}"
)
when (OchAutoPilotStatusListenerManager.autopilotState) {
IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_DISABLE -> {// 不可用 不可启动自驾
this.viewCallback?.autopilotDisable()
}
IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_ENABLE -> {
if (CallerAutoPilotControlManager.isCanStartAutopilot(false) && OchAutoPilotStatusListenerManager.canStartAutopilotFromFSM) {// 不可用
this.viewCallback?.canStartAutopilot()
} else {// 部分可用
this.viewCallback?.autopilotDisable()
}
}
IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_RUNNING -> {// 自驾中
this.viewCallback?.stopAutopilotAnimation()
this.viewCallback?.inAutopilot()
}
IMoGoAutopilotStatusListener.STATUS_PARALLEL_DRIVING -> {// 平行驾驶中
this.viewCallback?.stopAutopilotAnimation()
this.viewCallback?.inRemoteDriver()
}
}
}
}
@@ -144,7 +239,7 @@ class AutopilotStateModel : ViewModel(), IOchAutopilotStatusListener, ILineCall
* 条件过滤完成 正式进入启动自驾状态
*/
override fun sendStartAutopilotSuccess() {
OchChainLogManager.writeChainLog("自驾信息","启动自驾成功")
OchChainLogManager.writeChainLog("自驾信息","发送启动自驾信息到底盘成功")
BizLoopManager.runInMainThread {
this.viewCallback?.startAutopilotAnimation()
isPalyStartAni.set(true)
@@ -169,6 +264,12 @@ class AutopilotStateModel : ViewModel(), IOchAutopilotStatusListener, ILineCall
}
}
/**
* 1、正在起自驾过程中、自驾状态变化切为非自驾状态或者FSM 状态改为不能启动自驾
* 2、debug状态下5s后自动按照失败计算
* 3、超时失败
* 4、底盘明确告知启动失败
*/
private fun startAutopilotFail(){
BizLoopManager.runInMainThread{
this.viewCallback?.stopAutopilotAnimation()

View File

@@ -182,7 +182,7 @@ public class OrderModel {
new IReceivedMsgListener() {
@Override
public void onFusionColor(boolean fusionColor) {
IReceivedMsgListener.super.onFusionColor(fusionColor);
}
@Override

View File

@@ -5,6 +5,7 @@ import com.mogo.commons.AbsMogoApplication
import com.mogo.commons.module.status.MogoStatusManager
import com.mogo.eagle.core.data.BaseData
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotControlManager
import com.mogo.eagle.core.function.call.och.CallerEagleBaseFunctionCall4OchManager
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
import com.mogo.eagle.core.utilcode.util.GsonUtils
import com.mogo.eagle.core.utilcode.util.NetworkUtils
@@ -164,6 +165,9 @@ class RoutingRunningModel : ViewModel(), IDistanceListener {
LineManager.setLineInfo(null)
LineManager.setContraiInfo(null)
LineManager.setStartAndEndStation(null,null)
CallerEagleBaseFunctionCall4OchManager.updateOrderStatus(false)
// 设置灰度路线任务执行状态,切换模式时判断使用
MogoStatusManager.getInstance().setTaxiUnmanedDriverLineRoutingPerformTask(TAG, false)

View File

@@ -4,6 +4,7 @@ import androidx.lifecycle.ViewModel
import com.mogo.commons.AbsMogoApplication
import com.mogo.commons.storage.SharedPrefsMgr
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotControlManager
import com.mogo.eagle.core.function.call.och.CallerEagleBaseFunctionCall4OchManager
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
import com.mogo.eagle.core.utilcode.util.GsonUtils
import com.mogo.eagle.core.utilcode.util.NetworkUtils
@@ -155,7 +156,7 @@ class RoutingSelectModel : ViewModel() {
LineManager.setLineInfo(LineInfo(grayLineBean.lineId?:0L,grayLineBean.lineName?:"", orderId = "${data.taskId}"))
LineManager.setContraiInfo(contrailBean.toContraiInfo())
LineManager.setStartAndEndStation(grayLineBean.startSite?.toBusStationBean(),grayLineBean.endSite?.toBusStationBean())
CallerEagleBaseFunctionCall4OchManager.updateOrderStatus(true)
viewCallback?.onStartGrayTaskAndQueryContrailSuccess(data)
// Routing 从这里解析出经停信息,轨迹信息,并调用下载轨迹接口

View File

@@ -180,10 +180,7 @@ object PassBusStationEventManager : IMoGoChassisLocationWGS84Listener {
it.notifyDistance
),
isDriverScreen,
String.format(
EventTypeEnumNew.getWarningTts(EventTypeEnumNew.TYPE_USECASE_ROAD_BUS_STATION.poiType),
it.notifyDistance
),
EventTypeEnumNew.getWarningTts(EventTypeEnumNew.TYPE_USECASE_ROAD_BUS_STATION.poiType),
UriUtils.res2Uri(
EventTypeEnumNew.getPoiTypeBg(
EventTypeEnumNew.TYPE_USECASE_ROAD_BUS_STATION.poiType,

View File

@@ -212,7 +212,7 @@ class RedLightWarningManager : IMoGoTrafficLightListener, IMoGoVipSetListener,
)
)
)
CallerHmiManager.warningV2X(EventTypeEnumNew.TYPE_USECASE_ID_IVP_RED.poiType, EventTypeEnumNew.TYPE_USECASE_ID_IVP_RED.content, EventTypeEnumNew.TYPE_USECASE_ID_IVP_RED.tts, isFromObu = false)
CallerHmiManager.warningV2X(EventTypeEnumNew.TYPE_USECASE_ID_IVP_RED.poiType, EventTypeEnumNew.TYPE_USECASE_ID_IVP_RED.content, EventTypeEnumNew.TYPE_USECASE_ID_IVP_RED.tts)
}
}
@@ -242,7 +242,7 @@ class RedLightWarningManager : IMoGoTrafficLightListener, IMoGoVipSetListener,
)
)
)
CallerHmiManager.warningV2X(EventTypeEnumNew.TYPE_USECASE_ID_IVP_GREEN.poiType, content, tts, isFromObu = false)
CallerHmiManager.warningV2X(EventTypeEnumNew.TYPE_USECASE_ID_IVP_GREEN.poiType, content, tts)
}
}

View File

@@ -69,6 +69,7 @@ import mogo.v2x.MogoV2X
import java.nio.charset.Charset
import java.util.concurrent.CopyOnWriteArrayList
import java.util.concurrent.CopyOnWriteArraySet
import java.util.concurrent.TimeUnit
import java.util.concurrent.atomic.AtomicBoolean
object V2XEventManager : IMoGoChassisLocationGCJ02Listener, IV2XCallback,
@@ -250,7 +251,7 @@ object V2XEventManager : IMoGoChassisLocationGCJ02Listener, IV2XCallback,
tts,
null,
ALERT_WARNING_TOP,
isFromObu = false
TimeUnit.SECONDS.toMillis(5)
)
}
}

View File

@@ -159,8 +159,9 @@ internal object V2NIdentifyDrawer: IEventDismissListener {
}
}
}
val content = "发现前方${distance.toInt()}${ if (poiType == EventTypeEnumNew.TYPE_SOCKET_ROAD_SHIGONG.poiType) "车道施工" else "车道事故" }"
val tts = "$content, ${SkinResources.getInstance().getString(R.string.operation_platform_name)}提醒您小心行人及来车"
val contentType = if (poiType == EventTypeEnumNew.TYPE_SOCKET_ROAD_SHIGONG.poiType) "道路施工" else "道路事故"
val content = "前方${distance.toInt()}米有$contentType"
val tts = "${SkinResources.getInstance().getString(R.string.operation_platform_name)}发现前方$contentType, 提醒您注意行人及来车"
V2XBizTrace.onAck(TAG, "绘制poi事件:$poiType")
saveMsgBox(
MsgBoxBean(
@@ -237,7 +238,7 @@ internal object V2NIdentifyDrawer: IEventDismissListener {
}
// 弹事件框
val alertContent = String.format(EventTypeEnumNew.getAlarmContent(EventTypeEnumNew.TYPE_SOCKET_ROAD_OTHER_RETROGRADE_VEHICLE.poiType), distance.toInt())
val alertTts = String.format(EventTypeEnumNew.getWarningTts(EventTypeEnumNew.TYPE_SOCKET_ROAD_OTHER_RETROGRADE_VEHICLE.poiType), distance.toInt())
val alertTts = EventTypeEnumNew.getWarningTts(EventTypeEnumNew.TYPE_SOCKET_ROAD_OTHER_RETROGRADE_VEHICLE.poiType)
CallerRoadV2NEventWindowListenerManager.showLiveVideo(
newEventId,
event.timestamp,
@@ -363,7 +364,7 @@ internal object V2NIdentifyDrawer: IEventDismissListener {
}
// 弹事件框
val alertContent = String.format(EventTypeEnumNew.getAlarmContent(EventTypeEnumNew.TYPE_SOCKET_ROAD_PEOPLE_CROSS.poiType), distance.toInt())
val alertTts = String.format(EventTypeEnumNew.getWarningTts(EventTypeEnumNew.TYPE_SOCKET_ROAD_PEOPLE_CROSS.poiType), distance.toInt())
val alertTts = EventTypeEnumNew.getWarningTts(EventTypeEnumNew.TYPE_SOCKET_ROAD_PEOPLE_CROSS.poiType)
CallerRoadV2NEventWindowListenerManager.showLiveVideo(
data.eventId,
data.timestamp,

View File

@@ -1,5 +1,6 @@
package com.mogo.eagle.function.biz.v2x.v2n.scenario.scene.road;
import com.mogo.commons.voice.AIAssist;
import com.mogo.eagle.core.data.enums.CommunicationType;
import com.mogo.eagle.core.data.enums.DataSourceType;
import com.mogo.eagle.core.data.enums.EventTypeEnumNew;
@@ -133,7 +134,7 @@ public class V2XRoadEventScenario extends AbsV2XScenario<V2XRoadEventEntity> imp
);
CallerHmiManager.INSTANCE.warningV2X(poiType, alarmText,
ttsText, this,WarningDirectionEnum.ALERT_WARNING_TOP,
TimeUnit.SECONDS.toMillis(5), false);
TimeUnit.SECONDS.toMillis(5), AIAssist.LEVEL2, false);
//消息埋点
V2XEventAnalyticsManager.INSTANCE.triggerV2XEvent(poiType,alarmText,ttsText, DataSourceType.AICLOUD, CommunicationType.V2N);
}

View File

@@ -9,6 +9,7 @@ import android.text.style.ForegroundColorSpan;
import android.util.Log;
import androidx.annotation.Nullable;
import com.mogo.commons.voice.AIAssist;
import com.mogo.eagle.core.data.enums.CommunicationType;
import com.mogo.eagle.core.data.enums.DataSourceType;
import com.mogo.eagle.core.data.enums.EventTypeEnumNew;
@@ -87,7 +88,7 @@ public class V2XFrontWarningScenario extends AbsV2XScenario implements IMoGoChas
CallerHmiManager.INSTANCE.warningV2X(v2xType + "",
getAlertContentForFrontWarning(mMarkerEntity), mMarkerEntity.getTts(),
this,getDirection(),
TimeUnit.SECONDS.toMillis(5), false);
TimeUnit.SECONDS.toMillis(5), AIAssist.LEVEL2, false);
//消息埋点
V2XEventAnalyticsManager.INSTANCE.triggerV2XEvent(v2xType,getAlertContentForFrontWarning(mMarkerEntity).toString(),
mMarkerEntity.getTts(), DataSourceType.AICLOUD, CommunicationType.V2N);

View File

@@ -271,7 +271,7 @@ class VipCarManager : IMogoOnMessageListener<VipMessage>, IMoGoTrafficLightListe
CallerMsgBoxManager.saveMsgBox(
MsgBoxBean(MsgBoxType.V2X, V2XMsg(v2xType, alertContent.toString(), ttsContent,CommunicationType.V2N.name))
)
CallerHmiManager.warningV2X(v2xType, alertContent, ttsContent, isFromObu = false)
CallerHmiManager.warningV2X(v2xType, alertContent, ttsContent)
V2XEventAnalyticsManager.triggerV2XEvent(v2xType, alertContent.toString(),
ttsContent,DataSourceType.AICLOUD,CommunicationType.V2N)
}

View File

@@ -29,6 +29,7 @@ internal class StatusView(private val model: StatusModel, ctx: Context): Constra
private var observer: Observer<Pair<Status?, ArrayList<Status>>>? = null
init {
LayoutInflater.from(context).inflate(R.layout.layout_status_bar, this, true)
layoutTransition = null
rv = findViewById(R.id.rv)
init()
}

View File

@@ -151,7 +151,7 @@ class MoGoHmiProvider : IMoGoHmiProvider {
* 不展示顶部弹窗,其它保留
*/
@Synchronized
override fun warningV2X(v2xType: String, alertContent: CharSequence?, ttsContent: String?, listener: IMoGoWarningStatusListener?, direction: WarningDirectionEnum, expireTime: Long, isFromObu: Boolean) {
override fun warningV2X(v2xType: String, alertContent: CharSequence?, ttsContent: String?, listener: IMoGoWarningStatusListener?, direction: WarningDirectionEnum, expireTime: Long, newLevel: Int, isFromObu:Boolean) {
if (isFromObu) {
// 修改: 只有来自obu的事件这样处理
//30秒内同一个事件只出现一次 TODO 临时添加,后面宏宇统一在数据中心处理

View File

@@ -56,11 +56,6 @@ object TrackerSourceFilterHelper {
}
fun getDefaultColor(data: TrackedObject): String {
if (isTaxi(FunctionBuildConfig.appIdentityMode) &&
isPassenger(FunctionBuildConfig.appIdentityMode)
) {
return ""
}
var color = ""
if (!FunctionBuildConfig.isDrawUnknownIdentifyData
&& data.type == TrafficTypeEnum.TYPE_TRAFFIC_ID_WEI_ZHI.type

View File

@@ -237,7 +237,7 @@ class RoadCrossRoamView @JvmOverloads constructor(
SkinResources.getInstance().getString(R.string.operation_platform_name)
}为您提供路口全息影像助力出行"
}
AIAssist.getInstance(context).speakTTSVoice(disStr)
AIAssist.getInstance(context).speakTTSVoiceWithLevel(disStr, AIAssist.NEW_LEVEL_2)
}
CallerHmiViewControlListenerManager.invokeV2XEvent(View.VISIBLE, TAG)
CallerServicesEventManager.updateServicesNum(CallerServicesEventManager.ServiceType.ROAD)

View File

@@ -113,7 +113,7 @@ object FunctionBuildConfig {
*/
@Volatile
@JvmField
var isFusionColor = false
var isFusionColor = true
/**
* 是否开启obu rv预警感知物融合功能 , 仅大理,烟台交付项目

View File

@@ -464,7 +464,7 @@ enum class EventTypeEnumNew(
"通过公交站",
poiTypeSrcVr = R.drawable.icon_v2x_bus_station_driver,
content = "前方%s米有公交站",
tts = "前方%s米有公交站${SkinResources.getInstance().getString(R.string.operation_platform_name)}提醒您小心右侧行人及来车"
tts = "${SkinResources.getInstance().getString(R.string.operation_platform_name)}发现前方公交站,提醒您注意右侧行人及来车"
),
TYPE_ATTENTION_CONFLUENCE(
44.toString(),
@@ -517,8 +517,8 @@ enum class EventTypeEnumNew(
"100062",
"他车倒车/逆行",
poiTypeSrcVr = R.drawable.icon_v2x_other_retrograde_vehicle_driver,
content = "前方%s米有车辆异常倒车或逆行",
tts = "前方%s米有车辆异常倒车或逆行${SkinResources.getInstance().getString(R.string.operation_platform_name)}提醒您注意观察小心通过"
content = "前方%s米有车倒车或逆行",
tts = "${SkinResources.getInstance().getString(R.string.operation_platform_name)}发现前方有异常车辆,提醒您注意观察 小心通过"
),
TYPE_SOCKET_ROAD_GREE_WAVE(
"100063",
@@ -532,7 +532,7 @@ enum class EventTypeEnumNew(
"行人横穿",
poiTypeSrcVr = View.NO_ID,
content = "前方%s米有行人/非机动车横穿",
tts = "前方%s米有行人/非机动车横穿,${SkinResources.getInstance().getString(R.string.operation_platform_name)}提醒您提前减速,注意观察,小心通过"
tts = "${SkinResources.getInstance().getString(R.string.operation_platform_name)}发现前方有行人或非机动车横穿,提醒您注意观察小心通过"
),
TYPE_ERROR(
0.toString(),

View File

@@ -25,7 +25,7 @@ interface IMoGoHmiProvider :IProvider{
/**
* 不展示顶部弹窗,其它保留
*/
fun warningV2X(v2xType: String, alertContent: CharSequence?, ttsContent: String?, listener: IMoGoWarningStatusListener?, direction: WarningDirectionEnum, expireTime: Long, isFromObu: Boolean)
fun warningV2X(v2xType: String, alertContent: CharSequence?, ttsContent: String?, listener: IMoGoWarningStatusListener?, direction: WarningDirectionEnum, expireTime: Long, newLevel: Int, isFromObu:Boolean)
/**
* 展示指定方位上的红框预警

View File

@@ -4,6 +4,7 @@ import android.content.Context
import android.view.View
import android.view.ViewGroup
import com.alibaba.android.arouter.launcher.ARouter
import com.mogo.commons.voice.AIAssist
import com.mogo.eagle.core.data.biz.dispatch.DispatchAdasAutoPilotLocReceiverBean
import com.mogo.eagle.core.data.biz.notice.NoticeNormalData
import com.mogo.eagle.core.data.biz.notice.NoticeTrafficStylePushData
@@ -50,7 +51,8 @@ object CallerHmiManager {
listenerIMoGo: IMoGoWarningStatusListener? = null,
direction: WarningDirectionEnum = ALERT_WARNING_NON,
expireTime: Long = 5000L,
isFromObu: Boolean,
newLevel: Int = AIAssist.LEVEL2,
isFromObu :Boolean = false
) {
hmiProviderApi?.warningV2X(
v2xType,
@@ -59,6 +61,7 @@ object CallerHmiManager {
listenerIMoGo,
direction,
expireTime,
newLevel,
isFromObu
)
}

View File

@@ -24,10 +24,11 @@ public class AIAssist {
private static volatile AIAssist sInstance;
public static final int LEVEL0 = 3;//P0
public static final int LEVEL1 = 2;//P1
public static final int LEVEL2 = 1;//P2
public static final int LEVEL3 = 0;//P3
public static final int LEVEL0 = 4;//P0
public static final int LEVEL1 = 3;//P1
public static final int NEW_LEVEL_2 = 2;// P2
public static final int LEVEL2 = 1;//P3
public static final int LEVEL3 = 0;//P4
private IMogoTTS mTTS;
private IGlobalTtsCallback mTTSCallback;
@@ -144,7 +145,7 @@ public class AIAssist {
}
/**
* 等级由低到高为0、1、2、3分别对应p3、p2、p1、p0
* 等级由低到高为0、1、2、3、4,分别对应p4、p3、p2、p1、p0(已更新)
*
* @param text
* @param level
@@ -159,7 +160,7 @@ public class AIAssist {
* 支持多语言的Tts
*
* @param ttsEntity: 多语言Entity
* @param level: 等级由低到高为0、1、2、3分别对应p3、p2、p1、p0
* @param level: 等级由低到高为0、1、2、3、4,分别对应p4、p3、p2、p1、p0(已更新)
* @param callback
*/
public void speakMultiLangTTSWithLevel(MultiLangTtsEntity ttsEntity, int level, IMogoTTSCallback callback) {

View File

@@ -92,8 +92,8 @@ WEBSOCKET_VERSION=1.1.7
applicationId=com.mogo.launcer
applicationName=IntelligentPilot
# RoboBus司机端2.5.1RoboTaxi司机端2.5.1RoboTaxi乘客端1.0.0
versionCode=6008000
versionName=6.8.0
versionCode=6008002
versionName=6.8.2
################# 新架构模块Maven版本管理 #################
MOGO_CORE_FUNCTION_HMI_VERSION=0.0.58.10
@@ -151,7 +151,7 @@ MATRIX_VERSION=2.0.8
# 公交模式司机端版本号
DRIVER_VERSION=6.8.0
DRIVER_VERSION=6.8.2
# 公交模式乘客端端版本号
PASSENGER_VERSION=5.8.0
PASSENGER_VERSION=5.8.2

View File

@@ -234,6 +234,9 @@ class IFlyTekTts : IMogoTTS, InitListener {
d(TAG, "插入消息:$ttsEntity,level为$ttsLevel")
insertTts(ttsEntity, ttsLevel)
return
} else if (ttsLevel == 2) {
d(TAG, "已有p2级别在播报新内容直接丢弃!")
return
} else {
// 打断并合成新的
stopTts()
@@ -252,6 +255,8 @@ class IFlyTekTts : IMogoTTS, InitListener {
d(TAG, "===================")
d(TAG, "插入消息:$ttsEntity,level为$ttsLevel")
insertTts(ttsEntity, ttsLevel)
} else if (ttsLevel == 2) {
d(TAG, "已有高级别在播报,新内容直接丢弃!")
}
return
}

View File

@@ -413,7 +413,10 @@ public class PadTTS implements IMogoTTS, VoiceClient.VoiceCmdCallBack {
CallerLogger.d(TAG, "插入消息:" + ttsEntity + ",level为" + ttsLevel);
insertTts(ttsEntity, ttsLevel);
return;
} else {
} else if (ttsLevel == 2) {
CallerLogger.d(TAG, "已有p2级别在播报新内容直接丢弃!");
return;
} else {
// 打断并合成新的
stopTts();
CallerLogger.d(TAG, "非Level1同级别打断!");
@@ -431,6 +434,8 @@ public class PadTTS implements IMogoTTS, VoiceClient.VoiceCmdCallBack {
CallerLogger.d(TAG, "===================");
CallerLogger.d(TAG, "插入消息:" + ttsEntity + ",level为" + ttsLevel);
insertTts(ttsEntity, ttsLevel);
} else if (ttsLevel == 2) {
CallerLogger.d(TAG, "已有高级别在播报,新内容直接丢弃!");
}
return;
}