Merge branch 'dev_robotaxi-d-app-module_240_230131_2.14.0' into test_robotaxi-d-app-module_240_230131_2.14.0.1
This commit is contained in:
@@ -15,6 +15,8 @@ import android.widget.FrameLayout
|
||||
import android.widget.ListView
|
||||
import androidx.appcompat.widget.AppCompatImageView
|
||||
import androidx.constraintlayout.widget.ConstraintLayout
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant
|
||||
import com.mogo.eagle.core.utilcode.mogo.storage.SharedPrefsMgr
|
||||
import com.mogo.eagle.core.utilcode.util.*
|
||||
import com.mogo.och.taxi.passenger.R
|
||||
@@ -136,6 +138,7 @@ object OverlayLeftViewUtils {
|
||||
subscribeOVERVIEW = Observable.timer(300, TimeUnit.MILLISECONDS)
|
||||
.subscribe {
|
||||
EventBus.getDefault().post(UIStatus(UIStatus.OVERVIEW))
|
||||
CallerLogger.d(SceneConstant.M_TAXI_P + TAG, "发送Eventbus subscribeOVERVIEW")
|
||||
}
|
||||
}else{
|
||||
EventBus.getDefault().post(FinishActivity())
|
||||
|
||||
@@ -50,6 +50,7 @@ if (!isAndroidTestBuild()) {
|
||||
LancetX {
|
||||
enable true
|
||||
enableInDebug true
|
||||
logLevel "DEBUG"
|
||||
|
||||
weaveGroup {
|
||||
anr_fix {
|
||||
|
||||
@@ -22,6 +22,8 @@ public class SpaceWarningDialog extends Dialog {
|
||||
private TextView tvCancel;//取消
|
||||
private Activity mActivity;
|
||||
|
||||
private ClickListener clickListener;
|
||||
|
||||
public SpaceWarningDialog(@NonNull Activity activity) {
|
||||
super(activity, R.style.bad_case_dialog);
|
||||
mActivity = activity;
|
||||
@@ -49,8 +51,11 @@ public class SpaceWarningDialog extends Dialog {
|
||||
//清理磁盘
|
||||
tvCleanDisk.setOnClickListener(v -> {
|
||||
//跳转录包管理页面
|
||||
if(mActivity!=null){
|
||||
CallerDevaToolsManager.INSTANCE.showBadCaseManagerView(mActivity);
|
||||
// if(mActivity!=null){
|
||||
// CallerDevaToolsManager.INSTANCE.showBadCaseManagerView(mActivity);
|
||||
// }
|
||||
if(clickListener!=null){
|
||||
clickListener.showBadCaseManagerView();
|
||||
}
|
||||
dismiss();
|
||||
});
|
||||
@@ -61,6 +66,10 @@ public class SpaceWarningDialog extends Dialog {
|
||||
});
|
||||
}
|
||||
|
||||
public void setClickListener(ClickListener clickListener){
|
||||
this.clickListener = clickListener;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAttachedToWindow() {
|
||||
super.onAttachedToWindow();
|
||||
@@ -71,4 +80,8 @@ public class SpaceWarningDialog extends Dialog {
|
||||
super.onDetachedFromWindow();
|
||||
}
|
||||
|
||||
public interface ClickListener{
|
||||
void showBadCaseManagerView();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -80,17 +80,4 @@
|
||||
android:progressDrawable="@drawable/space_warning_progress_bg"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
android:layout_marginTop="378px"
|
||||
android:text="100G"
|
||||
android:textColor="#FFFF6200"
|
||||
android:textSize="43px"
|
||||
/>
|
||||
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
@@ -64,13 +64,14 @@
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvBagTime"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_width="110dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="#FFFFFFFF"
|
||||
android:textSize="26dp"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintRight_toLeftOf="@id/ivBagAudio"
|
||||
android:layout_marginEnd="30dp"
|
||||
android:gravity="start"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
|
||||
@@ -194,6 +194,9 @@ class MoGoHmiFragment : MvpFragment<MoGoHmiContract.View?, HmiPresenter?>(),
|
||||
|
||||
private var bagManagerEntity: BagManagerEntity = BagManagerEntity()
|
||||
|
||||
private var spaceWarningDialog: SpaceWarningDialog ?=null
|
||||
private var isShowWarningDialog = false
|
||||
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
}
|
||||
@@ -407,13 +410,32 @@ class MoGoHmiFragment : MvpFragment<MoGoHmiContract.View?, HmiPresenter?>(),
|
||||
super.onBagManagerResult(bagManager)
|
||||
//判断磁盘是否已满,展示预警弹窗
|
||||
UiThreadHandler.post{
|
||||
if(bagManager.spaceInfoRespCount>0){
|
||||
for(spaceInfo in bagManager.spaceInfoRespList){
|
||||
for(bagSpaceInfo in spaceInfo.bagDirsSpaceInfoList){
|
||||
if(bagSpaceInfo.free == 0L){
|
||||
//磁盘空间已满
|
||||
val spaceWarningDialog = SpaceWarningDialog(context as Activity)
|
||||
spaceWarningDialog.show()
|
||||
if(bagManager.reqType == 1){
|
||||
if(bagManager.spaceInfoRespCount>0){
|
||||
for(spaceInfo in bagManager.spaceInfoRespList){
|
||||
for(bagSpaceInfo in spaceInfo.bagDirsSpaceInfoList){
|
||||
if(bagSpaceInfo.free == 0L){
|
||||
//磁盘空间已满
|
||||
if(!isShowWarningDialog){
|
||||
if(spaceWarningDialog == null){
|
||||
spaceWarningDialog = SpaceWarningDialog(context as Activity)
|
||||
spaceWarningDialog?.setClickListener(object:SpaceWarningDialog.ClickListener{
|
||||
override fun showBadCaseManagerView() {
|
||||
if(mBadCaseManagerView == null){
|
||||
toggleBagManagerView()
|
||||
}
|
||||
}
|
||||
|
||||
})
|
||||
}
|
||||
spaceWarningDialog?.let {
|
||||
if(!it.isShowing){
|
||||
it.show()
|
||||
}
|
||||
}
|
||||
isShowWarningDialog = true
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1729,6 +1751,7 @@ class MoGoHmiFragment : MvpFragment<MoGoHmiContract.View?, HmiPresenter?>(),
|
||||
}
|
||||
|
||||
override fun showSmallFragment() {
|
||||
CallerLogger.d("$M_HMI$TAG", "showSmallFragment start!")
|
||||
// 加载全览模式图层
|
||||
val fragmentOverview = ARouter.getInstance().build(MoGoFragmentPaths.PATH_FRAGMENT_OVERVIEW)
|
||||
.navigation() as BaseFragment
|
||||
@@ -1745,9 +1768,11 @@ class MoGoHmiFragment : MvpFragment<MoGoHmiContract.View?, HmiPresenter?>(),
|
||||
}.commitAllowingStateLoss()
|
||||
}
|
||||
CallerDevaToolsManager.hideStatusBar()
|
||||
CallerLogger.d("$M_HMI$TAG", "showSmallFragment end!")
|
||||
}
|
||||
|
||||
override fun hideSmallFragment() {
|
||||
CallerLogger.d("$M_HMI$TAG", "hideSmallFragment start!")
|
||||
val fragmentOverview = ARouter.getInstance().build(MoGoFragmentPaths.PATH_FRAGMENT_OVERVIEW)
|
||||
.navigation() as BaseFragment
|
||||
activity?.supportFragmentManager?.beginTransaction()
|
||||
@@ -1757,6 +1782,7 @@ class MoGoHmiFragment : MvpFragment<MoGoHmiContract.View?, HmiPresenter?>(),
|
||||
}
|
||||
}
|
||||
?.commitAllowingStateLoss()
|
||||
CallerLogger.d("$M_HMI$TAG", "hideSmallFragment end!")
|
||||
// context?.let { CallerDevaToolsManager.showStatusBar(it, statusBarContainer) }
|
||||
}
|
||||
|
||||
|
||||
@@ -63,8 +63,8 @@ class OfflineMapDialog(context: Context): BaseFloatDialog(context) {
|
||||
leftView?.setOnClickListener {
|
||||
when {
|
||||
isConfirm -> {
|
||||
cacheHDOfflineData()
|
||||
showNewContent(isLoading = true, false)
|
||||
cacheHDOfflineData()
|
||||
}
|
||||
else -> {
|
||||
dismiss()
|
||||
@@ -75,6 +75,7 @@ class OfflineMapDialog(context: Context): BaseFloatDialog(context) {
|
||||
rightView?.setOnClickListener {
|
||||
when {
|
||||
isRetry -> {
|
||||
showNewContent(isLoading = true, false)
|
||||
cacheHDOfflineData()
|
||||
}
|
||||
else -> {
|
||||
@@ -163,11 +164,14 @@ class OfflineMapDialog(context: Context): BaseFloatDialog(context) {
|
||||
downloadResultImg?.background = ContextCompat.getDrawable(context, R.drawable.download_success_icon)
|
||||
}
|
||||
else -> {
|
||||
isRetry = true
|
||||
isConfirm = false
|
||||
offlineTitleView?.text = context.resources.getString(R.string.offline_download_failure)
|
||||
okView?.visibility = View.GONE
|
||||
progressBar?.visibility = View.GONE
|
||||
downloadPercentView?.visibility = View.GONE
|
||||
leftView?.visibility = View.VISIBLE
|
||||
leftView?.text = context.resources.getString(R.string.ok_tip)
|
||||
rightView?.visibility = View.VISIBLE
|
||||
vertLineView?.visibility = View.VISIBLE
|
||||
rightView?.text = context.resources.getString(R.string.retry)
|
||||
|
||||
@@ -216,6 +216,7 @@ class DriverMsgBoxListAdapter(private val activity: Activity) :
|
||||
null,
|
||||
null
|
||||
)
|
||||
holder.tvOperationStatusSelect.text = "折叠"
|
||||
holder.ivOperationImageNormal.visibility = View.GONE
|
||||
holder.tvOperationTitleNormal.visibility = View.GONE
|
||||
holder.tvOperationContentNormal.visibility = View.GONE
|
||||
@@ -230,6 +231,7 @@ class DriverMsgBoxListAdapter(private val activity: Activity) :
|
||||
null,
|
||||
null
|
||||
)
|
||||
holder.tvOperationStatusSelect.text = "展开"
|
||||
holder.ivOperationImageNormal.visibility = View.VISIBLE
|
||||
holder.tvOperationTitleNormal.visibility = View.VISIBLE
|
||||
holder.tvOperationContentNormal.visibility = View.VISIBLE
|
||||
|
||||
@@ -3,7 +3,6 @@ package com.mogo.eagle.core.function.hmi.ui.widget
|
||||
import android.annotation.SuppressLint
|
||||
import android.content.Context
|
||||
import android.util.AttributeSet
|
||||
import android.util.Log
|
||||
import android.view.LayoutInflater
|
||||
import android.widget.LinearLayout
|
||||
import com.mogo.eagle.core.data.autopilot.AutopilotStatusInfo
|
||||
@@ -67,7 +66,6 @@ class VersionNameView @JvmOverloads constructor(
|
||||
if (!dockerVersion.isNullOrEmpty()) {
|
||||
it.text = " ; MAP:${dockerVersion}"
|
||||
}
|
||||
Log.i(TAG,"tvMapVersionName text="+tvMapVersionName.text)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -90,7 +88,6 @@ class VersionNameView @JvmOverloads constructor(
|
||||
|
||||
override fun onAutopilotStatusResponse(autoPilotStatusInfo: AutopilotStatusInfo) {
|
||||
dockerVersion = autoPilotStatusInfo.dockVersion
|
||||
Log.i(TAG,"dockerVersion=$dockerVersion")
|
||||
showCurrentMapVersion()
|
||||
//将工控机版本赋值给BadCase配置常量
|
||||
BadCaseConfig.dockerVersion = autoPilotStatusInfo.dockVersion
|
||||
|
||||
@@ -59,7 +59,7 @@
|
||||
android:id="@+id/tvOperationStatusSelect"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="折叠"
|
||||
android:text="展开"
|
||||
android:textColor="#FFFFFFFF"
|
||||
android:textSize="24dp"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
|
||||
@@ -7,6 +7,7 @@ import android.util.*
|
||||
import androidx.localbroadcastmanager.content.*
|
||||
import com.mogo.cloud.passport.*
|
||||
import com.mogo.commons.constants.HostConst
|
||||
import com.mogo.commons.debug.DebugConfig
|
||||
import com.mogo.commons.module.ServiceConst.CARD_TYPE_ROAD_CONDITION
|
||||
import com.mogo.commons.module.status.IMogoStatusChangedListener
|
||||
import com.mogo.commons.module.status.MogoStatusManager
|
||||
@@ -68,6 +69,7 @@ import com.mogo.eagle.core.utilcode.mogo.logger.*
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_V2X
|
||||
import com.mogo.eagle.core.utilcode.mogo.storage.*
|
||||
import com.mogo.eagle.core.utilcode.util.*
|
||||
import com.mogo.eagle.core.utilcode.util.BuildConfig
|
||||
import com.mogo.eagle.core.utilcode.util.TimeUtils
|
||||
import com.mogo.eagle.core.utilcode.util.Utils
|
||||
import com.mogo.map.listener.*
|
||||
@@ -112,7 +114,7 @@ object V2XEventManager : IMoGoMapLocationListener, IMoGoTokenCallback, IV2XCallb
|
||||
V2XManager.init(V2XConfig.Builder().also {
|
||||
it.aiCloudConfig(MoGoAiCloudClientConfig.getInstance())
|
||||
it.context(context)
|
||||
it.loggable(true)
|
||||
it.loggable(DebugConfig.isDebug())
|
||||
it.distanceForTriggerRefresh(200f) //行驶超过200(包含)米,刷新道路周边信息(短链请求)
|
||||
it.durationForTriggerRefresh(
|
||||
60,
|
||||
|
||||
@@ -35,7 +35,6 @@ public class V2XAlarmServer {
|
||||
CopyOnWriteArrayList<V2XRoadEventEntity> v2XRoadEventEntityList,
|
||||
MogoLocation currentLocation) {
|
||||
try {
|
||||
Log.d("RWJ", "getDriveFrontAlarmEvent --- 1 ---" + currentLocation );
|
||||
if (!showedEvents.isEmpty()) {
|
||||
Iterator<V2XRoadEventEntity> iterator = showedEvents.iterator();
|
||||
while (iterator.hasNext()) {
|
||||
@@ -52,7 +51,6 @@ public class V2XAlarmServer {
|
||||
}
|
||||
}
|
||||
}
|
||||
Log.d("RWJ", "getDriveFrontAlarmEvent --- 2 ---" + currentLocation);
|
||||
if (currentLocation != null && v2XRoadEventEntityList != null) {
|
||||
// 因为集合是按照距离排序后的所以这里检索出来第一个就发出警告
|
||||
for (V2XRoadEventEntity v2XRoadEventEntity : v2XRoadEventEntityList) {
|
||||
|
||||
@@ -2,7 +2,6 @@ package com.mogo.eagle.core.function.v2x.trafficlight.core
|
||||
|
||||
import android.content.Context
|
||||
import android.os.Handler
|
||||
import android.util.Log
|
||||
import com.mogo.eagle.core.data.trafficlight.TrafficLightResult
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotIdentifyListener
|
||||
import com.mogo.eagle.core.function.api.obu.IMoGoObuTrafficLightDisapperListener
|
||||
@@ -61,8 +60,6 @@ class TrafficLightDispatcher : IMoGoAutopilotIdentifyListener, IMoGoTrafficLight
|
||||
* @param trafficLights 感知红绿灯
|
||||
*/
|
||||
override fun onAutopilotPerceptionTrafficLight(trafficLights: TrafficLightOuterClass.TrafficLights?) {
|
||||
Log.i(TAG,"hasObuLightStatus="+hasObuLightStatus + " hasAiLightStatus="+hasAiLightStatus)
|
||||
Log.i(TAG,"时间:"+com.mogo.eagle.core.utilcode.util.TimeUtils.millis2String(System.currentTimeMillis()))
|
||||
if (!hasObuLightStatus) {
|
||||
if (!hasAiLightStatus) {
|
||||
trafficLights?.let { it ->
|
||||
@@ -77,37 +74,30 @@ class TrafficLightDispatcher : IMoGoAutopilotIdentifyListener, IMoGoTrafficLight
|
||||
light = it.uTurn
|
||||
}
|
||||
if (light == null) {
|
||||
Log.i(TAG,"light为空")
|
||||
//隐藏红绿灯显示
|
||||
TrafficLightHMIManager.INSTANCE.hideTrafficLight()
|
||||
} else {
|
||||
Log.i(TAG,"light.state="+light.state)
|
||||
when (light.state) {
|
||||
TrafficLightOuterClass.LightState.STATE_RED -> {
|
||||
Log.i(TAG,"显示红灯")
|
||||
//红灯
|
||||
CallerHmiManager.showWarningTrafficLight(1, 2)
|
||||
CallerHmiManager.changeCountdownGreen(0)
|
||||
}
|
||||
TrafficLightOuterClass.LightState.STATE_YELLOW -> {
|
||||
Log.i(TAG,"显示黄灯")
|
||||
//黄灯
|
||||
CallerHmiManager.showWarningTrafficLight(2, 2)
|
||||
CallerHmiManager.changeCountdownGreen(0)
|
||||
}
|
||||
TrafficLightOuterClass.LightState.STATE_GREEN -> {
|
||||
Log.i(TAG,"显示绿灯")
|
||||
//绿灯
|
||||
CallerHmiManager.showWarningTrafficLight(3, 2)
|
||||
CallerHmiManager.changeCountdownGreen(0)
|
||||
}
|
||||
TrafficLightOuterClass.LightState.STATE_OFF -> {
|
||||
Log.i(TAG,"隐藏显示")
|
||||
//黑灯,隐藏红绿灯显示
|
||||
TrafficLightHMIManager.INSTANCE.hideTrafficLight()
|
||||
}
|
||||
else -> {
|
||||
Log.i(TAG,"直接其他情况")
|
||||
TrafficLightHMIManager.INSTANCE.hideTrafficLight()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -70,10 +70,7 @@ public class AutopilotAbilityManager {
|
||||
String v = carConfig.getDockVersion();
|
||||
int version = parseVersion(true, v);
|
||||
if (version != -1) {
|
||||
if (startTimer != null) {
|
||||
startTimer.cancel();
|
||||
startTimer = null;
|
||||
}
|
||||
stopTimer();
|
||||
dockerVersion = version;
|
||||
Log.i("dddd", "工控机版本=" + dockerVersion);
|
||||
initAutopilotAbility();
|
||||
@@ -161,6 +158,13 @@ public class AutopilotAbilityManager {
|
||||
}
|
||||
}
|
||||
|
||||
private void stopTimer() {
|
||||
if (startTimer != null) {
|
||||
startTimer.cancel();
|
||||
startTimer = null;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 连接工控机成功调用此函数,如果dockerVersion还未获取到将启动最低版本的启动自动驾驶能力检测
|
||||
* 此函数为保险措施 以防无法获取工控机版本时 也能 正常执行逻辑
|
||||
@@ -182,6 +186,7 @@ public class AutopilotAbilityManager {
|
||||
}
|
||||
|
||||
public synchronized void stop() {
|
||||
stopTimer();
|
||||
stop230();
|
||||
stop250();
|
||||
handler = null;
|
||||
|
||||
Reference in New Issue
Block a user