完善吐盘逻辑,调整设置界面,隐藏无关设置
This commit is contained in:
@@ -95,6 +95,16 @@ class LoginByFaceActivity : BaseActivity<ActivityLoginFaceBinding>(),
|
|||||||
override fun initialize() {
|
override fun initialize() {
|
||||||
userViewModel.activeEngine()
|
userViewModel.activeEngine()
|
||||||
|
|
||||||
|
PlcHelper.getInstance(this).openSerialPort(object : PlcCallback<String> {
|
||||||
|
override fun onSuccess(result: String) {
|
||||||
|
ToastUtils.showToast("打开串口 → 成功: ${result}")
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun onError(message: String) {
|
||||||
|
ToastUtils.showToast("打开串口 → 失败: $message")
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
initArcViewModel()
|
initArcViewModel()
|
||||||
initArcView()
|
initArcView()
|
||||||
openRectInfoDraw = true
|
openRectInfoDraw = true
|
||||||
@@ -414,17 +424,18 @@ class LoginByFaceActivity : BaseActivity<ActivityLoginFaceBinding>(),
|
|||||||
SoundPoolUtil.getInstance().play(RECOGNIZE_SUCCESS, 0)
|
SoundPoolUtil.getInstance().play(RECOGNIZE_SUCCESS, 0)
|
||||||
plateEnable = false
|
plateEnable = false
|
||||||
recognizeCountDownUtil.cancelCountDown()
|
recognizeCountDownUtil.cancelCountDown()
|
||||||
PlcHelper.getInstance(this@LoginByFaceActivity).outPlate(object : PlcCallback<String> {
|
PlcHelper.getInstance(this@LoginByFaceActivity)
|
||||||
override fun onSuccess(result: String) {
|
.outPlate(object : PlcCallback<String> {
|
||||||
loadLogInfo("collectFace,openPlate: 出盘成功,result=$result")
|
override fun onSuccess(result: String) {
|
||||||
goInitActivity()
|
loadLogInfo("collectFace,openPlate: 出盘成功,result=$result")
|
||||||
}
|
goInitActivity()
|
||||||
|
}
|
||||||
|
|
||||||
override fun onError(message: String) {
|
override fun onError(message: String) {
|
||||||
loadLogInfo("collectFace,openPlate: 出盘失败,message=$message")
|
loadLogInfo("collectFace,openPlate: 出盘失败,message=$message")
|
||||||
goInitActivity()
|
goInitActivity()
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onError(message: String) {
|
override fun onError(message: String) {
|
||||||
|
|||||||
@@ -144,6 +144,7 @@ class PlcSettingActivity : BaseActivity<ActivityPlcSettingBinding>() {
|
|||||||
override fun onSuccess(result: String) {
|
override fun onSuccess(result: String) {
|
||||||
hideWaitingDialog()
|
hideWaitingDialog()
|
||||||
ToastUtils.showToast("返回营业成功:$result")
|
ToastUtils.showToast("返回营业成功:$result")
|
||||||
|
finish()
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onError(message: String) {
|
override fun onError(message: String) {
|
||||||
|
|||||||
@@ -15,9 +15,9 @@
|
|||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="0dp"
|
android:layout_height="0dp"
|
||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
|
android:clipToPadding="false"
|
||||||
android:paddingHorizontal="50dp"
|
android:paddingHorizontal="50dp"
|
||||||
android:paddingVertical="20dp"
|
android:paddingVertical="20dp">
|
||||||
android:clipToPadding="false">
|
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
@@ -143,126 +143,131 @@
|
|||||||
android:textColor="#FFCC99"
|
android:textColor="#FFCC99"
|
||||||
android:textSize="22sp" />
|
android:textSize="22sp" />
|
||||||
|
|
||||||
<!-- ===== 故障处理 ===== -->
|
|
||||||
<TextView
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginTop="24dp"
|
|
||||||
android:text="故障处理"
|
|
||||||
android:textColor="#FFCC99"
|
|
||||||
android:textSize="20sp"
|
|
||||||
android:textStyle="bold" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/btnAlarmReset"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="60dp"
|
|
||||||
android:layout_marginTop="10dp"
|
|
||||||
android:background="@drawable/btn_outline"
|
|
||||||
android:gravity="center"
|
|
||||||
android:text="故障复位"
|
|
||||||
android:textColor="#FFCC99"
|
|
||||||
android:textSize="22sp" />
|
|
||||||
|
|
||||||
<!-- ===== 参数设置 ===== -->
|
|
||||||
<TextView
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginTop="24dp"
|
|
||||||
android:text="参数设置"
|
|
||||||
android:textColor="#FFCC99"
|
|
||||||
android:textSize="20sp"
|
|
||||||
android:textStyle="bold" />
|
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="10dp"
|
android:orientation="vertical"
|
||||||
android:orientation="horizontal">
|
android:visibility="gone">
|
||||||
|
<!-- ===== 故障处理 ===== -->
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="24dp"
|
||||||
|
android:text="故障处理"
|
||||||
|
android:textColor="#FFCC99"
|
||||||
|
android:textSize="20sp"
|
||||||
|
android:textStyle="bold" />
|
||||||
|
|
||||||
<EditText
|
<TextView
|
||||||
android:id="@+id/etParamType"
|
android:id="@+id/btnAlarmReset"
|
||||||
android:layout_width="0dp"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="60dp"
|
android:layout_height="60dp"
|
||||||
android:layout_weight="1"
|
android:layout_marginTop="10dp"
|
||||||
android:background="@drawable/btn_outline"
|
android:background="@drawable/btn_outline"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:hint="参数类型(如 18FD)"
|
android:text="故障复位"
|
||||||
android:inputType="text"
|
|
||||||
android:paddingHorizontal="12dp"
|
|
||||||
android:textColor="#FFCC99"
|
android:textColor="#FFCC99"
|
||||||
android:textColorHint="#99885566"
|
android:textSize="22sp" />
|
||||||
android:textSize="18sp" />
|
|
||||||
|
<!-- ===== 参数设置 ===== -->
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="24dp"
|
||||||
|
android:text="参数设置"
|
||||||
|
android:textColor="#FFCC99"
|
||||||
|
android:textSize="20sp"
|
||||||
|
android:textStyle="bold" />
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="10dp"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
<EditText
|
||||||
|
android:id="@+id/etParamType"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="60dp"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:background="@drawable/btn_outline"
|
||||||
|
android:gravity="center"
|
||||||
|
android:hint="参数类型(如 18FD)"
|
||||||
|
android:inputType="text"
|
||||||
|
android:paddingHorizontal="12dp"
|
||||||
|
android:textColor="#FFCC99"
|
||||||
|
android:textColorHint="#99885566"
|
||||||
|
android:textSize="18sp" />
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:layout_width="20dp"
|
||||||
|
android:layout_height="1dp" />
|
||||||
|
|
||||||
|
<EditText
|
||||||
|
android:id="@+id/etParamValue"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="60dp"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:background="@drawable/btn_outline"
|
||||||
|
android:gravity="center"
|
||||||
|
android:hint="参数值(整数)"
|
||||||
|
android:inputType="number"
|
||||||
|
android:paddingHorizontal="12dp"
|
||||||
|
android:textColor="#FFCC99"
|
||||||
|
android:textColorHint="#99885566"
|
||||||
|
android:textSize="18sp" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/btnSetParams"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="60dp"
|
||||||
|
android:layout_marginTop="12dp"
|
||||||
|
android:background="@drawable/btn_outline"
|
||||||
|
android:gravity="center"
|
||||||
|
android:text="设置参数"
|
||||||
|
android:textColor="#FFCC99"
|
||||||
|
android:textSize="22sp" />
|
||||||
|
|
||||||
|
<!-- ===== 状态显示 ===== -->
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="24dp"
|
||||||
|
android:text="PLC 状态"
|
||||||
|
android:textColor="#FFCC99"
|
||||||
|
android:textSize="20sp"
|
||||||
|
android:textStyle="bold" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/btnRefreshStatus"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="60dp"
|
||||||
|
android:layout_marginTop="10dp"
|
||||||
|
android:background="@drawable/btn_outline"
|
||||||
|
android:gravity="center"
|
||||||
|
android:text="刷新状态"
|
||||||
|
android:textColor="#FFCC99"
|
||||||
|
android:textSize="22sp" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tvStatusInfo"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="12dp"
|
||||||
|
android:background="@drawable/btn_outline"
|
||||||
|
android:paddingHorizontal="16dp"
|
||||||
|
android:paddingVertical="14dp"
|
||||||
|
android:text="暂无状态数据"
|
||||||
|
android:textColor="#FFCC99"
|
||||||
|
android:textSize="16sp"
|
||||||
|
tools:text="空盘:false | 平台下位:false | 平台上位:true | 取盘红外:false | 报警码:0" />
|
||||||
|
|
||||||
<View
|
<View
|
||||||
android:layout_width="20dp"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="1dp" />
|
android:layout_height="30dp" />
|
||||||
|
|
||||||
<EditText
|
|
||||||
android:id="@+id/etParamValue"
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="60dp"
|
|
||||||
android:layout_weight="1"
|
|
||||||
android:background="@drawable/btn_outline"
|
|
||||||
android:gravity="center"
|
|
||||||
android:hint="参数值(整数)"
|
|
||||||
android:inputType="number"
|
|
||||||
android:paddingHorizontal="12dp"
|
|
||||||
android:textColor="#FFCC99"
|
|
||||||
android:textColorHint="#99885566"
|
|
||||||
android:textSize="18sp" />
|
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/btnSetParams"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="60dp"
|
|
||||||
android:layout_marginTop="12dp"
|
|
||||||
android:background="@drawable/btn_outline"
|
|
||||||
android:gravity="center"
|
|
||||||
android:text="设置参数"
|
|
||||||
android:textColor="#FFCC99"
|
|
||||||
android:textSize="22sp" />
|
|
||||||
|
|
||||||
<!-- ===== 状态显示 ===== -->
|
|
||||||
<TextView
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginTop="24dp"
|
|
||||||
android:text="PLC 状态"
|
|
||||||
android:textColor="#FFCC99"
|
|
||||||
android:textSize="20sp"
|
|
||||||
android:textStyle="bold" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/btnRefreshStatus"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="60dp"
|
|
||||||
android:layout_marginTop="10dp"
|
|
||||||
android:background="@drawable/btn_outline"
|
|
||||||
android:gravity="center"
|
|
||||||
android:text="刷新状态"
|
|
||||||
android:textColor="#FFCC99"
|
|
||||||
android:textSize="22sp" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/tvStatusInfo"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginTop="12dp"
|
|
||||||
android:background="@drawable/btn_outline"
|
|
||||||
android:paddingHorizontal="16dp"
|
|
||||||
android:paddingVertical="14dp"
|
|
||||||
android:text="暂无状态数据"
|
|
||||||
android:textColor="#FFCC99"
|
|
||||||
android:textSize="16sp"
|
|
||||||
tools:text="空盘:false | 平台下位:false | 平台上位:true | 取盘红外:false | 报警码:0" />
|
|
||||||
|
|
||||||
<View
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="30dp" />
|
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
</ScrollView>
|
</ScrollView>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user