Support PM67 voltage fields in UMP logger v3

This commit is contained in:
2026-10-01 16:00:25 +03:00
parent 3457657979
commit c0ee7c46ea
6 changed files with 222 additions and 9 deletions

View File

@@ -23,7 +23,7 @@ def build_request(mode, token, function, address, value):
if not 1 <= token <= 255:
raise ValueError('Неверный номер CAN-запроса')
valid = ((function == 3 and ((address == BASE and value == 16) or
(address == DATA and value in (40, 80, 120)) or
(address == DATA and value in (40, 80, 120, 42, 84)) or
(address == LIVE and value == MAX_WORDS) or (address == EMU_CONTROL and value == 4))) or
(function == 6 and ((BASE <= address <= BASE+3 and 0 <= value <= 65535) or
(address == EMU_CONTROL+2 and value in (0, 1)))))