From df6feb559755b6c7c4e7e69c09c5a915d7249ee9 Mon Sep 17 00:00:00 2001 From: Ziver Koc Date: Mon, 16 May 2016 23:16:18 +0200 Subject: [PATCH] Implementation of BinaryStruct for Nexa done --- resource/web/css/bootstrap-theme.css | 0 resource/web/css/bootstrap-theme.css.map | 0 resource/web/css/bootstrap-theme.min.css | 0 resource/web/css/bootstrap-theme.min.css.map | 0 resource/web/css/bootstrap.css | 0 resource/web/css/bootstrap.css.map | 0 resource/web/css/bootstrap.min.css | 0 resource/web/css/bootstrap.min.css.map | 0 .../fonts/glyphicons-halflings-regular.eot | Bin .../fonts/glyphicons-halflings-regular.woff2 | Bin resource/web/js/bootstrap.js | 0 resource/web/js/bootstrap.min.js | 0 .../tellstick/protocols/NexaSelfLearning.java | 52 +----------------- 13 files changed, 1 insertion(+), 51 deletions(-) mode change 100644 => 100755 resource/web/css/bootstrap-theme.css mode change 100644 => 100755 resource/web/css/bootstrap-theme.css.map mode change 100644 => 100755 resource/web/css/bootstrap-theme.min.css mode change 100644 => 100755 resource/web/css/bootstrap-theme.min.css.map mode change 100644 => 100755 resource/web/css/bootstrap.css mode change 100644 => 100755 resource/web/css/bootstrap.css.map mode change 100644 => 100755 resource/web/css/bootstrap.min.css mode change 100644 => 100755 resource/web/css/bootstrap.min.css.map mode change 100644 => 100755 resource/web/fonts/glyphicons-halflings-regular.eot mode change 100644 => 100755 resource/web/fonts/glyphicons-halflings-regular.woff2 mode change 100644 => 100755 resource/web/js/bootstrap.js mode change 100644 => 100755 resource/web/js/bootstrap.min.js diff --git a/resource/web/css/bootstrap-theme.css b/resource/web/css/bootstrap-theme.css old mode 100644 new mode 100755 diff --git a/resource/web/css/bootstrap-theme.css.map b/resource/web/css/bootstrap-theme.css.map old mode 100644 new mode 100755 diff --git a/resource/web/css/bootstrap-theme.min.css b/resource/web/css/bootstrap-theme.min.css old mode 100644 new mode 100755 diff --git a/resource/web/css/bootstrap-theme.min.css.map b/resource/web/css/bootstrap-theme.min.css.map old mode 100644 new mode 100755 diff --git a/resource/web/css/bootstrap.css b/resource/web/css/bootstrap.css old mode 100644 new mode 100755 diff --git a/resource/web/css/bootstrap.css.map b/resource/web/css/bootstrap.css.map old mode 100644 new mode 100755 diff --git a/resource/web/css/bootstrap.min.css b/resource/web/css/bootstrap.min.css old mode 100644 new mode 100755 diff --git a/resource/web/css/bootstrap.min.css.map b/resource/web/css/bootstrap.min.css.map old mode 100644 new mode 100755 diff --git a/resource/web/fonts/glyphicons-halflings-regular.eot b/resource/web/fonts/glyphicons-halflings-regular.eot old mode 100644 new mode 100755 diff --git a/resource/web/fonts/glyphicons-halflings-regular.woff2 b/resource/web/fonts/glyphicons-halflings-regular.woff2 old mode 100644 new mode 100755 diff --git a/resource/web/js/bootstrap.js b/resource/web/js/bootstrap.js old mode 100644 new mode 100755 diff --git a/resource/web/js/bootstrap.min.js b/resource/web/js/bootstrap.min.js old mode 100644 new mode 100755 diff --git a/src/se/hal/plugin/tellstick/protocols/NexaSelfLearning.java b/src/se/hal/plugin/tellstick/protocols/NexaSelfLearning.java index 80d0ac74..8f5759fa 100755 --- a/src/se/hal/plugin/tellstick/protocols/NexaSelfLearning.java +++ b/src/se/hal/plugin/tellstick/protocols/NexaSelfLearning.java @@ -62,57 +62,6 @@ public class NexaSelfLearning extends TellstickProtocol public String encode(){ - /* - // Binary 0 => "01" - // Binary 1 => "10" - StringBuilder enc = new StringBuilder(); - enc.append(new char[]{'T', 127, 255, 24, 1}); - - - // House - StringBuilder m = new StringBuilder(); - for (int i = 25; i >= 0; --i) { - m.append( (house & (1 << i)) == 0 ? "01" : "10" ); - } - // Group - if (group) - m.append("10"); - else - m.append("01"); - - // On or OFF - if (enable) - m.append("10"); - else - m.append("01"); - - // Unit - for (int i = 3; i >= 0; --i) { - m.append( (unit & (1 << i)) == 0 ? "01" : "10" ); - } - - // The number of data is odd add this to make it even - m.append("0"); - //01011001101001011010100110010101010101101001011010 01 01 1001011010 0 - - char code = 9; // b1001, startcode - for (int i = 0; i < m.length(); ++i) { - code <<= 4; - if (m.charAt(i) == '1') { - code |= 0x08; // b1000 - } else { - code |= 0x0A; // b1010 - } - if (i % 2 == 0) { - enc.append(code); - code = 0x00; - } - } - - enc.append("+"); - return enc.toString(); -*/ - try { StringBuilder enc = new StringBuilder(); enc.append(new char[]{'T', 127, 255, 24, 1}); @@ -152,6 +101,7 @@ public class NexaSelfLearning extends TellstickProtocol } + public int getHouse() { return house; }