Merge branch 'dev_robobus-m1-p-app-module_1.0.0_230112_1.0.0' into 'dev_RoboBus_P_230220_1.0.1'
Dev robobus m1 p app module 1.0.0 230112 1.0.0 See merge request zhjt/AndroidApp/MoGoEagleEye!623
This commit is contained in:
@@ -145,7 +145,7 @@ class PM2DrivingModel private constructor() {
|
||||
override fun onReceivedMsg(type: Int, byteArray: ByteArray) {//接收司机端发来的信息
|
||||
if (TelematicConstant.BUSINESS_STRING == type){
|
||||
val msg = GsonUtils.fromJson(String(byteArray),AppConnectMsg::class.java) as AppConnectMsg
|
||||
Logger.d(TAG,"onReceivedMsg = "+GsonUtils.toJson(msg))
|
||||
Logger.d(SceneConstant.M_BUS_P+TAG,"onReceivedMsg = "+GsonUtils.toJson(msg))
|
||||
if (msg.isPlay){ //播报
|
||||
speakTTS(msg.msg)
|
||||
}
|
||||
@@ -192,19 +192,19 @@ class PM2DrivingModel private constructor() {
|
||||
|
||||
private val moGoAutopilotPlanningListener = object : IMoGoPlanningRottingListener{
|
||||
override fun onAutopilotRotting(globalPathResp: MessagePad.GlobalPathResp?) {
|
||||
val routePoints = globalPathResp?.wayPointsList
|
||||
if (null != routePoints && routePoints.size > 0) {
|
||||
updateRoutePoints(routePoints)
|
||||
// startOrStopRouteAndWipe(true)
|
||||
globalPathResp?.let {
|
||||
d(SceneConstant.M_BUS_P + TAG, "och-rotting==wayPointsSize = " + it.wayPointsList.size)
|
||||
updateRoutePoints(it.wayPointsList)
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
fun updateRoutePoints(routePoints: List<MessagePad.Location?>?) {
|
||||
fun updateRoutePoints(routePoints: List<MessagePad.Location>?) {
|
||||
mRoutePoints.clear()
|
||||
val latLngModels = CoordinateCalculateRouteUtil
|
||||
.coordinateConverterWgsToGcjLocations(mContext, routePoints)
|
||||
d(SceneConstant.M_BUS_P + TAG, "och-rotting==latLngModels = " + latLngModels.size)
|
||||
mRoutePoints.addAll(latLngModels)
|
||||
calculateTwoStationsRoute()
|
||||
}
|
||||
@@ -227,7 +227,7 @@ class PM2DrivingModel private constructor() {
|
||||
super.onAutopilotStatusResponse(autoPilotStatusInfo)
|
||||
val status = autoPilotStatusInfo.state
|
||||
if (mCurrentAutoStatus == status) return
|
||||
|
||||
d(SceneConstant.M_BUS_P+TAG, "onAutopilotStatusResponse ===== $status")
|
||||
if (IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_RUNNING != status){
|
||||
//美化模式下且行程中
|
||||
if (FunctionBuildConfig.isDemoMode &&
|
||||
@@ -241,6 +241,7 @@ class PM2DrivingModel private constructor() {
|
||||
}else{//自驾状态 2
|
||||
mAutoStatusCallback?.updateAutoStatus(true)
|
||||
}
|
||||
mCurrentAutoStatus = status
|
||||
}
|
||||
|
||||
}
|
||||
@@ -260,7 +261,7 @@ class PM2DrivingModel private constructor() {
|
||||
if (data?.data == null) return
|
||||
if (data.data.driverStatus != operationStatus?.driverStatus
|
||||
|| data.data.plateNumber != operationStatus?.plateNumber){
|
||||
d(TAG, "queryDriverOperationStatus ===== 车牌或者登陆状态有变更")
|
||||
d(SceneConstant.M_BUS_P+TAG, "queryDriverOperationStatus ===== 车牌或者登陆状态有变更")
|
||||
mDrivingInfoCallback?.changeOperationStatus(data.data.driverStatus == 1)
|
||||
}
|
||||
operationStatus = data.data as PM2OperationStatusResponse.Result
|
||||
@@ -294,7 +295,7 @@ class PM2DrivingModel private constructor() {
|
||||
}
|
||||
|
||||
if (data?.result?.sites === null) {
|
||||
d(TAG, "queryDriverSiteByCoordinate ===== 没有路线")
|
||||
d(SceneConstant.M_BUS_P+TAG, "queryDriverSiteByCoordinate ===== 没有路线")
|
||||
routesResult = null
|
||||
mNextStationIndex = 0
|
||||
isGoingToNextStation = false
|
||||
@@ -314,7 +315,7 @@ class PM2DrivingModel private constructor() {
|
||||
queryDriverOperationDelay()
|
||||
return
|
||||
}
|
||||
d(TAG, "queryDriverSiteByCoordinate = %s", msg)
|
||||
d(SceneConstant.M_BUS_P+TAG, "queryDriverSiteByCoordinate = %s", msg)
|
||||
}
|
||||
|
||||
})
|
||||
@@ -335,7 +336,7 @@ class PM2DrivingModel private constructor() {
|
||||
&& station.isLeaving && i + 1 < stations.size) {
|
||||
mDrivingInfoCallback?.updateStationsInfo(stations as MutableList<PM2Station>, i + 1, false)
|
||||
if (mNextStationIndex != i + 1) {
|
||||
d(TAG,"轨迹排查--开始行程")
|
||||
d(SceneConstant.M_BUS_P+TAG,"och-rotting--start ")
|
||||
mTwoStationsRouts.clear()
|
||||
startRemainRouteInfo()
|
||||
}
|
||||
@@ -397,7 +398,7 @@ class PM2DrivingModel private constructor() {
|
||||
break
|
||||
}
|
||||
for (lastPoints in lastPointsMap.values) {
|
||||
d(SceneConstant.M_BUS_P + TAG, "轨迹排查==lastPoints.size() = " + lastPoints.size)
|
||||
d(SceneConstant.M_BUS_P + TAG, "och-rotting==lastPoints.size() = " + lastPoints.size)
|
||||
var lastSumLength = 0f
|
||||
lastSumLength = if (lastPoints.size == 1) { //只是最后一个点,计算当前位置和最后一个点的距离
|
||||
if (mNextStationIndex <= mStations.size - 1 && mNextStationIndex >= 0) {
|
||||
@@ -416,7 +417,7 @@ class PM2DrivingModel private constructor() {
|
||||
CoordinateCalculateRouteUtil.calculateRouteSumLength(lastPoints)
|
||||
}
|
||||
val lastTime = lastSumLength / BusPassengerConst.BUS_AVERAGE_SPEED * 3.6 //秒
|
||||
d(SceneConstant.M_BUS_P + TAG, "轨迹排查==lastSumLength = $lastSumLength")
|
||||
d(SceneConstant.M_BUS_P + TAG, "och-rotting==lastSumLength = $lastSumLength")
|
||||
mDrivingInfoCallback?.updateRemainMT(
|
||||
lastSumLength.toLong(),
|
||||
lastTime.toLong()
|
||||
@@ -446,7 +447,7 @@ class PM2DrivingModel private constructor() {
|
||||
stationNext.gcjLat
|
||||
)
|
||||
|
||||
d(SceneConstant.M_BUS_P + TAG, "轨迹排查==currentRouteIndex = " + currentRouteIndex
|
||||
d(SceneConstant.M_BUS_P + TAG, "och-rotting==currentRouteIndex = " + currentRouteIndex
|
||||
+ ", nextRouteIndex = " + nextRouteIndex)
|
||||
|
||||
if (currentRouteIndex < nextRouteIndex) { //如果找到的next在起点的轨迹前面,直接舍弃这个轨迹,不显示
|
||||
@@ -467,7 +468,7 @@ class PM2DrivingModel private constructor() {
|
||||
* @param isStart
|
||||
*/
|
||||
fun startOrStopCalculateRouteInfo(isStart: Boolean) {
|
||||
d(TAG, "startOrStopCalculateRouteInfo() $isStart")
|
||||
d(SceneConstant.M_BUS_P+TAG, "startOrStopCalculateRouteInfo() $isStart")
|
||||
if (isStart) {
|
||||
PM2ModelLoopManager.startCalculateRouteInfoLoop()
|
||||
} else {
|
||||
|
||||
@@ -2,16 +2,13 @@ package com.mogo.och.bus.passenger.ui
|
||||
|
||||
import android.graphics.BitmapFactory
|
||||
import android.os.Bundle
|
||||
import android.os.Handler
|
||||
import android.os.Looper
|
||||
import android.os.Message
|
||||
import android.view.View
|
||||
import androidx.core.content.ContextCompat
|
||||
import com.amap.api.maps.model.LatLng
|
||||
import com.mogo.commons.mvp.MvpFragment
|
||||
import com.mogo.eagle.core.data.msgbox.MsgBoxBean
|
||||
import com.mogo.eagle.core.data.msgbox.MsgBoxType
|
||||
import com.mogo.eagle.core.data.msgbox.NoticeFrCloudMsg
|
||||
import com.mogo.eagle.core.data.msgbox.V2XMsg
|
||||
import com.mogo.eagle.core.data.notice.NoticeTrafficStylePushData
|
||||
import com.mogo.eagle.core.function.call.msgbox.CallerMsgBoxManager
|
||||
import com.mogo.eagle.core.function.hmi.ui.setting.ToggleDebugView
|
||||
import com.mogo.eagle.core.utilcode.kotlin.onClick
|
||||
import com.mogo.eagle.core.utilcode.util.DateTimeUtils
|
||||
@@ -21,6 +18,7 @@ import com.mogo.och.bus.passenger.presenter.PM2DrivingPresenter
|
||||
import com.mogo.och.common.module.utils.DateTimeUtil.*
|
||||
import com.mogo.och.common.module.utils.NumberFormatUtil
|
||||
import kotlinx.android.synthetic.m2.p_m2_driving_info_fragment.*
|
||||
import java.lang.ref.WeakReference
|
||||
import kotlin.math.ceil
|
||||
import kotlin.math.roundToInt
|
||||
|
||||
@@ -30,6 +28,9 @@ import kotlin.math.roundToInt
|
||||
*/
|
||||
class PM2DrivingInfoFragment :
|
||||
MvpFragment<PM2DrivingInfoFragment?, PM2DrivingPresenter?>() {
|
||||
|
||||
private var timeHandler: TimeHandler? = null
|
||||
|
||||
/**
|
||||
* 改变自动驾驶状态
|
||||
*
|
||||
@@ -71,6 +72,8 @@ class PM2DrivingInfoFragment :
|
||||
// BPRouteDataTestUtils.converToRouteData()
|
||||
}
|
||||
updateCurrentTime()
|
||||
timeHandler = TimeHandler(this)
|
||||
timeHandler?.sendEmptyMessageDelayed(WHAT_TIME_CURRENT, LOOP_TIME_TEXT)
|
||||
}
|
||||
|
||||
override fun initViews(savedInstanceState: Bundle?) {
|
||||
@@ -89,6 +92,7 @@ class PM2DrivingInfoFragment :
|
||||
}
|
||||
|
||||
override fun onDestroy() {
|
||||
timeHandler?.removeCallbacksAndMessages(null)
|
||||
super.onDestroy()
|
||||
overMapView.onDestroy()
|
||||
}
|
||||
@@ -216,8 +220,27 @@ class PM2DrivingInfoFragment :
|
||||
"$remainDis$disUnit | $time 分钟".also { remain_mt.text = it }
|
||||
}
|
||||
|
||||
companion object {
|
||||
private val TAG = PM2DrivingInfoFragment::class.java.simpleName
|
||||
class TimeHandler(obj: PM2DrivingInfoFragment) : Handler(Looper.getMainLooper()) {
|
||||
private val mRef: WeakReference<PM2DrivingInfoFragment> = WeakReference(obj)
|
||||
|
||||
val drivingInfoFragment = mRef.get() as PM2DrivingInfoFragment
|
||||
override fun handleMessage(msg: Message) {
|
||||
mRef.get()?.run {
|
||||
when (msg.what) {
|
||||
WHAT_TIME_CURRENT -> {
|
||||
drivingInfoFragment.updateCurrentTime()
|
||||
sendEmptyMessageDelayed(
|
||||
WHAT_TIME_CURRENT, LOOP_TIME_TEXT)
|
||||
} //可以直接访问Activity中的变量
|
||||
else -> {}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
companion object {
|
||||
private val TAG = PM2DrivingInfoFragment::class.java.simpleName
|
||||
const val LOOP_TIME_TEXT = 60 * 1000L
|
||||
const val WHAT_TIME_CURRENT = 10001 //MSG_WHAT
|
||||
}
|
||||
}
|
||||
@@ -20,6 +20,7 @@ import com.mogo.commons.AbsMogoApplication;
|
||||
import com.mogo.commons.module.status.IMogoStatusChangedListener;
|
||||
import com.mogo.commons.module.status.MogoStatusManager;
|
||||
import com.mogo.commons.module.status.StatusDescriptor;
|
||||
import com.mogo.commons.voice.AIAssist;
|
||||
import com.mogo.eagle.core.data.BaseData;
|
||||
import com.mogo.eagle.core.data.autopilot.AutopilotControlParameters;
|
||||
import com.mogo.eagle.core.data.config.FunctionBuildConfig;
|
||||
@@ -67,6 +68,8 @@ import com.mogo.och.common.module.utils.NumberFormatUtil;
|
||||
import com.mogo.och.common.module.utils.PinYinUtil;
|
||||
import com.mogo.och.common.module.utils.ToastUtilsOch;
|
||||
import com.mogo.och.common.module.voice.VoiceNotice;
|
||||
import com.mogo.tts.base.LangTtsEntity;
|
||||
import com.mogo.tts.base.LanguageType;
|
||||
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
@@ -714,9 +717,28 @@ public class OrderModel {
|
||||
, isLastStop);
|
||||
}
|
||||
|
||||
VoiceNotice.showNotice(String.format(mContext
|
||||
// VoiceNotice.showNotice(String.format(mContext
|
||||
// .getString(R.string.bus_arrived_station_tip),
|
||||
// arriveStation));
|
||||
|
||||
ttsArrivedStation(arriveStation);
|
||||
}
|
||||
|
||||
private void ttsArrivedStation(String arriveStation){
|
||||
List<LangTtsEntity> list = new ArrayList<>();
|
||||
LangTtsEntity chineseTTS = new LangTtsEntity(String.format(mContext
|
||||
.getString(R.string.bus_arrived_station_tip),
|
||||
arriveStation));
|
||||
arriveStation), LanguageType.CHINESE);
|
||||
LangTtsEntity engTTS = new LangTtsEntity(String.format(mContext
|
||||
.getString(R.string.bus_arrived_station_english_tip),
|
||||
arriveStation), LanguageType.ENGLISH);
|
||||
LangTtsEntity koreanTTS = new LangTtsEntity(String.format(mContext
|
||||
.getString(R.string.bus_arrived_station_korean_tip),
|
||||
arriveStation), LanguageType.KOREAN);
|
||||
list.add(chineseTTS);
|
||||
list.add(engTTS);
|
||||
list.add(koreanTTS);
|
||||
VoiceNotice.showNotice(list, AIAssist.LEVEL0);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -768,9 +790,30 @@ public class OrderModel {
|
||||
|
||||
//车站10s后播报
|
||||
private void leaveTTSTips(String nextStation) {
|
||||
VoiceNotice.showNotice(String.format(mContext
|
||||
.getString(R.string.bus_leave_station_tip),
|
||||
nextStation), DELAY_10S);
|
||||
|
||||
UiThreadHandler.postDelayed(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
List<LangTtsEntity> list = new ArrayList<>();
|
||||
LangTtsEntity chineseTTS = new LangTtsEntity(String.format(mContext
|
||||
.getString(R.string.bus_leave_station_tip),
|
||||
nextStation), LanguageType.CHINESE);
|
||||
LangTtsEntity engTTS = new LangTtsEntity(String.format(mContext
|
||||
.getString(R.string.bus_leave_station_english_tip),
|
||||
nextStation), LanguageType.ENGLISH);
|
||||
LangTtsEntity koreanTTS = new LangTtsEntity(String.format(mContext
|
||||
.getString(R.string.bus_leave_station_korean_tip),
|
||||
nextStation), LanguageType.KOREAN);
|
||||
list.add(chineseTTS);
|
||||
list.add(engTTS);
|
||||
list.add(koreanTTS);
|
||||
VoiceNotice.showNotice(list, AIAssist.LEVEL0);
|
||||
}
|
||||
},DELAY_10S);
|
||||
|
||||
// VoiceNotice.showNotice(String.format(mContext
|
||||
// .getString(R.string.bus_leave_station_tip),
|
||||
// nextStation), DELAY_10S);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1014,7 +1057,7 @@ public class OrderModel {
|
||||
queryBusRoutes();// 重新获取任务
|
||||
removeTipRunnables();
|
||||
// startOrStopQueryPassengerWriteOff(false);
|
||||
VoiceNotice.showNotice(mContext.getString(R.string.bus_end_task_tip));
|
||||
ttsEndTask();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1038,6 +1081,21 @@ public class OrderModel {
|
||||
});
|
||||
}
|
||||
|
||||
private void ttsEndTask() {
|
||||
// VoiceNotice.showNotice(mContext.getString(R.string.bus_end_task_tip));
|
||||
List<LangTtsEntity> list = new ArrayList<>();
|
||||
LangTtsEntity chineseTTS = new LangTtsEntity(mContext
|
||||
.getString(R.string.bus_end_task_tip), LanguageType.CHINESE);
|
||||
LangTtsEntity engTTS = new LangTtsEntity(mContext
|
||||
.getString(R.string.bus_end_task_english_tip), LanguageType.ENGLISH);
|
||||
LangTtsEntity koreanTTS = new LangTtsEntity(mContext
|
||||
.getString(R.string.bus_end_task_korean_tip), LanguageType.KOREAN);
|
||||
list.add(chineseTTS);
|
||||
list.add(engTTS);
|
||||
list.add(koreanTTS);
|
||||
VoiceNotice.showNotice(list, AIAssist.LEVEL0);
|
||||
}
|
||||
|
||||
/**
|
||||
* 到站
|
||||
*
|
||||
|
||||
@@ -43,8 +43,16 @@
|
||||
|
||||
<!-- region tts -->
|
||||
<string name="bus_arrived_station_tip">已到达%1$s,带好随身物品,下车请注意安全。</string>
|
||||
<string name="bus_arrived_station_english_tip">We are arriving at %1$s ,get off with your belongings</string>
|
||||
<string name="bus_arrived_station_korean_tip">%1$s 역에 도착했습니다 , 소지품 챙겨서 내리세요</string>
|
||||
|
||||
<string name="bus_leave_station_tip">车辆起步,请扶稳坐好,前方到站是%1$s,请下车的乘客做好准备。</string>
|
||||
<string name="bus_leave_station_english_tip">The next station is %1$s ,please get ready for your arrival</string>
|
||||
<string name="bus_leave_station_korean_tip">전방에서 역에 도착하는 %1$s ,차에서 내리는 승객은 준비하세요</string>
|
||||
|
||||
<string name="bus_end_task_tip">感谢您体验\'蘑菇车联\'自动驾驶小巴车,我们下次再见。</string>
|
||||
<string name="bus_end_task_english_tip">Thank you for experiencing the self-driving minibus. See you next time</string>
|
||||
<string name="bus_end_task_korean_tip">자율주행 버스를 체험해 주셔서 감사합니다. 다음에 또 뵙겠습니다</string>
|
||||
<!-- endregion -->
|
||||
|
||||
<string name="bus_before_tips_s">距离发车时间还有%1$s分钟</string>
|
||||
|
||||
@@ -3,6 +3,8 @@ package com.mogo.och.common.module.voice
|
||||
import com.mogo.commons.AbsMogoApplication
|
||||
import com.mogo.commons.voice.AIAssist
|
||||
import com.mogo.eagle.core.utilcode.util.UiThreadHandler
|
||||
import com.mogo.tts.base.LangTtsEntity
|
||||
import com.mogo.tts.base.MultiLangTtsEntity
|
||||
|
||||
object VoiceNotice {
|
||||
@JvmStatic
|
||||
@@ -46,4 +48,9 @@ object VoiceNotice {
|
||||
AIAssist.getInstance(AbsMogoApplication.getApp()).stopTts()
|
||||
}
|
||||
}
|
||||
|
||||
@JvmStatic
|
||||
fun showNotice(listTTS: MutableList<LangTtsEntity>, level: Int) {
|
||||
AIAssist.getInstance(AbsMogoApplication.getApp())
|
||||
.speakMultiLangTTSWithLevel(MultiLangTtsEntity(listTTS), level,null) }
|
||||
}
|
||||
@@ -38,3 +38,15 @@
|
||||
3. demo: 演示环境(大部分时候都是测试环境)
|
||||
|
||||
## 区分 flavor 功能引入
|
||||
|
||||
|
||||
|
||||
## 不能启动自动驾驶的档位
|
||||
| 车型 | 配置所在文件 | 档位 | 配置 |
|
||||
|:-|:-|:-|:-|
|
||||
| 东风、红旗 | fOchTaxi.gradle、fOchTaxiPassenger.gradle | P、R | buildConfigField 'java.util.Set<chassis.Chassis.GearPosition>', 'UNABLE_LAUNCH_AUTOPILOT_GEAR', 'new java.util.HashSet<chassis.Chassis.GearPosition>(){{add(chassis.Chassis.GearPosition.GEAR_P);add(chassis.Chassis.GearPosition.GEAR_R);}}' |
|
||||
| 金旅小巴 | fOchBus.gradle、fOchBusPassenger.gradle、fOchShuttle.gradle、fOchShuttlePassenger.gradle | N、R | buildConfigField 'java.util.Set<chassis.Chassis.GearPosition>', 'UNABLE_LAUNCH_AUTOPILOT_GEAR', 'new java.util.HashSet<chassis.Chassis.GearPosition>(){{add(chassis.Chassis.GearPosition.GEAR_N);add(chassis.Chassis.GearPosition.GEAR_R);}}' |
|
||||
| M1 | fOchBusPassengerM1.gradle | 不限制档位 | buildConfigField 'java.util.Set<chassis.Chassis.GearPosition>', 'UNABLE_LAUNCH_AUTOPILOT_GEAR', 'null' |
|
||||
| M2 | fOchBusPassengerM2.gradle | N、P、R | buildConfigField 'java.util.Set<chassis.Chassis.GearPosition>', 'UNABLE_LAUNCH_AUTOPILOT_GEAR', 'new java.util.HashSet<chassis.Chassis.GearPosition>(){{add(chassis.Chassis.GearPosition.GEAR_N);add(chassis.Chassis.GearPosition.GEAR_P);add(chassis.Chassis.GearPosition.GEAR_R);}}' |
|
||||
| 清扫车 | fOchSweeper.gradle | N | buildConfigField 'java.util.Set<chassis.Chassis.GearPosition>', 'UNABLE_LAUNCH_AUTOPILOT_GEAR', 'new java.util.HashSet<chassis.Chassis.GearPosition>(){{add(chassis.Chassis.GearPosition.GEAR_N);}}' |
|
||||
| 开沃 | 暂无 | 不限制档位 | buildConfigField 'java.util.Set<chassis.Chassis.GearPosition>', 'UNABLE_LAUNCH_AUTOPILOT_GEAR', 'null' |
|
||||
|
||||
@@ -477,6 +477,8 @@ Object readFileToJson(env){
|
||||
def variantName() {
|
||||
if(gradle.startParameter.taskNames.size()>0) {
|
||||
def taskName = gradle.startParameter.taskNames[0]
|
||||
taskName = taskName.replace("Debug","")
|
||||
taskName = taskName.replace("Release","")
|
||||
if (taskName.endsWith("Qa")) {
|
||||
return "qa"
|
||||
} else if (taskName.endsWith("Online")) {
|
||||
|
||||
@@ -45,6 +45,9 @@ project.android.productFlavors {
|
||||
|
||||
// 构建 是否支持多屏异显异交互
|
||||
buildConfigField 'boolean', 'IS_MULTI_DISPLAY', 'true'
|
||||
|
||||
//不能启动自驾的档位
|
||||
buildConfigField 'java.util.Set<chassis.Chassis.GearPosition>', 'UNABLE_LAUNCH_AUTOPILOT_GEAR', 'null'
|
||||
}
|
||||
|
||||
}
|
||||
@@ -48,6 +48,9 @@ project.android.productFlavors {
|
||||
|
||||
// 构建 是否支持多屏异显异交互
|
||||
buildConfigField 'boolean', 'IS_MULTI_DISPLAY', 'true'
|
||||
|
||||
//不能启动自驾的档位
|
||||
buildConfigField 'java.util.Set<chassis.Chassis.GearPosition>', 'UNABLE_LAUNCH_AUTOPILOT_GEAR', 'null'
|
||||
}
|
||||
|
||||
}
|
||||
@@ -48,5 +48,8 @@ project.android.productFlavors {
|
||||
|
||||
// 构建 是否支持多屏异显异交互
|
||||
buildConfigField 'boolean', 'IS_MULTI_DISPLAY', 'false'
|
||||
|
||||
//Bus不能启动自驾的档位
|
||||
buildConfigField 'java.util.Set<chassis.Chassis.GearPosition>', 'UNABLE_LAUNCH_AUTOPILOT_GEAR_BUS', 'new java.util.HashSet<chassis.Chassis.GearPosition>(){{add(chassis.Chassis.GearPosition.GEAR_N);add(chassis.Chassis.GearPosition.GEAR_R);}}'
|
||||
}
|
||||
}
|
||||
@@ -44,5 +44,8 @@ project.android.productFlavors {
|
||||
|
||||
// 构建 是否支持多屏异显异交互
|
||||
buildConfigField 'boolean', 'IS_MULTI_DISPLAY', 'false'
|
||||
|
||||
//Bus不能启动自驾的档位
|
||||
buildConfigField 'java.util.Set<chassis.Chassis.GearPosition>', 'UNABLE_LAUNCH_AUTOPILOT_GEAR_BUS', 'new java.util.HashSet<chassis.Chassis.GearPosition>(){{add(chassis.Chassis.GearPosition.GEAR_N);add(chassis.Chassis.GearPosition.GEAR_R);}}'
|
||||
}
|
||||
}
|
||||
@@ -45,5 +45,8 @@ project.android.productFlavors {
|
||||
|
||||
// 构建 是否支持多屏异显异交互
|
||||
buildConfigField 'boolean', 'IS_MULTI_DISPLAY', 'false'
|
||||
|
||||
//M2不能启动自驾的档位
|
||||
buildConfigField 'java.util.Set<chassis.Chassis.GearPosition>', 'UNABLE_LAUNCH_AUTOPILOT_GEAR', 'new java.util.HashSet<chassis.Chassis.GearPosition>(){{add(chassis.Chassis.GearPosition.GEAR_N);add(chassis.Chassis.GearPosition.GEAR_P);add(chassis.Chassis.GearPosition.GEAR_R);}}'
|
||||
}
|
||||
}
|
||||
@@ -46,5 +46,8 @@ project.android.productFlavors {
|
||||
|
||||
// 构建 是否支持多屏异显异交互
|
||||
buildConfigField 'boolean', 'IS_MULTI_DISPLAY', 'false'
|
||||
|
||||
//Bus不能启动自驾的档位
|
||||
buildConfigField 'java.util.Set<chassis.Chassis.GearPosition>', 'UNABLE_LAUNCH_AUTOPILOT_GEAR_BUS', 'new java.util.HashSet<chassis.Chassis.GearPosition>(){{add(chassis.Chassis.GearPosition.GEAR_N);add(chassis.Chassis.GearPosition.GEAR_R);}}'
|
||||
}
|
||||
}
|
||||
@@ -41,5 +41,8 @@ project.android.productFlavors {
|
||||
|
||||
// 构建 是否支持多屏异显异交互
|
||||
buildConfigField 'boolean', 'IS_MULTI_DISPLAY', 'false'
|
||||
|
||||
//Bus不能启动自驾的档位
|
||||
buildConfigField 'java.util.Set<chassis.Chassis.GearPosition>', 'UNABLE_LAUNCH_AUTOPILOT_GEAR_BUS', 'new java.util.HashSet<chassis.Chassis.GearPosition>(){{add(chassis.Chassis.GearPosition.GEAR_N);add(chassis.Chassis.GearPosition.GEAR_R);}}'
|
||||
}
|
||||
}
|
||||
@@ -49,5 +49,8 @@ project.android.productFlavors {
|
||||
|
||||
// 构建 是否支持多屏异显异交互
|
||||
buildConfigField 'boolean', 'IS_MULTI_DISPLAY', 'false'
|
||||
|
||||
//清扫车不能启动自驾的档位
|
||||
buildConfigField 'java.util.Set<chassis.Chassis.GearPosition>', 'UNABLE_LAUNCH_AUTOPILOT_GEAR', 'new java.util.HashSet<chassis.Chassis.GearPosition>(){{add(chassis.Chassis.GearPosition.GEAR_N);}}'
|
||||
}
|
||||
}
|
||||
@@ -49,6 +49,9 @@ project.android.productFlavors {
|
||||
|
||||
// 构建 是否支持多屏异显异交互
|
||||
buildConfigField 'boolean', 'IS_MULTI_DISPLAY', 'false'
|
||||
|
||||
//Taxi不能启动自驾的档位
|
||||
buildConfigField 'java.util.Set<chassis.Chassis.GearPosition>', 'UNABLE_LAUNCH_AUTOPILOT_GEAR', 'new java.util.HashSet<chassis.Chassis.GearPosition>(){{add(chassis.Chassis.GearPosition.GEAR_P);add(chassis.Chassis.GearPosition.GEAR_R);}}'
|
||||
}
|
||||
|
||||
}
|
||||
@@ -48,6 +48,9 @@ project.android.productFlavors {
|
||||
|
||||
// 构建 是否支持多屏异显异交互
|
||||
buildConfigField 'boolean', 'IS_MULTI_DISPLAY', 'true'
|
||||
|
||||
//Taxi不能启动自驾的档位
|
||||
buildConfigField 'java.util.Set<chassis.Chassis.GearPosition>', 'UNABLE_LAUNCH_AUTOPILOT_GEAR', 'new java.util.HashSet<chassis.Chassis.GearPosition>(){{add(chassis.Chassis.GearPosition.GEAR_P);add(chassis.Chassis.GearPosition.GEAR_R);}}'
|
||||
}
|
||||
|
||||
}
|
||||
@@ -45,5 +45,8 @@ project.android.productFlavors {
|
||||
|
||||
// 构建 是否支持多屏异显异交互
|
||||
buildConfigField 'boolean', 'IS_MULTI_DISPLAY', 'false'
|
||||
|
||||
//不能启动自驾的档位
|
||||
buildConfigField 'java.util.Set<chassis.Chassis.GearPosition>', 'UNABLE_LAUNCH_AUTOPILOT_GEAR', 'null'
|
||||
}
|
||||
}
|
||||
@@ -18,8 +18,8 @@ project.android.variantFilter { variant ->
|
||||
// region 过滤shuttle 的flavors
|
||||
if (names.contains("shuttle")) {
|
||||
//Gradle会忽略满足上述条件的所有变体
|
||||
if (names.contains("fOchBus")) {
|
||||
} else if (names.contains("fOchBusPassenger")) {
|
||||
if (names.contains("fOchShuttle")) {
|
||||
} else if (names.contains("fOchShuttlePassenger")) {
|
||||
} else {
|
||||
setIgnore(true)
|
||||
}
|
||||
|
||||
@@ -48,5 +48,8 @@ project.android.productFlavors {
|
||||
|
||||
// 构建 是否支持多屏异显异交互
|
||||
buildConfigField 'boolean', 'IS_MULTI_DISPLAY', 'false'
|
||||
|
||||
//M1不能启动自驾的档位
|
||||
buildConfigField 'java.util.Set<chassis.Chassis.GearPosition>', 'UNABLE_LAUNCH_AUTOPILOT_GEAR', 'null'
|
||||
}
|
||||
}
|
||||
@@ -39,6 +39,8 @@ object ConfigStartUp {
|
||||
FunctionBuildConfig.appIdentityMode = BuildConfig.APP_IDENTITY_MODE
|
||||
// 各个module需要的url
|
||||
FunctionBuildConfig.urlJson = GsonUtils.fromJson(BuildConfig.URLs, UrlConfig::class.java)
|
||||
//不能启动自动驾驶的档位
|
||||
FunctionBuildConfig.unableLaunchAutopilotGear = BuildConfig.UNABLE_LAUNCH_AUTOPILOT_GEAR
|
||||
|
||||
// // 这里影响当前Activity的身份信息,多进程先保持与原来一样,主进程为司机端,:passenger 进程为乘客端 TODO 暂时不启用,仅做洱海交付,独立乘客屏+宣传视频
|
||||
// if (ProcessUtils.getCurrentProcessName().contains(":passenger")) {
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
"socket_tech_url": ""
|
||||
},
|
||||
"online": {
|
||||
"och_url": "http://tech-dev.zhidaohulian.com",
|
||||
"och_url": "http://tech.zhidaohulian.com",
|
||||
"shuttle_url": "https://och-driver.zhidaozhixing.com",
|
||||
"passport_url": "",
|
||||
"socket_base_url": "",
|
||||
|
||||
@@ -64,6 +64,12 @@ android {
|
||||
driver {
|
||||
dimension "multi_device"
|
||||
buildConfigField 'boolean', 'IS_CLIENT', 'false'
|
||||
buildConfigField 'java.util.Set<chassis.Chassis.GearPosition>', 'UNABLE_LAUNCH_AUTOPILOT_GEAR_TAXI', 'new java.util.HashSet<chassis.Chassis.GearPosition>(){{add(chassis.Chassis.GearPosition.GEAR_P);add(chassis.Chassis.GearPosition.GEAR_R);}}'
|
||||
buildConfigField 'java.util.Set<chassis.Chassis.GearPosition>', 'UNABLE_LAUNCH_AUTOPILOT_GEAR_BUS', 'new java.util.HashSet<chassis.Chassis.GearPosition>(){{add(chassis.Chassis.GearPosition.GEAR_N);add(chassis.Chassis.GearPosition.GEAR_R);}}'
|
||||
buildConfigField 'java.util.Set<chassis.Chassis.GearPosition>', 'UNABLE_LAUNCH_AUTOPILOT_GEAR_M1', 'null'
|
||||
buildConfigField 'java.util.Set<chassis.Chassis.GearPosition>', 'UNABLE_LAUNCH_AUTOPILOT_GEAR_M2', 'new java.util.HashSet<chassis.Chassis.GearPosition>(){{add(chassis.Chassis.GearPosition.GEAR_N);add(chassis.Chassis.GearPosition.GEAR_P);add(chassis.Chassis.GearPosition.GEAR_R);}}'
|
||||
buildConfigField 'java.util.Set<chassis.Chassis.GearPosition>', 'UNABLE_LAUNCH_AUTOPILOT_GEAR_SWEEPER', 'new java.util.HashSet<chassis.Chassis.GearPosition>(){{add(chassis.Chassis.GearPosition.GEAR_N);}}'
|
||||
buildConfigField 'java.util.Set<chassis.Chassis.GearPosition>', 'UNABLE_LAUNCH_AUTOPILOT_GEAR_VAN', 'null'
|
||||
}
|
||||
|
||||
}
|
||||
@@ -94,6 +100,6 @@ dependencies {
|
||||
// implementation project(':core:mogo-core-utils')
|
||||
implementation 'org.greenrobot:eventbus:3.2.0'
|
||||
implementation 'com.android.support:multidex:1.0.3'
|
||||
implementation 'com.mogo.cloud:telematic:1.3.59'
|
||||
// implementation 'com.mogo.cloud:telematic:1.3.59'//注释掉司机端 乘客端
|
||||
implementation 'com.jcraft:jsch:0.1.55'
|
||||
}
|
||||
|
||||
@@ -4,8 +4,13 @@ import android.app.Application;
|
||||
|
||||
import com.zhidao.adas.client.utils.CrashHandler;
|
||||
|
||||
import chassis.Chassis;
|
||||
|
||||
public class App extends Application {
|
||||
public static App INSTANCE;
|
||||
|
||||
public Chassis.GearPosition gear;
|
||||
|
||||
@Override
|
||||
public void onCreate() {
|
||||
super.onCreate();
|
||||
|
||||
@@ -2,36 +2,15 @@ package com.zhidao.adas.client;
|
||||
|
||||
import android.util.Pair;
|
||||
|
||||
import com.zhidao.adas.client.bean.ArrivalNotification;
|
||||
import com.zhidao.adas.client.bean.AutopilotState;
|
||||
import com.zhidao.adas.client.bean.BagManagerCmd;
|
||||
import com.zhidao.adas.client.bean.BaseInfo;
|
||||
import com.zhidao.adas.client.bean.BasicInfoReq;
|
||||
import com.zhidao.adas.client.bean.CarConfigResp;
|
||||
import com.zhidao.adas.client.bean.ChassisStates;
|
||||
import com.zhidao.adas.client.bean.DataShow;
|
||||
import com.zhidao.adas.client.bean.ErrorData;
|
||||
import com.zhidao.adas.client.bean.FSMFunctionStates;
|
||||
import com.zhidao.adas.client.bean.GlobalPathResp;
|
||||
import com.zhidao.adas.client.bean.GnssInfo;
|
||||
import com.zhidao.adas.client.bean.MogoReportMessage;
|
||||
import com.zhidao.adas.client.bean.ObuMap;
|
||||
import com.zhidao.adas.client.bean.ObuRsi;
|
||||
import com.zhidao.adas.client.bean.ObuRsm;
|
||||
import com.zhidao.adas.client.bean.ObuSpat;
|
||||
import com.zhidao.adas.client.bean.OriginalPointCloudData;
|
||||
import com.zhidao.adas.client.bean.PerceptionTrafficLight;
|
||||
import com.zhidao.adas.client.bean.PlanningDecisionState;
|
||||
import com.zhidao.adas.client.bean.PlanningObjects;
|
||||
import com.zhidao.adas.client.bean.PredictionObstacleTrajectory;
|
||||
import com.zhidao.adas.client.bean.RecordDataConfig;
|
||||
import com.zhidao.adas.client.bean.RecordPanel;
|
||||
import com.zhidao.adas.client.bean.RoboSweeperTaskIndex;
|
||||
import com.zhidao.adas.client.bean.StatusInfo;
|
||||
import com.zhidao.adas.client.bean.TrackedObjects;
|
||||
import com.zhidao.adas.client.bean.Trajectory;
|
||||
import com.zhidao.adas.client.bean.VehicleState;
|
||||
import com.zhidao.adas.client.bean.Warn;
|
||||
import com.zhidao.adas.client.log.LogSave;
|
||||
import com.zhidao.adas.client.utils.Constants;
|
||||
import com.zhidao.support.adas.high.common.ThreadPoolManager;
|
||||
@@ -44,6 +23,8 @@ import java.util.Locale;
|
||||
import java.util.concurrent.Future;
|
||||
import java.util.concurrent.LinkedBlockingQueue;
|
||||
|
||||
import mogo.telematics.pad.MessagePad;
|
||||
|
||||
/**
|
||||
* 数据分发
|
||||
*/
|
||||
@@ -193,8 +174,8 @@ public class DataDistribution {
|
||||
}
|
||||
|
||||
public String cutDown(String str) {
|
||||
if (isCutDown && str.length() > 650) {
|
||||
str = str.substring(0, 650) + "\n(已缩短。如需查看完整数据,请勾选日志缩短复选框)";
|
||||
if (isCutDown && str.length() > 850) {
|
||||
str = str.substring(0, 850) + "\n(已缩短。如需查看完整数据,请勾选日志缩短复选框)";
|
||||
}
|
||||
return str;
|
||||
}
|
||||
@@ -202,219 +183,222 @@ public class DataDistribution {
|
||||
private String onTransmit(String time, BaseInfo data) {
|
||||
String temp = data.toString();
|
||||
String str = cutDown(temp);
|
||||
if (data instanceof Trajectory) {
|
||||
listTrajectory.add(0, new DataShow(listTrajectorySize++, time + str));
|
||||
if (listTrajectory.size() > LIST_SIZE) {
|
||||
listTrajectory.remove(listTrajectory.size() - 1);
|
||||
if (data.header == null) {
|
||||
if (data instanceof ErrorData) {
|
||||
listErrorData.add(0, new DataShow(listErrorDataSize++, time + str));
|
||||
if (listErrorData.size() > 100) {
|
||||
listErrorData.remove(listErrorData.size() - 1);
|
||||
}
|
||||
if (listener != null && Constants.TITLE.RECEIVE_ERROR.equals(listener.first)) {
|
||||
listener.second.onRefresh();
|
||||
}
|
||||
} else if (data instanceof OriginalPointCloudData) {
|
||||
listOriginalPointCloud.add(0, new DataShow(listOriginalPointCloudSize++, time + str));
|
||||
if (listOriginalPointCloud.size() > LIST_SIZE) {
|
||||
listOriginalPointCloud.remove(listOriginalPointCloud.size() - 1);
|
||||
}
|
||||
if (listener != null && Constants.TITLE.RECEIVE_POINT_CLOUD_ORIGINAL.equals(listener.first)) {
|
||||
listener.second.onRefresh();
|
||||
}
|
||||
}
|
||||
if (listener != null && Constants.TITLE.RECEIVE_TRAJECTORY.equals(listener.first)) {
|
||||
listener.second.onRefresh();
|
||||
}
|
||||
} else if (data instanceof TrackedObjects) {
|
||||
listTrackedObjects.add(0, new DataShow(listTrackedObjectsSize++, time + str));
|
||||
if (listTrackedObjects.size() > LIST_SIZE) {
|
||||
listTrackedObjects.remove(listTrackedObjects.size() - 1);
|
||||
}
|
||||
if (listener != null && Constants.TITLE.RECEIVE_TRACKED_OBJECTS.equals(listener.first)) {
|
||||
listener.second.onRefresh();
|
||||
}
|
||||
} else if (data instanceof OriginalPointCloudData) {
|
||||
listOriginalPointCloud.add(0, new DataShow(listOriginalPointCloudSize++, time + str));
|
||||
if (listOriginalPointCloud.size() > LIST_SIZE) {
|
||||
listOriginalPointCloud.remove(listOriginalPointCloud.size() - 1);
|
||||
}
|
||||
if (listener != null && Constants.TITLE.RECEIVE_POINT_CLOUD_ORIGINAL.equals(listener.first)) {
|
||||
listener.second.onRefresh();
|
||||
}
|
||||
} else if (data instanceof PlanningObjects) {
|
||||
listPlanningObjects.add(0, new DataShow(listPlanningObjectsSize++, time + str));
|
||||
if (listPlanningObjects.size() > LIST_SIZE) {
|
||||
listPlanningObjects.remove(listPlanningObjects.size() - 1);
|
||||
}
|
||||
if (listener != null && Constants.TITLE.RECEIVE_PLANNING_OBJECTS.equals(listener.first)) {
|
||||
listener.second.onRefresh();
|
||||
}
|
||||
} else if (data instanceof PlanningDecisionState) {
|
||||
listPlanningDecisionState.add(0, new DataShow(listPlanningDecisionStateSize++, time + str));
|
||||
if (listPlanningDecisionState.size() > LIST_SIZE) {
|
||||
listPlanningDecisionState.remove(listPlanningDecisionState.size() - 1);
|
||||
}
|
||||
if (listener != null && Constants.TITLE.RECEIVE_PLANNING_DECISION_STATE.equals(listener.first)) {
|
||||
listener.second.onRefresh();
|
||||
}
|
||||
} else if (data instanceof ObuSpat) {
|
||||
listObuSpat.add(0, new DataShow(listObuSpatSize++, time + str));
|
||||
if (listObuSpat.size() > LIST_SIZE) {
|
||||
listObuSpat.remove(listObuSpat.size() - 1);
|
||||
}
|
||||
if (listener != null && Constants.TITLE.RECEIVE_OBU_SPAT.equals(listener.first)) {
|
||||
listener.second.onRefresh();
|
||||
}
|
||||
} else if (data instanceof ObuRsi) {
|
||||
listObuRsi.add(0, new DataShow(listObuRsiSize++, time + str));
|
||||
if (listObuRsi.size() > LIST_SIZE) {
|
||||
listObuRsi.remove(listObuRsi.size() - 1);
|
||||
}
|
||||
if (listener != null && Constants.TITLE.RECEIVE_OBU_RSI.equals(listener.first)) {
|
||||
listener.second.onRefresh();
|
||||
}
|
||||
} else if (data instanceof ObuRsm) {
|
||||
listObuRsm.add(0, new DataShow(listObuRsmSize++, time + str));
|
||||
if (listObuRsm.size() > LIST_SIZE) {
|
||||
listObuRsm.remove(listObuRsm.size() - 1);
|
||||
}
|
||||
if (listener != null && Constants.TITLE.RECEIVE_OBU_RSM.equals(listener.first)) {
|
||||
listener.second.onRefresh();
|
||||
}
|
||||
} else if (data instanceof ObuMap) {
|
||||
listObuMap.add(0, new DataShow(listObuMapSize++, time + str));
|
||||
if (listObuMap.size() > LIST_SIZE) {
|
||||
listObuMap.remove(listObuMap.size() - 1);
|
||||
}
|
||||
if (listener != null && Constants.TITLE.RECEIVE_OBU_MAP.equals(listener.first)) {
|
||||
listener.second.onRefresh();
|
||||
}
|
||||
} else if (data instanceof GnssInfo) {
|
||||
listGnssInfo.add(0, new DataShow(listGnssInfoSize++, time + str));
|
||||
if (listGnssInfo.size() > LIST_SIZE) {
|
||||
listGnssInfo.remove(listGnssInfo.size() - 1);
|
||||
}
|
||||
if (listener != null && Constants.TITLE.RECEIVE_GNSS_INFO.equals(listener.first)) {
|
||||
listener.second.onRefresh();
|
||||
}
|
||||
} else if (data instanceof VehicleState) {
|
||||
listVehicleState.add(0, new DataShow(listVehicleStateSize++, time + str));
|
||||
if (listVehicleState.size() > LIST_SIZE) {
|
||||
listVehicleState.remove(listVehicleState.size() - 1);
|
||||
}
|
||||
if (listener != null && Constants.TITLE.RECEIVE_VEHICLE_STATE.equals(listener.first)) {
|
||||
listener.second.onRefresh();
|
||||
}
|
||||
} else if (data instanceof ChassisStates) {
|
||||
listChassisStates.add(0, new DataShow(listChassisStatesSize++, time + str));
|
||||
if (listChassisStates.size() > LIST_SIZE) {
|
||||
listChassisStates.remove(listChassisStates.size() - 1);
|
||||
}
|
||||
if (listener != null && Constants.TITLE.RECEIVE_CHASSIS_STATES.equals(listener.first)) {
|
||||
listener.second.onRefresh();
|
||||
}
|
||||
} else if (data instanceof AutopilotState) {
|
||||
listAutopilotState.add(0, new DataShow(listAutopilotStateSize++, time + str));
|
||||
if (listAutopilotState.size() > LIST_SIZE) {
|
||||
listAutopilotState.remove(listAutopilotState.size() - 1);
|
||||
}
|
||||
if (listener != null && Constants.TITLE.RECEIVE_AUTOPILOT_STATE.equals(listener.first)) {
|
||||
listener.second.onRefresh();
|
||||
}
|
||||
} else if (data instanceof MogoReportMessage) {
|
||||
listMogoReportMessage.add(0, new DataShow(listMogoReportMessageSize++, time + str));
|
||||
if (listMogoReportMessage.size() > LIST_SIZE) {
|
||||
listMogoReportMessage.remove(listMogoReportMessage.size() - 1);
|
||||
}
|
||||
if (listener != null && Constants.TITLE.RECEIVE_REPORT_MESSAGE.equals(listener.first)) {
|
||||
listener.second.onRefresh();
|
||||
}
|
||||
} else if (data instanceof PerceptionTrafficLight) {
|
||||
listPerceptionTrafficLight.add(0, new DataShow(listPerceptionTrafficLightSize++, time + str));
|
||||
if (listPerceptionTrafficLight.size() > LIST_SIZE) {
|
||||
listPerceptionTrafficLight.remove(listPerceptionTrafficLight.size() - 1);
|
||||
}
|
||||
if (listener != null && Constants.TITLE.RECEIVE_PERCEPTION_TRAFFIC_LIGHT.equals(listener.first)) {
|
||||
listener.second.onPerceptionTrafficLight((PerceptionTrafficLight) data);
|
||||
}
|
||||
} else if (data instanceof PredictionObstacleTrajectory) {
|
||||
listPredictionObstacleTrajectory.add(0, new DataShow(listPredictionObstacleTrajectorySize++, time + str));
|
||||
if (listPredictionObstacleTrajectory.size() > LIST_SIZE) {
|
||||
listPredictionObstacleTrajectory.remove(listPredictionObstacleTrajectory.size() - 1);
|
||||
}
|
||||
if (listener != null && Constants.TITLE.RECEIVE_PREDICTION_OBSTACLE_TRAJECTORY.equals(listener.first)) {
|
||||
listener.second.onRefresh();
|
||||
}
|
||||
} else if (data instanceof BasicInfoReq) {
|
||||
|
||||
} else if (data instanceof CarConfigResp) {
|
||||
if (listener != null && Constants.TITLE.TITLE_CAR_CONFIG_RESP.equals(listener.first)) {
|
||||
listener.second.onRefresh();
|
||||
}
|
||||
} else if (data instanceof RecordPanel) {
|
||||
listRecordPanel.add(0, new DataShow(listRecordPanelSize++, time + str));
|
||||
if (listRecordPanel.size() > LIST_SIZE) {
|
||||
listRecordPanel.remove(listRecordPanel.size() - 1);
|
||||
}
|
||||
if (listener != null && Constants.TITLE.RECEIVE_RECORD_RESULT.equals(listener.first)) {
|
||||
listener.second.onRefresh();
|
||||
}
|
||||
} else if (data instanceof BagManagerCmd) {
|
||||
listBagManagerCmd.add(0, new DataShow(listBagManagerCmdSize++, time + str));
|
||||
if (listBagManagerCmd.size() > LIST_SIZE) {
|
||||
listBagManagerCmd.remove(listBagManagerCmd.size() - 1);
|
||||
}
|
||||
if (listener != null && Constants.TITLE.RECEIVE_BAG_MANAGER_CMD.equals(listener.first)) {
|
||||
listener.second.onRefresh();
|
||||
}
|
||||
} else if (data instanceof GlobalPathResp) {
|
||||
listGlobalPathResp.add(0, new DataShow(listGlobalPathRespSize++, time + str));
|
||||
if (listGlobalPathResp.size() > LIST_SIZE) {
|
||||
listGlobalPathResp.remove(listGlobalPathResp.size() - 1);
|
||||
}
|
||||
if (listener != null && Constants.TITLE.RECEIVE_GLOBAL_PATH_RESP.equals(listener.first)) {
|
||||
listener.second.onRefresh();
|
||||
}
|
||||
} else if (data instanceof Warn) {
|
||||
listWarn.add(0, new DataShow(listWarnSize++, time + str));
|
||||
if (listWarn.size() > LIST_SIZE) {
|
||||
listWarn.remove(listWarn.size() - 1);
|
||||
}
|
||||
if (listener != null && Constants.TITLE.RECEIVE_WARN.equals(listener.first)) {
|
||||
listener.second.onRefresh();
|
||||
}
|
||||
} else if (data instanceof ArrivalNotification) {
|
||||
listArrivalNotification.add(0, new DataShow(listArrivalNotificationSize++, time + str));
|
||||
if (listArrivalNotification.size() > LIST_SIZE) {
|
||||
listArrivalNotification.remove(listArrivalNotification.size() - 1);
|
||||
}
|
||||
if (listener != null && Constants.TITLE.RECEIVE_ARRIVAL_NOTIFICATION.equals(listener.first)) {
|
||||
listener.second.onRefresh();
|
||||
}
|
||||
} else if (data instanceof StatusInfo) {
|
||||
listStatusInfo.add(0, new DataShow(listStatusInfoSize++, time + str));
|
||||
if (listStatusInfo.size() > LIST_SIZE) {
|
||||
listStatusInfo.remove(listStatusInfo.size() - 1);
|
||||
}
|
||||
if (listener != null && Constants.TITLE.RECEIVE_STATUS_QUERY_RESP.equals(listener.first)) {
|
||||
listener.second.onRefresh();
|
||||
}
|
||||
} else if (data instanceof RecordDataConfig) {
|
||||
listRecordDataConfig.add(0, new DataShow(listRecordDataConfigSize++, time + str));
|
||||
if (listRecordDataConfig.size() > LIST_SIZE) {
|
||||
listRecordDataConfig.remove(listRecordDataConfig.size() - 1);
|
||||
}
|
||||
if (listener != null && Constants.TITLE.RECEIVE_RECORD_DATA_CONFIG_RESP.equals(listener.first)) {
|
||||
listener.second.onRefresh();
|
||||
}
|
||||
} else if (data instanceof RoboSweeperTaskIndex) {
|
||||
listRoboSweeperTaskIndex.add(0, new DataShow(listRoboSweeperTaskIndexSize++, time + str));
|
||||
if (listRoboSweeperTaskIndex.size() > LIST_SIZE) {
|
||||
listRoboSweeperTaskIndex.remove(listRoboSweeperTaskIndex.size() - 1);
|
||||
}
|
||||
if (listener != null && Constants.TITLE.RECEIVE_SWEEPER_TASK_INDEX_DATA.equals(listener.first)) {
|
||||
listener.second.onRefresh();
|
||||
}
|
||||
} else if (data instanceof FSMFunctionStates) {
|
||||
listFSMFunctionStates.add(0, new DataShow(listFSMFunctionStatesSize++, time + str));
|
||||
if (listFSMFunctionStates.size() > LIST_SIZE) {
|
||||
listFSMFunctionStates.remove(listFSMFunctionStates.size() - 1);
|
||||
}
|
||||
if (listener != null && Constants.TITLE.RECEIVE_FUNCTION_STATES.equals(listener.first)) {
|
||||
listener.second.onRefresh();
|
||||
}
|
||||
} else if (data instanceof ErrorData) {
|
||||
listErrorData.add(0, new DataShow(listErrorDataSize++, time + str));
|
||||
if (listErrorData.size() > 100) {
|
||||
listErrorData.remove(listErrorData.size() - 1);
|
||||
}
|
||||
if (listener != null && Constants.TITLE.RECEIVE_ERROR.equals(listener.first)) {
|
||||
listener.second.onRefresh();
|
||||
} else {
|
||||
MessagePad.MessageType messageType = data.header.getMsgType();
|
||||
if (messageType == MessagePad.MessageType.MsgTypeTrajectory) {
|
||||
listTrajectory.add(0, new DataShow(listTrajectorySize++, time + str));
|
||||
if (listTrajectory.size() > LIST_SIZE) {
|
||||
listTrajectory.remove(listTrajectory.size() - 1);
|
||||
}
|
||||
if (listener != null && Constants.TITLE.RECEIVE_TRAJECTORY.equals(listener.first)) {
|
||||
listener.second.onRefresh();
|
||||
}
|
||||
} else if (messageType == MessagePad.MessageType.MsgTypeTrackedObjects) {
|
||||
listTrackedObjects.add(0, new DataShow(listTrackedObjectsSize++, time + str));
|
||||
if (listTrackedObjects.size() > LIST_SIZE) {
|
||||
listTrackedObjects.remove(listTrackedObjects.size() - 1);
|
||||
}
|
||||
if (listener != null && Constants.TITLE.RECEIVE_TRACKED_OBJECTS.equals(listener.first)) {
|
||||
listener.second.onRefresh();
|
||||
}
|
||||
} else if (messageType == MessagePad.MessageType.MsgTypePlanningObjects) {
|
||||
listPlanningObjects.add(0, new DataShow(listPlanningObjectsSize++, time + str));
|
||||
if (listPlanningObjects.size() > LIST_SIZE) {
|
||||
listPlanningObjects.remove(listPlanningObjects.size() - 1);
|
||||
}
|
||||
if (listener != null && Constants.TITLE.RECEIVE_PLANNING_OBJECTS.equals(listener.first)) {
|
||||
listener.second.onRefresh();
|
||||
}
|
||||
} else if (messageType == MessagePad.MessageType.MsgTypePlanningDecisionState) {
|
||||
listPlanningDecisionState.add(0, new DataShow(listPlanningDecisionStateSize++, time + str));
|
||||
if (listPlanningDecisionState.size() > LIST_SIZE) {
|
||||
listPlanningDecisionState.remove(listPlanningDecisionState.size() - 1);
|
||||
}
|
||||
if (listener != null && Constants.TITLE.RECEIVE_PLANNING_DECISION_STATE.equals(listener.first)) {
|
||||
listener.second.onRefresh();
|
||||
}
|
||||
} else if (messageType == MessagePad.MessageType.MsgTypeGnssInfo) {
|
||||
listGnssInfo.add(0, new DataShow(listGnssInfoSize++, time + str));
|
||||
if (listGnssInfo.size() > LIST_SIZE) {
|
||||
listGnssInfo.remove(listGnssInfo.size() - 1);
|
||||
}
|
||||
if (listener != null && Constants.TITLE.RECEIVE_GNSS_INFO.equals(listener.first)) {
|
||||
listener.second.onRefresh();
|
||||
}
|
||||
} else if (messageType == MessagePad.MessageType.MsgTypeVehicleState) {
|
||||
listVehicleState.add(0, new DataShow(listVehicleStateSize++, time + str));
|
||||
if (listVehicleState.size() > LIST_SIZE) {
|
||||
listVehicleState.remove(listVehicleState.size() - 1);
|
||||
}
|
||||
if (listener != null && Constants.TITLE.RECEIVE_VEHICLE_STATE.equals(listener.first)) {
|
||||
listener.second.onRefresh();
|
||||
}
|
||||
} else if (messageType == MessagePad.MessageType.MsgTypeChassisStates) {
|
||||
listChassisStates.add(0, new DataShow(listChassisStatesSize++, time + str));
|
||||
if (listChassisStates.size() > LIST_SIZE) {
|
||||
listChassisStates.remove(listChassisStates.size() - 1);
|
||||
}
|
||||
if (listener != null && Constants.TITLE.RECEIVE_CHASSIS_STATES.equals(listener.first)) {
|
||||
listener.second.onRefresh();
|
||||
}
|
||||
} else if (messageType == MessagePad.MessageType.MsgTypeAutopilotState) {
|
||||
listAutopilotState.add(0, new DataShow(listAutopilotStateSize++, time + str));
|
||||
if (listAutopilotState.size() > LIST_SIZE) {
|
||||
listAutopilotState.remove(listAutopilotState.size() - 1);
|
||||
}
|
||||
if (listener != null && Constants.TITLE.RECEIVE_AUTOPILOT_STATE.equals(listener.first)) {
|
||||
listener.second.onRefresh();
|
||||
}
|
||||
} else if (messageType == MessagePad.MessageType.MsgTypeReportMessage) {
|
||||
listMogoReportMessage.add(0, new DataShow(listMogoReportMessageSize++, time + str));
|
||||
if (listMogoReportMessage.size() > LIST_SIZE) {
|
||||
listMogoReportMessage.remove(listMogoReportMessage.size() - 1);
|
||||
}
|
||||
if (listener != null && Constants.TITLE.RECEIVE_REPORT_MESSAGE.equals(listener.first)) {
|
||||
listener.second.onRefresh();
|
||||
}
|
||||
} else if (messageType == MessagePad.MessageType.MsgTypePredictionObstacleTrajectory) {
|
||||
listPredictionObstacleTrajectory.add(0, new DataShow(listPredictionObstacleTrajectorySize++, time + str));
|
||||
if (listPredictionObstacleTrajectory.size() > LIST_SIZE) {
|
||||
listPredictionObstacleTrajectory.remove(listPredictionObstacleTrajectory.size() - 1);
|
||||
}
|
||||
if (listener != null && Constants.TITLE.RECEIVE_PREDICTION_OBSTACLE_TRAJECTORY.equals(listener.first)) {
|
||||
listener.second.onRefresh();
|
||||
}
|
||||
} else if (messageType == MessagePad.MessageType.MsgTypeCarConfigResp) {
|
||||
if (listener != null && Constants.TITLE.TITLE_CAR_CONFIG_RESP.equals(listener.first)) {
|
||||
listener.second.onRefresh();
|
||||
}
|
||||
} else if (messageType == MessagePad.MessageType.MsgTypeRecordResult) {
|
||||
listRecordPanel.add(0, new DataShow(listRecordPanelSize++, time + str));
|
||||
if (listRecordPanel.size() > LIST_SIZE) {
|
||||
listRecordPanel.remove(listRecordPanel.size() - 1);
|
||||
}
|
||||
if (listener != null && Constants.TITLE.RECEIVE_RECORD_RESULT.equals(listener.first)) {
|
||||
listener.second.onRefresh();
|
||||
}
|
||||
} else if (messageType == MessagePad.MessageType.MsgTypeBagManagerCmd) {
|
||||
listBagManagerCmd.add(0, new DataShow(listBagManagerCmdSize++, time + str));
|
||||
if (listBagManagerCmd.size() > LIST_SIZE) {
|
||||
listBagManagerCmd.remove(listBagManagerCmd.size() - 1);
|
||||
}
|
||||
if (listener != null && Constants.TITLE.RECEIVE_BAG_MANAGER_CMD.equals(listener.first)) {
|
||||
listener.second.onRefresh();
|
||||
}
|
||||
} else if (messageType == MessagePad.MessageType.MsgTypeGlobalPathResp) {
|
||||
listGlobalPathResp.add(0, new DataShow(listGlobalPathRespSize++, time + str));
|
||||
if (listGlobalPathResp.size() > LIST_SIZE) {
|
||||
listGlobalPathResp.remove(listGlobalPathResp.size() - 1);
|
||||
}
|
||||
if (listener != null && Constants.TITLE.RECEIVE_GLOBAL_PATH_RESP.equals(listener.first)) {
|
||||
listener.second.onRefresh();
|
||||
}
|
||||
} else if (messageType == MessagePad.MessageType.MsgTypeWarn) {
|
||||
listWarn.add(0, new DataShow(listWarnSize++, time + str));
|
||||
if (listWarn.size() > LIST_SIZE) {
|
||||
listWarn.remove(listWarn.size() - 1);
|
||||
}
|
||||
if (listener != null && Constants.TITLE.RECEIVE_WARN.equals(listener.first)) {
|
||||
listener.second.onRefresh();
|
||||
}
|
||||
} else if (messageType == MessagePad.MessageType.MsgTypeArrivalNotification) {
|
||||
listArrivalNotification.add(0, new DataShow(listArrivalNotificationSize++, time + str));
|
||||
if (listArrivalNotification.size() > LIST_SIZE) {
|
||||
listArrivalNotification.remove(listArrivalNotification.size() - 1);
|
||||
}
|
||||
if (listener != null && Constants.TITLE.RECEIVE_ARRIVAL_NOTIFICATION.equals(listener.first)) {
|
||||
listener.second.onRefresh();
|
||||
}
|
||||
} else if (messageType == MessagePad.MessageType.MsgTypeStatusQueryResp) {
|
||||
listStatusInfo.add(0, new DataShow(listStatusInfoSize++, time + str));
|
||||
if (listStatusInfo.size() > LIST_SIZE) {
|
||||
listStatusInfo.remove(listStatusInfo.size() - 1);
|
||||
}
|
||||
if (listener != null && Constants.TITLE.RECEIVE_STATUS_QUERY_RESP.equals(listener.first)) {
|
||||
listener.second.onRefresh();
|
||||
}
|
||||
} else if (messageType == MessagePad.MessageType.MsgTypeRecordDataConfigResp) {
|
||||
listRecordDataConfig.add(0, new DataShow(listRecordDataConfigSize++, time + str));
|
||||
if (listRecordDataConfig.size() > LIST_SIZE) {
|
||||
listRecordDataConfig.remove(listRecordDataConfig.size() - 1);
|
||||
}
|
||||
if (listener != null && Constants.TITLE.RECEIVE_RECORD_DATA_CONFIG_RESP.equals(listener.first)) {
|
||||
listener.second.onRefresh();
|
||||
}
|
||||
} else if (messageType == MessagePad.MessageType.MsgTypeSweeperTaskIndexData) {
|
||||
listRoboSweeperTaskIndex.add(0, new DataShow(listRoboSweeperTaskIndexSize++, time + str));
|
||||
if (listRoboSweeperTaskIndex.size() > LIST_SIZE) {
|
||||
listRoboSweeperTaskIndex.remove(listRoboSweeperTaskIndex.size() - 1);
|
||||
}
|
||||
if (listener != null && Constants.TITLE.RECEIVE_SWEEPER_TASK_INDEX_DATA.equals(listener.first)) {
|
||||
listener.second.onRefresh();
|
||||
}
|
||||
} else if (messageType == MessagePad.MessageType.MsgTypeFunctionStates) {
|
||||
listFSMFunctionStates.add(0, new DataShow(listFSMFunctionStatesSize++, time + str));
|
||||
if (listFSMFunctionStates.size() > LIST_SIZE) {
|
||||
listFSMFunctionStates.remove(listFSMFunctionStates.size() - 1);
|
||||
}
|
||||
if (listener != null && Constants.TITLE.RECEIVE_FUNCTION_STATES.equals(listener.first)) {
|
||||
listener.second.onRefresh();
|
||||
}
|
||||
} else if (data instanceof PerceptionTrafficLight) {
|
||||
listPerceptionTrafficLight.add(0, new DataShow(listPerceptionTrafficLightSize++, time + str));
|
||||
if (listPerceptionTrafficLight.size() > LIST_SIZE) {
|
||||
listPerceptionTrafficLight.remove(listPerceptionTrafficLight.size() - 1);
|
||||
}
|
||||
if (listener != null && Constants.TITLE.RECEIVE_PERCEPTION_TRAFFIC_LIGHT.equals(listener.first)) {
|
||||
listener.second.onPerceptionTrafficLight((PerceptionTrafficLight) data);
|
||||
}
|
||||
} else if (data instanceof ObuSpat) {
|
||||
listObuSpat.add(0, new DataShow(listObuSpatSize++, time + str));
|
||||
if (listObuSpat.size() > LIST_SIZE) {
|
||||
listObuSpat.remove(listObuSpat.size() - 1);
|
||||
}
|
||||
if (listener != null && Constants.TITLE.RECEIVE_OBU_SPAT.equals(listener.first)) {
|
||||
listener.second.onRefresh();
|
||||
}
|
||||
} else if (data instanceof ObuRsi) {
|
||||
listObuRsi.add(0, new DataShow(listObuRsiSize++, time + str));
|
||||
if (listObuRsi.size() > LIST_SIZE) {
|
||||
listObuRsi.remove(listObuRsi.size() - 1);
|
||||
}
|
||||
if (listener != null && Constants.TITLE.RECEIVE_OBU_RSI.equals(listener.first)) {
|
||||
listener.second.onRefresh();
|
||||
}
|
||||
} else if (data instanceof ObuRsm) {
|
||||
listObuRsm.add(0, new DataShow(listObuRsmSize++, time + str));
|
||||
if (listObuRsm.size() > LIST_SIZE) {
|
||||
listObuRsm.remove(listObuRsm.size() - 1);
|
||||
}
|
||||
if (listener != null && Constants.TITLE.RECEIVE_OBU_RSM.equals(listener.first)) {
|
||||
listener.second.onRefresh();
|
||||
}
|
||||
} else if (data instanceof ObuMap) {
|
||||
listObuMap.add(0, new DataShow(listObuMapSize++, time + str));
|
||||
if (listObuMap.size() > LIST_SIZE) {
|
||||
listObuMap.remove(listObuMap.size() - 1);
|
||||
}
|
||||
if (listener != null && Constants.TITLE.RECEIVE_OBU_MAP.equals(listener.first)) {
|
||||
listener.second.onRefresh();
|
||||
}
|
||||
}
|
||||
}
|
||||
return temp;
|
||||
|
||||
@@ -1,23 +0,0 @@
|
||||
package com.zhidao.adas.client.bean;
|
||||
|
||||
import com.google.protobuf.TextFormat;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
|
||||
import mogo.telematics.pad.MessagePad;
|
||||
|
||||
public class ArrivalNotification extends BaseInfo {
|
||||
public final MessagePad.ArrivalNotification bean;
|
||||
|
||||
public ArrivalNotification(MessagePad.Header header, MessagePad.ArrivalNotification bean, SimpleDateFormat sdf) {
|
||||
super("接收", bean.getSerializedSize(), header, sdf);
|
||||
this.bean = bean;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return super.toString() + TextFormat.printer().escapingNonAscii(false).printToString(bean);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,24 +0,0 @@
|
||||
package com.zhidao.adas.client.bean;
|
||||
|
||||
import com.google.protobuf.TextFormat;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
|
||||
import mogo.telematics.pad.MessagePad;
|
||||
|
||||
public class AutopilotState extends BaseInfo {
|
||||
public final MessagePad.AutopilotState bean;
|
||||
|
||||
public AutopilotState(MessagePad.Header header, MessagePad.AutopilotState bean, SimpleDateFormat sdf) {
|
||||
super("接收", bean.getSerializedSize(), header, sdf);
|
||||
this.bean = bean;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return super.toString() + TextFormat.printer().escapingNonAscii(false).printToString(bean);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,24 +0,0 @@
|
||||
package com.zhidao.adas.client.bean;
|
||||
|
||||
import com.google.protobuf.TextFormat;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
|
||||
import bag_manager.BagManagerOuterClass;
|
||||
import mogo.telematics.pad.MessagePad;
|
||||
|
||||
public class BagManagerCmd extends BaseInfo {
|
||||
public final BagManagerOuterClass.BagManager bean;
|
||||
|
||||
public BagManagerCmd(MessagePad.Header header, BagManagerOuterClass.BagManager bean, SimpleDateFormat sdf) {
|
||||
super("接收", bean.getSerializedSize(), header, sdf);
|
||||
this.bean = bean;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return super.toString() + TextFormat.printer().escapingNonAscii(false).printToString(bean);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,23 +0,0 @@
|
||||
package com.zhidao.adas.client.bean;
|
||||
|
||||
import com.google.protobuf.TextFormat;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
|
||||
import mogo.telematics.pad.MessagePad;
|
||||
|
||||
public class BasicInfoReq extends BaseInfo {
|
||||
public final MessagePad.BasicInfoReq bean;
|
||||
|
||||
public BasicInfoReq(MessagePad.Header header, MessagePad.BasicInfoReq bean, SimpleDateFormat sdf) {
|
||||
super("接收", bean.getSerializedSize(), header, sdf);
|
||||
this.bean = bean;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return super.toString() + TextFormat.printer().escapingNonAscii(false).printToString(bean);
|
||||
}
|
||||
}
|
||||
@@ -1,23 +0,0 @@
|
||||
package com.zhidao.adas.client.bean;
|
||||
|
||||
import com.google.protobuf.TextFormat;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
|
||||
import mogo.telematics.pad.MessagePad;
|
||||
|
||||
public class CarConfigResp extends BaseInfo {
|
||||
public final MessagePad.CarConfigResp bean;
|
||||
|
||||
public CarConfigResp(MessagePad.Header header, MessagePad.CarConfigResp bean, SimpleDateFormat sdf) {
|
||||
super("接收", bean.getSerializedSize(), header, sdf);
|
||||
this.bean = bean;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return super.toString() + TextFormat.printer().escapingNonAscii(false).printToString(bean);
|
||||
}
|
||||
}
|
||||
@@ -1,24 +0,0 @@
|
||||
package com.zhidao.adas.client.bean;
|
||||
|
||||
import com.google.protobuf.TextFormat;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
|
||||
import chassis.ChassisStatesOuterClass;
|
||||
import mogo.telematics.pad.MessagePad;
|
||||
|
||||
public class ChassisStates extends BaseInfo {
|
||||
public final ChassisStatesOuterClass.ChassisStates bean;
|
||||
|
||||
public ChassisStates(MessagePad.Header header, ChassisStatesOuterClass.ChassisStates bean, SimpleDateFormat sdf) {
|
||||
super("接收", bean.getSerializedSize(), header, sdf);
|
||||
this.bean = bean;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return super.toString() + TextFormat.printer().escapingNonAscii(false).printToString(bean);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,24 +0,0 @@
|
||||
package com.zhidao.adas.client.bean;
|
||||
|
||||
import com.google.protobuf.TextFormat;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
|
||||
import function_state_management.FunctionStates;
|
||||
import mogo.telematics.pad.MessagePad;
|
||||
|
||||
public class FSMFunctionStates extends BaseInfo {
|
||||
public final FunctionStates.FSMFunctionStates bean;
|
||||
|
||||
public FSMFunctionStates(MessagePad.Header header, FunctionStates.FSMFunctionStates bean, SimpleDateFormat sdf) {
|
||||
super("接收", bean.getSerializedSize(), header, sdf);
|
||||
this.bean = bean;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return super.toString() + TextFormat.printer().escapingNonAscii(false).printToString(bean);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,23 +0,0 @@
|
||||
package com.zhidao.adas.client.bean;
|
||||
|
||||
import com.google.protobuf.TextFormat;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
|
||||
import mogo.telematics.pad.MessagePad;
|
||||
|
||||
public class GlobalPathResp extends BaseInfo {
|
||||
public final MessagePad.GlobalPathResp bean;
|
||||
|
||||
public GlobalPathResp(MessagePad.Header header, MessagePad.GlobalPathResp bean, SimpleDateFormat sdf) {
|
||||
super("接收", bean.getSerializedSize(), header, sdf);
|
||||
this.bean = bean;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return super.toString() + TextFormat.printer().escapingNonAscii(false).printToString(bean);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,24 +0,0 @@
|
||||
package com.zhidao.adas.client.bean;
|
||||
|
||||
import com.google.protobuf.TextFormat;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
|
||||
import mogo.telematics.pad.MessagePad;
|
||||
|
||||
public class GnssInfo extends BaseInfo {
|
||||
public final MessagePad.GnssInfo bean;
|
||||
|
||||
public GnssInfo(MessagePad.Header header, MessagePad.GnssInfo bean, SimpleDateFormat sdf) {
|
||||
super("接收", bean.getSerializedSize(), header, sdf);
|
||||
this.bean = bean;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return super.toString() + TextFormat.printer().escapingNonAscii(false).printToString(bean);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,25 +0,0 @@
|
||||
package com.zhidao.adas.client.bean;
|
||||
|
||||
import com.google.protobuf.TextFormat;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
|
||||
import mogo.telematics.pad.MessagePad;
|
||||
import mogo_msg.MogoReportMsg;
|
||||
|
||||
public class MogoReportMessage extends BaseInfo {
|
||||
public final MogoReportMsg.MogoReportMessage bean;
|
||||
|
||||
public MogoReportMessage(MessagePad.Header header, MogoReportMsg.MogoReportMessage bean, SimpleDateFormat sdf) {
|
||||
super("接收", bean.getSerializedSize(), header, sdf);
|
||||
this.bean = bean;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return super.toString() + TextFormat.printer().escapingNonAscii(false).printToString(bean);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -2,6 +2,7 @@ package com.zhidao.adas.client.bean;
|
||||
|
||||
import com.google.protobuf.TextFormat;
|
||||
import com.mogo.support.obu.ObuScene;
|
||||
import com.zhidao.support.adas.high.common.ByteUtil;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
|
||||
@@ -18,7 +19,7 @@ public class ObuMap extends BaseInfo {
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return super.toString() + TextFormat.printer().escapingNonAscii(false).printToString(bean);
|
||||
return super.toString() + "Payload原始数据:" + ByteUtil.byteArrToHex(bean.toByteArray()) + '\n' + TextFormat.printer().escapingNonAscii(false).printToString(bean);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@ package com.zhidao.adas.client.bean;
|
||||
|
||||
import com.google.protobuf.TextFormat;
|
||||
import com.mogo.support.obu.ObuScene;
|
||||
import com.zhidao.support.adas.high.common.ByteUtil;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
|
||||
@@ -18,7 +19,7 @@ public class ObuRsi extends BaseInfo {
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return super.toString() + TextFormat.printer().escapingNonAscii(false).printToString(bean);
|
||||
return super.toString() + "Payload原始数据:" + ByteUtil.byteArrToHex(bean.toByteArray()) + '\n' + TextFormat.printer().escapingNonAscii(false).printToString(bean);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@ package com.zhidao.adas.client.bean;
|
||||
|
||||
import com.google.protobuf.TextFormat;
|
||||
import com.mogo.support.obu.ObuScene;
|
||||
import com.zhidao.support.adas.high.common.ByteUtil;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
|
||||
@@ -18,7 +19,7 @@ public class ObuRsm extends BaseInfo {
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return super.toString() + TextFormat.printer().escapingNonAscii(false).printToString(bean);
|
||||
return super.toString() + "Payload原始数据:" + ByteUtil.byteArrToHex(bean.toByteArray()) + '\n' + TextFormat.printer().escapingNonAscii(false).printToString(bean);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@ package com.zhidao.adas.client.bean;
|
||||
|
||||
import com.google.protobuf.TextFormat;
|
||||
import com.mogo.support.obu.ObuScene;
|
||||
import com.zhidao.support.adas.high.common.ByteUtil;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
|
||||
@@ -18,7 +19,7 @@ public class ObuSpat extends BaseInfo {
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return super.toString() + TextFormat.printer().escapingNonAscii(false).printToString(bean);
|
||||
return super.toString() + "Payload原始数据:" + ByteUtil.byteArrToHex(bean.toByteArray()) + '\n' + TextFormat.printer().escapingNonAscii(false).printToString(bean);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,24 +0,0 @@
|
||||
package com.zhidao.adas.client.bean;
|
||||
|
||||
import com.google.protobuf.TextFormat;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
|
||||
import mogo.telematics.pad.MessagePad;
|
||||
import mogo.v2x.ObuWarningEvent;
|
||||
|
||||
public class ObuWarningData extends BaseInfo {
|
||||
public final ObuWarningEvent.ObuWarningData bean;
|
||||
|
||||
public ObuWarningData(MessagePad.Header header, ObuWarningEvent.ObuWarningData bean, SimpleDateFormat sdf) {
|
||||
super("接收", bean.getSerializedSize(), header, sdf);
|
||||
this.bean = bean;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return super.toString() + TextFormat.printer().escapingNonAscii(false).printToString(bean);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,6 +1,7 @@
|
||||
package com.zhidao.adas.client.bean;
|
||||
|
||||
import com.google.protobuf.TextFormat;
|
||||
import com.zhidao.support.adas.high.common.ByteUtil;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
|
||||
@@ -18,7 +19,7 @@ public class PerceptionTrafficLight extends BaseInfo {
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return super.toString() + TextFormat.printer().escapingNonAscii(false).printToString(bean);
|
||||
return super.toString() + "Payload原始数据:" + ByteUtil.byteArrToHex(bean.toByteArray()) + '\n' + TextFormat.printer().escapingNonAscii(false).printToString(bean);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,23 +0,0 @@
|
||||
package com.zhidao.adas.client.bean;
|
||||
|
||||
import com.google.protobuf.TextFormat;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
|
||||
import mogo.telematics.pad.MessagePad;
|
||||
|
||||
public class PlanningDecisionState extends BaseInfo {
|
||||
public final MessagePad.PlanningActionMsg bean;
|
||||
|
||||
public PlanningDecisionState(MessagePad.Header header, MessagePad.PlanningActionMsg bean, SimpleDateFormat sdf) {
|
||||
super("接收", bean.getSerializedSize(), header, sdf);
|
||||
this.bean = bean;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return super.toString() + TextFormat.printer().escapingNonAscii(false).printToString(bean);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,23 +0,0 @@
|
||||
package com.zhidao.adas.client.bean;
|
||||
|
||||
import com.google.protobuf.TextFormat;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
|
||||
import mogo.telematics.pad.MessagePad;
|
||||
|
||||
public class PlanningObjects extends BaseInfo {
|
||||
public final MessagePad.PlanningObjects bean;
|
||||
|
||||
public PlanningObjects(MessagePad.Header header, MessagePad.PlanningObjects bean, SimpleDateFormat sdf) {
|
||||
super("接收", bean.getSerializedSize(), header, sdf);
|
||||
this.bean = bean;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return super.toString() + TextFormat.printer().escapingNonAscii(false).printToString(bean);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,24 +0,0 @@
|
||||
package com.zhidao.adas.client.bean;
|
||||
|
||||
import com.google.protobuf.TextFormat;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
|
||||
import mogo.telematics.pad.MessagePad;
|
||||
import prediction.Prediction;
|
||||
|
||||
public class PredictionObstacleTrajectory extends BaseInfo {
|
||||
public final Prediction.mPredictionObjects bean;
|
||||
|
||||
public PredictionObstacleTrajectory(MessagePad.Header header, Prediction.mPredictionObjects bean, SimpleDateFormat sdf) {
|
||||
super("接收", bean.getSerializedSize(), header, sdf);
|
||||
this.bean = bean;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return super.toString() + TextFormat.printer().escapingNonAscii(false).printToString(bean);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
package com.zhidao.adas.client.bean;
|
||||
|
||||
import com.google.protobuf.GeneratedMessageV3;
|
||||
import com.google.protobuf.TextFormat;
|
||||
import com.zhidao.support.adas.high.common.ByteUtil;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
|
||||
import mogo.telematics.pad.MessagePad;
|
||||
|
||||
public class ReceiveData extends BaseInfo {
|
||||
public final GeneratedMessageV3 bean;
|
||||
|
||||
public ReceiveData(MessagePad.Header header, GeneratedMessageV3 bean, SimpleDateFormat sdf) {
|
||||
super("接收", bean.getSerializedSize(), header, sdf);
|
||||
this.bean = bean;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return super.toString() + "Payload原始数据:" + ByteUtil.byteArrToHex(bean.toByteArray()) + '\n' + TextFormat.printer().escapingNonAscii(false).printToString(bean);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,22 +0,0 @@
|
||||
package com.zhidao.adas.client.bean;
|
||||
|
||||
import com.google.protobuf.TextFormat;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
|
||||
import mogo.telematics.pad.MessagePad;
|
||||
|
||||
public class RecordDataConfig extends BaseInfo {
|
||||
public final MessagePad.RecordDataConfig bean;
|
||||
|
||||
public RecordDataConfig(MessagePad.Header header, MessagePad.RecordDataConfig bean, SimpleDateFormat sdf) {
|
||||
super("接收", bean.getSerializedSize(), header, sdf);
|
||||
this.bean = bean;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return super.toString() + TextFormat.printer().escapingNonAscii(false).printToString(bean);
|
||||
}
|
||||
}
|
||||
@@ -1,24 +0,0 @@
|
||||
package com.zhidao.adas.client.bean;
|
||||
|
||||
import com.google.protobuf.TextFormat;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
|
||||
import mogo.telematics.pad.MessagePad;
|
||||
import record_cache.RecordPanelOuterClass;
|
||||
|
||||
public class RecordPanel extends BaseInfo {
|
||||
public final RecordPanelOuterClass.RecordPanel bean;
|
||||
|
||||
public RecordPanel(MessagePad.Header header, RecordPanelOuterClass.RecordPanel bean, SimpleDateFormat sdf) {
|
||||
super("接收", bean.getSerializedSize(), header, sdf);
|
||||
this.bean = bean;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return super.toString() + TextFormat.printer().escapingNonAscii(false).printToString(bean);
|
||||
}
|
||||
}
|
||||
@@ -1,24 +0,0 @@
|
||||
package com.zhidao.adas.client.bean;
|
||||
|
||||
import com.google.protobuf.TextFormat;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
|
||||
import mogo.telematics.pad.MessagePad;
|
||||
import planning.RoboSweeperTaskIndexOuterClass;
|
||||
|
||||
public class RoboSweeperTaskIndex extends BaseInfo {
|
||||
public final RoboSweeperTaskIndexOuterClass.RoboSweeperTaskIndex bean;
|
||||
|
||||
public RoboSweeperTaskIndex(MessagePad.Header header, RoboSweeperTaskIndexOuterClass.RoboSweeperTaskIndex bean, SimpleDateFormat sdf) {
|
||||
super("接收", bean.getSerializedSize(), header, sdf);
|
||||
this.bean = bean;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return super.toString() + TextFormat.printer().escapingNonAscii(false).printToString(bean);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,24 +0,0 @@
|
||||
package com.zhidao.adas.client.bean;
|
||||
|
||||
import com.google.protobuf.TextFormat;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
|
||||
import mogo.telematics.pad.MessagePad;
|
||||
import system_master.SystemStatusInfo;
|
||||
|
||||
public class StatusInfo extends BaseInfo {
|
||||
public final SystemStatusInfo.StatusInfo bean;
|
||||
|
||||
public StatusInfo(MessagePad.Header header, SystemStatusInfo.StatusInfo bean, SimpleDateFormat sdf) {
|
||||
super("接收", bean.getSerializedSize(), header, sdf);
|
||||
this.bean = bean;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return super.toString() + TextFormat.printer().escapingNonAscii(false).printToString(bean);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,21 +0,0 @@
|
||||
package com.zhidao.adas.client.bean;
|
||||
|
||||
import com.google.protobuf.TextFormat;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
|
||||
import mogo.telematics.pad.MessagePad;
|
||||
|
||||
public class TrackedObjects extends BaseInfo {
|
||||
private MessagePad.TrackedObjects bean;
|
||||
|
||||
public TrackedObjects(MessagePad.Header header, MessagePad.TrackedObjects bean, SimpleDateFormat sdf) {
|
||||
super("接收", bean.getSerializedSize(), header, sdf);
|
||||
this.bean = bean;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return super.toString() + TextFormat.printer().escapingNonAscii(false).printToString(bean);
|
||||
}
|
||||
}
|
||||
@@ -1,21 +0,0 @@
|
||||
package com.zhidao.adas.client.bean;
|
||||
|
||||
import com.google.protobuf.TextFormat;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
|
||||
import mogo.telematics.pad.MessagePad;
|
||||
|
||||
public class Trajectory extends BaseInfo {
|
||||
public final MessagePad.Trajectory bean;
|
||||
|
||||
public Trajectory(MessagePad.Header header, MessagePad.Trajectory bean, SimpleDateFormat sdf) {
|
||||
super("接收", bean.getSerializedSize(), header, sdf);
|
||||
this.bean = bean;
|
||||
}
|
||||
@Override
|
||||
public String toString() {
|
||||
return super.toString() + TextFormat.printer().escapingNonAscii(false).printToString(bean);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,22 +0,0 @@
|
||||
package com.zhidao.adas.client.bean;
|
||||
|
||||
import com.google.protobuf.TextFormat;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
|
||||
import chassis.VehicleStateOuterClass;
|
||||
import mogo.telematics.pad.MessagePad;
|
||||
|
||||
public class VehicleState extends BaseInfo {
|
||||
public final VehicleStateOuterClass.VehicleState bean;
|
||||
|
||||
public VehicleState(MessagePad.Header header, VehicleStateOuterClass.VehicleState bean, SimpleDateFormat sdf) {
|
||||
super("接收", bean.getSerializedSize(), header, sdf);
|
||||
this.bean = bean;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return super.toString() + TextFormat.printer().escapingNonAscii(false).printToString(bean);
|
||||
}
|
||||
}
|
||||
@@ -1,21 +0,0 @@
|
||||
package com.zhidao.adas.client.bean;
|
||||
|
||||
import com.google.protobuf.TextFormat;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
|
||||
import mogo.telematics.pad.MessagePad;
|
||||
|
||||
public class Warn extends BaseInfo {
|
||||
public final MessagePad.Warn bean;
|
||||
|
||||
public Warn(MessagePad.Header header, MessagePad.Warn bean, SimpleDateFormat sdf) {
|
||||
super("接收", bean.getSerializedSize(), header, sdf);
|
||||
this.bean = bean;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return super.toString() + TextFormat.printer().escapingNonAscii(false).printToString(bean);
|
||||
}
|
||||
}
|
||||
@@ -1,7 +1,5 @@
|
||||
package com.zhidao.adas.client.ui;
|
||||
|
||||
import static com.mogo.telematic.MogoProtocolMsg.NORMAL_DATA;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.DialogInterface;
|
||||
import android.content.Intent;
|
||||
@@ -45,11 +43,7 @@ import androidx.recyclerview.widget.SimpleItemAnimator;
|
||||
|
||||
import com.google.protobuf.TextFormat;
|
||||
import com.mogo.support.obu.ObuScene;
|
||||
import com.mogo.telematic.MogoProtocolMsg;
|
||||
import com.mogo.telematic.NSDNettyManager;
|
||||
import com.mogo.telematic.client.listener.NettyClientListener;
|
||||
import com.mogo.telematic.client.status.ConnectState;
|
||||
import com.mogo.telematic.server.netty.NettyServerListener;
|
||||
import com.zhidao.adas.client.App;
|
||||
import com.zhidao.adas.client.BuildConfig;
|
||||
import com.zhidao.adas.client.DataDistribution;
|
||||
import com.zhidao.adas.client.R;
|
||||
@@ -57,36 +51,16 @@ import com.zhidao.adas.client.adapter.InfoTitleAdapter;
|
||||
import com.zhidao.adas.client.base.BaseActivity;
|
||||
import com.zhidao.adas.client.base.BaseAdapter;
|
||||
import com.zhidao.adas.client.base.BaseFragment;
|
||||
import com.zhidao.adas.client.bean.ArrivalNotification;
|
||||
import com.zhidao.adas.client.bean.AutopilotState;
|
||||
import com.zhidao.adas.client.bean.BagManagerCmd;
|
||||
import com.zhidao.adas.client.bean.BasicInfoReq;
|
||||
import com.zhidao.adas.client.bean.CarConfigResp;
|
||||
import com.zhidao.adas.client.bean.ChassisStates;
|
||||
import com.zhidao.adas.client.bean.ErrorData;
|
||||
import com.zhidao.adas.client.bean.FSMFunctionStates;
|
||||
import com.zhidao.adas.client.bean.GlobalPathResp;
|
||||
import com.zhidao.adas.client.bean.GnssInfo;
|
||||
import com.zhidao.adas.client.bean.IPCConnectState;
|
||||
import com.zhidao.adas.client.bean.MogoReportMessage;
|
||||
import com.zhidao.adas.client.bean.ObuMap;
|
||||
import com.zhidao.adas.client.bean.ObuRsi;
|
||||
import com.zhidao.adas.client.bean.ObuRsm;
|
||||
import com.zhidao.adas.client.bean.ObuSpat;
|
||||
import com.zhidao.adas.client.bean.OriginalPointCloudData;
|
||||
import com.zhidao.adas.client.bean.PerceptionTrafficLight;
|
||||
import com.zhidao.adas.client.bean.PlanningDecisionState;
|
||||
import com.zhidao.adas.client.bean.PlanningObjects;
|
||||
import com.zhidao.adas.client.bean.PredictionObstacleTrajectory;
|
||||
import com.zhidao.adas.client.bean.RecordDataConfig;
|
||||
import com.zhidao.adas.client.bean.RecordPanel;
|
||||
import com.zhidao.adas.client.bean.RoboSweeperTaskIndex;
|
||||
import com.zhidao.adas.client.bean.ReceiveData;
|
||||
import com.zhidao.adas.client.bean.SpecialVehicleBean;
|
||||
import com.zhidao.adas.client.bean.StatusInfo;
|
||||
import com.zhidao.adas.client.bean.TrackedObjects;
|
||||
import com.zhidao.adas.client.bean.Trajectory;
|
||||
import com.zhidao.adas.client.bean.VehicleState;
|
||||
import com.zhidao.adas.client.bean.Warn;
|
||||
import com.zhidao.adas.client.log.ConnectStatusSave;
|
||||
import com.zhidao.adas.client.log.LogSave;
|
||||
import com.zhidao.adas.client.other.permission.BackgrounderPermission;
|
||||
@@ -99,14 +73,12 @@ import com.zhidao.support.adas.high.AdasManager;
|
||||
import com.zhidao.support.adas.high.AdasOptions;
|
||||
import com.zhidao.support.adas.high.OnAdasConnectStatusListener;
|
||||
import com.zhidao.support.adas.high.OnAdasListener;
|
||||
import com.zhidao.support.adas.high.OnMultiDeviceListener;
|
||||
import com.zhjt.mogo.adas.data.bean.AutopilotStatistics;
|
||||
import com.zhidao.support.adas.high.bean.VersionCompatibility;
|
||||
import com.zhidao.support.adas.high.common.ByteUtil;
|
||||
import com.zhidao.support.adas.high.common.Constants.IPC_CONNECTION_STATUS;
|
||||
import com.zhidao.support.adas.high.common.CupidLogUtils;
|
||||
import com.zhidao.support.adas.high.common.ProtocolStatus;
|
||||
import com.zhidao.support.adas.high.common.ReceiveTimeoutManager;
|
||||
import com.zhjt.mogo.adas.data.bean.AutopilotStatistics;
|
||||
|
||||
import java.net.Inet4Address;
|
||||
import java.net.InetAddress;
|
||||
@@ -125,7 +97,6 @@ import bag_manager.BagManagerOuterClass;
|
||||
import chassis.ChassisStatesOuterClass;
|
||||
import chassis.VehicleStateOuterClass;
|
||||
import function_state_management.FunctionStates;
|
||||
import io.netty.channel.Channel;
|
||||
import mogo.telematics.pad.MessagePad;
|
||||
import mogo_msg.MogoReportMsg;
|
||||
import perception.TrafficLightOuterClass;
|
||||
@@ -880,44 +851,46 @@ public class MainActivity extends BaseActivity implements OnAdasListener, OnAdas
|
||||
|
||||
@Override
|
||||
public void onTrajectory(MessagePad.Header header, MessagePad.Trajectory trajectory) {
|
||||
Trajectory base = new Trajectory(header, trajectory, sdf);
|
||||
ReceiveData base = new ReceiveData(header, trajectory, sdf);
|
||||
DataDistribution.getInstance().addData(base);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onTrackedObjects(MessagePad.Header header, MessagePad.TrackedObjects trackedObjects) {
|
||||
TrackedObjects base = new TrackedObjects(header, trackedObjects, sdf);
|
||||
ReceiveData base = new ReceiveData(header, trackedObjects, sdf);
|
||||
DataDistribution.getInstance().addData(base);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onGnssInfo(MessagePad.Header header, MessagePad.GnssInfo gnssInfo) {
|
||||
GnssInfo base = new GnssInfo(header, gnssInfo, sdf);
|
||||
ReceiveData base = new ReceiveData(header, gnssInfo, sdf);
|
||||
DataDistribution.getInstance().addData(base);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onVehicleState(MessagePad.Header header, VehicleStateOuterClass.VehicleState vehicleState) {
|
||||
VehicleState base = new VehicleState(header, vehicleState, sdf);
|
||||
App.INSTANCE.gear = vehicleState.getGear();
|
||||
ReceiveData base = new ReceiveData(header, vehicleState, sdf);
|
||||
DataDistribution.getInstance().addData(base);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void onChassisStates(MessagePad.Header header, ChassisStatesOuterClass.ChassisStates chassisStates) {
|
||||
ChassisStates base = new ChassisStates(header, chassisStates, sdf);
|
||||
App.INSTANCE.gear = chassisStates.getGearSystemStates().getGearPosition();
|
||||
ReceiveData base = new ReceiveData(header, chassisStates, sdf);
|
||||
DataDistribution.getInstance().addData(base);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAutopilotState(MessagePad.Header header, MessagePad.AutopilotState autopilotState) {
|
||||
AutopilotState base = new AutopilotState(header, autopilotState, sdf);
|
||||
ReceiveData base = new ReceiveData(header, autopilotState, sdf);
|
||||
DataDistribution.getInstance().addData(base);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onReportMessage(MessagePad.Header header, MogoReportMsg.MogoReportMessage mogoReportMessage) {
|
||||
MogoReportMessage base = new MogoReportMessage(header, mogoReportMessage, sdf);
|
||||
ReceiveData base = new ReceiveData(header, mogoReportMessage, sdf);
|
||||
DataDistribution.getInstance().addData(base);
|
||||
}
|
||||
|
||||
@@ -929,7 +902,7 @@ public class MainActivity extends BaseActivity implements OnAdasListener, OnAdas
|
||||
|
||||
@Override
|
||||
public void onPredictionObstacleTrajectory(MessagePad.Header header, Prediction.mPredictionObjects predictionObjects) {
|
||||
PredictionObstacleTrajectory base = new PredictionObstacleTrajectory(header, predictionObjects, sdf);
|
||||
ReceiveData base = new ReceiveData(header, predictionObjects, sdf);
|
||||
DataDistribution.getInstance().addData(base);
|
||||
}
|
||||
|
||||
@@ -968,32 +941,32 @@ public class MainActivity extends BaseActivity implements OnAdasListener, OnAdas
|
||||
|
||||
@Override
|
||||
public void onPlanningObjects(MessagePad.Header header, MessagePad.PlanningObjects planningObjects) {
|
||||
PlanningObjects base = new PlanningObjects(header, planningObjects, sdf);
|
||||
ReceiveData base = new ReceiveData(header, planningObjects, sdf);
|
||||
DataDistribution.getInstance().addData(base);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBasicInfoReq(MessagePad.Header header, MessagePad.BasicInfoReq basicInfoReq) {
|
||||
BasicInfoReq info = new BasicInfoReq(header, basicInfoReq, sdf);
|
||||
DataDistribution.getInstance().addData(info);
|
||||
ReceiveData base = new ReceiveData(header, basicInfoReq, sdf);
|
||||
DataDistribution.getInstance().addData(base);
|
||||
AdasManager.getInstance().sendBasicInfoResp("", 0, com.zhidao.support.adas.high.common.Constants.TERMINAL_ROLE.DEBUG);
|
||||
runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
showToastCenter("收到车机基础信息请求:" + info.toString());
|
||||
showToastCenter("收到车机基础信息请求:" + base.toString());
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onCarConfigResp(MessagePad.Header header, MessagePad.CarConfigResp carConfigResp) {
|
||||
CarConfigResp base = new CarConfigResp(header, carConfigResp, sdf);
|
||||
ReceiveData base = new ReceiveData(header, carConfigResp, sdf);
|
||||
DataDistribution.getInstance().addData(base);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onRecordResult(MessagePad.Header header, RecordPanelOuterClass.RecordPanel recordPanel) {
|
||||
RecordPanel base = new RecordPanel(header, recordPanel, sdf);
|
||||
ReceiveData base = new ReceiveData(header, recordPanel, sdf);
|
||||
DataDistribution.getInstance().addData(base);
|
||||
recordKey = recordPanel.getKey();
|
||||
recordFileName = recordPanel.getFilename();
|
||||
@@ -1001,37 +974,37 @@ public class MainActivity extends BaseActivity implements OnAdasListener, OnAdas
|
||||
|
||||
@Override
|
||||
public void onGlobalPathResp(MessagePad.Header header, MessagePad.GlobalPathResp globalPathResp) {
|
||||
GlobalPathResp base = new GlobalPathResp(header, globalPathResp, sdf);
|
||||
ReceiveData base = new ReceiveData(header, globalPathResp, sdf);
|
||||
DataDistribution.getInstance().addData(base);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onWarn(MessagePad.Header header, MessagePad.Warn warn) {
|
||||
Warn base = new Warn(header, warn, sdf);
|
||||
ReceiveData base = new ReceiveData(header, warn, sdf);
|
||||
DataDistribution.getInstance().addData(base);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onArrivalNotification(MessagePad.Header header, MessagePad.ArrivalNotification arrivalNotification) {
|
||||
ArrivalNotification base = new ArrivalNotification(header, arrivalNotification, sdf);
|
||||
ReceiveData base = new ReceiveData(header, arrivalNotification, sdf);
|
||||
DataDistribution.getInstance().addData(base);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onStatusQueryResp(MessagePad.Header header, SystemStatusInfo.StatusInfo statusInfo) {
|
||||
StatusInfo base = new StatusInfo(header, statusInfo, sdf);
|
||||
ReceiveData base = new ReceiveData(header, statusInfo, sdf);
|
||||
DataDistribution.getInstance().addData(base);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onRecordDataConfigResp(MessagePad.Header header, MessagePad.RecordDataConfig config) {
|
||||
RecordDataConfig base = new RecordDataConfig(header, config, sdf);
|
||||
ReceiveData base = new ReceiveData(header, config, sdf);
|
||||
DataDistribution.getInstance().addData(base);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onPlanningActionMsg(MessagePad.Header header, MessagePad.PlanningActionMsg planningActionMsg) {
|
||||
PlanningDecisionState base = new PlanningDecisionState(header, planningActionMsg, sdf);
|
||||
ReceiveData base = new ReceiveData(header, planningActionMsg, sdf);
|
||||
DataDistribution.getInstance().addData(base);
|
||||
}
|
||||
|
||||
@@ -1062,19 +1035,19 @@ public class MainActivity extends BaseActivity implements OnAdasListener, OnAdas
|
||||
|
||||
@Override
|
||||
public void onFunctionStates(MessagePad.Header header, FunctionStates.FSMFunctionStates functionStates) {
|
||||
FSMFunctionStates base = new FSMFunctionStates(header, functionStates, sdf);
|
||||
ReceiveData base = new ReceiveData(header, functionStates, sdf);
|
||||
DataDistribution.getInstance().addData(base);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onSweeperTaskIndexData(MessagePad.Header header, RoboSweeperTaskIndexOuterClass.RoboSweeperTaskIndex roboSweeperTaskIndex) {
|
||||
RoboSweeperTaskIndex base = new RoboSweeperTaskIndex(header, roboSweeperTaskIndex, sdf);
|
||||
ReceiveData base = new ReceiveData(header, roboSweeperTaskIndex, sdf);
|
||||
DataDistribution.getInstance().addData(base);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBagManagerCmd(MessagePad.Header header, BagManagerOuterClass.BagManager bagManager) {
|
||||
BagManagerCmd base = new BagManagerCmd(header, bagManager, sdf);
|
||||
ReceiveData base = new ReceiveData(header, bagManager, sdf);
|
||||
DataDistribution.getInstance().addData(base);
|
||||
}
|
||||
|
||||
@@ -1084,6 +1057,7 @@ public class MainActivity extends BaseActivity implements OnAdasListener, OnAdas
|
||||
if (BuildConfig.IS_CLIENT) {
|
||||
/*—————————————作为乘客端———————————*/
|
||||
options = new AdasOptions.Builder().setClient(true).build();
|
||||
/*乘客端启动 注释掉
|
||||
NSDNettyManager.getInstance().searchAndConnectServer(this, "1234", new NettyClientListener<MogoProtocolMsg>() {
|
||||
|
||||
@Override
|
||||
@@ -1103,7 +1077,7 @@ public class MainActivity extends BaseActivity implements OnAdasListener, OnAdas
|
||||
getHandler().sendEmptyMessage(WHAT_DRIVER_IP);
|
||||
onUpdateConnectStateView();
|
||||
}
|
||||
});
|
||||
});*/
|
||||
} else {
|
||||
/*—————————————作为司机端———————————*/
|
||||
int mode = Constants.getIpcConnectionMode(this);
|
||||
@@ -1126,6 +1100,7 @@ public class MainActivity extends BaseActivity implements OnAdasListener, OnAdas
|
||||
break;
|
||||
}
|
||||
|
||||
/*司机端启动 注释掉
|
||||
NSDNettyManager.getInstance().startNSDNettyServerWithSN(this, new NettyServerListener<MogoProtocolMsg>() {
|
||||
@Override
|
||||
public void onMessageResponseServer(MogoProtocolMsg msg, Channel channel) {
|
||||
@@ -1152,10 +1127,11 @@ public class MainActivity extends BaseActivity implements OnAdasListener, OnAdas
|
||||
public void onChannelDisConnect(Channel channel) {
|
||||
Log.i(TAG, "onChannelDisConnect channel=" + channel.id());
|
||||
}
|
||||
}, "1234567");
|
||||
}, "1234567");*/
|
||||
}
|
||||
AdasManager.getInstance().create(options, this);
|
||||
AdasManager.getInstance().setOnAdasListener(this);
|
||||
/*两端数据转发 注释掉
|
||||
AdasManager.getInstance().setOnMultiDeviceListener(new OnMultiDeviceListener() {
|
||||
@Override
|
||||
public void onForwardingDriverIPCMessage(byte[] bytes) {
|
||||
@@ -1173,7 +1149,7 @@ public class MainActivity extends BaseActivity implements OnAdasListener, OnAdas
|
||||
.sendMogoProtocolMsgToServer(new MogoProtocolMsg(NORMAL_DATA, bytes.length, bytes), null);
|
||||
Log.i(TAG, "乘客屏发送数据=" + ByteUtil.byteArrToHex(bytes));
|
||||
}
|
||||
});
|
||||
});*/
|
||||
}
|
||||
|
||||
|
||||
@@ -1587,7 +1563,7 @@ public class MainActivity extends BaseActivity implements OnAdasListener, OnAdas
|
||||
break;
|
||||
case WHAT_DRIVER_IP:
|
||||
ipcIp.setVisibility(View.VISIBLE);
|
||||
ipcIp.setText("司机IP:" + NSDNettyManager.getInstance().getConnServerIp());
|
||||
// ipcIp.setText("司机IP:" + NSDNettyManager.getInstance().getConnServerIp());
|
||||
break;
|
||||
case WHAT_IPC_CONNECT_STATE:
|
||||
if (floatWindow != null) {
|
||||
|
||||
@@ -23,6 +23,7 @@ import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
import androidx.recyclerview.widget.SimpleItemAnimator;
|
||||
|
||||
import com.zhidao.adas.client.App;
|
||||
import com.zhidao.adas.client.BuildConfig;
|
||||
import com.zhidao.adas.client.R;
|
||||
import com.zhidao.adas.client.adapter.ConfigAdapter;
|
||||
@@ -36,6 +37,7 @@ import com.zhidao.support.adas.high.bean.VersionCompatibility;
|
||||
import com.zhidao.support.adas.high.common.Constants;
|
||||
import com.zhidao.support.adas.high.common.CupidLogUtils;
|
||||
import com.zhidao.support.adas.high.common.MessageType;
|
||||
import com.zhidao.support.adas.high.common.autopilot.ability.AutopilotAbilityManager;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.ArrayList;
|
||||
@@ -45,6 +47,7 @@ import java.util.List;
|
||||
import java.util.Locale;
|
||||
import java.util.Set;
|
||||
|
||||
import chassis.Chassis;
|
||||
import mogo.telematics.pad.MessagePad;
|
||||
|
||||
/**
|
||||
@@ -65,7 +68,7 @@ public class VersionFragment extends BaseFragment {
|
||||
private ConfigAdapter adapter;
|
||||
private InterfaceAdapter unregisteredAdapter;
|
||||
private InterfaceAdapter registeredAdapter;
|
||||
|
||||
private Set[] unableGears;
|
||||
|
||||
private int role = Constants.TERMINAL_ROLE.DEBUG;//角色 默认调试屏
|
||||
|
||||
@@ -216,9 +219,48 @@ public class VersionFragment extends BaseFragment {
|
||||
list.add(new Config("ADAS LIB版本:", AdasManager.getInstance().getAdasVersion()));
|
||||
list.add(new Config("APP构建时间:", BuildConfig.BUILD_TIME));
|
||||
list.add(getAutopilotAbilityConfig(""));
|
||||
list.add(gear());
|
||||
adapter.setData(list);
|
||||
}
|
||||
|
||||
private Config gear() {
|
||||
StringBuilder builder = new StringBuilder();
|
||||
Chassis.GearPosition gear = App.INSTANCE.gear;
|
||||
if (gear != null) {
|
||||
if (unableGears == null) {
|
||||
unableGears = new Set[6];
|
||||
unableGears[0] = BuildConfig.UNABLE_LAUNCH_AUTOPILOT_GEAR_BUS;
|
||||
unableGears[1] = BuildConfig.UNABLE_LAUNCH_AUTOPILOT_GEAR_M1;
|
||||
unableGears[2] = BuildConfig.UNABLE_LAUNCH_AUTOPILOT_GEAR_M2;
|
||||
unableGears[3] = BuildConfig.UNABLE_LAUNCH_AUTOPILOT_GEAR_SWEEPER;
|
||||
unableGears[4] = BuildConfig.UNABLE_LAUNCH_AUTOPILOT_GEAR_TAXI;
|
||||
unableGears[5] = BuildConfig.UNABLE_LAUNCH_AUTOPILOT_GEAR_VAN;
|
||||
}
|
||||
for (int j = 0; j < unableGears.length; j++) {
|
||||
String type = "";
|
||||
if (j == 0) {
|
||||
type = "BUS";
|
||||
} else if (j == 1) {
|
||||
type = "M1";
|
||||
} else if (j == 2) {
|
||||
type = "M2";
|
||||
} else if (j == 3) {
|
||||
type = "SWEEPER";
|
||||
} else if (j == 4) {
|
||||
type = "TAXI";
|
||||
} else if (j == 5) {
|
||||
type = "VAN";
|
||||
}
|
||||
AutopilotAbilityManager.getInstance().setUnableLaunchAutopilotGear(unableGears[j]);
|
||||
boolean b = AutopilotAbilityManager.getInstance().isLaunchAutopilot(gear);
|
||||
builder.append("车型:").append(type);
|
||||
builder.append(" 当前档位:").append(gear.name());
|
||||
builder.append(" 是否可以启动自驾:").append(b).append('\n');
|
||||
}
|
||||
}
|
||||
return new Config("档位影响:", builder.toString());
|
||||
}
|
||||
|
||||
private Config getAutopilotAbilityConfig(String value) {
|
||||
return new Config("能否启动自动驾驶:", value);
|
||||
}
|
||||
@@ -226,32 +268,34 @@ public class VersionFragment extends BaseFragment {
|
||||
public void autopilotAbility(boolean isAutopilotAbility, String unableAutopilotReason) {
|
||||
List<Config> list = adapter.getData();
|
||||
if (list != null) {
|
||||
Config temp = getAutopilotAbilityConfig(isAutopilotAbility + ",原因:" + unableAutopilotReason);
|
||||
int index = list.indexOf(temp);
|
||||
if (index < 0) {
|
||||
list.add(temp);
|
||||
if (getActivity() != null)
|
||||
getActivity().runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
adapter.notifyItemInserted(list.size() - 1);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
Config config = list.get(index);
|
||||
config.cover(temp);
|
||||
config.color = RandomColor.randomColor();
|
||||
if (getActivity() != null)
|
||||
getActivity().runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
adapter.notifyItemChanged(index);
|
||||
}
|
||||
});
|
||||
}
|
||||
updateRefreshConfig(list, getAutopilotAbilityConfig(isAutopilotAbility + ",原因:" + unableAutopilotReason));
|
||||
updateRefreshConfig(list, gear());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private void updateRefreshConfig(List<Config> list, Config temp) {
|
||||
int index = list.indexOf(temp);
|
||||
if (index < 0) {
|
||||
list.add(temp);
|
||||
if (getActivity() != null)
|
||||
getActivity().runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
adapter.notifyItemInserted(list.size() - 1);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
Config config = list.get(index);
|
||||
config.cover(temp);
|
||||
config.color = RandomColor.randomColor();
|
||||
if (getActivity() != null)
|
||||
getActivity().runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
adapter.notifyItemChanged(index);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
<color name="connect_status_search_address">#1E90FF</color>
|
||||
<color name="color1">#FFC0CB</color>
|
||||
<color name="color2">#FF8F00</color>
|
||||
<color name="color3">#FFE500</color>
|
||||
<color name="color4">#B9ED3E</color>
|
||||
<color name="color3">#FF33FF</color>
|
||||
<color name="color4">#669900</color>
|
||||
<color name="color5">#2EEDEB</color>
|
||||
</resources>
|
||||
|
||||
@@ -107,7 +107,7 @@ class MoGoAutopilotControlProvider :
|
||||
.setIpcConnectionMode(AdasOptions.IPC_CONNECTION_MODE.FIXATION)
|
||||
.setIpcFixationIP(AdasManager.getInstance().getIPCFixationIPList(mContext))
|
||||
.setClient(false)
|
||||
.setIdentityMode(FunctionBuildConfig.appIdentityMode)
|
||||
.setUnableLaunchAutopilotGear(FunctionBuildConfig.unableLaunchAutopilotGear)
|
||||
// .setSubscribeInterfaceOptions(subscribeInterfaceOptions)//
|
||||
.build()
|
||||
|
||||
@@ -198,7 +198,7 @@ class MoGoAutopilotControlProvider :
|
||||
val options = AdasOptions
|
||||
.Builder()
|
||||
.setClient(true)
|
||||
.setIdentityMode(FunctionBuildConfig.appIdentityMode)
|
||||
.setUnableLaunchAutopilotGear(FunctionBuildConfig.unableLaunchAutopilotGear)
|
||||
.build()
|
||||
AdasManager.getInstance()
|
||||
.create(options, MoGoAdasMsgConnectStatusListenerImpl())
|
||||
@@ -226,7 +226,7 @@ class MoGoAutopilotControlProvider :
|
||||
.setIpcConnectionMode(AdasOptions.IPC_CONNECTION_MODE.FIXATION)
|
||||
.setIpcFixationIP(AdasManager.getInstance().getIPCFixationIPList(mContext))
|
||||
.setClient(false)// 乘客端直连工控机改为false
|
||||
.setIdentityMode(FunctionBuildConfig.appIdentityMode)
|
||||
.setUnableLaunchAutopilotGear(FunctionBuildConfig.unableLaunchAutopilotGear)
|
||||
.build()
|
||||
AdasManager.getInstance().create(options, MoGoAdasMsgConnectStatusListenerImpl())
|
||||
//////////////////////////////////注意先后顺序,AdasManager.getInstance().create后才可以设置监听/////////////////////////////////////////////
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.mogo.eagle.core.data.config
|
||||
|
||||
import chassis.Chassis
|
||||
import com.mogo.eagle.core.data.deva.net.UrlConfig
|
||||
import com.mogo.eagle.core.utilcode.util.GsonUtils
|
||||
|
||||
@@ -213,4 +214,10 @@ object FunctionBuildConfig {
|
||||
@JvmField
|
||||
var urlJson: UrlConfig = GsonUtils.fromJson("{\"och_url\":\"https://tech.zhidaohulian.com\"}", UrlConfig::class.java)
|
||||
|
||||
/**
|
||||
* 最外层设置的Url
|
||||
*/
|
||||
@Volatile
|
||||
@JvmField
|
||||
var unableLaunchAutopilotGear: Set<Chassis.GearPosition>? = null
|
||||
}
|
||||
@@ -4,6 +4,9 @@ import com.zhidao.support.adas.high.common.autopilot.ability.AutopilotAbilityMan
|
||||
import com.zhidao.support.adas.high.subscribe.SubscribeInterfaceOptions;
|
||||
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
|
||||
import chassis.Chassis;
|
||||
|
||||
/**
|
||||
* Date:2019/5/31。
|
||||
@@ -126,13 +129,13 @@ public class AdasOptions {
|
||||
}
|
||||
|
||||
/**
|
||||
* 身份/车型
|
||||
* 不能启动自驾的档位
|
||||
*
|
||||
* @param identityMode 车型
|
||||
* @param unableLaunchAutopilotGear 档位
|
||||
* @return
|
||||
*/
|
||||
public Builder setIdentityMode(String identityMode) {
|
||||
options.setIdentityMode(identityMode);
|
||||
public Builder setUnableLaunchAutopilotGear(Set<Chassis.GearPosition> unableLaunchAutopilotGear) {
|
||||
options.setUnableLaunchAutopilotGear(unableLaunchAutopilotGear);
|
||||
return this;
|
||||
}
|
||||
|
||||
@@ -153,7 +156,7 @@ public class AdasOptions {
|
||||
options.ipcAssignIP = null;
|
||||
options.ipcFixationIP = null;
|
||||
options.subscribeInterfaceOptions = null;
|
||||
options.setIdentityMode("");
|
||||
options.setUnableLaunchAutopilotGear(null);
|
||||
return options;
|
||||
}
|
||||
|
||||
@@ -197,7 +200,7 @@ public class AdasOptions {
|
||||
this.subscribeInterfaceOptions = subscribeInterfaceOptions;
|
||||
}
|
||||
|
||||
public void setIdentityMode(String identityMode) {
|
||||
AutopilotAbilityManager.getInstance().setIdentityMode(identityMode);
|
||||
public void setUnableLaunchAutopilotGear(Set<Chassis.GearPosition> unableLaunchAutopilotGear) {
|
||||
AutopilotAbilityManager.getInstance().setUnableLaunchAutopilotGear(unableLaunchAutopilotGear);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,10 +1,7 @@
|
||||
package com.zhidao.support.adas.high.common.autopilot.ability;
|
||||
|
||||
import com.zhidao.support.adas.high.OnAdasListener;
|
||||
|
||||
import java.util.Timer;
|
||||
import java.util.TimerTask;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
import chassis.Chassis;
|
||||
import chassis.ChassisStatesOuterClass;
|
||||
@@ -31,10 +28,6 @@ public class AutopilotAbility230 {
|
||||
}
|
||||
|
||||
private void onCallback() {
|
||||
//金旅、开沃小巴乘客端 不能启动自动驾驶
|
||||
if (AutopilotAbilityManager.getInstance().isBusPassenger()) {
|
||||
return;
|
||||
}
|
||||
boolean isAutopilotAbility = true;//是否能启动自动驾驶
|
||||
String unableAutopilotReason = null;//不能启动自动驾驶原因
|
||||
//检测底盘相关
|
||||
@@ -47,36 +40,14 @@ public class AutopilotAbility230 {
|
||||
}
|
||||
}
|
||||
if (isAutopilotAbility) {
|
||||
/**
|
||||
* 档位状态判断 目前判断的车型包括 东风Taxi 红旗Taxi 金旅Bus 金旅M1 金旅M1 福田清扫车 开沃
|
||||
* TODO 如果 identityMode 未赋值以及目前已知其他车型判断逻辑跟东风Taxi和红旗 走
|
||||
*/
|
||||
//开沃任何档位都能启动自驾
|
||||
if (!AutopilotAbilityManager.getInstance().isBusDriverVan()) {
|
||||
if (chassisStates.hasGearSystemStates()) {
|
||||
Chassis.GearPosition gear = chassisStates.getGearSystemStates().getGearPosition();
|
||||
//金旅Bus和清扫车 档位不正常
|
||||
if (AutopilotAbilityManager.getInstance().isBusDriver()) {
|
||||
if (gear == Chassis.GearPosition.GEAR_N || gear == Chassis.GearPosition.GEAR_R) {
|
||||
isAutopilotAbility = false;
|
||||
unableAutopilotReason = "档位不正常";
|
||||
}
|
||||
} else if (AutopilotAbilityManager.getInstance().isSweeperDriverFutian()) {
|
||||
if (gear == Chassis.GearPosition.GEAR_N) {
|
||||
isAutopilotAbility = false;
|
||||
unableAutopilotReason = "档位不正常";
|
||||
}
|
||||
} else {
|
||||
//东风Taxi和红旗 司机端和乘客端 档位不正常
|
||||
if (gear == Chassis.GearPosition.GEAR_P || gear == Chassis.GearPosition.GEAR_R) {
|
||||
isAutopilotAbility = false;
|
||||
unableAutopilotReason = "档位不正常";
|
||||
}
|
||||
}
|
||||
if (chassisStates.hasGearSystemStates()) {
|
||||
Chassis.GearPosition gear = chassisStates.getGearSystemStates().getGearPosition();
|
||||
if (!AutopilotAbilityManager.getInstance().isLaunchAutopilot(gear)) {
|
||||
isAutopilotAbility = false;
|
||||
unableAutopilotReason = "档位不正常";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//TODO 关于手刹:不同车型的实现不同所以目前没法使用此字段
|
||||
// if (isAutopilotAbility) {
|
||||
// //电子驻车制动系统
|
||||
@@ -88,9 +59,7 @@ public class AutopilotAbility230 {
|
||||
// }
|
||||
// }
|
||||
}
|
||||
if (AutopilotAbilityManager.getInstance().getListener() != null) {
|
||||
AutopilotAbilityManager.getInstance().getListener().onAutopilotAbility(isAutopilotAbility, unableAutopilotReason);
|
||||
}
|
||||
AutopilotAbilityManager.getInstance().onAutopilotAbility(isAutopilotAbility, unableAutopilotReason);
|
||||
}
|
||||
|
||||
public synchronized void start() {
|
||||
@@ -114,5 +83,4 @@ public class AutopilotAbility230 {
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -45,10 +45,6 @@ public class AutopilotAbility250 {
|
||||
}
|
||||
|
||||
private void onCallback(SystemStatusInfo.StatusInfo statusInfo) {
|
||||
//金旅、开沃小巴乘客端 不能启动自动驾驶
|
||||
if (AutopilotAbilityManager.getInstance().isBusPassenger()) {
|
||||
return;
|
||||
}
|
||||
boolean isAutopilotAbility = true;//是否能启动自动驾驶
|
||||
String unableAutopilotReason = null;//不能启动自动驾驶原因
|
||||
//检测节点状态相关
|
||||
@@ -122,36 +118,14 @@ public class AutopilotAbility250 {
|
||||
}
|
||||
}
|
||||
if (isAutopilotAbility) {
|
||||
/**
|
||||
* 档位状态判断 目前判断的车型包括 东风Taxi 红旗Taxi 金旅Bus 金旅M1 金旅M1 福田清扫车 开沃
|
||||
* TODO 如果 identityMode 未赋值以及目前已知其他车型判断逻辑跟东风Taxi和红旗 走
|
||||
*/
|
||||
//开沃任何档位都能启动自驾
|
||||
if (!AutopilotAbilityManager.getInstance().isBusDriverVan()) {
|
||||
if (chassisStates.hasGearSystemStates()) {
|
||||
Chassis.GearPosition gear = chassisStates.getGearSystemStates().getGearPosition();
|
||||
//金旅Bus和清扫车 档位不正常
|
||||
if (AutopilotAbilityManager.getInstance().isBusDriver()) {
|
||||
if (gear == Chassis.GearPosition.GEAR_N || gear == Chassis.GearPosition.GEAR_R) {
|
||||
isAutopilotAbility = false;
|
||||
unableAutopilotReason = "档位不正常";
|
||||
}
|
||||
} else if (AutopilotAbilityManager.getInstance().isSweeperDriverFutian()) {
|
||||
if (gear == Chassis.GearPosition.GEAR_N) {
|
||||
isAutopilotAbility = false;
|
||||
unableAutopilotReason = "档位不正常";
|
||||
}
|
||||
} else {
|
||||
//东风Taxi和红旗 司机端和乘客端 档位不正常
|
||||
if (gear == Chassis.GearPosition.GEAR_P || gear == Chassis.GearPosition.GEAR_R) {
|
||||
isAutopilotAbility = false;
|
||||
unableAutopilotReason = "档位不正常";
|
||||
}
|
||||
}
|
||||
if (chassisStates.hasGearSystemStates()) {
|
||||
Chassis.GearPosition gear = chassisStates.getGearSystemStates().getGearPosition();
|
||||
if (!AutopilotAbilityManager.getInstance().isLaunchAutopilot(gear)) {
|
||||
isAutopilotAbility = false;
|
||||
unableAutopilotReason = "档位不正常";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//TODO 关于手刹:不同车型的实现不同所以目前没法使用此字段
|
||||
// if (isAutopilotAbility) {
|
||||
// //电子驻车制动系统
|
||||
@@ -163,9 +137,7 @@ public class AutopilotAbility250 {
|
||||
// }
|
||||
// }
|
||||
}
|
||||
if (AutopilotAbilityManager.getInstance().getListener() != null) {
|
||||
AutopilotAbilityManager.getInstance().getListener().onAutopilotAbility(isAutopilotAbility, unableAutopilotReason);
|
||||
}
|
||||
AutopilotAbilityManager.getInstance().onAutopilotAbility(isAutopilotAbility, unableAutopilotReason);
|
||||
}
|
||||
|
||||
public synchronized void start() {
|
||||
|
||||
@@ -10,11 +10,13 @@ import com.zhidao.support.adas.high.OnAdasListener;
|
||||
import com.zhidao.support.adas.high.common.Constants;
|
||||
import com.zhidao.support.adas.high.common.CupidLogUtils;
|
||||
|
||||
import java.util.Set;
|
||||
import java.util.Timer;
|
||||
import java.util.TimerTask;
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
import chassis.Chassis;
|
||||
import chassis.ChassisStatesOuterClass;
|
||||
import mogo.telematics.pad.MessagePad;
|
||||
import system_master.SystemStatusInfo;
|
||||
@@ -38,37 +40,14 @@ public class AutopilotAbilityManager {
|
||||
private AutopilotAbility250 autopilotAbility250;
|
||||
private Timer startTimer;
|
||||
/**
|
||||
* 身份/车型
|
||||
* 不能启动自动驾驶的档位
|
||||
*/
|
||||
private String identityMode;
|
||||
private Set<Chassis.GearPosition> unableLaunchAutopilotGear;
|
||||
|
||||
public interface OnAutopilotAbilityListener {
|
||||
void onStatusQuery();//查询是被调用
|
||||
}
|
||||
|
||||
/**
|
||||
* 身份规则定义根据app/productFlavors/README.md
|
||||
* * taxi司机屏 Taxi_Driver_Base (东风、红旗司机端)
|
||||
* * taxi乘客屏 Taxi_Passenger_Base (东风、红旗乘客端)
|
||||
* * bus司机屏 Bus_Driver_Base (金旅小巴司机端)
|
||||
* * Bus_Driver_Van (开沃小巴司机端)
|
||||
* * bus乘客屏 Bus_Passenger_Base (金旅、开沃小巴乘客端)
|
||||
* * Bus_Passenger_M1 (M1小巴乘客端)
|
||||
* * Bus_Passenger_M2 (M2小巴乘客端)
|
||||
* * 清扫车 Sweeper_Driver_FT (福田清扫车司机端)
|
||||
* <p>
|
||||
* 此定义不区分角色,只区分业务线和车型
|
||||
*/
|
||||
private interface IDENTITY_MODE {
|
||||
String TAXI_DRIVER_BASE = "Taxi_Driver_Base";//(东风、红旗司机端)
|
||||
String TAXI_PASSENGER_BASE = "Taxi_Passenger_Base";//(东风、红旗乘客端)
|
||||
String BUS_DRIVER_BASE = "Bus_Driver_Base";//(金旅小巴司机端)
|
||||
String BUS_DRIVER_VAN = "Bus_Driver_Van";//(开沃小巴司机端)
|
||||
String BUS_PASSENGER_BASE = "Bus_Passenger_Base";//(金旅、开沃小巴乘客端)
|
||||
String BUS_PASSENGER_M1 = "Bus_Passenger_M1";//(M1小巴乘客端)
|
||||
String BUS_PASSENGER_M2 = "Bus_Passenger_M2";//(M2小巴乘客端)
|
||||
String SWEEPER_DRIVER_FT = "Sweeper_Driver_FT";//(福田清扫车司机端)
|
||||
}
|
||||
|
||||
private AutopilotAbilityManager() {
|
||||
}
|
||||
@@ -84,8 +63,22 @@ public class AutopilotAbilityManager {
|
||||
return INSTANCE;
|
||||
}
|
||||
|
||||
public void setIdentityMode(String identityMode) {
|
||||
this.identityMode = identityMode;
|
||||
public void setUnableLaunchAutopilotGear(Set<Chassis.GearPosition> unableLaunchAutopilotGear) {
|
||||
this.unableLaunchAutopilotGear = unableLaunchAutopilotGear;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取当前档位是否能启动自动驾驶 如果不传递默认可以启动
|
||||
* 不能启动自驾档位规则:app/README.md/不能启动自动驾驶的档位
|
||||
*
|
||||
* @param currentGear 当前档位
|
||||
* @return 是否能启动自驾
|
||||
*/
|
||||
public boolean isLaunchAutopilot(Chassis.GearPosition currentGear) {
|
||||
if (unableLaunchAutopilotGear != null && !unableLaunchAutopilotGear.isEmpty()) {
|
||||
return !unableLaunchAutopilotGear.contains(currentGear);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public void setCarConfig(MessagePad.CarConfigResp carConfig) {
|
||||
@@ -105,8 +98,10 @@ public class AutopilotAbilityManager {
|
||||
this.listener = listener;
|
||||
}
|
||||
|
||||
public OnAdasListener getListener() {
|
||||
return listener;
|
||||
public void onAutopilotAbility(boolean isAutopilotAbility, String unableAutopilotReason) {
|
||||
if (listener != null) {
|
||||
listener.onAutopilotAbility(isAutopilotAbility, unableAutopilotReason);
|
||||
}
|
||||
}
|
||||
|
||||
public void setHandler(Handler handler) {
|
||||
@@ -243,32 +238,4 @@ public class AutopilotAbilityManager {
|
||||
}
|
||||
return version;
|
||||
}
|
||||
|
||||
/**
|
||||
* 金旅、开沃小巴乘客端
|
||||
*/
|
||||
public boolean isBusPassenger() {
|
||||
return IDENTITY_MODE.BUS_PASSENGER_BASE.equalsIgnoreCase(identityMode);
|
||||
}
|
||||
|
||||
/**
|
||||
* 开沃小巴司机端
|
||||
*/
|
||||
public boolean isBusDriverVan() {
|
||||
return IDENTITY_MODE.BUS_DRIVER_VAN.equalsIgnoreCase(identityMode);
|
||||
}
|
||||
|
||||
/**
|
||||
* 金旅小巴司机端
|
||||
*/
|
||||
public boolean isBusDriver() {
|
||||
return IDENTITY_MODE.BUS_DRIVER_BASE.equalsIgnoreCase(identityMode);
|
||||
}
|
||||
|
||||
/**
|
||||
* 福田清扫车司机端
|
||||
*/
|
||||
public boolean isSweeperDriverFutian() {
|
||||
return IDENTITY_MODE.SWEEPER_DRIVER_FT.equalsIgnoreCase(identityMode);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user