diff options
author | Brent Avery <brent.avery0@gmail.com> | 2018-01-29T20·45+1100 |
---|---|---|
committer | Brent Avery <brent.avery0@gmail.com> | 2018-01-29T20·50+1100 |
commit | 4e33ef446520275e0a9426dc8182dcc3af276da3 (patch) | |
tree | bdd0af6775e1d79dd59f1b90dd8bcaf2ccb654e8 /broadlink | |
parent | dd6eb8767e7a7f1f54aa1e7a7b57309bc4fc5fba (diff) |
Get rf scan learning working in CLI tool (#87)
Diffstat (limited to 'broadlink')
-rw-r--r-- | broadlink/__init__.py | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/broadlink/__init__.py b/broadlink/__init__.py index a4c8a4841aff..8a193d556101 100644 --- a/broadlink/__init__.py +++ b/broadlink/__init__.py @@ -503,7 +503,12 @@ class rm(device): def sweep_frequency(self): packet = bytearray(16) - packet[0] = 0x19; + packet[0] = 0x19 + self.send_packet(0x6a, packet) + + def cancel_sweep_frequency(self): + packet = bytearray(16) + packet[0] = 0x1e self.send_packet(0x6a, packet) def check_frequency(self): @@ -541,7 +546,7 @@ class rm(device): temp = (ord(payload[0x4]) * 10 + ord(payload[0x5])) / 10.0 return temp -# For legay compatibility - don't use this +# For legacy compatibility - don't use this class rm2(rm): def __init__ (self): device.__init__(self, None, None) |