Merge branch 'dev_robotaxi-d_230711_3.4.0' into dev_20230708_unmanned_3.5.0
This commit is contained in:
@@ -647,6 +647,10 @@ public class OrderModel {
|
||||
*/
|
||||
private void startAutopilot(boolean isRestart, int leaveIndex) {
|
||||
|
||||
|
||||
// 非自驾状态---->预写日志----> 启动自驾 ---> 自驾启动成功 ----> 上报日志
|
||||
// 自驾状态---->启动自驾 ---> 自驾启动成功
|
||||
|
||||
//根据开关和后台是否发布轨迹启动自驾
|
||||
if (FunctionBuildConfig.isPassStartAutopilotCommand && TextUtils.isEmpty(busRoutesResult.csvFileUrl)
|
||||
&& TextUtils.isEmpty(busRoutesResult.csvFileUrlDPQP)){
|
||||
@@ -661,12 +665,6 @@ public class OrderModel {
|
||||
CallerLogger.INSTANCE.e(M_BUS + TAG, "isPassStartAutopilotCommand = " +
|
||||
FunctionBuildConfig.isPassStartAutopilotCommand);
|
||||
|
||||
if(CallerAutoPilotStatusListenerManager.INSTANCE.getState()
|
||||
== IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_RUNNING){
|
||||
ToastUtils.showShort("自驾中、请勿重复启动");
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
if (!FunctionBuildConfig.isDemoMode && !OCHAdasAbilityManager.getInstance().getAutopilotAbilityStatus()) {
|
||||
ToastUtils.showLong(OCHAdasAbilityManager.getInstance().getAutopilotUnAbilityReason() +
|
||||
@@ -677,7 +675,10 @@ public class OrderModel {
|
||||
|
||||
firstStartAutopilot++;
|
||||
|
||||
triggerStartServiceEvent(isRestart, false);
|
||||
if(CallerAutoPilotStatusListenerManager.INSTANCE.getState() != IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_RUNNING){
|
||||
// 预写日志
|
||||
triggerStartServiceEvent(isRestart, false);
|
||||
}
|
||||
|
||||
AutopilotControlParameters parameters = initAutopilotControlParameters(leaveIndex);
|
||||
if (null == parameters) {
|
||||
|
||||
@@ -10,12 +10,14 @@ import android.media.AudioManager
|
||||
import android.provider.Settings
|
||||
import android.text.TextUtils
|
||||
import android.util.AttributeSet
|
||||
import android.util.Log
|
||||
import android.view.Gravity
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.widget.SeekBar
|
||||
import androidx.constraintlayout.widget.ConstraintLayout
|
||||
import androidx.core.content.ContextCompat
|
||||
import androidx.core.view.isVisible
|
||||
import com.mogo.commons.module.intent.IMogoIntentListener
|
||||
import com.mogo.commons.module.intent.IntentManager
|
||||
import com.mogo.commons.module.receiver.MogoReceiver
|
||||
|
||||
@@ -107,7 +107,7 @@ internal class InfoVideoView @JvmOverloads constructor(
|
||||
if (!player.isIfCurrentIsFullscreen) {
|
||||
when (player.currentState) {
|
||||
GSYVideoView.CURRENT_STATE_PAUSE -> {
|
||||
player.onVideoResume(false)
|
||||
//player.onVideoResume(false)
|
||||
}
|
||||
else -> {}
|
||||
}
|
||||
@@ -215,6 +215,18 @@ internal class InfoVideoView @JvmOverloads constructor(
|
||||
return Pair(centerItemPosition, player)
|
||||
}
|
||||
|
||||
override fun onWindowFocusChanged(hasWindowFocus: Boolean) {
|
||||
super.onWindowFocusChanged(hasWindowFocus)
|
||||
val carouselLayoutManager = rvVideoPlaylist?.layoutManager as CarouselLayoutManager
|
||||
val (centerItemPosition: Int, player) = getPlayer(carouselLayoutManager)
|
||||
player?.let {
|
||||
if(it.isInPlayingState&&!it.isIfCurrentIsFullscreen&&!hasWindowFocus){
|
||||
player.onVideoPause()
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
override fun onDetachedFromWindow() {
|
||||
super.onDetachedFromWindow()
|
||||
}
|
||||
|
||||
@@ -122,6 +122,7 @@ class ConsultVideoPlayer : StandardGSYVideoPlayer {
|
||||
layoutParams2.height = AutoSizeUtils.dp2px(context,108f)
|
||||
layoutParams2.width = AutoSizeUtils.dp2px(context,108f)
|
||||
fullscreenButton.layoutParams = layoutParams2
|
||||
fullscreenButton.visibility = View.VISIBLE
|
||||
}
|
||||
|
||||
}
|
||||
@@ -152,13 +153,13 @@ class ConsultVideoPlayer : StandardGSYVideoPlayer {
|
||||
|
||||
override fun onWindowFocusChanged(hasWindowFocus: Boolean) {
|
||||
super.onWindowFocusChanged(hasWindowFocus)
|
||||
// if(isIfCurrentIsFullscreen&&smalllPlayer!=null){
|
||||
// if(hasWindowFocus){//获取焦点
|
||||
// onVideoResume()
|
||||
// }else{
|
||||
// onVideoPause()
|
||||
// }
|
||||
// }
|
||||
if(isIfCurrentIsFullscreen&&smalllPlayer!=null){
|
||||
if(hasWindowFocus){//获取焦点
|
||||
onVideoResume()
|
||||
}else{
|
||||
onVideoPause()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
override fun touchDoubleUp() {
|
||||
@@ -167,7 +168,7 @@ class ConsultVideoPlayer : StandardGSYVideoPlayer {
|
||||
|
||||
override fun changeUiToNormal() {
|
||||
super.changeUiToNormal()
|
||||
setViewShowState(fullscreenButton, INVISIBLE)
|
||||
//setViewShowState(fullscreenButton, INVISIBLE)
|
||||
this.statusBarView?.visibility = View.VISIBLE
|
||||
}
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
app:compassDrawable="@drawable/taxi_p_map_car_light"
|
||||
app:mapStyleExtraPath="style_extra.data"
|
||||
app:mapStylePath="style.data"
|
||||
app:leftPadding="160"
|
||||
app:leftPadding="800"
|
||||
app:rightPadding="160"
|
||||
app:topPadding="160"
|
||||
app:bottomPadding="160"
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
|
||||
|
||||
<View
|
||||
android:id="@+id/v_bottom_bg"
|
||||
android:layout_width="@dimen/dp_842"
|
||||
android:layout_height="@dimen/dp_466"
|
||||
android:layout_marginTop="@dimen/dp_44"
|
||||
@@ -38,7 +39,7 @@
|
||||
android:textSize="@dimen/dp_35"
|
||||
app:layout_constraintBaseline_toBaselineOf="@+id/actv_speed_value"
|
||||
app:layout_constraintStart_toEndOf="@+id/actv_speed_value"
|
||||
android:layout_marginStart="@dimen/dp_24"
|
||||
android:layout_marginStart="@dimen/dp_20"
|
||||
android:text="KM/H" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
@@ -71,7 +72,8 @@
|
||||
<View
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="1dp"
|
||||
android:background="@color/taxi_p_5C71AB"
|
||||
android:background="@color/taxi_p_B35C71AB"
|
||||
android:layout_marginTop="-15dp"
|
||||
app:layout_constraintEnd_toEndOf="@+id/actv_endstation"
|
||||
app:layout_constraintStart_toStartOf="@+id/actv_speed_value"
|
||||
app:layout_constraintTop_toBottomOf="@+id/actv_speed_value" />
|
||||
@@ -82,7 +84,8 @@
|
||||
android:layout_width="0dp"
|
||||
android:gravity="center"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_51"
|
||||
android:layout_marginTop="@dimen/dp_50"
|
||||
android:layout_marginBottom="@dimen/dp_66"
|
||||
android:layout_marginStart="@dimen/dp_58"
|
||||
android:textSize="@dimen/dp_61"
|
||||
android:fontFamily="@font/din"
|
||||
@@ -90,7 +93,8 @@
|
||||
android:textColor="@color/taxi_p_081831"
|
||||
app:layout_constraintEnd_toStartOf="@+id/actv_surplus_time"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/actv_speed_value"
|
||||
app:layout_constraintTop_toTopOf="@+id/v_bottom_bg"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/v_bottom_bg"
|
||||
android:text="--" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
|
||||
@@ -43,6 +43,7 @@
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/fullscreen"
|
||||
android:visibility="invisible"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
android:layout_marginTop="@dimen/dp_42"
|
||||
|
||||
@@ -61,7 +61,7 @@
|
||||
<color name="taxi_p_004DC4">#004DC4</color>
|
||||
<color name="taxi_p_293449">#293449</color>
|
||||
<color name="taxi_p_203555">#203555</color>
|
||||
<color name="taxi_p_5C71AB">#5C71AB</color>
|
||||
<color name="taxi_p_B35C71AB">#B35C71AB</color>
|
||||
<color name="taxi_p_081831">#081831</color>
|
||||
<color name="taxi_p_112B57">#112B57</color>
|
||||
<color name="taxi_p_66476FBE">#66476FBE</color>
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
<uses-permission android:name="android.permission.CHANGE_WIFI_STATE" />
|
||||
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
|
||||
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW" />
|
||||
|
||||
<uses-permission android:name="android.permission.VIBRATE" />
|
||||
<application
|
||||
android:name=".App"
|
||||
android:allowBackup="true"
|
||||
|
||||
@@ -1,12 +1,15 @@
|
||||
package com.zhidao.adas.magic.ui;
|
||||
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.DialogInterface;
|
||||
import android.content.Intent;
|
||||
import android.net.Uri;
|
||||
import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
import android.os.Message;
|
||||
import android.os.VibrationEffect;
|
||||
import android.os.Vibrator;
|
||||
import android.provider.Settings;
|
||||
import android.text.Editable;
|
||||
import android.text.TextUtils;
|
||||
@@ -89,7 +92,7 @@ import system_master.SystemStatusInfo;
|
||||
public class MainActivity extends BaseActivity implements OnAdasListener, OnAdasConnectStatusListener, BaseAdapter.OnItemClickListener<TitleBean> {
|
||||
private final static String TAG = MainActivity.class.getSimpleName();
|
||||
private final SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSS", Locale.getDefault());
|
||||
private static final String GNSS_HINT = "%s\n经度:%f 纬度:%f 海拔:%f 航向角:%f 加速度:%f 曲率:%f 惯导车速:%f 车辆车速:%f";
|
||||
private static final String GNSS_HINT = "%s\n经度:%f 纬度:%f 海拔:%f 航向角:%f 加速度:%f 车速:%f";
|
||||
|
||||
private static final int WHAT_IPC_IP = 0x00;
|
||||
private static final int WHAT_IPC_CONNECT_STATE = 0x01;
|
||||
@@ -116,7 +119,7 @@ public class MainActivity extends BaseActivity implements OnAdasListener, OnAdas
|
||||
private ListPopupWindow listPopupWindow;
|
||||
private FloatWindow floatWindow;
|
||||
private View include_title;
|
||||
|
||||
private Vibrator vibrator;
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
@@ -129,6 +132,7 @@ public class MainActivity extends BaseActivity implements OnAdasListener, OnAdas
|
||||
onUpdateConnectStateView();
|
||||
showIPCIP();
|
||||
AdasManager.getInstance().setEnableLog(false);
|
||||
vibrator = (Vibrator) getSystemService(Context.VIBRATOR_SERVICE);
|
||||
}
|
||||
|
||||
|
||||
@@ -472,8 +476,7 @@ public class MainActivity extends BaseActivity implements OnAdasListener, OnAdas
|
||||
Message message = Message.obtain();
|
||||
message.what = WHAT_UPDATE_GNSS;
|
||||
message.obj = String.format(Locale.getDefault(), GNSS_HINT, sdf.format(new Date((long) (header.getTimestamp() * 1000))),
|
||||
gnssInfo.getLongitude(), gnssInfo.getLatitude(), gnssInfo.getAltitude(), gnssInfo.getHeading(), gnssInfo.getAcceleration(),
|
||||
gnssInfo.getYawRate(), gnssInfo.getGnssSpeed(), gnssInfo.getVehicleSpeed());
|
||||
gnssInfo.getLongitude(), gnssInfo.getLatitude(), gnssInfo.getAltitude(), gnssInfo.getHeading(), gnssInfo.getAcceleration(), gnssInfo.getGnssSpeed());
|
||||
getHandler().sendMessage(message);
|
||||
}
|
||||
|
||||
@@ -734,6 +737,15 @@ public class MainActivity extends BaseActivity implements OnAdasListener, OnAdas
|
||||
|
||||
@Override
|
||||
public void onItemClick(int position, TitleBean data) {
|
||||
if (vibrator != null) {//震动
|
||||
if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.O) {
|
||||
VibrationEffect vibe = VibrationEffect.createOneShot(80, 255);
|
||||
vibrator.vibrate(vibe);
|
||||
} else {
|
||||
vibrator.vibrate(80);
|
||||
}
|
||||
}
|
||||
|
||||
if (connectStatus != IPC_CONNECTION_STATUS.CONNECTED) {
|
||||
String msg = "未连接工控机";
|
||||
showToastCenter(msg);
|
||||
|
||||
@@ -88,7 +88,7 @@ class DriverMsgBoxBubbleView @JvmOverloads constructor(
|
||||
}
|
||||
if(isShowData){
|
||||
if(category == MsgCategory.RECORD_BAG){
|
||||
if(!FunctionBuildConfig.isDemoMode){
|
||||
if(!FunctionBuildConfig.isDemoMode && FunctionBuildConfig.isShowBagRecordWindow){
|
||||
//弹出被动录包弹窗
|
||||
CallerDevaToolsManager.onReceiveBadCaseRecord(msgBoxBean,context as Activity,true)
|
||||
CallerMsgBoxEventListenerManager.invokeUpdateTipListener(true)
|
||||
|
||||
@@ -271,6 +271,12 @@ internal class SOPSettingView @JvmOverloads constructor(
|
||||
hmiAction("SOP 故障减速停车, ",isChecked)
|
||||
}
|
||||
|
||||
//是否展示被动触发的录包弹窗(自动驾驶下出现问题触发的录包)
|
||||
tbShowBagRecordWindow.isChecked = FunctionBuildConfig.isShowBagRecordWindow
|
||||
tbShowBagRecordWindow.setOnCheckedChangeListener{_, isChecked ->
|
||||
FunctionBuildConfig.isShowBagRecordWindow = isChecked
|
||||
hmiAction("SOP 是否展示被动触发的录包弹窗, ",isChecked)
|
||||
}
|
||||
|
||||
//变道绕障的目标障碍物速度阈值
|
||||
tvSpeed.text = "${FunctionBuildConfig.detouringSpeed} m/s"
|
||||
|
||||
@@ -318,9 +318,23 @@
|
||||
android:scaleY="1.2"
|
||||
android:scaleX="1.2"
|
||||
app:layout_constraintTop_toBottomOf="@id/tbWeakNetSlowDown"
|
||||
app:layout_constraintRight_toLeftOf="@+id/verticalGuideLine"
|
||||
app:layout_constraintRight_toLeftOf="@id/verticalGuideLine"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
/>
|
||||
<!--是否展示被动录包弹窗-->
|
||||
<androidx.appcompat.widget.SwitchCompat
|
||||
android:id="@+id/tbShowBagRecordWindow"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="录包弹窗"
|
||||
android:paddingTop="25dp"
|
||||
android:paddingBottom="25dp"
|
||||
android:scaleY="1.2"
|
||||
android:scaleX="1.2"
|
||||
app:layout_constraintTop_toBottomOf="@id/tbWeakNetSlowDown"
|
||||
app:layout_constraintLeft_toRightOf="@id/verticalGuideLine"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvSpeedThresholdTitle"
|
||||
|
||||
@@ -197,6 +197,13 @@ object FunctionBuildConfig {
|
||||
@JvmField
|
||||
var isReportWarning = true
|
||||
|
||||
/**
|
||||
* 是否展示被动触发的录包弹窗(自动驾驶下出现问题触发的录包)
|
||||
*/
|
||||
@Volatile
|
||||
@JvmField
|
||||
var isShowBagRecordWindow = true
|
||||
|
||||
/**
|
||||
* 是否是V2N新链路(云->工控机->App)
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user