|
@@ -1192,7 +1192,7 @@ class CallingdoorActivity :BaseActivity<CallingdoorActivityPresenter, Callingdoo
|
|
|
Log.d("serialPortSOSCall", "紧急按钮: " + status)
|
|
|
if ("0".equals(status)) {
|
|
|
//卫生间紧急按钮: 一定时间内重复多次按无效
|
|
|
- if (System.currentTimeMillis() - clickSosTime > 10000 || !Constant.SOS_ON) {
|
|
|
+ if (System.currentTimeMillis() - clickSosTime > 10000 || !Constant.sosOn) {
|
|
|
runOnUiThread {
|
|
|
clickSosTime = System.currentTimeMillis()
|
|
|
if (Constant.TCP_CONNECTED) {
|
|
@@ -1491,11 +1491,7 @@ class CallingdoorActivity :BaseActivity<CallingdoorActivityPresenter, Callingdoo
|
|
|
if (tcpModel.action == TcpAction.SideAction.CALL) {
|
|
|
//手柄分机呼叫成功
|
|
|
//RingPlayHelper.playRingTone(activity, R.raw.outgoing_call, false)
|
|
|
-
|
|
|
SerialPortHelper.setDoorLight(1, "200")
|
|
|
- //显示分机呼叫信息
|
|
|
- //val interactionVO = Gson().fromJson(tcpModel.data.toString(), InteractionVO::class.java)
|
|
|
- //updateBedCall(interactionVO, true)
|
|
|
} else if (tcpModel.action == TcpAction.SideAction.SOS_CALL) {
|
|
|
SerialPortHelper.setDoorLight(1, "200")
|
|
|
Constant.sosOn = true
|
|
@@ -1504,9 +1500,6 @@ class CallingdoorActivity :BaseActivity<CallingdoorActivityPresenter, Callingdoo
|
|
|
RingPlayHelper.stopRingTone()
|
|
|
}
|
|
|
|
|
|
- //val interactionVO = Gson().fromJson(tcpModel.data.toString(), InteractionVO::class.java)
|
|
|
- //updateBedCall(interactionVO, false)
|
|
|
-
|
|
|
if (SettingConfig.getDoorLightAlwaysOn(activity) == 0) {
|
|
|
//如果当前还有其他床位呼叫或者是紧急呼叫则不重置门灯
|
|
|
//if (bedCalls.size == 0 && !Constant.sosOn) {
|
|
@@ -1516,7 +1509,7 @@ class CallingdoorActivity :BaseActivity<CallingdoorActivityPresenter, Callingdoo
|
|
|
} else if (tcpModel.action == TcpAction.SideAction.SOS_CANCEL) {
|
|
|
Constant.sosOn = false
|
|
|
if (SettingConfig.getDoorLightAlwaysOn(activity) == 0) {
|
|
|
- //如果当前还有其他床位呼叫或者是紧急呼叫则不重置门灯
|
|
|
+ //如果当前还有其他床位呼叫则不重置门灯
|
|
|
//if (bedCalls.size == 0) {
|
|
|
DoorLightHelper.resetDoorLight()
|
|
|
//}
|
|
@@ -1613,6 +1606,13 @@ class CallingdoorActivity :BaseActivity<CallingdoorActivityPresenter, Callingdoo
|
|
|
}
|
|
|
} else {
|
|
|
view_flipper.removeAllViews()
|
|
|
+
|
|
|
+ //重置门灯
|
|
|
+ if (!Constant.sosOn) {
|
|
|
+ if (SettingConfig.getDoorLightAlwaysOn(activity) == 0) {
|
|
|
+ DoorLightHelper.resetDoorLight()
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -1768,9 +1768,6 @@ class CallingdoorActivity :BaseActivity<CallingdoorActivityPresenter, Callingdoo
|
|
|
runOnUiThread {
|
|
|
showCalls()
|
|
|
}
|
|
|
- } else {
|
|
|
- Constant.callNums = 0
|
|
|
- DoorLightHelper.resetDoorLight()
|
|
|
}
|
|
|
} catch (ex: Exception) {
|
|
|
ex.printStackTrace()
|