fix: use HM42 vendor image upload session

This commit is contained in:
yi-bot committed 2026-08-03 03:12:48 +00:00
1 parent 092b104e3d
commit 2919ebe312
5 files changed
+75 -6

No files matched your search

+11
View File
@@ -73,6 +73,17 @@ class TestCommandFrames:
assert P.requires_complete_image_planes("PP_da14585_4.2") is False
assert P.requires_complete_image_planes(None) is False
def test_hm42_image_session_by_firmware_family(self):
assert P.uses_hm42_image_session("HM42_AIO_V1.0.9") is True
assert P.uses_hm42_image_session("PP_da14585_4.2") is False
assert P.uses_hm42_image_session(None) is False
assert P.hm42_image_begin_frames() == (
bytes.fromhex("8001"),
bytes.fromhex("0000"),
bytes.fromhex("020000"),
)
assert P.hm42_image_finish_frame() == bytes.fromhex("0101")
def test_parking(self):
"""停车牌 "12" → EF1122(向量#4)"""
assert P.parking_frame("12") == bytes([0xEF, 0x11, 0x22])