Merge branch 'dev_robotaxi-d-app-module_2130_221116_2.13.0' into mutidev_robotaxi-d-app-module_2130_221116_2.13.0_multi_display

This commit is contained in:
donghongyu
2022-12-07 16:30:42 +08:00
6 changed files with 88 additions and 25 deletions

View File

@@ -19,6 +19,7 @@ import com.mogo.eagle.core.utilcode.mogo.AppIdentityModeUtils
import com.mogo.eagle.core.utilcode.util.ToastUtils
import com.mogo.eagle.core.function.business.routeoverlay.RouteStrategy
import com.mogo.eagle.core.function.hmi.ui.widget.DemoModeView
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
@@ -71,6 +72,28 @@ class SOPSettingView @JvmOverloads constructor(
}
}
/**
* obu弱势交通控制
*/
tbObuWeaknessTrafficSop.setOnCheckedChangeListener { _, isChecked ->
if (!isChecked) { //默认开启
CallerHmiManager.setObuWeaknessTraffic(true)
} else {
CallerHmiManager.setObuWeaknessTraffic(false)
}
}
/**
* 云端弱势交通控制
*/
tbCloudWeaknessTrafficSop.setOnCheckedChangeListener { _, isChecked ->
if (isChecked) { //默认关闭
CallerHmiManager.setCloudWeaknessTraffic(true)
} else {
CallerHmiManager.setCloudWeaknessTraffic(false)
}
}
//红绿灯标识
tbTrafficLight.isChecked = HmiBuildConfig.isShowTrafficLightView
tbTrafficLight.setOnCheckedChangeListener { _, isChecked ->

View File

@@ -45,6 +45,7 @@ import com.zhjt.mogo_core_function_devatools.monitor.db.CpuInfo;
import com.zhjt.mogo_core_function_devatools.monitor.db.MemInfo;
import com.zhjt.mogo_core_function_devatools.monitor.db.MonitorDb;
import java.io.File;
import java.lang.reflect.Field;
import java.text.SimpleDateFormat;
import java.util.Date;
@@ -103,15 +104,25 @@ public abstract class MainMoGoApplication extends AbsMogoApplication {
new Thread(() -> {
String lastLaunchTimeStr = SPUtils.getInstance().getString("last_launch", "");
SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd");
Date currDate = new Date(System.currentTimeMillis());
String currTimeStr = format.format(currDate);
if (lastLaunchTimeStr != null && !lastLaunchTimeStr.isEmpty()) {
Date currDate = new Date(System.currentTimeMillis());
String currTimeStr = format.format(currDate);
boolean isSameDay = currTimeStr.equals(lastLaunchTimeStr);
// 超过一天需要清除消息盒子中的数据并把时间戳存入SP
if (!isSameDay) {
this.deleteDatabase(MsgBoxDb.INTERNAL_DB_NAME);
File file = this.getDatabasePath(MsgBoxDb.INTERNAL_DB_NAME);
if (file != null && file.exists()) {
this.deleteDatabase(MsgBoxDb.INTERNAL_DB_NAME);
}
SPUtils.getInstance().put("last_launch", currTimeStr);
}
} else {
// 首次使用App或中途仅删除sp文件
File file = this.getDatabasePath(MsgBoxDb.INTERNAL_DB_NAME);
if (file != null && file.exists()) {
this.deleteDatabase(MsgBoxDb.INTERNAL_DB_NAME);
}
SPUtils.getInstance().put("last_launch", currTimeStr);
}
}).start();
}

View File

@@ -49,13 +49,17 @@
<TextView
android:id="@+id/tvBubbleReportType"
android:layout_width="wrap_content"
android:layout_width="0dp"
android:layout_height="wrap_content"
app:layout_constraintTop_toBottomOf="@id/tvBubbleReportTime"
app:layout_constraintLeft_toLeftOf="@id/tvBubbleReportTime"
app:layout_constraintRight_toRightOf="@id/tvBubbleReceiveTime"
android:layout_marginTop="5px"
android:textColor="#B3FFFFFF"
android:textSize="28px"
android:maxLines="1"
android:ellipsize="end"
android:gravity="start"
/>
<TextView

View File

@@ -129,6 +129,30 @@
app:layout_constraintTop_toBottomOf="@id/tbRainMode"
/>
<ToggleButton
android:id="@+id/tbObuWeaknessTrafficSop"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="@dimen/dp_10"
android:padding="@dimen/dp_20"
android:background="@drawable/radio_button_normal_background_right"
app:layout_constraintTop_toBottomOf="@id/tbObu"
android:textOff="关闭路侧弱势群体预警"
android:textOn="打开路侧弱势群体预警"
android:textSize="@dimen/dp_24" />
<ToggleButton
android:id="@+id/tbCloudWeaknessTrafficSop"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="@dimen/dp_10"
android:padding="@dimen/dp_20"
android:background="@drawable/radio_button_normal_background_right"
app:layout_constraintTop_toBottomOf="@id/tbObuWeaknessTrafficSop"
android:textOff="开启云端弱势群体预警"
android:textOn="关闭云端弱势群体预警"
android:textSize="@dimen/dp_24" />
<ToggleButton
android:id="@+id/tbIPCReport"
android:layout_width="match_parent"
@@ -140,7 +164,7 @@
android:textOff="开启异常上报提示"
android:textOn="关闭异常上报提示"
android:textSize="@dimen/dp_24"
app:layout_constraintTop_toBottomOf="@id/tbObu"
app:layout_constraintTop_toBottomOf="@id/tbCloudWeaknessTrafficSop"
/>
<TextView