about summary refs log tree commit diff
diff options
context:
space:
mode:
authorMatthew Garrett <mjg59@coreos.com>2016-11-10T20·15+1300
committerGitHub <noreply@github.com>2016-11-10T20·15+1300
commit61efc7ae29b6ddb05e662a38941c1b1ed582131d (patch)
tree7794946c8f19788ba7eaf54c9bd32dcbd36415b3
parent0b9dd40921ae3f3e6b95d19a4a13e5060932831a (diff)
parent4705fdf011b7f5ec8b8c30269451bb0a020c6bf2 (diff)
Merge pull request #14 from msh100/master
each send_packet() needs a unique count
-rwxr-xr-xbroadlink/__init__.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/broadlink/__init__.py b/broadlink/__init__.py
index 8e38c06df63f..cd9d1599f144 100755
--- a/broadlink/__init__.py
+++ b/broadlink/__init__.py
@@ -129,6 +129,7 @@ class device:
     self.key = payload[0x04:0x14]
 
   def send_packet(self, command, payload):
+    self.count = (self.count + 1) & 0xffff
     packet = bytearray(0x38)
     packet[0x00] = 0x5a
     packet[0x01] = 0xa5