mirror of
https://github.com/firestar5683/StarPilot.git
synced 2026-06-28 01:52:06 +08:00
FW query debug script: print version brand (#25058)
* test_fw_query_on_routes: print brand * dynamic paddign old-commit-hash: 30cb9ac962395a86464fdfc079b5f0030c7b9b9d
This commit is contained in:
@@ -126,9 +126,10 @@ if __name__ == "__main__":
|
||||
print("New style (exact):", exact_matches)
|
||||
print("New style (fuzzy):", fuzzy_matches)
|
||||
|
||||
for version in car_fw:
|
||||
padding = max([len(fw.brand) for fw in car_fw])
|
||||
for version in sorted(car_fw, key=lambda fw: fw.brand):
|
||||
subaddr = None if version.subAddress == 0 else hex(version.subAddress)
|
||||
print(f" (Ecu.{version.ecu}, {hex(version.address)}, {subaddr}): [{version.fwVersion}],")
|
||||
print(f" Brand: {version.brand:{padding}} - (Ecu.{version.ecu}, {hex(version.address)}, {subaddr}): [{version.fwVersion}],")
|
||||
|
||||
print("Mismatches")
|
||||
found = False
|
||||
|
||||
Reference in New Issue
Block a user