Merge remote-tracking branch 'origin/dev_robotaxi-d_241202_6.8.2' into dev_robobus-d_241202_6.8.4
# Conflicts: # OCH/common/bridge/src/main/java/com/mogo/och/bridge/autopilot/line/LineManager.kt # OCH/common/bridge/src/main/java/com/mogo/och/bridge/ui/autopilot/AutopilotStateModel.kt # OCH/shuttle/driver_weaknet/src/main/java/com/mogo/och/weaknet/repository/db/MyDataBase.kt # gradle.properties
This commit is contained in:
@@ -116,6 +116,7 @@ object LoginModel {
|
||||
OchChainLogManager.writeChainLog("登录页面","获取验证码 mContext${mContext}")
|
||||
}else {
|
||||
mContext?.let {
|
||||
OchChainLogManager.writeChainLog("登录页面","网络请求去获取验证码")
|
||||
OchCommonServiceManager.getPhoneCode(it, phone,
|
||||
object : OchCommonServiceCallback<BaseData> {
|
||||
override fun onSuccess(data: BaseData?) {
|
||||
|
||||
@@ -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)) {
|
||||
|
||||
@@ -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{
|
||||
|
||||
@@ -65,14 +65,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)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,21 +2,59 @@ package com.mogo.och.bridge.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(){}
|
||||
}
|
||||
|
||||
@@ -82,6 +82,9 @@ object LineManager : CallerBase<ILineCallback>() {
|
||||
if (oldValue != newValue) {
|
||||
CallerEagleBaseFunctionCall4OchManager.setOchAutopilotOrderId(newValue)
|
||||
isFirstStartAutopilot = true
|
||||
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){
|
||||
@@ -253,11 +256,11 @@ object LineManager : CallerBase<ILineCallback>() {
|
||||
}
|
||||
|
||||
private fun setAutopilotControlParameters(){
|
||||
getStationsWithLineAndContrai { start, end, lineInfo, contrai ->
|
||||
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)
|
||||
@@ -316,6 +319,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()
|
||||
@@ -325,8 +331,7 @@ object LineManager : CallerBase<ILineCallback>() {
|
||||
parameters?.startLatLon = AutoPilotLonLat(start.lat, start.lon)
|
||||
parameters?.endLatLon = AutoPilotLonLat(end.lat, end.lon)
|
||||
parameters?.vehicleType = 10
|
||||
autopilotId = "${lineInfo.lineId}_${start.siteId}_${end.siteId}_${lineInfo.orderId}"
|
||||
parameters?.orderId = autopilotId
|
||||
parameters?.orderId = this.autopilotId
|
||||
parameters?.firstAutopilotFlag = isFirstStartAutopilot
|
||||
|
||||
if (parameters?.autoPilotLine == null) {
|
||||
@@ -519,6 +524,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(
|
||||
@@ -532,6 +542,11 @@ object LineManager : CallerBase<ILineCallback>() {
|
||||
type,
|
||||
source
|
||||
)
|
||||
if(send){
|
||||
M_LISTENERS.forEach {
|
||||
it.value.startAutopilotSuccess(source,autopilotId)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package com.mogo.och.bridge.ui.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.bridge.autopilot.autopilot.IOchAutopilotStatusListener
|
||||
import com.mogo.och.bridge.autopilot.autopilot.OchAutoPilotStatusListenerManager
|
||||
import com.mogo.och.bridge.autopilot.line.ILineCallback
|
||||
import com.mogo.och.bridge.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, ILineCallb
|
||||
|
||||
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, ILineCallb
|
||||
AutopilotStateDebug.addListener(TAG, this)
|
||||
OchAutoPilotStatusListenerManager.addListener(TAG, this)
|
||||
LineManager.addListener(TAG, this)
|
||||
BeautifyManager.setStatusChangeListener(TAG,this)
|
||||
}
|
||||
|
||||
override fun debugStatusChange(debugStatus: Boolean) {
|
||||
@@ -93,51 +101,126 @@ class AutopilotStateModel : ViewModel(), IOchAutopilotStatusListener, ILineCallb
|
||||
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()
|
||||
}
|
||||
this.lineId = null
|
||||
autopilotStateChange()
|
||||
}
|
||||
|
||||
IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_ENABLE -> {
|
||||
if (CallerAutoPilotControlManager.isCanStartAutopilot(false) && OchAutoPilotStatusListenerManager.canStartAutopilotFromFSM) {// 不可用
|
||||
this.viewCallback?.canStartAutopilot()
|
||||
} else {// 部分可用
|
||||
this.viewCallback?.autopilotDisable()
|
||||
/**
|
||||
* 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()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -159,7 +242,7 @@ class AutopilotStateModel : ViewModel(), IOchAutopilotStatusListener, ILineCallb
|
||||
* 条件过滤完成 正式进入启动自驾状态
|
||||
*/
|
||||
override fun sendStartAutopilotSuccess() {
|
||||
OchChainLogManager.writeChainLog("自驾信息", "启动自驾成功")
|
||||
OchChainLogManager.writeChainLog("自驾信息","发送启动自驾信息到底盘成功")
|
||||
BizLoopManager.runInMainThread {
|
||||
this.viewCallback?.startAutopilotAnimation()
|
||||
isPalyStartAni.set(true)
|
||||
@@ -187,8 +270,14 @@ class AutopilotStateModel : ViewModel(), IOchAutopilotStatusListener, ILineCallb
|
||||
}
|
||||
}
|
||||
|
||||
private fun startAutopilotFail() {
|
||||
BizLoopManager.runInMainThread {
|
||||
/**
|
||||
* 1、正在起自驾过程中、自驾状态变化切为非自驾状态或者FSM 状态改为不能启动自驾
|
||||
* 2、debug状态下5s后自动按照失败计算
|
||||
* 3、超时失败
|
||||
* 4、底盘明确告知启动失败
|
||||
*/
|
||||
private fun startAutopilotFail(){
|
||||
BizLoopManager.runInMainThread{
|
||||
this.viewCallback?.stopAutopilotAnimation()
|
||||
this.viewCallback?.startAutopilotFail()
|
||||
this.isPalyStartAni.set(false)
|
||||
|
||||
@@ -85,5 +85,8 @@ public class LanSocketManagerJava implements IReceivedMsgListener {
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void onFusionColor(boolean fusionColor) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -184,6 +184,11 @@ public class OrderModel {
|
||||
|
||||
private final IReceivedMsgListener mReceivedMsgListener =
|
||||
new IReceivedMsgListener() {
|
||||
@Override
|
||||
public void onFusionColor(boolean fusionColor) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDemoMode(boolean isDemoMode) {
|
||||
|
||||
|
||||
@@ -146,6 +146,39 @@
|
||||
app:layout_constraintBottom_toTopOf="@+id/video_fragment"
|
||||
app:layout_constraintEnd_toEndOf="parent" />
|
||||
|
||||
<!-- 事件弹框 -->
|
||||
<com.mogo.eagle.core.function.hmi.ui.v2n.RoadV2NEventWindowView
|
||||
android:id="@+id/roadV2NEventWindowView"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="-70dp"
|
||||
android:layout_marginRight="14dp"
|
||||
app:layout_constraintBottom_toTopOf="@+id/zv_msg_pop_bottom"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
android:visibility="gone"/>
|
||||
|
||||
<!--红绿灯提醒-->
|
||||
<com.mogo.eagle.core.function.hmi.ui.notice.traffic.TrafficLightPromptView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="@dimen/dp_m_70"
|
||||
app:layout_constraintBottom_toTopOf="@id/zv_msg_pop_bottom"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:promptUser="passenger_bus"
|
||||
android:visibility="gone"
|
||||
/>
|
||||
|
||||
<!--融合红绿灯-->
|
||||
<com.mogo.eagle.core.function.hmi.ui.widget.FusionTrafficLightView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/och_shadow_layout"
|
||||
android:layout_marginTop="@dimen/dp_30"
|
||||
app:fusionLightUser="passenger_bus"
|
||||
android:visibility="gone"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_shuttle_b2_p_version"
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
@@ -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 从这里解析出经停信息,轨迹信息,并调用下载轨迹接口
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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)
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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)
|
||||
}
|
||||
|
||||
@@ -31,6 +31,7 @@ import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotCarConfigListene
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotControlProvider
|
||||
import com.mogo.eagle.core.function.api.hmi.view.IViewControlListener.Companion.FUNC_MODE_RAIN
|
||||
import com.mogo.eagle.core.function.api.map.collect.IMoGoMapDataCollectProvider
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotControlManager
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotCarConfigListenerManager
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerIpcConnectStateToastManager
|
||||
import com.mogo.eagle.core.function.call.cloud.CallerCloudCertManager
|
||||
@@ -56,6 +57,7 @@ import com.mogo.eagle.core.utilcode.util.ToastUtils
|
||||
import com.mogo.eagle.core.utilcode.util.UiThreadHandler
|
||||
import com.mogo.telematic.MogoProtocolMsg
|
||||
import com.mogo.telematic.MogoProtocolMsg.NORMAL_DATA
|
||||
import com.mogo.telematic.MogoProtocolMsg.SYNC_FUSION_COLOR_STATUS
|
||||
import com.mogo.telematic.MogoProtocolMsg.SYNC_MODE_STATUS
|
||||
import com.mogo.telematic.NSDNettyManager
|
||||
import com.mogo.telematic.client.listener.NettyClientListener
|
||||
@@ -161,6 +163,7 @@ class MoGoAutopilotControlProvider :
|
||||
override fun run() {
|
||||
// 同步是否开启美化模式
|
||||
setDemoMode(FunctionBuildConfig.isDemoMode)
|
||||
setFusionColor(FunctionBuildConfig.isFusionColor)
|
||||
setIgnoreConditionDraw(FunctionBuildConfig.isIgnoreConditionsDrawAutopilotTrajectoryData)
|
||||
msgHandler.synMsgToAllClients()
|
||||
}
|
||||
@@ -571,6 +574,32 @@ class MoGoAutopilotControlProvider :
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 感知颜色绘制同步
|
||||
*/
|
||||
override fun setFusionColor(isEnable: Boolean) {
|
||||
// 同步给乘客端
|
||||
if (AppIdentityModeUtils.isDriver(FunctionBuildConfig.appIdentityMode)) {
|
||||
val byteArray = if (isEnable) {
|
||||
"1;${System.currentTimeMillis()}".toByteArray()
|
||||
} else {
|
||||
"0;${System.currentTimeMillis()}".toByteArray()
|
||||
}
|
||||
if (NSDNettyManager.getInstance().isServerStart) {
|
||||
NSDNettyManager.getInstance()
|
||||
.sendMsgToAllClients(
|
||||
MogoProtocolMsg(
|
||||
SYNC_FUSION_COLOR_STATUS,
|
||||
byteArray.size,
|
||||
byteArray
|
||||
)
|
||||
)
|
||||
} else {
|
||||
CallerLogger.d("$M_D_C$TAG", "同步感知颜色绘制时司机端Server未启动!")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
override fun setIgnoreConditionDraw(isIgnore: Boolean) {
|
||||
// 同步给乘客端
|
||||
if (AppIdentityModeUtils.isDriver(FunctionBuildConfig.appIdentityMode)) {
|
||||
|
||||
@@ -143,6 +143,8 @@ class MoGoAdasMsgConnectStatusListenerImpl :
|
||||
CallerAutoPilotControlManager.setRainMode(FunctionBuildConfig.isRainMode)
|
||||
// 6.6.2 版本默认开启,与海江确认过,默认发盲区模式
|
||||
CallerAutoPilotControlManager.sendFusionMode(2)
|
||||
CallerAutoPilotControlManager.sendV2iToPncCmd(FunctionBuildConfig.v2iToPNC)
|
||||
CallerAutoPilotControlManager.sendV2nToPncCmd(FunctionBuildConfig.v2nTotalSwitch)
|
||||
}
|
||||
|
||||
AdasConstants.IpcConnectionStatus.CONNECTING -> {
|
||||
|
||||
@@ -20,6 +20,7 @@ import com.mogo.eagle.core.data.multidisplay.TelematicConstant
|
||||
import com.mogo.eagle.core.data.v2x.V2XEvent.RoadEventX
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotControlManager
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotControlManager.setDemoMode
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotControlManager.setFusionColor
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotControlManager.setIgnoreConditionDraw
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotIdentifyListenerManager
|
||||
@@ -74,6 +75,9 @@ class TeleMsgHandler : IMsgHandler {
|
||||
@Volatile
|
||||
private var demoModeTime = 0L
|
||||
|
||||
@Volatile
|
||||
private var fusionColorTime = 0L
|
||||
|
||||
@Volatile
|
||||
private var timestamp = 0L
|
||||
|
||||
@@ -302,6 +306,27 @@ class TeleMsgHandler : IMsgHandler {
|
||||
}
|
||||
}
|
||||
|
||||
MogoProtocolMsg.SYNC_FUSION_COLOR_STATUS -> {
|
||||
val content = String(it.body)
|
||||
if (content.contains(";")) {
|
||||
val strArr = content.split(";")
|
||||
if (strArr.size == 2) {
|
||||
val currTime = strArr[1].toLong()
|
||||
if (currTime > fusionColorTime) {
|
||||
val fusionColor = when (strArr[0]) {
|
||||
"1" -> true
|
||||
else -> false
|
||||
}
|
||||
CallerTelematicListenerManager.dispatchFusionColor(fusionColor)
|
||||
fusionColorTime = currTime
|
||||
invokeNettyConnResult("乘客屏收到 fusionColor为:${fusionColor}")
|
||||
} else {
|
||||
invokeNettyConnResult("乘客屏收到过时的fusionColor")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
MogoProtocolMsg.REQ_MAC_ADDRESS -> {
|
||||
val carConfig = MessagePad.CarConfigResp.parseFrom(msg.body)
|
||||
AppConfigInfo.plateNumber = carConfig.plateNumber
|
||||
@@ -484,6 +509,7 @@ class TeleMsgHandler : IMsgHandler {
|
||||
val socketAddress = channel?.remoteAddress().toString()
|
||||
CallerLogger.d("${SceneConstant.M_D_C}$TAG", "Client ip is:${socketAddress}")
|
||||
setDemoMode(FunctionBuildConfig.isDemoMode)
|
||||
setFusionColor(FunctionBuildConfig.isFusionColor)
|
||||
setIgnoreConditionDraw(FunctionBuildConfig.isIgnoreConditionsDrawAutopilotTrajectoryData)
|
||||
}
|
||||
|
||||
|
||||
@@ -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()
|
||||
}
|
||||
|
||||
@@ -7,13 +7,18 @@ import android.view.View
|
||||
import androidx.constraintlayout.widget.ConstraintLayout
|
||||
import androidx.core.content.ContextCompat
|
||||
import chassis.Chassis
|
||||
import com.mogo.eagle.core.data.config.FunctionBuildConfig
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotStatusListener
|
||||
import com.mogo.eagle.core.function.api.hmi.view.IViewControlListener
|
||||
import com.mogo.eagle.core.function.api.hmi.view.IViewControlListener.Companion.FUNC_MODE_DEMO
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager
|
||||
import com.mogo.eagle.core.function.call.hmi.CallerHmiManager
|
||||
import com.mogo.eagle.core.function.call.hmi.CallerHmiViewControlListenerManager
|
||||
import com.mogo.eagle.core.function.hmi.R
|
||||
import com.mogo.eagle.core.utilcode.kotlin.onClick
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.Logger
|
||||
import com.mogo.eagle.core.utilcode.util.UiThreadHandler
|
||||
import com.zhjt.mogo_core_function_devatools.status.StatusManager
|
||||
import com.zhjt.mogo_core_function_devatools.status.entity.AcceleratorStatus
|
||||
import com.zhjt.mogo_core_function_devatools.status.entity.BrakeStatus
|
||||
@@ -44,7 +49,8 @@ class StartAutoPilotStatusView @JvmOverloads constructor(
|
||||
context: Context,
|
||||
attrs: AttributeSet? = null,
|
||||
defStyleAttr: Int = 0
|
||||
) : ConstraintLayout(context, attrs, defStyleAttr), StatusManager.IStatusListener {
|
||||
) : ConstraintLayout(context, attrs, defStyleAttr), StatusManager.IStatusListener,
|
||||
IViewControlListener {
|
||||
|
||||
companion object {
|
||||
private const val TAG = "StartAutoPilotStatusView"
|
||||
@@ -89,7 +95,7 @@ class StartAutoPilotStatusView @JvmOverloads constructor(
|
||||
}
|
||||
|
||||
private fun handleFSM(status: FSMStatus) {
|
||||
Logger.d(TAG, "--- handleFSM ---FSMStatus: code=${status.state} isError=${status.isException()} ")
|
||||
Logger.d(TAG, "--- handleFSM ---FSMStatus: code=${status.state} isError=${status.isException()} isDemoMode=${FunctionBuildConfig.isDemoMode}")
|
||||
val lastHasFSM = hasFSM.get()
|
||||
val newHasFSM = status.hasFSMModule()
|
||||
Logger.d(TAG, "--- handleFSM ---lastHasFSM=${lastHasFSM} newHasFSM=${newHasFSM}")
|
||||
@@ -98,6 +104,11 @@ class StartAutoPilotStatusView @JvmOverloads constructor(
|
||||
}
|
||||
hasFSM.set(newHasFSM)
|
||||
|
||||
if (FunctionBuildConfig.isDemoMode && status.isException()) {
|
||||
// 美化模式下如果是异常的,修改成正常的
|
||||
status.state = FSMStateCode.ExistNormal
|
||||
}
|
||||
|
||||
when (status.state) {
|
||||
FSMStateCode.UnKnown -> {
|
||||
fSMStatusLayout?.setOnClickListener(null)
|
||||
@@ -145,9 +156,15 @@ class StartAutoPilotStatusView @JvmOverloads constructor(
|
||||
}
|
||||
|
||||
private fun handleWithoutFSM(status: Status) {
|
||||
val isError =
|
||||
var isError =
|
||||
status.isException() && CallerAutoPilotStatusListenerManager.getAutoPilotStatusInfo().state != IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_RUNNING
|
||||
Logger.d(TAG, "--- handleWithoutFSM ---${status::class.simpleName}: $isError")
|
||||
Logger.d(TAG, "--- handleWithoutFSM --- isError=${status::class.simpleName}: $isError isDemoMode=${FunctionBuildConfig.isDemoMode}")
|
||||
|
||||
if (FunctionBuildConfig.isDemoMode && isError) {
|
||||
// 美化模式下如果是异常的,修改成正常的
|
||||
isError = false
|
||||
}
|
||||
|
||||
when (status) {
|
||||
is GearStatus -> {
|
||||
val position = try {
|
||||
@@ -224,6 +241,34 @@ class StartAutoPilotStatusView @JvmOverloads constructor(
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 处理无FSM模块时 && 美化模式时
|
||||
*/
|
||||
private fun handleWithoutFSMDemoMode() {
|
||||
Logger.d(TAG, "--- handleWithoutFSMDemoMode ---")
|
||||
UiThreadHandler.post {
|
||||
tv_gear?.isEnabled = false
|
||||
iv_accelerator?.isSelected = false
|
||||
iv_brake?.isSelected = false
|
||||
iv_double_flash?.isSelected = false
|
||||
iv_steer?.isSelected = false
|
||||
withoutFSMStatusLayout?.background =
|
||||
ContextCompat.getDrawable(
|
||||
context,
|
||||
R.drawable.icon_no_fsm_status_bg_normal
|
||||
)
|
||||
notifyStatus(false)
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 处理有FSM模块时 && 美化模式时
|
||||
*/
|
||||
private fun handleFSMDemoMode() {
|
||||
Logger.d(TAG, "--- handleFSMDemoMode ---")
|
||||
handleFSM(FSMStatus(FSMStateCode.ExistNormal, listOf("正常")))
|
||||
}
|
||||
|
||||
private fun notifyStatus(isError: Boolean) {
|
||||
Logger.d(TAG, "--- notifyStatus ---: $isError")
|
||||
statusChangedListeners.values.forEach { itx ->
|
||||
@@ -238,11 +283,27 @@ class StartAutoPilotStatusView @JvmOverloads constructor(
|
||||
override fun onAttachedToWindow() {
|
||||
super.onAttachedToWindow()
|
||||
StatusManager.addListener(TAG, this)
|
||||
CallerHmiViewControlListenerManager.addListener(TAG,this)
|
||||
}
|
||||
|
||||
override fun onDetachedFromWindow() {
|
||||
super.onDetachedFromWindow()
|
||||
StatusManager.removeListener(TAG)
|
||||
CallerHmiViewControlListenerManager.removeListener(TAG)
|
||||
}
|
||||
|
||||
override fun updateFuncMode(tag: String, boolean: Boolean) {
|
||||
if(tag == FUNC_MODE_DEMO){
|
||||
Logger.i(TAG, "updateFuncMode: tag=$tag value=$boolean")
|
||||
if (FunctionBuildConfig.isDemoMode) {
|
||||
// 构建数据,强制刷新成正常的状态
|
||||
if (hasFSM.get()) {
|
||||
handleFSMDemoMode()
|
||||
} else {
|
||||
handleWithoutFSMDemoMode()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -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 临时添加,后面宏宇统一在数据中心处理
|
||||
|
||||
@@ -54,7 +54,7 @@ class BusPassengerMsgBoxBubbleView @JvmOverloads constructor(
|
||||
override fun onDataChanged(category: MsgCategory, msgBoxList: MsgBoxBean){
|
||||
UiThreadHandler.post({
|
||||
if(category == MsgCategory.NOTICE){
|
||||
if(msgBoxList.type == MsgBoxType.NOTICE || msgBoxList.type == MsgBoxType.V2X
|
||||
if(msgBoxList.type == MsgBoxType.NOTICE
|
||||
|| msgBoxList.type == MsgBoxType.OBU || msgBoxList.type == MsgBoxType.OPERATION){
|
||||
MsgBoxConfig.noticeList.add(msgBoxList)
|
||||
if(isShowData){
|
||||
|
||||
@@ -57,7 +57,7 @@ class MBoxBubbleView @JvmOverloads constructor(
|
||||
override fun onDataChanged(category: MsgCategory, msgBoxList: MsgBoxBean) {
|
||||
UiThreadHandler.post({
|
||||
if(category == MsgCategory.NOTICE){
|
||||
if(msgBoxList.type == MsgBoxType.NOTICE || msgBoxList.type == MsgBoxType.V2X
|
||||
if(msgBoxList.type == MsgBoxType.NOTICE
|
||||
|| msgBoxList.type == MsgBoxType.OBU || msgBoxList.type == MsgBoxType.OPERATION){
|
||||
MsgBoxConfig.noticeList.add(msgBoxList)
|
||||
if(isShowData){
|
||||
|
||||
@@ -54,7 +54,7 @@ class MMsgBoxBubbleView @JvmOverloads constructor(
|
||||
override fun onDataChanged(category: MsgCategory, msgBoxList: MsgBoxBean) {
|
||||
UiThreadHandler.post({
|
||||
if(category == MsgCategory.NOTICE){
|
||||
if(msgBoxList.type == MsgBoxType.NOTICE || msgBoxList.type == MsgBoxType.V2X
|
||||
if(msgBoxList.type == MsgBoxType.NOTICE
|
||||
|| msgBoxList.type == MsgBoxType.OBU || msgBoxList.type == MsgBoxType.OPERATION){
|
||||
update(msgBoxList)
|
||||
}
|
||||
|
||||
@@ -445,6 +445,7 @@ class OperatePanelLayout : LinearLayout {
|
||||
FunctionBuildConfig.isFusionColor = isChecked //6.6.2版本基于运营需求-产品设计-v2i进pnc,感知目标颜色替换
|
||||
FunctionBuildConfig.fusionMode = 2
|
||||
CallerAutoPilotControlManager.sendFusionMode(2)
|
||||
CallerAutoPilotControlManager.setFusionColor(isChecked)
|
||||
CallerHmiViewControlListenerManager.invokeFuncMode(IViewControlListener.FUNC_FUSION_COLOR,isChecked)
|
||||
CallerAutoPilotControlManager.sendV2iToPncCmd(isChecked)
|
||||
hmiAction("V2I场景进PNC, ", isChecked)
|
||||
|
||||
@@ -75,6 +75,7 @@ import com.mogo.eagle.core.function.api.hmi.view.IViewControlListener.Companion.
|
||||
import com.mogo.eagle.core.function.api.hmi.view.IViewControlListener.Companion.FUNC_MODE_DEMO
|
||||
import com.mogo.eagle.core.function.api.hmi.view.IViewControlListener.Companion.FUNC_MODE_RAIN
|
||||
import com.mogo.eagle.core.function.api.setting.ISopSettingListener
|
||||
import com.mogo.eagle.core.function.api.telematic.IReceivedMsgListener
|
||||
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.CallerAutopilotIdentifyListenerManager
|
||||
@@ -97,6 +98,7 @@ import com.mogo.eagle.core.function.call.obu.CallerObuConnectListenerManager
|
||||
import com.mogo.eagle.core.function.call.obu.CallerObuInfoListenerManager
|
||||
import com.mogo.eagle.core.function.call.setting.CallerMoGoUiSettingManager
|
||||
import com.mogo.eagle.core.function.call.setting.CallerSopSettingManager
|
||||
import com.mogo.eagle.core.function.call.telematic.CallerTelematicListenerManager
|
||||
import com.mogo.eagle.core.function.call.telematic.CallerTelematicManager
|
||||
import com.mogo.eagle.core.function.hmi.R
|
||||
import com.mogo.eagle.core.function.hmi.ui.utils.HmiActionLog
|
||||
@@ -360,7 +362,8 @@ internal class DebugSettingView @JvmOverloads constructor(
|
||||
IMoGoChassisStatesListener,
|
||||
IMoGoSweeperFutianCleanSystemListener,
|
||||
IMoGoObuInfoListener,
|
||||
ISopSettingListener, IViewControlListener, IMoGoCloudListener, IBindStateChangeListener {
|
||||
ISopSettingListener, IViewControlListener, IMoGoCloudListener, IBindStateChangeListener,
|
||||
IReceivedMsgListener {
|
||||
|
||||
companion object {
|
||||
private const val TAG = "DebugSettingView"
|
||||
@@ -469,6 +472,8 @@ internal class DebugSettingView @JvmOverloads constructor(
|
||||
|
||||
CallerHmiViewControlListenerManager.addListener(TAG, this)
|
||||
|
||||
CallerTelematicListenerManager.addListener(TAG, this)
|
||||
|
||||
//添加 业务配置监听
|
||||
CallerDevaToolsFuncConfigListenerManager.registerDevaToolsFuncConfigListener(
|
||||
FuncBizConfig.FOUNDATION, TAG, true, this
|
||||
@@ -513,6 +518,9 @@ internal class DebugSettingView @JvmOverloads constructor(
|
||||
CallerSopSettingManager.removeListener(TAG)
|
||||
|
||||
CallerHmiViewControlListenerManager.removeListener(TAG)
|
||||
|
||||
CallerTelematicListenerManager.removeListener(TAG)
|
||||
|
||||
DevicesManager.removeBindStateChangeListener(TAG)
|
||||
// 移除 业务配置监听
|
||||
CallerDevaToolsFuncConfigListenerManager.unRegisterDevaToolsFuncConfigListener(
|
||||
@@ -946,6 +954,7 @@ internal class DebugSettingView @JvmOverloads constructor(
|
||||
btnDrawFusion.isChecked = FunctionBuildConfig.isFusionColor
|
||||
btnDrawFusion.setOnCheckedChangeListener { _, isChecked ->
|
||||
FunctionBuildConfig.isFusionColor = isChecked
|
||||
CallerAutoPilotControlManager.setFusionColor(isChecked)
|
||||
}
|
||||
|
||||
// 演示模式,上一次勾选的数据
|
||||
@@ -2714,6 +2723,13 @@ internal class DebugSettingView @JvmOverloads constructor(
|
||||
tbCarAperture.isChecked = status
|
||||
}
|
||||
|
||||
override fun onFusionColor(fusionColor: Boolean) {
|
||||
super.onFusionColor(fusionColor)
|
||||
ThreadUtils.runOnUiThread {
|
||||
btnDrawFusion.isChecked = FunctionBuildConfig.isFusionColor
|
||||
}
|
||||
}
|
||||
|
||||
override fun updateFuncMode(tag: String, boolean: Boolean) {
|
||||
super.updateFuncMode(tag, boolean)
|
||||
if (tag == FUNC_MODE_DEMO) {
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -113,7 +113,7 @@ object FunctionBuildConfig {
|
||||
*/
|
||||
@Volatile
|
||||
@JvmField
|
||||
var isFusionColor = false
|
||||
var isFusionColor = true
|
||||
|
||||
/**
|
||||
* 是否开启obu rv预警感知物融合功能 , 仅大理,烟台交付项目
|
||||
@@ -360,14 +360,14 @@ object FunctionBuildConfig {
|
||||
*/
|
||||
@Volatile
|
||||
@JvmField
|
||||
var v2nNewLinkedToPNC = false
|
||||
var v2nNewLinkedToPNC = true
|
||||
|
||||
/**
|
||||
* 是否开启V2I场景进PNC的开关,开关默认关闭
|
||||
*/
|
||||
@Volatile
|
||||
@JvmField
|
||||
var v2iToPNC = false
|
||||
var v2iToPNC = true
|
||||
|
||||
@Volatile
|
||||
@JvmField
|
||||
|
||||
@@ -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(),
|
||||
@@ -821,14 +821,15 @@ enum class EventTypeEnumNew(
|
||||
FOURS_ICE.poiType -> R.raw.v2x_daolujiebing
|
||||
FOURS_PONDING.poiType -> R.raw.v2x_daolujishui
|
||||
GHOST_PROBE.poiType -> R.raw.v2x_guzhangqiuzhu
|
||||
TYPE_SOCKET_ROAD_SHIGONG.poiType -> if (AppIdentityModeUtils.isPassenger(FunctionBuildConfig.appIdentityMode)) R.raw.shigong_passenger else R.raw.v2x_shigong_warning
|
||||
TYPE_SOCKET_ROAD_SHIGONG.poiType -> R.raw.v2x_shigong_warning
|
||||
TYPE_SOCKET_ROAD_JINGZHI.poiType -> R.raw.v2x_zhangai
|
||||
TYPE_SOCKET_ROAD_SHIGU.poiType -> {
|
||||
if (AppIdentityModeUtils.isTaxiPassenger(FunctionBuildConfig.appIdentityMode)) {
|
||||
R.raw.v2x_shigu_sanjiaopai
|
||||
} else {
|
||||
R.raw.taxi_sanjiaopai
|
||||
}
|
||||
// if (AppIdentityModeUtils.isTaxiPassenger(FunctionBuildConfig.appIdentityMode)) {
|
||||
// R.raw.v2x_shigu_sanjiaopai
|
||||
// } else {
|
||||
// R.raw.taxi_sanjiaopai
|
||||
// }
|
||||
R.raw.taxi_sanjiaopai
|
||||
}
|
||||
TYPE_SOCKET_ROAD_CONGESTION.poiType -> R.raw.v2x_yongdu
|
||||
TYPE_SOCKET_ROAD_PEOPLE_CROSS.poiType -> if (FunctionBuildConfig.skinMode != 0) TrafficTypeEnum.TYPE_TRAFFIC_ID_PEOPLE_CROSS.traffic3DIconId else TrafficTypeEnum.TYPE_TRAFFIC_ID_PEOPLE_CROSS.traffic3DNightIconId
|
||||
|
||||
@@ -164,6 +164,12 @@ interface IMoGoAutopilotControlProvider : IMoGoFunctionServerProvider {
|
||||
*/
|
||||
fun setDemoMode(isEnable: Boolean)
|
||||
|
||||
/**
|
||||
* 融合颜色
|
||||
* 司机屏同步给乘客屏
|
||||
*/
|
||||
fun setFusionColor(isEnable: Boolean)
|
||||
|
||||
/**
|
||||
* 是否忽略条件直接绘制
|
||||
* 司机屏同步给乘客屏
|
||||
|
||||
@@ -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)
|
||||
|
||||
/**
|
||||
* 展示指定方位上的红框预警
|
||||
|
||||
@@ -1,9 +1,11 @@
|
||||
package com.mogo.eagle.core.function.api.telematic
|
||||
|
||||
interface IReceivedMsgListener {
|
||||
fun onReceivedMsg(type: Int, byteArray: ByteArray)
|
||||
fun onReceivedMsg(type: Int, byteArray: ByteArray){}
|
||||
|
||||
fun onReceivedServerSn(sn: String?) {}
|
||||
|
||||
fun onDemoMode(isDemoMode: Boolean) {}
|
||||
|
||||
fun onFusionColor(fusionColor: Boolean){}
|
||||
}
|
||||
@@ -355,6 +355,12 @@ object CallerAutoPilotControlManager {
|
||||
}
|
||||
}
|
||||
|
||||
fun setFusionColor(isEnable: Boolean){
|
||||
if (AppIdentityModeUtils.isDriver(FunctionBuildConfig.appIdentityMode)) {
|
||||
providerApi?.setFusionColor(isEnable)
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 是否忽略条件直接绘制
|
||||
* 司机屏同步给乘客屏
|
||||
|
||||
@@ -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
|
||||
)
|
||||
}
|
||||
|
||||
@@ -57,4 +57,21 @@ object CallerTelematicListenerManager: CallerBase<IReceivedMsgListener>() {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fun dispatchFusionColor(fusionColor: Boolean) {
|
||||
if (fusionColor != FunctionBuildConfig.isFusionColor) {
|
||||
FunctionBuildConfig.isFusionColor = fusionColor
|
||||
M_LISTENERS.forEach {
|
||||
val listener = it.value
|
||||
try {
|
||||
listener.onFusionColor(fusionColor)
|
||||
} catch (e: Exception) {
|
||||
e.printStackTrace()
|
||||
Log.e(TAG, "转发感知颜色出现异常:${e.message}")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -8,10 +8,10 @@
|
||||
<bool name="v2n_total_switch">true</bool>
|
||||
|
||||
<!-- 是否是V2N新链路(云->工控机->App)-->
|
||||
<bool name="v2n_new_linked">false</bool>
|
||||
<bool name="v2n_new_linked">true</bool>
|
||||
|
||||
<!-- V2N场景进PNC -->
|
||||
<bool name="v2n_new_linked_to_pnc">false</bool>
|
||||
<bool name="v2n_new_linked_to_pnc">true</bool>
|
||||
|
||||
<!-- 是否开启绿波通行, 默认关闭 -->
|
||||
<bool name="v2n_green_wave">false</bool>
|
||||
@@ -26,7 +26,7 @@
|
||||
<bool name="v2i_weakness_traffic">false</bool>
|
||||
|
||||
<!-- 是否开启V2I场景进PNC -->
|
||||
<bool name="v2i_from_pnc">false</bool>
|
||||
<bool name="v2i_from_pnc">true</bool>
|
||||
|
||||
<!-- 是否开启v2v总开关 -->
|
||||
<bool name="v2v_total_switch">false</bool>
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -64,21 +64,21 @@ bytex.ASM_API=ASM7
|
||||
LOGLIB_VERSION=1.10.18
|
||||
######## MogoAiCloudSDK Version ########
|
||||
# 网络请求LOGLIB_VERSION
|
||||
MOGO_NETWORK_VERSION=1.4.7.42
|
||||
MOGO_NETWORK_VERSION=1.4.7.58
|
||||
# 鉴权
|
||||
MOGO_PASSPORT_VERSION=1.4.7.42
|
||||
MOGO_PASSPORT_VERSION=1.4.7.58
|
||||
# 长链接
|
||||
MOGO_SOCKET_VERSION=1.4.7.42
|
||||
MOGO_SOCKET_VERSION=1.4.7.58
|
||||
# 数据采集
|
||||
MOGO_REALTIME_VERSION=1.4.7.42
|
||||
MOGO_REALTIME_VERSION=1.4.7.58
|
||||
# 直播推流
|
||||
MOGO_LIVE_VERSION=1.4.7.42
|
||||
MOGO_LIVE_VERSION=1.4.7.58
|
||||
# 直播拉流
|
||||
MOGO_TRAFFICLIVE_VERSION=1.4.7.42
|
||||
MOGO_TRAFFICLIVE_VERSION=1.4.7.58
|
||||
# 定位服务
|
||||
MOGO_LOCATION_VERSION=1.4.7.42
|
||||
MOGO_LOCATION_VERSION=1.4.7.58
|
||||
# 远程通讯模块
|
||||
MOGO_TELEMATIC_VERSION=1.4.7.42
|
||||
MOGO_TELEMATIC_VERSION=1.4.7.58
|
||||
# 动态换肤SDK
|
||||
MOGO_SKIN_VERSION=1.4.7.49.19
|
||||
######## MogoAiCloudSDK Version ########
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user