[6.1.0][Feat]新增手动切换QUIC协议

This commit is contained in:
chenfufeng
2023-09-26 18:22:26 +08:00
parent bee6344ce3
commit f285ee7071
3 changed files with 52 additions and 14 deletions

View File

@@ -21,6 +21,7 @@ import androidx.core.view.MenuCompat
import androidx.core.view.isVisible
import androidx.lifecycle.lifecycleScope
import chassis.Chassis
import com.mogo.cloud.network.cronet.QuicConfig
import com.mogo.cloud.passport.MoGoAiCloudClient
import com.mogo.cloud.passport.MoGoAiCloudClientConfig
import com.mogo.commons.constants.SharedPrefsConstants
@@ -762,6 +763,9 @@ internal class DebugSettingView @JvmOverloads constructor(
tbObuWarningFusionUnion.setOnCheckedChangeListener { _, isChecked ->
FunctionBuildConfig.isObuWarningFusionUnion = isChecked
}
tbCronet.setOnCheckedChangeListener { _, isChecked ->
QuicConfig.setEnable(context, isChecked)
}
//重启工控机所有节点
btnIpcReboot.onClick {
@@ -813,6 +817,7 @@ internal class DebugSettingView @JvmOverloads constructor(
// update tracker provider view
trackerIPCProvider.visibility = View.VISIBLE
}
R.id.trackerProviderObu -> {
FunctionBuildConfig.debugTrackerProvider = 1
// update tracker provider view
@@ -859,16 +864,16 @@ internal class DebugSettingView @JvmOverloads constructor(
ToastUtils.showShort("功能开发中")
}
if(FunctionBuildConfig.isDrawPointCloudData){
if (FunctionBuildConfig.isDrawPointCloudData) {
//如果点云效果是打开的,则自车光圈也跟随打开
tbCarAperture.isChecked = true
}else{
} else {
tbCarAperture.isChecked = FunctionBuildConfig.isDisplayAnimEnable
}
tbCarAperture.setOnCheckedChangeListener { compoundButton, isChecked ->
CallerMapUIServiceManager.getMapUIController()?.setDisplayAnimEnable(isChecked)
CallerSopSettingManager.invokeCarApertureListener(isChecked)
if(!compoundButton.isPressed){
if (!compoundButton.isPressed) {
return@setOnCheckedChangeListener
}
FunctionBuildConfig.isDisplayAnimEnable = isChecked
@@ -882,9 +887,9 @@ internal class DebugSettingView @JvmOverloads constructor(
return@setOnCheckedChangeListener
}
//打开点云效果时,如果自车光圈是关闭状态,则自动打开自车光圈(点云是跟随光圈的 默认没有光圈就不显示点云的)
if(isChecked && !FunctionBuildConfig.isDisplayAnimEnable){
if (isChecked && !FunctionBuildConfig.isDisplayAnimEnable) {
tbCarAperture.isChecked = true
}else{
} else {
tbCarAperture.isChecked = FunctionBuildConfig.isDisplayAnimEnable
}
CallerAutoPilotControlManager.setIsDrawPointCloud(isChecked)
@@ -932,6 +937,7 @@ internal class DebugSettingView @JvmOverloads constructor(
btnConnectServerIp.visibility = View.GONE
etConnectServerIp.visibility = View.GONE
}
else -> {
brakeThresholdDivider.visibility = View.VISIBLE
btnConnectServerIp.visibility = View.VISIBLE
@@ -1112,32 +1118,41 @@ internal class DebugSettingView @JvmOverloads constructor(
R.id.group_hy -> {
return@setOnMenuItemClickListener false
}
R.id.group_bj -> {
return@setOnMenuItemClickListener false
}
R.id.env_reset ->
CallerDevaToolsManager.envConfigReset()
R.id.hy_product ->
CallerDevaToolsManager.envConfigChange(
"0734",
DebugConfig.NET_MODE_RELEASE
)
R.id.hy_qa ->
CallerDevaToolsManager.envConfigChange("0734", DebugConfig.NET_MODE_QA)
R.id.hy_demo ->
CallerDevaToolsManager.envConfigChange(
"0734",
DebugConfig.NET_MODE_DEMO
)
R.id.bj_product ->
CallerDevaToolsManager.envConfigChange(
"010",
DebugConfig.NET_MODE_RELEASE
)
R.id.bj_qa ->
CallerDevaToolsManager.envConfigChange("010", DebugConfig.NET_MODE_QA)
R.id.bj_demo ->
CallerDevaToolsManager.envConfigChange("010", DebugConfig.NET_MODE_DEMO)
else ->
throw AssertionError("invalid item: $item")
}
@@ -1594,11 +1609,13 @@ internal class DebugSettingView @JvmOverloads constructor(
AppConfigInfo.isDriver = true
AppConfigInfo.isConnectedNetty = CallerTelematicManager.getServerStarted()
}
AppIdentityModeUtils.isPassenger(FunctionBuildConfig.appIdentityMode) -> {
AppConfigInfo.isDriver = false
AppConfigInfo.isConnectedNetty = CallerTelematicManager.getClientConnStatus()
AppConfigInfo.serverSn = CallerTelematicManager.getServerToken()
}
else -> {
}
}
@@ -1654,12 +1671,15 @@ internal class DebugSettingView @JvmOverloads constructor(
2 -> {
"测试环境"
}
3 -> {
"生产环境"
}
4 -> {
"演示环境"
}
else -> {
"未知环境"
}
@@ -1710,6 +1730,7 @@ internal class DebugSettingView @JvmOverloads constructor(
AppConfigInfo.isDriver -> {
"司机端Server启动"
}
else -> {
"乘客端${"(司机屏SN是:${AppConfigInfo.serverSn})"}连接"
}
@@ -1729,6 +1750,7 @@ internal class DebugSettingView @JvmOverloads constructor(
AppConfigInfo.isDriver -> {
"司机屏发送数据"
}
else -> "乘客屏接收数据"
}
}的最新时间为:<font color='red'>${simpleDateFormat.format(AppConfigInfo.teleTimeStamp)}"
@@ -1904,6 +1926,7 @@ internal class DebugSettingView @JvmOverloads constructor(
}
tbIsDemoMode.setPadding(left, top, right, bottom)
}
BIZ_RAIN_MODE -> {
tbIsRainMode.isClickable = !lock
val (left, top, right, bottom) = tbIsRainMode.currentPadding()
@@ -1916,6 +1939,7 @@ internal class DebugSettingView @JvmOverloads constructor(
}
tbIsRainMode.setPadding(left, top, right, bottom)
}
BIZ_WARNING_UPLOAD -> {
tbReportWarning.isClickable = !lock
val (left, top, right, bottom) = tbReportWarning.currentPadding()
@@ -1927,6 +1951,7 @@ internal class DebugSettingView @JvmOverloads constructor(
}
tbReportWarning.setPadding(left, top, right, bottom)
}
BIZ_BAG_RECORD -> {
val (left, top, right, bottom) = btnRecordBag.currentPadding()
if (lock) {
@@ -1940,6 +1965,7 @@ internal class DebugSettingView @JvmOverloads constructor(
}
btnRecordBag.setPadding(left, top, right, bottom)
}
BIZ_FULL_LOG -> {
val (left, top, right, bottom) = tbLogCatch.currentPadding()
if (lock) {

View File

@@ -290,6 +290,18 @@
android:textOn="关闭obu预警融合"
android:textSize="@dimen/dp_24" />
<ToggleButton
android:id="@+id/tbCronet"
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"
android:textColor="#000"
android:textOff="开启QUIC协议(网络信号差时)"
android:textOn="关闭QUIC协议"
android:textSize="@dimen/dp_24" />
<!-- APP升级数据 start -->
<ToggleButton
android:id="@+id/tbAppUpgrade"

View File

@@ -61,23 +61,23 @@ bytex.ASM_API=ASM7
LOGLIB_VERSION=1.9.12
######## MogoAiCloudSDK Version ########
# 网络请求LOGLIB_VERSION
MOGO_NETWORK_VERSION=1.4.7.16
MOGO_NETWORK_VERSION=1.4.7.17
# 鉴权
MOGO_PASSPORT_VERSION=1.4.7.16
MOGO_PASSPORT_VERSION=1.4.7.17
# 常链接
MOGO_SOCKET_VERSION=1.4.7.16
MOGO_SOCKET_VERSION=1.4.7.17
# 数据采集
MOGO_REALTIME_VERSION=1.4.7.16
MOGO_REALTIME_VERSION=1.4.7.17
# 探路,道路事件发布,获取
MOGO_TANLU_VERSION=1.4.7.16
MOGO_TANLU_VERSION=1.4.7.17
# 直播推流
MOGO_LIVE_VERSION=1.4.7.16
MOGO_LIVE_VERSION=1.4.7.17
# 直播拉流
MOGO_TRAFFICLIVE_VERSION=1.4.7.16
MOGO_TRAFFICLIVE_VERSION=1.4.7.17
# 定位服务
MOGO_LOCATION_VERSION=1.4.7.16
MOGO_LOCATION_VERSION=1.4.7.17
# 远程通讯模块
MOGO_TELEMATIC_VERSION=1.4.7.16
MOGO_TELEMATIC_VERSION=1.4.7.17
######## MogoAiCloudSDK Version ########
# 自研地图
MAP_SDK_VERSION=3.2.0.15