Merge branch 'dev_MogoAP_eagle-1030_211020_8.0.14_for_newtts' into test_MogoAP_eagle-220_211207_8.0.15.1

# Conflicts:
#	gradle.properties
This commit is contained in:
donghongyu
2021-12-14 16:11:22 +08:00
4 changed files with 66 additions and 25 deletions

View File

@@ -33,6 +33,13 @@ changeCurrentIcon : 修改自车3D模型
changeMaoViewAngle : 修改地图视角
```
* ### 小地图 MAP 图层 相关 -> [CallerSmpManager.kt][DebugSettingView.kt] -> [Demo][DebugSettingView.kt]
```
showPanel() : 显示小地图
hidePanel() : 隐藏小地图
```
* ### 域控制器 相关 -> [CallerAutoPilotManager.kt][DebugSettingView.kt] -> [Demo][DebugSettingView.kt]
```

View File

@@ -26,6 +26,7 @@ import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotCarStatusListe
import com.mogo.eagle.core.function.call.hmi.CallerHmiManager
import com.mogo.eagle.core.function.call.map.CallerHDMapManager
import com.mogo.eagle.core.function.call.map.CallerMapLocationListenerManager
import com.mogo.eagle.core.function.call.map.CallerSmpManager
import com.mogo.eagle.core.function.call.obu.CallerOBUManager
import com.mogo.eagle.core.function.call.obu.CallerObuListenerManager
import com.mogo.eagle.core.function.hmi.R
@@ -49,11 +50,11 @@ import kotlinx.android.synthetic.main.view_debug_setting.view.*
* 展示 本机、网络、工控机、OBU等状态信息支持设置IP等参数进行调试
*/
class DebugSettingView @JvmOverloads constructor(
context: Context,
attrs: AttributeSet? = null,
defStyleAttr: Int = 0
context: Context,
attrs: AttributeSet? = null,
defStyleAttr: Int = 0
) : ConstraintLayout(context, attrs, defStyleAttr), IMoGoObuStatusListener,
IMoGoAutopilotStatusListener, IMoGoAutopilotCarStateListener, IMoGoMapLocationListener {
IMoGoAutopilotStatusListener, IMoGoAutopilotCarStateListener, IMoGoMapLocationListener {
private val TAG = "DebugSettingView"
@@ -132,7 +133,7 @@ class DebugSettingView @JvmOverloads constructor(
tvObuInfo.text = CallerObuListenerManager.getObuStatusInfoJsonString()
tvAutopilotInfo.text =
CallerAutoPilotStatusListenerManager.getAutoPilotStatusInfoJsonString()
CallerAutoPilotStatusListenerManager.getAutoPilotStatusInfoJsonString()
// 初始化App 配置信息
val appConfigInfo = AppConfigInfo()
@@ -150,7 +151,7 @@ class DebugSettingView @JvmOverloads constructor(
// 初始化OBU IP信息
val ipAddress =
SharedPrefsMgr.getInstance(context).getString(MoGoConfig.OBU_IP, "192.168.1.199")
SharedPrefsMgr.getInstance(context).getString(MoGoConfig.OBU_IP, "192.168.1.199")
etObuIP.setText(ipAddress)
etObuIP.text?.let { etObuIP.setSelection(it.length) }
@@ -172,18 +173,18 @@ class DebugSettingView @JvmOverloads constructor(
// 初始化 GSP数据源 数据
rgGpsProvider.check(
when (FunctionBuildConfig.gpsProvider) {
0 -> {
R.id.rbGpsProviderAndroid
when (FunctionBuildConfig.gpsProvider) {
0 -> {
R.id.rbGpsProviderAndroid
}
1 -> {
R.id.rbGpsProviderRTK
}
2 -> {
R.id.rbGpsProviderOBU
}
else -> R.id.rbGpsProviderAndroid
}
1 -> {
R.id.rbGpsProviderRTK
}
2 -> {
R.id.rbGpsProviderOBU
}
else -> R.id.rbGpsProviderAndroid
}
)
rgGpsProvider.setOnCheckedChangeListener { group, checkedId ->
when (checkedId) {
@@ -201,14 +202,14 @@ class DebugSettingView @JvmOverloads constructor(
// 初始化 感知数据是否绘制 选择情况
rgIsDrawIdentifyData.check(
when (FunctionBuildConfig.isDrawIdentifyData) {
true -> {
R.id.rbDraw
when (FunctionBuildConfig.isDrawIdentifyData) {
true -> {
R.id.rbDraw
}
false -> {
R.id.rbDoNotDraw
}
}
false -> {
R.id.rbDoNotDraw
}
}
)
rgIsDrawIdentifyData.setOnCheckedChangeListener { group, checkedId ->
when (checkedId) {
@@ -277,6 +278,13 @@ class DebugSettingView @JvmOverloads constructor(
CallerAutoPilotManager.setIsWriteLog(true)
}
}
tbControlView.setOnCheckedChangeListener { buttonView, isChecked ->
if (isChecked) {
CallerSmpManager.hidePanel()
} else {
CallerSmpManager.showPanel()
}
}
}
/**

View File

@@ -91,6 +91,16 @@
android:textOn="显示「工具箱」"
android:textSize="@dimen/dp_34" />
<ToggleButton
android:id="@+id/tbControlView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="2dp"
android:gravity="center"
android:textOff="隐藏「小地图」"
android:textOn="显示「小地图」"
android:textSize="@dimen/dp_34" />
<!-- <Button
android:id="@+id/tbChangeCarCenter100"
android:layout_width="wrap_content"

View File

@@ -14,7 +14,7 @@ import com.mogo.eagle.core.function.call.base.CallerBase
object CallerSmpManager : CallerBase() {
private val mogoSmallMapProvider: IMogoSmallMapProvider
get() = ARouter.getInstance().build(MoGoFragmentPaths.PATH_FRAGMENT_SMP)
.navigation() as IMogoSmallMapProvider
.navigation() as IMogoSmallMapProvider
/**
* 绘制路径线
@@ -31,4 +31,20 @@ object CallerSmpManager : CallerBase() {
fun clearPolyline() {
mogoSmallMapProvider.clearPolyline()
}
/**
* 显示面板
*/
@JvmStatic
fun showPanel() {
mogoSmallMapProvider.showPanel()
}
/**
* 隐藏面板
*/
@JvmStatic
fun hidePanel() {
mogoSmallMapProvider.hidePanel()
}
}