fix: select RXTX channel by firmware family

This commit is contained in:
yi-bot committed 2026-08-03 01:57:44 +00:00
1 parent 34dd6b4c52
commit da02bd31c6
7 files changed
+182 -4

No files matched your search

+6
View File
@@ -61,6 +61,12 @@ class TestSetTime:
class TestCommandFrames:
def test_rxtx_channel_by_firmware_family(self):
assert P.select_rxtx_uuid("HM42_AIO_V1.0.9") == P.RXTX_CHAR_UUID_LEGACY
assert P.select_rxtx_uuid("hm42_aio_v2") == P.RXTX_CHAR_UUID_LEGACY
assert P.select_rxtx_uuid("PP_da14585_4.2") == P.RXTX_CHAR_UUID
assert P.select_rxtx_uuid(None) == P.RXTX_CHAR_UUID
def test_parking(self):
"""停车牌 "12" → EF1122(向量#4)"""
assert P.parking_frame("12") == bytes([0xEF, 0x11, 0x22])