[Add]
增加了设置连接工控机IP的调用 Signed-off-by: donghongyu <donghongyu@zhidaoauto.com>
This commit is contained in:
@@ -165,6 +165,24 @@ class DebugSettingView @JvmOverloads constructor(
|
||||
}
|
||||
}
|
||||
|
||||
// 初始化工控机 IP信息
|
||||
val autoPilotIpAddress =
|
||||
SharedPrefsMgr.getInstance(context).getString(MoGoConfig.AUTOPILOT_IP, "192.168.1.102")
|
||||
|
||||
etAutopilotIP.setText(autoPilotIpAddress)
|
||||
etAutopilotIP.text?.let { etAutopilotIP.setSelection(it.length) }
|
||||
|
||||
btnSetAutopilotIP.setOnClickListener {
|
||||
val autoPilotIp = etAutopilotIP.text.toString()
|
||||
if (autoPilotIp.isNotEmpty()) {
|
||||
CallerAutoPilotManager.resetIpAddress(autoPilotIp)
|
||||
// 保存本地 AutoPilot IP地址
|
||||
SharedPrefsMgr.getInstance(context).putString(MoGoConfig.AUTOPILOT_IP, autoPilotIp)
|
||||
} else {
|
||||
ToastUtils.showShort("请输入正确的IP地址")
|
||||
}
|
||||
}
|
||||
|
||||
// 域控制器
|
||||
btnRecordPackage.setOnClickListener {
|
||||
CallerAutoPilotManager.recordPackage()
|
||||
|
||||
@@ -409,6 +409,25 @@
|
||||
android:textColor="#000"
|
||||
android:textSize="@dimen/dp_34"
|
||||
android:textStyle="bold" />
|
||||
<androidx.appcompat.widget.AppCompatEditText
|
||||
android:id="@+id/etAutopilotIP"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="#32009688"
|
||||
android:gravity="center"
|
||||
android:minHeight="48dp"
|
||||
android:padding="@dimen/dp_5"
|
||||
android:text="192.168.1.102"
|
||||
android:textSize="@dimen/dp_34" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/btnSetAutopilotIP"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:padding="@dimen/dp_5"
|
||||
android:text="设置IP"
|
||||
android:textSize="@dimen/dp_34" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/btnRecordPackage"
|
||||
|
||||
Reference in New Issue
Block a user