rf-protocols 3.3.0__tar.gz → 4.0.1__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.
- {rf_protocols-3.3.0 → rf_protocols-4.0.1}/PKG-INFO +1 -1
- {rf_protocols-3.3.0 → rf_protocols-4.0.1}/pyproject.toml +1 -1
- {rf_protocols-3.3.0 → rf_protocols-4.0.1}/rf_protocols/commands/pt2262.py +7 -6
- {rf_protocols-3.3.0 → rf_protocols-4.0.1}/rf_protocols.egg-info/PKG-INFO +1 -1
- {rf_protocols-3.3.0 → rf_protocols-4.0.1}/LICENSE +0 -0
- {rf_protocols-3.3.0 → rf_protocols-4.0.1}/README.md +0 -0
- {rf_protocols-3.3.0 → rf_protocols-4.0.1}/rf_protocols/__init__.py +0 -0
- {rf_protocols-3.3.0 → rf_protocols-4.0.1}/rf_protocols/codes/honeywell/string_lights/__init__.py +0 -0
- {rf_protocols-3.3.0 → rf_protocols-4.0.1}/rf_protocols/codes/honeywell/string_lights/turn_off.sub +0 -0
- {rf_protocols-3.3.0 → rf_protocols-4.0.1}/rf_protocols/codes/honeywell/string_lights/turn_on.sub +0 -0
- {rf_protocols-3.3.0 → rf_protocols-4.0.1}/rf_protocols/codes/novy/cooker_hood/__init__.py +0 -0
- {rf_protocols-3.3.0 → rf_protocols-4.0.1}/rf_protocols/codes/somfy/rts/__init__.py +0 -0
- {rf_protocols-3.3.0 → rf_protocols-4.0.1}/rf_protocols/commands/__init__.py +0 -0
- {rf_protocols-3.3.0 → rf_protocols-4.0.1}/rf_protocols/commands/ev1527.py +0 -0
- {rf_protocols-3.3.0 → rf_protocols-4.0.1}/rf_protocols/commands/kaku.py +0 -0
- {rf_protocols-3.3.0 → rf_protocols-4.0.1}/rf_protocols/commands/novy.py +0 -0
- {rf_protocols-3.3.0 → rf_protocols-4.0.1}/rf_protocols/commands/ook.py +0 -0
- {rf_protocols-3.3.0 → rf_protocols-4.0.1}/rf_protocols/commands/pilota_casa.py +0 -0
- {rf_protocols-3.3.0 → rf_protocols-4.0.1}/rf_protocols/commands/somfy_rts.py +0 -0
- {rf_protocols-3.3.0 → rf_protocols-4.0.1}/rf_protocols/loader.py +0 -0
- {rf_protocols-3.3.0 → rf_protocols-4.0.1}/rf_protocols/parser.py +0 -0
- {rf_protocols-3.3.0 → rf_protocols-4.0.1}/rf_protocols.egg-info/SOURCES.txt +0 -0
- {rf_protocols-3.3.0 → rf_protocols-4.0.1}/rf_protocols.egg-info/dependency_links.txt +0 -0
- {rf_protocols-3.3.0 → rf_protocols-4.0.1}/rf_protocols.egg-info/requires.txt +0 -0
- {rf_protocols-3.3.0 → rf_protocols-4.0.1}/rf_protocols.egg-info/top_level.txt +0 -0
- {rf_protocols-3.3.0 → rf_protocols-4.0.1}/setup.cfg +0 -0
- {rf_protocols-3.3.0 → rf_protocols-4.0.1}/tests/test_loader.py +0 -0
- {rf_protocols-3.3.0 → rf_protocols-4.0.1}/tests/test_parser.py +0 -0
|
@@ -51,7 +51,7 @@ from typing import override
|
|
|
51
51
|
|
|
52
52
|
from . import ModulationType, RadioFrequencyCommand
|
|
53
53
|
|
|
54
|
-
_VALID_SYMBOLS = frozenset("
|
|
54
|
+
_VALID_SYMBOLS = frozenset("01FX")
|
|
55
55
|
|
|
56
56
|
|
|
57
57
|
class PT2262Command(RadioFrequencyCommand):
|
|
@@ -64,7 +64,7 @@ class PT2262Command(RadioFrequencyCommand):
|
|
|
64
64
|
self,
|
|
65
65
|
*,
|
|
66
66
|
data: str,
|
|
67
|
-
timebase_us: int = 350,
|
|
67
|
+
timebase_us: int = 350, # length of a short pulse
|
|
68
68
|
frequency: int = 433_920_000,
|
|
69
69
|
repeat_count: int = 5,
|
|
70
70
|
) -> None:
|
|
@@ -73,7 +73,7 @@ class PT2262Command(RadioFrequencyCommand):
|
|
|
73
73
|
if len(normalized_data) != 12:
|
|
74
74
|
raise ValueError("data must be exactly 12 characters long")
|
|
75
75
|
if not set(normalized_data).issubset(_VALID_SYMBOLS):
|
|
76
|
-
raise ValueError("data must contain only symbols '0', '1', and '
|
|
76
|
+
raise ValueError("data must contain only symbols '0', '1', 'F', and 'X'")
|
|
77
77
|
|
|
78
78
|
super().__init__(
|
|
79
79
|
frequency=frequency,
|
|
@@ -86,13 +86,14 @@ class PT2262Command(RadioFrequencyCommand):
|
|
|
86
86
|
@override
|
|
87
87
|
def get_raw_timings(self) -> list[int]:
|
|
88
88
|
"""Compute the PT2262 frame timings followed by the sync symbol."""
|
|
89
|
-
short_us =
|
|
90
|
-
long_us =
|
|
91
|
-
sync_low_us =
|
|
89
|
+
short_us = self.timebase_us
|
|
90
|
+
long_us = 3 * self.timebase_us
|
|
91
|
+
sync_low_us = 31 * self.timebase_us
|
|
92
92
|
symbols = {
|
|
93
93
|
"0": [short_us, -long_us, short_us, -long_us],
|
|
94
94
|
"1": [long_us, -short_us, long_us, -short_us],
|
|
95
95
|
"F": [short_us, -long_us, long_us, -short_us],
|
|
96
|
+
"X": [short_us, -long_us, short_us, -short_us],
|
|
96
97
|
}
|
|
97
98
|
|
|
98
99
|
timings: list[int] = []
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{rf_protocols-3.3.0 → rf_protocols-4.0.1}/rf_protocols/codes/honeywell/string_lights/__init__.py
RENAMED
|
File without changes
|
{rf_protocols-3.3.0 → rf_protocols-4.0.1}/rf_protocols/codes/honeywell/string_lights/turn_off.sub
RENAMED
|
File without changes
|
{rf_protocols-3.3.0 → rf_protocols-4.0.1}/rf_protocols/codes/honeywell/string_lights/turn_on.sub
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|