Merge branch 'dev_robotaxi-d-app-module_2120_221017_2.12.0' into dev_robotaxi-d-app-module_2120_221017_2.12.0_launch_autopilot_fail

This commit is contained in:
xinfengkun
2022-11-07 15:01:07 +08:00
29 changed files with 271 additions and 95 deletions

View File

@@ -65,6 +65,9 @@ class BusConst {
const val EVENT_PARAM_START_RESULT = "start_autopilot" // true/false
const val EVENT_PARAM_PLATE_NUM = "plate_number" // 车牌号
const val EVENT_PARAM_ENV_ONLINE = "env_online" // 是否线上环境true/false
// 埋点key开启自动驾驶前已识别的异常会导致无法开启自驾
const val EVENT_KEY_AP_UNABLE_START_REASON = "event_key_och_bus_ap_unable_start_reason"
const val EVENT_PARAM_UNABLE_START_REASON = "unable_start_reason";
/**
* 订单起终点Marker类型

View File

@@ -532,6 +532,7 @@ public class BusOrderModel {
if (!FunctionBuildConfig.isDemoMode && !OCHAdasAbilityManager.getInstance().getAutopilotAbilityStatus()){
ToastUtils.showLong(OCHAdasAbilityManager.getInstance().getAutopilotUnAbilityReason() +
", 请稍候重试");
triggerUnableStartAPReasonEvent();
return;
}
@@ -976,6 +977,17 @@ public class BusOrderModel {
currentStation.getName(), nextStation.getName(), currentLineId);
}
public void triggerUnableStartAPReasonEvent() {
if (stationList == null || backgroundCurrentStationIndex >= stationList.size()-1) {
return;
}
BusStationBean currentStation = stationList.get( backgroundCurrentStationIndex);
BusStationBean nextStation = stationList.get( backgroundCurrentStationIndex +1);
BusAnalyticsManager.getInstance().triggerUnableStartAPReasonEvent(
currentStation.getName(), nextStation.getName(), currentLineId,
OCHAdasAbilityManager.getInstance().getAutopilotUnAbilityReason());
}
public BusRoutesResult getBusRoutesResult() {
return busRoutesResult;
}

View File

@@ -79,4 +79,31 @@ public class BusAnalyticsManager {
UiThreadHandler.postDelayed(startAutopilotRunnable, BusConst.LOOP_PERIOD_15S);
}
}
/**
* 触发"无法开启自驾已知异常"埋点
* @param startName
* @param endName
* @param lineId
*/
public void triggerUnableStartAPReasonEvent(String startName, String endName, int lineId,
String reason) {
String sn = MoGoAiCloudClientConfig.getInstance().getSn();
String plateNum = AppConfigInfo.INSTANCE.getPlateNumber();
String dateTime = DateTimeUtils.getTimeText(
System.currentTimeMillis(), DateTimeUtils.yyyy_MM_dd_HH_mm_ss);
HashMap<String, Object> params = new HashMap<>();
params.put(BusConst.EVENT_PARAM_SN, sn);
params.put(BusConst.EVENT_PARAM_PLATE_NUM, TextUtils.isEmpty(plateNum) ? "" : plateNum);
params.put(BusConst.EVENT_PARAM_ENV_ONLINE,
DebugConfig.getNetMode() == DebugConfig.NET_MODE_RELEASE ? true : false);
params.put(BusConst.EVENT_PARAM_TIME, dateTime);
params.put(BusConst.EVENT_PARAM_START_NAME, startName);
params.put(BusConst.EVENT_PARAM_END_NAME, endName);
params.put(BusConst.EVENT_PARAM_LINE_ID, lineId);
params.put(BusConst.EVENT_PARAM_UNABLE_START_REASON, reason);
AnalyticsManager.INSTANCE.track(BusConst.EVENT_KEY_AP_UNABLE_START_REASON, params);
}
}

View File

@@ -29,7 +29,8 @@ object BusSendTripInfoManager{
arrivalStopName: String,
isLastStop: Boolean) {
d(SceneConstant.M_BUS + "BusSendTripInfoManager", "type: "+ type
+", lineName: "+ lineName + ", stationName: "+arrivalStopName+", isLastStop: "+isLastStop)
+", lineName: "+ lineName +", departureStopName: "+ departureStopName
+ ", arrivalStopName: "+arrivalStopName+", isLastStop: "+isLastStop)
CallerAutoPilotManager.sendTripInfo(type,lineName,departureStopName, arrivalStopName, isLastStop)
}
}

View File

@@ -67,6 +67,9 @@ class TaxiConst {
const val EVENT_PARAM_START_RESULT = "start_autopilot" // true/false
const val EVENT_PARAM_PLATE_NUM = "plate_number" // 车牌号
const val EVENT_PARAM_ENV_ONLINE = "env_online" // 是否线上环境true/false
// 埋点key开启自动驾驶前已识别的异常会导致无法开启自驾
const val EVENT_KEY_AP_UNABLE_START_REASON = "event_key_och_taxi_ap_unable_start_reason"
const val EVENT_PARAM_UNABLE_START_REASON = "unable_start_reason";
// 实时计算当前剩余里程和时间 间隔 2秒
const val LOOP_CALCULATEROUTE_2S = 2 * 1000L

View File

@@ -811,6 +811,7 @@ public class TaxiModel {
}
if (mCurrentOCHOrder.orderStatus == TaxiOrderStatusEnum.ArriveAtEnd.getCode()){
if (FunctionBuildConfig.isDemoMode) {
CallerLogger.INSTANCE.d(M_TAXI + TAG, "setIPCDemoModefalse");
CallerAutoPilotManager.INSTANCE.setIPCDemoMode(false);
}
@@ -885,6 +886,9 @@ public class TaxiModel {
if (!FunctionBuildConfig.isDemoMode && !OCHAdasAbilityManager.getInstance().getAutopilotAbilityStatus()){
ToastUtils.showLong(OCHAdasAbilityManager.getInstance().getAutopilotUnAbilityReason() +
", 请稍候重试");
TaxiAnalyticsManager.getInstance().triggerUnableStartAPReasonEvent(
mCurrentOCHOrder.startSiteAddr, mCurrentOCHOrder.endSiteAddr, mCurrentOCHOrder.orderNo,
OCHAdasAbilityManager.getInstance().getAutopilotUnAbilityReason());
return;
}

View File

@@ -620,6 +620,7 @@ public class TaxiBeingServerdOrdersFragment extends BaseTaxiUIFragment
public void onCurrentOrderCancelDone() {
//去除起终点
saveOrderState = -1;
if (mCurrentOrder != null){
setOrRemoveMapMaker(false, TaxiConst.TAXI_START_MAP_MAKER,mCurrentOrder.startSitePoint,R.raw.star_marker);
setOrRemoveMapMaker(false, TaxiConst.TAXI_END_MAP_MAKER,mCurrentOrder.endSitePoint,R.raw.end_marker);

View File

@@ -79,4 +79,31 @@ public class TaxiAnalyticsManager {
UiThreadHandler.postDelayed(startAutopilotRunnable, TaxiConst.LOOP_PERIOD_15S);
}
}
/**
* 触发"无法开启自驾已知异常"埋点
* @param startName
* @param endName
* @param orderNo
*/
public void triggerUnableStartAPReasonEvent(String startName, String endName, String orderNo,
String reason) {
String sn = MoGoAiCloudClientConfig.getInstance().getSn();
String plateNum = AppConfigInfo.INSTANCE.getPlateNumber();
String dateTime = DateTimeUtils.getTimeText(
System.currentTimeMillis(), DateTimeUtils.yyyy_MM_dd_HH_mm_ss);
HashMap<String, Object> params = new HashMap<>();
params.put(TaxiConst.EVENT_PARAM_SN, sn);
params.put(TaxiConst.EVENT_PARAM_PLATE_NUM, TextUtils.isEmpty(plateNum) ? "" : plateNum);
params.put(TaxiConst.EVENT_PARAM_ENV_ONLINE,
DebugConfig.getNetMode() == DebugConfig.NET_MODE_RELEASE ? true : false);
params.put(TaxiConst.EVENT_PARAM_TIME, dateTime);
params.put(TaxiConst.EVENT_PARAM_START_NAME, startName);
params.put(TaxiConst.EVENT_PARAM_END_NAME, endName);
params.put(TaxiConst.EVENT_PARAM_ORDER_NUMBER, orderNo);
params.put(TaxiConst.EVENT_PARAM_UNABLE_START_REASON, reason);
AnalyticsManager.INSTANCE.track(TaxiConst.EVENT_KEY_AP_UNABLE_START_REASON, params);
}
}

View File

@@ -107,8 +107,24 @@ internal object BadCaseManager : LifecycleEventObserver {
if(ClickUtils.isFastClick()){
if(NetworkUtils.isConnected()){
if(BadCaseConfig.dockerVersion!=null){
val caseListDialog = CaseListDialog(activity)
caseListDialog.show()
//兼容老MAP版本
if(BadCaseConfig.dockerVersion!!.contains("2.3.0")
|| BadCaseConfig.dockerVersion!!.contains("2.4.0")
|| BadCaseConfig.dockerVersion!!.contains("2.5.0")
|| BadCaseConfig.dockerVersion!!.contains("2.6.0")
|| BadCaseConfig.dockerVersion!!.contains("2.8.0")){
val initiativeBadCaseWindow = InitiativeBadCaseWindow(activity)
initiativeBadCaseWindow.setClickListener(object: InitiativeBadCaseWindow.ClickListener{
override fun closeWindow() {
initiativeBadCaseWindow.hideFloatWindow()
}
})
initiativeBadCaseWindow.showFloatWindow(null)
}else{
val caseListDialog = CaseListDialog(activity)
caseListDialog.show()
}
}else{
ToastUtils.showShort("工控机连接状态异常")
}

View File

@@ -174,19 +174,27 @@ internal class BadCaseConfigView @JvmOverloads constructor(
override fun onAutopilotRecordConfig(config: MessagePad.RecordDataConfig) {
super.onAutopilotRecordConfig(config)
ThreadUtils.runOnUiThread {
config.recordTypesList.iterator().forEach {
if (it.id != 99){
val topicList = ArrayList<TopicEntity>()
it.topicsList.iterator().forEach {
topicList.add(TopicEntity(it,true,false))
if(BadCaseConfig.dockerVersion!!.contains("2.3.0")
|| BadCaseConfig.dockerVersion!!.contains("2.4.0")
|| BadCaseConfig.dockerVersion!!.contains("2.5.0")
|| BadCaseConfig.dockerVersion!!.contains("2.6.0")
|| BadCaseConfig.dockerVersion!!.contains("2.8.0")){
rvTemplate.visibility = View.GONE
}else{
config.recordTypesList.iterator().forEach {
if (it.id != 99){
val topicList = ArrayList<TopicEntity>()
it.topicsList.iterator().forEach {
topicList.add(TopicEntity(it,true,false))
}
recordTypesList.add(RecordTypeEntity(it.id,it.desc,topicList))
}
recordTypesList.add(RecordTypeEntity(it.id,it.desc,topicList))
}
}
if(recordTypesList.size>1){
rvTemplate.visibility = View.VISIBLE
recordTemplateAdapter?.setData(recordTypesList)
recordTemplateAdapter?.notifyDataSetChanged()
if(recordTypesList.size>1){
rvTemplate.visibility = View.VISIBLE
recordTemplateAdapter?.setData(recordTypesList)
recordTemplateAdapter?.notifyDataSetChanged()
}
}
}
}

View File

@@ -163,20 +163,21 @@ public class CaseTopicListDialog extends Dialog implements IMoGoAutopilotRecordL
ToastUtils.showShort("Topic设置成功");
if(recordType.getId() == 0){
//自定义Topic
BadCaseConfig.customTopicList.clear();
BadCaseConfig.customTopicList.addAll(addTopicList);
}
addTopicList.clear();
recordType.getTopicsList().removeAll(allTopicList);
dismiss();
}else{
ToastUtils.showShort("Topic设置失败");
}
}
});
tvCancel.setOnClickListener(v -> {
dismiss();
recordType.getTopicsList().removeAll(allTopicList);
dismiss();
});
}
@@ -184,11 +185,13 @@ public class CaseTopicListDialog extends Dialog implements IMoGoAutopilotRecordL
@Override
public void onAutopilotRecordConfig(MessagePad.RecordDataConfig config) {
ThreadUtils.runOnUiThread(() -> {
Log.i("houyanli","AllTopicsCount="+config.getAllTopicsCount());
if(config.getAllTopicsCount()>0){
for(int index=0;index<config.getAllTopicsCount();index++){
if(!recordType.getTopicsList().contains(config.getAllTopics(index))){
allTopicList.add(new TopicEntity(config.getAllTopics(index),false,true));
}
Log.i("houyanli","topic="+config.getAllTopics(index));
}
recordType.getTopicsList().addAll(allTopicList);
topicListAdapter.setData(recordType.getTopicsList());

View File

@@ -331,7 +331,7 @@ class InitiativeBadCaseWindow constructor(activity: Activity) : View.OnTouchList
return true
}
fun showFloatWindow(recordCaseEntity: RecordCaseEntity) {
fun showFloatWindow(recordCaseEntity: RecordCaseEntity?) {
if (mFloatLayout.parent == null) {
val metrics = DisplayMetrics()
// 默认固定位置,靠屏幕右边缘的中间
@@ -340,8 +340,13 @@ class InitiativeBadCaseWindow constructor(activity: Activity) : View.OnTouchList
mWindowParams!!.y = metrics.heightPixels / 2 - getSysBarHeight(mActivity)-350
mWindowManager!!.addView(mFloatLayout, mWindowParams)
//开启录包
CallerAutoPilotManager.recordPackage(recordCaseEntity.caseId,Random(SystemClock.elapsedRealtime()).nextInt(),
BadCaseConfig.totalDuration, BadCaseConfig.previousDuration,recordCaseEntity.topicList)
if(recordCaseEntity!=null){
CallerAutoPilotManager.recordPackage(recordCaseEntity.caseId,Random(SystemClock.elapsedRealtime()).nextInt(),
BadCaseConfig.totalDuration, BadCaseConfig.previousDuration,recordCaseEntity.topicList)
}else{
CallerAutoPilotManager.recordPackage(BadCaseConfig.type,Random(SystemClock.elapsedRealtime()).nextInt(),
BadCaseConfig.totalDuration, BadCaseConfig.previousDuration)
}
}
}

View File

@@ -15,10 +15,10 @@ import com.zhjt.mogo_core_function_devatools.R
*/
class TopicListAdapter: RecyclerView.Adapter<TopicListAdapter.TopicListHolder>() {
private var data:List<TopicEntity>? = null
private var data:MutableList<TopicEntity>? = null
private var topicClickListener: TopicClickListener? = null
fun setData( data: List<TopicEntity>?){
fun setData( data: MutableList<TopicEntity>?){
this.data = data
}
@@ -39,13 +39,37 @@ class TopicListAdapter: RecyclerView.Adapter<TopicListAdapter.TopicListHolder>()
holder.topic_check_box.isChecked = topicList[position].topicStatus
holder.topic_check_box.tag = topicList
holder.topic_check_box.isClickable = topicList[position].topicCanClick
holder.topic_check_box.setOnCheckedChangeListener { _, b ->
topicList[position].topicStatus = b
topicClickListener?.onClick(topicList[position].topicName,b)
holder.topic_check_box.setOnCheckedChangeListener { _, isChecked ->
topicList[position].topicStatus = isChecked
topicClickListener?.onClick(topicList[position].topicName,isChecked)
if(isChecked){
//滚动到置顶
moveItem(topicList[position],position,0)
}else{
var lastNotCan = 0 //最后一个不能选择的
for( i in 0 until itemCount){
var topicEntity = data?.get(i)
if (topicEntity != null) {
if(!topicEntity.topicCanClick){
lastNotCan = i
}
}
}
moveItem(topicList[position],position,lastNotCan)
}
}
}
}
private fun moveItem(topicEntity: TopicEntity,removePos: Int,insertedPos: Int){
data?.remove(topicEntity)
notifyItemRemoved(removePos)
notifyItemRangeChanged(removePos, itemCount - removePos)
data?.add(insertedPos, topicEntity)
notifyItemInserted(insertedPos)
notifyItemRangeChanged(insertedPos, itemCount)
}
override fun getItemCount() = data?.size ?: 0
class TopicListHolder(itemView: View) : RecyclerView.ViewHolder(itemView){

View File

@@ -42,51 +42,51 @@ object StatusManager {
private const val TAG = "StatusManager"
private lateinit var model: StatusModel
private var timer: Job? = null
// private var timer: Job? = null
private var hasInit = false
private val listeners by lazy { CopyOnWriteArrayList<IStatusListener>() }
private var container: WeakReference<ViewGroup>? = null
private val listener = object : IMoGoAutopilotStatusListener {
override fun onAutopilotGuardian(guardianInfo: MogoReportMsg.MogoReportMessage?) {
super.onAutopilotGuardian(guardianInfo)
guardianInfo?.code?.takeIf {
CallerLogger.d("$M_DEVA$TAG", "-- onAutopilotGuardian ---: code: $it")
it.contains("RTK_STATUS", true) || it.contains("CAN", true) || it == "ILCT_RTK_OR_SLAM_CHANGE"
}?.run {
CallerLogger.d("$M_DEVA$TAG", "-- onAutopilotGuardian trigger req ---: code: $this")
req()
}
}
}
// private val listener = object : IMoGoAutopilotStatusListener {
// override fun onAutopilotGuardian(guardianInfo: MogoReportMsg.MogoReportMessage?) {
// super.onAutopilotGuardian(guardianInfo)
// guardianInfo?.code?.takeIf {
// CallerLogger.d("$M_DEVA$TAG", "-- onAutopilotGuardian ---: code: $it")
// it.contains("RTK_STATUS", true) || it.contains("CAN", true) || it == "ILCT_RTK_OR_SLAM_CHANGE"
// }?.run {
// CallerLogger.d("$M_DEVA$TAG", "-- onAutopilotGuardian trigger req ---: code: $this")
// req()
// }
// }
// }
private val appStateListener = object : IAppStateListener {
override fun onAppStateChanged(isForeground: Boolean) {
if (isForeground) {
req()
} else {
timer?.cancel()
}
}
}
// private val appStateListener = object : IAppStateListener {
//
// override fun onAppStateChanged(isForeground: Boolean) {
// if (isForeground) {
// req()
// } else {
// timer?.cancel()
// }
// }
// }
private val flows: ArrayList<IFlow<out Status>> by lazy {
ArrayList()
}
private fun req() {
timer?.cancel()
model.viewModelScope.launch(Dispatchers.IO) {
CallerAutoPilotManager.sendStatusQueryReq()
while (true) {
delay(60000) //一分钟主动请求一次
CallerAutoPilotManager.sendStatusQueryReq()
}
}.also {
timer = it
}
}
// private fun req() {
// timer?.cancel()
// model.viewModelScope.launch(Dispatchers.IO) {
// CallerAutoPilotManager.sendStatusQueryReq()
// while (true) {
// delay(60000) //一分钟主动请求一次
// CallerAutoPilotManager.sendStatusQueryReq()
// }
// }.also {
// timer = it
// }
// }
fun init(ctx: Context) {
if (hasInit) {
@@ -109,9 +109,9 @@ object StatusManager {
private fun onCreate(ctx: Context) {
val values = model.status.value?.second ?: throw IllegalStateException("state is not right.")
CallerAutoPilotStatusListenerManager.addListener(TAG, listener)
AppStateManager.registerAppStateListener(appStateListener)
req()
// CallerAutoPilotStatusListenerManager.addListener(TAG, listener)
// AppStateManager.registerAppStateListener(appStateListener)
// req()
values.map {
when (it) {
is CanStatus -> CanImpl(ctx)
@@ -166,9 +166,9 @@ object StatusManager {
private fun onDestroy(ctx: Context) {
hasInit = false
CallerAutoPilotStatusListenerManager.removeListener(TAG)
AppStateManager.unRegisterAppStateListener(appStateListener)
timer?.cancel()
// CallerAutoPilotStatusListenerManager.removeListener(TAG)
// AppStateManager.unRegisterAppStateListener(appStateListener)
// timer?.cancel()
flows.forEach {
it.onDestroy()
}

View File

@@ -32,9 +32,9 @@ internal class TracingImpl(ctx: Context): IFlow<TracingStatus>(ctx), IMoGoAutopi
super.onAutopilotGuardian(guardianInfo)
val current = guardianInfo?.code
val newState = current?.toState(guardianInfo.msg)
if (newState != null && newState != old) {
send(TracingStatus(newState))
if (newState != null) {
old = newState
send(TracingStatus(newState))
}
}

View File

@@ -129,14 +129,14 @@ internal class StatusAdapter(val ctx: Context, var data: ArrayList<Status>): Rec
MAP_TRA_TYPE -> {
"暂无轨迹"
}
MAP_DATA_EXIST -> "地图数据存在,正在加载${if (extraDesc.isEmpty()) "" else "[$extraDesc]" }"
MAP_DATA_NOT_EXIST -> "地图数据不存在${if (extraDesc.isEmpty()) "" else "[$extraDesc]"}"
TRACK_FINDED -> "轨迹类型:循迹[已找到轨迹$extraDesc]"
TRACK_LOADED -> "轨迹类型:循迹[加载成功$extraDesc]"
TRACK_NOT_EXIST -> "轨迹类型:循迹[不存在$extraDesc]"
TRACK_LOAD_FAIL -> "轨迹类型:循迹[加载失败$extraDesc]"
ROUTE_LOADED -> "轨迹类型:自主算路[加载成功$extraDesc]"
ROUTE_FAILED -> "轨迹类型:自主算路[加载失败$extraDesc]"
MAP_DATA_EXIST -> "地图数据存在,正在加载${ if(extraDesc.isNotEmpty()) "\n[$extraDesc]" else "" }"
MAP_DATA_NOT_EXIST -> "地图数据不存在${ if(extraDesc.isNotEmpty()) "\n[$extraDesc]" else "" }"
TRACK_FINDED -> "轨迹类型:循迹(已找到轨迹)${ if(extraDesc.isNotEmpty()) "\n[$extraDesc]" else "" }"
TRACK_LOADED -> "轨迹类型:循迹(加载成功)${ if(extraDesc.isNotEmpty()) "\n[$extraDesc]" else "" }"
TRACK_NOT_EXIST -> "轨迹类型:循迹(未找到轨迹)${ if(extraDesc.isNotEmpty()) "\n[$extraDesc]" else "" }"
TRACK_LOAD_FAIL -> "轨迹类型:循迹(加载失败)${ if(extraDesc.isNotEmpty()) "\n[$extraDesc]" else "" }"
ROUTE_LOADED -> "轨迹类型:自主算路(加载成功)${ if(extraDesc.isNotEmpty()) "\n[$extraDesc]" else "" }"
ROUTE_FAILED -> "轨迹类型:自主算路(加载失败)${ if(extraDesc.isNotEmpty()) "\n[$extraDesc]" else "" }"
UNKNOWN -> "暂无轨迹"
}
}

View File

@@ -17,7 +17,9 @@ import com.mogo.eagle.core.function.hmi.R
import com.mogo.eagle.core.utilcode.mogo.AppIdentityModeUtils
import com.mogo.eagle.core.utilcode.util.ToastUtils
import com.mogo.module.service.routeoverlay.RouteStrategy
import kotlinx.android.synthetic.main.view_debug_setting.view.*
import kotlinx.android.synthetic.main.view_sop_setting.view.*
import kotlinx.android.synthetic.main.view_sop_setting.view.tbRouteDynamicEffect
/**
* SOP设置窗口
@@ -134,11 +136,18 @@ class SOPSettingView @JvmOverloads constructor(
}
}
//是否开启异常上报
tbIPCReport.isChecked = FunctionBuildConfig.isReportWarning
tbIPCReport.setOnCheckedChangeListener { _, isChecked ->
FunctionBuildConfig.isReportWarning = isChecked
}
//变道绕障的目标障碍物速度阈值
tvSpeed.text = "${FunctionBuildConfig.detouringSpeed} m/s"
ivSpeedReduce.setOnClickListener {
if (FunctionBuildConfig.detouringSpeed <= 3) {
ToastUtils.showShort("阈值小可为3 m/s")
ToastUtils.showShort("阈值小可为3 m/s")
} else {
FunctionBuildConfig.detouringSpeed--
tvSpeed.text = "${FunctionBuildConfig.detouringSpeed} m/s"

View File

@@ -196,6 +196,7 @@ public class MainActivity extends MvpActivity<MainView, MainPresenter> implement
@Override
public void onWindowFocusChanged(boolean hasFocus) {
super.onWindowFocusChanged(hasFocus);
if (hasFocus) {
// 统计代码
final Map<String, Object> properties = new HashMap<>();

View File

@@ -10,6 +10,7 @@ import com.elegant.utils.UiThreadHandler;
import com.mogo.cloud.socket.SocketBuildConfig;
import com.mogo.commons.AbsMogoApplication;
import com.mogo.commons.debug.DebugConfig;
import com.mogo.commons.voice.AIAssist;
import com.mogo.eagle.core.data.config.FunctionBuildConfig;
import com.mogo.eagle.core.data.constants.MoGoConfig;
import com.mogo.eagle.core.data.constants.MogoServicePaths;
@@ -56,6 +57,7 @@ public abstract class MainMoGoApplication extends AbsMogoApplication {
initCrashConfig();
initLogConfig();
initTipToast();
AIAssist.getInstance(this);
initModules();
if (DebugConfig.isDebug()) {
initKoom();

View File

@@ -121,12 +121,25 @@
app:layout_constraintTop_toBottomOf="@id/tbRainMode"
/>
<ToggleButton
android:id="@+id/tbIPCReport"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="@dimen/dp_10"
android:background="@drawable/radio_button_normal_background_right"
android:textColor="#000"
android:textOff="开启异常上报提示"
android:textOn="关闭异常上报提示"
android:textSize="@dimen/dp_24"
app:layout_constraintTop_toBottomOf="@id/tbObu"
/>
<TextView
android:id="@+id/tvSpeedThresholdTitle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintTop_toBottomOf="@id/tbObu"
app:layout_constraintTop_toBottomOf="@id/tbIPCReport"
android:text="变道速度阈值:"
android:textSize="18sp"
android:textColor="#1A1A1A"

View File

@@ -78,7 +78,12 @@ class MogoPrivateObuManager private constructor() {
}
fun disConnectObu(){
MogoObuManager.getInstance().disConnect()
try {
MogoObuManager.getInstance().disConnect()
} catch (e: Exception) {
e.printStackTrace()
}
}
fun isConnected(): Boolean{

View File

@@ -17,6 +17,7 @@ import com.mogo.eagle.core.function.api.v2x.*
import com.mogo.eagle.core.function.call.map.*
import com.mogo.eagle.core.function.call.map.CallerMapRoadListenerManager.OnRoadListener
import com.mogo.eagle.core.function.call.v2x.*
import com.mogo.eagle.core.function.v2x.events.consts.V2XConst.V2X_EVENT_ALARM_POI
import com.mogo.eagle.core.function.v2x.events.scenario.scene.road.*
import com.mogo.eagle.core.utilcode.kotlin.*
import com.mogo.eagle.core.utilcode.mogo.logger.*
@@ -82,7 +83,7 @@ object AiRoadMarker {
override fun onClearAllMarkers(tag: String) {
Logger.d(TAG, "--- onClearAllMarkers ----: tag: $tag")
val marker = this@AiRoadMarker.marker.get()
if (marker != null) {
if (marker != null && tag == V2X_EVENT_ALARM_POI) {
Logger.d(TAG, "--- onClearAllMarkers ----: tag: -- 1: $tag")
unMarker(marker)
}

View File

@@ -66,6 +66,6 @@ interface IMoGoAutopilotStatusListener {
/**
* 平行驾驶
*/
const val STATUS_PARALLEL_DRIVING = 3
const val STATUS_PARALLEL_DRIVING = 7
}
}

View File

@@ -70,6 +70,12 @@ public abstract class MvpActivity<V extends IView, P extends Presenter<V>> exten
return this;
}
@Override
public void onWindowFocusChanged(boolean hasFocus) {
super.onWindowFocusChanged(hasFocus);
BarUtils.hideStatusBarAndSticky(this.getWindow());
}
@Override
public boolean dispatchTouchEvent(MotionEvent ev) {
if (ev.getAction() == MotionEvent.ACTION_DOWN && enableDispatchTouchEventToDismissSoftKeyBoard()) {
@@ -88,8 +94,8 @@ public abstract class MvpActivity<V extends IView, P extends Presenter<V>> exten
}
@Override
public void onWindowFocusChanged(boolean hasFocus) {
super.onWindowFocusChanged(hasFocus);
protected void onRestart() {
super.onRestart();
BarUtils.hideStatusBarAndSticky(this.getWindow());
}

View File

@@ -63,7 +63,7 @@ BIZCONFIG_VERSION=1.3.2
SERVICE_BIZ_VERSION=1.2.4
################ 外部依赖引用 ################
# loglib
LOGLIB_VERSION=1.3.38
LOGLIB_VERSION=1.3.39
######## MogoAiCloudSDK Version ########
# 网络请求LOGLIB_VERSION
MOGO_NETWORK_VERSION=1.4.3.26

View File

@@ -23,6 +23,7 @@ enum PilotMode {
MODE_AUTO_DRIVE = 1;
MODE_STEER_ONLY = 2;
MODE_SPEED_ONLY = 3;
MODE_REMOTE_DRIVE = 6;
}
enum LongitudeDrivingMode {

View File

@@ -143,11 +143,11 @@ message GnssInfo
// message definition for MessageType: MsgTypeAutopilotState
message AutopilotState
{
uint32 state = 1; //0: 不可用(abandoned), 1:ready, 2:自动驾驶中,3:平行驾驶
uint32 state = 1; //0: 不可用(abandoned), 1:ready, 2:自动驾驶中, 7:平行驾驶
uint32 camera = 2; //camera节点状态 1:开启0:关闭
uint32 radar = 3; //雷达节点状态 1:开启0:关闭
uint32 rtk = 4; //RTK节点状态 1:开启0:关闭
uint32 autopilotMode = 5; //自动驾驶状态 0: 非自动驾驶1: 自动驾驶2平行驾驶
uint32 autopilotMode = 5; //自动驾驶状态 0: 非自动驾驶1: 自动驾驶
double speed = 6; //惯导车速 m/s
string reason = 7; //不可用原因(abandoned)
}

View File

@@ -15,6 +15,8 @@ import system_master.SystemStatusInfo;
* 是否可以启动自动驾驶能力检测
* 目前监控了底盘的一些状态和查询节点状态应答的数据
* 没有使用监控事件报告的原因是因为,部分异常没进行正常恢复通知,例如收到了异常监控数据,但是异常恢复之后没有恢复的通知
*
* 此定时器不能停止 鹰眼中存在UI更新依赖循环查询系统状态
*/
public class AutopilotAbilityManager {
private static final String TAG = AutopilotAbilityManager.class.getSimpleName();

View File

@@ -73,15 +73,17 @@ public class AMapMarkerWrapper implements IMogoMarker, Observer {
@Override
public void destroy() {
if ( mMogoMarkerOptions != null ) {
mMogoMarkerOptions.deleteObservers();
mMogoMarkerOptions = null;
}
if ( mMarker != null ) {
mMarker.remove();
mMarker.setMObject( null );
mMarker.setOnInfoWindowClickListener( null );
mMarker = null;
synchronized (this) {
if ( mMogoMarkerOptions != null ) {
mMogoMarkerOptions.deleteObservers();
mMogoMarkerOptions = null;
}
if ( mMarker != null ) {
mMarker.remove();
mMarker.setMObject( null );
mMarker.setOnInfoWindowClickListener( null );
mMarker = null;
}
}
mMogoInfoWindowAdapter = null;
mMogoMarkerClickListener = null;