|
@@ -3,6 +3,7 @@ package com.wdkl.app.ncs.callingbed.activity
|
|
|
import android.graphics.Color
|
|
|
import android.hardware.Camera
|
|
|
import android.os.Bundle
|
|
|
+import android.text.TextUtils
|
|
|
import android.text.method.ScrollingMovementMethod
|
|
|
import android.view.SurfaceHolder
|
|
|
import android.view.View
|
|
@@ -26,6 +27,7 @@ import kotlinx.android.synthetic.main.test_lay.*
|
|
|
import org.greenrobot.eventbus.EventBus
|
|
|
import org.greenrobot.eventbus.Subscribe
|
|
|
import org.greenrobot.eventbus.ThreadMode
|
|
|
+import serialporttest.utils.SerialPortUtil433
|
|
|
|
|
|
|
|
|
@Router(path = "/callingdoor/text")
|
|
@@ -174,6 +176,23 @@ class AppTextActivity :BaseActivity<QrCodeFragmentPresenter, TestLayBinding>(),
|
|
|
}
|
|
|
|
|
|
}
|
|
|
+
|
|
|
+ //声光报警器测试
|
|
|
+ btn_flash_on.setOnClickListener {
|
|
|
+ val mac = edit_flash_mac.text.toString()
|
|
|
+ if (!TextUtils.isEmpty(mac)) {
|
|
|
+ val cmd = "$" + mac + "RELAY0,1F#"
|
|
|
+ SerialPortUtil433.getInstance().send(cmd)
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ btn_flash_off.setOnClickListener {
|
|
|
+ val mac = edit_flash_mac.text.toString()
|
|
|
+ if (!TextUtils.isEmpty(mac)) {
|
|
|
+ val cmd = "$" + mac + "RELAY0,0F#"
|
|
|
+ SerialPortUtil433.getInstance().send(cmd)
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
private fun startTest() {
|
|
|
is_startTest=true
|