Skip to content

Commit

Permalink
Version is in 3rd byte
Browse files Browse the repository at this point in the history
Signed-off-by: Olivier FAURAX <[email protected]>
  • Loading branch information
ofaurax committed Nov 8, 2024
1 parent 9ddf260 commit 5441b09
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packethardware/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -536,11 +536,12 @@ def get_mc_info(prop):
# Dell version encoding
# Their version is A.B.C.D, but we only report A.B.C as D is always 0
# aux: "0x00 0x1e 0x1e 0x00" -> ".30", not ".30.00"
# also "0x00 0x05 0x00 0xab" should be seen as ".00.171" -> ".00"
if normalize_vendor(get_mc_info("vendor")) == "Dell Inc.":
return (
__re_multiline_first(mc_info, regex[prop]).strip()
+ "."
+ str(int(get_mc_info("aux")[5:9], 16))
+ str(int(get_mc_info("aux")[10:14], 16))
)

# firmware_version provides X.Y, aux 1st byte provides .Z
Expand Down

0 comments on commit 5441b09

Please sign in to comment.