@@ -6,9 +6,13 @@ import android.view.LayoutInflater
|
||||
import androidx.constraintlayout.widget.ConstraintLayout
|
||||
import com.mogo.cloud.passport.MoGoAiCloudClient
|
||||
import com.mogo.eagle.core.data.app.AppConfigInfo
|
||||
import com.mogo.eagle.core.data.autopilot.AdasOCHData
|
||||
import com.mogo.eagle.core.data.autopilot.AutopilotStatusInfo
|
||||
import com.mogo.eagle.core.data.constants.MoGoConfig
|
||||
import com.mogo.eagle.core.data.obu.ObuStatusInfo
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutoPilotStatusListener
|
||||
import com.mogo.eagle.core.function.api.obu.IMoGoObuStatusListener
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager
|
||||
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
|
||||
@@ -30,7 +34,8 @@ class DebugSettingView @JvmOverloads constructor(
|
||||
context: Context,
|
||||
attrs: AttributeSet? = null,
|
||||
defStyleAttr: Int = 0
|
||||
) : ConstraintLayout(context, attrs, defStyleAttr), IMoGoObuStatusListener {
|
||||
) : ConstraintLayout(context, attrs, defStyleAttr), IMoGoObuStatusListener,
|
||||
IMoGoAutoPilotStatusListener {
|
||||
|
||||
private val TAG = "DebugSettingView"
|
||||
|
||||
@@ -42,16 +47,19 @@ class DebugSettingView @JvmOverloads constructor(
|
||||
override fun onAttachedToWindow() {
|
||||
super.onAttachedToWindow()
|
||||
CallerObuListenerManager.addListener(TAG, this)
|
||||
CallerAutoPilotStatusListenerManager.addListener(TAG, this)
|
||||
}
|
||||
|
||||
override fun onDetachedFromWindow() {
|
||||
super.onDetachedFromWindow()
|
||||
CallerObuListenerManager.removeListener(TAG)
|
||||
|
||||
CallerAutoPilotStatusListenerManager.removeListener(TAG)
|
||||
}
|
||||
|
||||
private fun initView() {
|
||||
tvObuInfo.text = CallerObuListenerManager.getObuStatusInfo()
|
||||
tvObuInfo.text = CallerObuListenerManager.getObuStatusInfoJsonString()
|
||||
tvAutopilotInfo.text =
|
||||
CallerAutoPilotStatusListenerManager.getAutoPilotStatusInfoJsonString()
|
||||
|
||||
// 初始化App 配置信息
|
||||
val appConfigInfo = AppConfigInfo()
|
||||
@@ -89,4 +97,19 @@ class DebugSettingView @JvmOverloads constructor(
|
||||
tvObuInfo.text = GsonUtils.toJson(obuStatusInfo)
|
||||
}
|
||||
|
||||
/**
|
||||
* 自动驾驶相关回调
|
||||
*/
|
||||
override fun onAutoPilotArriveAtStation(data: AdasOCHData?) {
|
||||
|
||||
}
|
||||
|
||||
override fun onAutoPilotStateChanged(state: Int, reason: String?) {
|
||||
|
||||
}
|
||||
|
||||
override fun onAutoPilotStatusResponse(autopilotStatusInfo: AutopilotStatusInfo?) {
|
||||
tvAutopilotInfo.text = GsonUtils.toJson(autopilotStatusInfo)
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="@dimen/dp_1000"
|
||||
android:layout_height="@dimen/dp_700"
|
||||
android:layout_width="@dimen/dp_1300"
|
||||
android:layout_height="@dimen/dp_1000"
|
||||
android:background="#FFFFFF">
|
||||
|
||||
<ScrollView
|
||||
@@ -21,6 +21,8 @@
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="#B200BCD4"
|
||||
android:padding="@dimen/dp_10"
|
||||
android:text="鹰眼应用配置信息"
|
||||
android:textColor="#000"
|
||||
android:textSize="@dimen/dp_34"
|
||||
@@ -44,20 +46,22 @@
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="#B200BCD4"
|
||||
android:padding="@dimen/dp_10"
|
||||
android:text="OBU 配置信息"
|
||||
android:textColor="#000"
|
||||
android:textSize="@dimen/dp_34"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatEditText
|
||||
android:id="@+id/etObuIP"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="#32009688"
|
||||
android:gravity="center"
|
||||
android:padding="@dimen/dp_5"
|
||||
android:text="192.168.1.199"
|
||||
android:textSize="@dimen/dp_34" />
|
||||
<androidx.appcompat.widget.AppCompatEditText
|
||||
android:id="@+id/etObuIP"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="#32009688"
|
||||
android:gravity="center"
|
||||
android:padding="@dimen/dp_5"
|
||||
android:text="192.168.1.199"
|
||||
android:textSize="@dimen/dp_34" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/btnSetObuIP"
|
||||
@@ -83,6 +87,23 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="#B200BCD4"
|
||||
android:padding="@dimen/dp_10"
|
||||
android:text="域控制器(工控机)配置信息"
|
||||
android:textColor="#000"
|
||||
android:textSize="@dimen/dp_34"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvAutopilotInfo"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="#000"
|
||||
android:textSize="@dimen/dp_34" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
Reference in New Issue
Block a user