From dbe65d6e277e518bab6f83e31056f0233e8de164 Mon Sep 17 00:00:00 2001 From: TrillGates Date: Thu, 18 Nov 2021 11:08:29 +0800 Subject: [PATCH] =?utf8?q?=E9=97=B9=E9=92=9F=E5=8D=95=E6=AC=A1=EF=BC=8C?= =?utf8?q?=E5=90=8E=E5=8F=B0=E4=B8=8B=E5=8F=91=E5=8A=9F=E8=83=BD=E5=AE=9E?= =?utf8?q?=E7=8E=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- .../java/com/ic/protocols/protocol_s123.java | 21 +++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/com/ic/protocols/protocol_s123.java b/app/src/main/java/com/ic/protocols/protocol_s123.java index 6de6becd..bf35e857 100644 --- a/app/src/main/java/com/ic/protocols/protocol_s123.java +++ b/app/src/main/java/com/ic/protocols/protocol_s123.java @@ -1435,9 +1435,17 @@ public class protocol_s123 { } else if (alarmtype == 3) { alarmName = context.getString(R.string.alarm_sit_too_long_tips_text); } + String status = "ON"; + if ("0".equals(alarmswitch)) { + status = "OFF"; + } else if ("1".equals(alarmswitch)) { + status = "ON"; + } else if ("2".equals(alarmswitch)) { + status = "ONCE"; + } alarmList.add(new Alarm("ST" + alarmtime.substring(0, 2) + "." + alarmtime.substring(2), "W" + repeat, "CON", - alarmswitch == 1 ? "ON" : "OFF", alarmName)); + status, alarmName)); } catch (Exception e) { ICLogger.e(e.getMessage(), e); } @@ -1468,7 +1476,16 @@ public class protocol_s123 { .toString() ); - alarmList.add(new Alarm("ST" + alarmtime.substring(0, 2) + "." + alarmtime.substring(2), "W" + repeat, "CON", alarmswitch == 1 ? "ON" : "OFF", "闹铃")); + String status = "ON"; + if ("0".equals(alarmswitch)) { + status = "OFF"; + } else if ("1".equals(alarmswitch)) { + status = "ON"; + } else if ("2".equals(alarmswitch)) { + status = "ONCE"; + } + alarmList.add(new Alarm("ST" + alarmtime.substring(0, 2) + "." + alarmtime.substring(2), "W" + repeat, "CON", + status, "闹铃")); } catch (Exception e) { ICLogger.e(e.getMessage(), e); } -- 2.17.1