|
@@ -405,22 +405,20 @@ public class InitActivity extends BaseActivity implements SerialPortUtil.ISerial
|
|
|
|
|
|
// mScreenExtinguishUtil.touchScreen();//===============================息屏
|
|
// mScreenExtinguishUtil.touchScreen();//===============================息屏
|
|
|
|
|
|
- //呼叫护士键短按松开
|
|
|
|
- if (buffer[5] == 1) {
|
|
|
|
|
|
+ LogUtil.d("serialPortBedOnclick", "buffer[5]==" + buffer[5]);
|
|
|
|
+ //呼叫护士键短按/长按松开
|
|
|
|
+ if (buffer[5] == 1 | buffer[5] == 2) {
|
|
if (null != Constants.MAC_ADDRESS) {
|
|
if (null != Constants.MAC_ADDRESS) {
|
|
//有线mac地址,设备出场信息,无线mac地址
|
|
//有线mac地址,设备出场信息,无线mac地址
|
|
- String str = "MGR_REG_A" + Constants.DELIMITER + Constants.MAC_ADDRESS + Constants.DELIMITER + "4" + Constants.DELIMITER + android.os.Build.DISPLAY +"_"+Constants.MCU_VERSION_NUMBER +
|
|
|
|
- Constants.DELIMITER + Constants.MAC_ADDRESS + Constants.DELIMITER + "FF:FF:FF:FF:FF:FF" + Constants.DELIMITER + SerialPortUtil.KEY_ID;
|
|
|
|
- UdpSendUtil.sendManualReboot(str);
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- //呼叫护士键长按松开
|
|
|
|
- if (buffer[5] == 2) {
|
|
|
|
- if (null != Constants.MAC_ADDRESS) {
|
|
|
|
- //有线mac地址,设备出场信息,无线mac地址
|
|
|
|
- String str = "MGR_REG_A" + Constants.DELIMITER + Constants.MAC_ADDRESS + Constants.DELIMITER + "4" + Constants.DELIMITER + android.os.Build.DISPLAY +"_"+Constants.MCU_VERSION_NUMBER +
|
|
|
|
|
|
+ final String str = "MGR_REG_A" + Constants.DELIMITER + Constants.MAC_ADDRESS + Constants.DELIMITER + "4" + Constants.DELIMITER + android.os.Build.DISPLAY +"_"+Constants.MCU_VERSION_NUMBER +
|
|
Constants.DELIMITER + Constants.MAC_ADDRESS + Constants.DELIMITER + "FF:FF:FF:FF:FF:FF" + Constants.DELIMITER + SerialPortUtil.KEY_ID;
|
|
Constants.DELIMITER + Constants.MAC_ADDRESS + Constants.DELIMITER + "FF:FF:FF:FF:FF:FF" + Constants.DELIMITER + SerialPortUtil.KEY_ID;
|
|
UdpSendUtil.sendManualReboot(str);
|
|
UdpSendUtil.sendManualReboot(str);
|
|
|
|
+ runOnUiThread(new Runnable() {
|
|
|
|
+ @Override
|
|
|
|
+ public void run() {
|
|
|
|
+ ToastUtil.showToast("收到按键消息,发送注册信息:" + str);
|
|
|
|
+ }
|
|
|
|
+ });
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|