adafruit-circuitpython-irremote 4.1.19__tar.gz → 5.0.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {adafruit-circuitpython-irremote-4.1.19 → adafruit_circuitpython_irremote-5.0.0}/PKG-INFO +1 -1
- {adafruit-circuitpython-irremote-4.1.19 → adafruit_circuitpython_irremote-5.0.0}/adafruit_circuitpython_irremote.egg-info/PKG-INFO +1 -1
- {adafruit-circuitpython-irremote-4.1.19 → adafruit_circuitpython_irremote-5.0.0}/adafruit_irremote.py +20 -11
- {adafruit-circuitpython-irremote-4.1.19 → adafruit_circuitpython_irremote-5.0.0}/examples/irremote_transmit.py +1 -1
- {adafruit-circuitpython-irremote-4.1.19 → adafruit_circuitpython_irremote-5.0.0}/pyproject.toml +1 -1
- {adafruit-circuitpython-irremote-4.1.19 → adafruit_circuitpython_irremote-5.0.0}/.github/PULL_REQUEST_TEMPLATE/adafruit_circuitpython_pr.md +0 -0
- {adafruit-circuitpython-irremote-4.1.19 → adafruit_circuitpython_irremote-5.0.0}/.github/workflows/build.yml +0 -0
- {adafruit-circuitpython-irremote-4.1.19 → adafruit_circuitpython_irremote-5.0.0}/.github/workflows/failure-help-text.yml +0 -0
- {adafruit-circuitpython-irremote-4.1.19 → adafruit_circuitpython_irremote-5.0.0}/.github/workflows/release_gh.yml +0 -0
- {adafruit-circuitpython-irremote-4.1.19 → adafruit_circuitpython_irremote-5.0.0}/.github/workflows/release_pypi.yml +0 -0
- {adafruit-circuitpython-irremote-4.1.19 → adafruit_circuitpython_irremote-5.0.0}/.gitignore +0 -0
- {adafruit-circuitpython-irremote-4.1.19 → adafruit_circuitpython_irremote-5.0.0}/.pre-commit-config.yaml +0 -0
- {adafruit-circuitpython-irremote-4.1.19 → adafruit_circuitpython_irremote-5.0.0}/.pylintrc +0 -0
- {adafruit-circuitpython-irremote-4.1.19 → adafruit_circuitpython_irremote-5.0.0}/.readthedocs.yaml +0 -0
- {adafruit-circuitpython-irremote-4.1.19 → adafruit_circuitpython_irremote-5.0.0}/CODE_OF_CONDUCT.md +0 -0
- {adafruit-circuitpython-irremote-4.1.19 → adafruit_circuitpython_irremote-5.0.0}/LICENSE +0 -0
- {adafruit-circuitpython-irremote-4.1.19 → adafruit_circuitpython_irremote-5.0.0}/LICENSES/CC-BY-4.0.txt +0 -0
- {adafruit-circuitpython-irremote-4.1.19 → adafruit_circuitpython_irremote-5.0.0}/LICENSES/MIT.txt +0 -0
- {adafruit-circuitpython-irremote-4.1.19 → adafruit_circuitpython_irremote-5.0.0}/LICENSES/Unlicense.txt +0 -0
- {adafruit-circuitpython-irremote-4.1.19 → adafruit_circuitpython_irremote-5.0.0}/README.rst +0 -0
- {adafruit-circuitpython-irremote-4.1.19 → adafruit_circuitpython_irremote-5.0.0}/README.rst.license +0 -0
- {adafruit-circuitpython-irremote-4.1.19 → adafruit_circuitpython_irremote-5.0.0}/adafruit_circuitpython_irremote.egg-info/SOURCES.txt +0 -0
- {adafruit-circuitpython-irremote-4.1.19 → adafruit_circuitpython_irremote-5.0.0}/adafruit_circuitpython_irremote.egg-info/dependency_links.txt +0 -0
- {adafruit-circuitpython-irremote-4.1.19 → adafruit_circuitpython_irremote-5.0.0}/adafruit_circuitpython_irremote.egg-info/requires.txt +0 -0
- {adafruit-circuitpython-irremote-4.1.19 → adafruit_circuitpython_irremote-5.0.0}/adafruit_circuitpython_irremote.egg-info/top_level.txt +0 -0
- {adafruit-circuitpython-irremote-4.1.19 → adafruit_circuitpython_irremote-5.0.0}/docs/_static/favicon.ico +0 -0
- {adafruit-circuitpython-irremote-4.1.19 → adafruit_circuitpython_irremote-5.0.0}/docs/_static/favicon.ico.license +0 -0
- {adafruit-circuitpython-irremote-4.1.19 → adafruit_circuitpython_irremote-5.0.0}/docs/api.rst +0 -0
- {adafruit-circuitpython-irremote-4.1.19 → adafruit_circuitpython_irremote-5.0.0}/docs/api.rst.license +0 -0
- {adafruit-circuitpython-irremote-4.1.19 → adafruit_circuitpython_irremote-5.0.0}/docs/conf.py +0 -0
- {adafruit-circuitpython-irremote-4.1.19 → adafruit_circuitpython_irremote-5.0.0}/docs/examples.rst +0 -0
- {adafruit-circuitpython-irremote-4.1.19 → adafruit_circuitpython_irremote-5.0.0}/docs/examples.rst.license +0 -0
- {adafruit-circuitpython-irremote-4.1.19 → adafruit_circuitpython_irremote-5.0.0}/docs/index.rst +0 -0
- {adafruit-circuitpython-irremote-4.1.19 → adafruit_circuitpython_irremote-5.0.0}/docs/index.rst.license +0 -0
- {adafruit-circuitpython-irremote-4.1.19 → adafruit_circuitpython_irremote-5.0.0}/docs/requirements.txt +0 -0
- {adafruit-circuitpython-irremote-4.1.19 → adafruit_circuitpython_irremote-5.0.0}/examples/irremote_nonblocking.py +0 -0
- {adafruit-circuitpython-irremote-4.1.19 → adafruit_circuitpython_irremote-5.0.0}/examples/irremote_simpletest.py +0 -0
- {adafruit-circuitpython-irremote-4.1.19 → adafruit_circuitpython_irremote-5.0.0}/optional_requirements.txt +0 -0
- {adafruit-circuitpython-irremote-4.1.19 → adafruit_circuitpython_irremote-5.0.0}/requirements.txt +0 -0
- {adafruit-circuitpython-irremote-4.1.19 → adafruit_circuitpython_irremote-5.0.0}/setup.cfg +0 -0
|
@@ -64,7 +64,7 @@ Implementation Notes
|
|
|
64
64
|
|
|
65
65
|
"""
|
|
66
66
|
|
|
67
|
-
__version__ = "
|
|
67
|
+
__version__ = "5.0.0"
|
|
68
68
|
__repo__ = "https://github.com/adafruit/Adafruit_CircuitPython_IRRemote.git"
|
|
69
69
|
|
|
70
70
|
|
|
@@ -171,9 +171,9 @@ def decode_bits(pulses: List) -> NamedTuple:
|
|
|
171
171
|
# convert marks/spaces to 0 and 1
|
|
172
172
|
for i, pulse_length in enumerate(pulses):
|
|
173
173
|
if (space * 0.75) <= pulse_length <= (space * 1.25):
|
|
174
|
-
pulses[i] = False
|
|
175
|
-
elif (mark * 0.75) <= pulse_length <= (mark * 1.25):
|
|
176
174
|
pulses[i] = True
|
|
175
|
+
elif (mark * 0.75) <= pulse_length <= (mark * 1.25):
|
|
176
|
+
pulses[i] = False
|
|
177
177
|
else:
|
|
178
178
|
msg = UnparseableIRMessage(input_pulses, reason="Pulses outside mark/space")
|
|
179
179
|
raise FailedToDecode(msg)
|
|
@@ -342,15 +342,21 @@ class GenericDecode:
|
|
|
342
342
|
class GenericTransmit:
|
|
343
343
|
"""Generic infrared transmit class that handles encoding.
|
|
344
344
|
|
|
345
|
-
:param int header: The length of header in microseconds
|
|
346
|
-
:param int one: The length of a one in microseconds
|
|
347
|
-
:param int zero: The length of a zero in microseconds
|
|
345
|
+
:param List[int] header: The length of header in microseconds, the length should be even
|
|
346
|
+
:param List[int] one: The length of a one in microseconds
|
|
347
|
+
:param List[int] zero: The length of a zero in microseconds
|
|
348
348
|
:param int trail: The length of the trail in microseconds, set to None to disable
|
|
349
349
|
:param bool debug: Enable debug output, default False
|
|
350
350
|
"""
|
|
351
351
|
|
|
352
352
|
def __init__(
|
|
353
|
-
self,
|
|
353
|
+
self,
|
|
354
|
+
header: List[int],
|
|
355
|
+
one: List[int],
|
|
356
|
+
zero: List[int],
|
|
357
|
+
trail: int,
|
|
358
|
+
*,
|
|
359
|
+
debug: bool = False,
|
|
354
360
|
) -> None:
|
|
355
361
|
self.header = header
|
|
356
362
|
self.one = one
|
|
@@ -381,14 +387,17 @@ class GenericTransmit:
|
|
|
381
387
|
bits_to_send = nbits
|
|
382
388
|
|
|
383
389
|
durations = array.array(
|
|
384
|
-
"H",
|
|
390
|
+
"H",
|
|
391
|
+
[0]
|
|
392
|
+
* (len(self.header) + bits_to_send * 2 + (0 if self.trail is None else 1)),
|
|
385
393
|
)
|
|
386
394
|
|
|
387
|
-
|
|
388
|
-
|
|
395
|
+
for i, _ in enumerate(self.header):
|
|
396
|
+
durations[i] = self.header[i]
|
|
397
|
+
|
|
389
398
|
if self.trail is not None:
|
|
390
399
|
durations[-1] = self.trail
|
|
391
|
-
out =
|
|
400
|
+
out = len(self.header)
|
|
392
401
|
bit_count = 0
|
|
393
402
|
for byte_index, _ in enumerate(data):
|
|
394
403
|
for i in range(7, -1, -1):
|
|
@@ -18,7 +18,7 @@ button.pull = digitalio.Pull.DOWN
|
|
|
18
18
|
pulseout = pulseio.PulseOut(board.IR_TX, frequency=38000, duty_cycle=2**15)
|
|
19
19
|
# Create an encoder that will take numbers and turn them into NEC IR pulses
|
|
20
20
|
encoder = adafruit_irremote.GenericTransmit(
|
|
21
|
-
header=[
|
|
21
|
+
header=[9000, 4500], one=[560, 1700], zero=[560, 1700], trail=560
|
|
22
22
|
)
|
|
23
23
|
|
|
24
24
|
while True:
|
{adafruit-circuitpython-irremote-4.1.19 → adafruit_circuitpython_irremote-5.0.0}/pyproject.toml
RENAMED
|
@@ -12,7 +12,7 @@ requires = [
|
|
|
12
12
|
[project]
|
|
13
13
|
name = "adafruit-circuitpython-irremote"
|
|
14
14
|
description = "CircuitPython library for infrared transmit and receive."
|
|
15
|
-
version = "
|
|
15
|
+
version = "5.0.0"
|
|
16
16
|
readme = "README.rst"
|
|
17
17
|
authors = [
|
|
18
18
|
{name = "Adafruit Industries", email = "circuitpython@adafruit.com"}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{adafruit-circuitpython-irremote-4.1.19 → adafruit_circuitpython_irremote-5.0.0}/.readthedocs.yaml
RENAMED
|
File without changes
|
{adafruit-circuitpython-irremote-4.1.19 → adafruit_circuitpython_irremote-5.0.0}/CODE_OF_CONDUCT.md
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{adafruit-circuitpython-irremote-4.1.19 → adafruit_circuitpython_irremote-5.0.0}/LICENSES/MIT.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{adafruit-circuitpython-irremote-4.1.19 → adafruit_circuitpython_irremote-5.0.0}/README.rst.license
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{adafruit-circuitpython-irremote-4.1.19 → adafruit_circuitpython_irremote-5.0.0}/docs/api.rst
RENAMED
|
File without changes
|
|
File without changes
|
{adafruit-circuitpython-irremote-4.1.19 → adafruit_circuitpython_irremote-5.0.0}/docs/conf.py
RENAMED
|
File without changes
|
{adafruit-circuitpython-irremote-4.1.19 → adafruit_circuitpython_irremote-5.0.0}/docs/examples.rst
RENAMED
|
File without changes
|
|
File without changes
|
{adafruit-circuitpython-irremote-4.1.19 → adafruit_circuitpython_irremote-5.0.0}/docs/index.rst
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{adafruit-circuitpython-irremote-4.1.19 → adafruit_circuitpython_irremote-5.0.0}/requirements.txt
RENAMED
|
File without changes
|
|
File without changes
|