Add MX-T40 BLE desktop controller and protocol documentation
Checks / tests (ubuntu-latest, 3.11) (push) Canceled after 0s
Checks / tests (ubuntu-latest, 3.14) (push) Canceled after 0s
Checks / tests (windows-latest, 3.11) (push) Canceled after 0s
Checks / tests (windows-latest, 3.14) (push) Canceled after 0s
Checks / package (push) Canceled after 0s
Checks / tests (ubuntu-latest, 3.11) (push) Canceled after 0s
Checks / tests (ubuntu-latest, 3.14) (push) Canceled after 0s
Checks / tests (windows-latest, 3.11) (push) Canceled after 0s
Checks / tests (windows-latest, 3.14) (push) Canceled after 0s
Checks / package (push) Canceled after 0s
This commit is contained in:
38 files changed
+2344
No files matched your search
@@ -0,0 +1,21 @@
|
||||
"""Decode actual status payloads without constructing a Tk window."""
|
||||
|
||||
import unittest
|
||||
|
||||
from controller.messages import describe_reply
|
||||
|
||||
|
||||
class StatusTests(unittest.TestCase):
|
||||
def test_captured_standard_eq(self):
|
||||
self.assertEqual(describe_reply(bytes.fromhex("41 03 02 00")), "EQ: Standard")
|
||||
|
||||
def test_captured_volume_mute_and_lighting(self):
|
||||
for raw, expected in [
|
||||
("41 01 0b 00", "Volume: 11"),
|
||||
("41 01 0c 00", "Volume: 12"),
|
||||
("41 07 01 00", "Mute: On"),
|
||||
("41 07 02 00", "Mute: Off"),
|
||||
("51 03 03", "Lighting: Dance"),
|
||||
]:
|
||||
with self.subTest(raw=raw):
|
||||
self.assertEqual(describe_reply(bytes.fromhex(raw)), expected)
|
||||
Reference in new issue
Block a user