2
0
mirror of https://opendev.org/x/pyghmi synced 2025-02-04 13:02:14 +00:00

Fix coordinate calculation for XCC3 in new DWC chassis

Change-Id: Ic4f9836b50f584d1616a3b2a9e9b9849cf7a5386
This commit is contained in:
Jarrod Johnson 2025-01-30 10:04:59 -05:00
parent 3455d4f03d
commit 8106eed782

View File

@ -327,7 +327,7 @@ class OEMHandler(generic.OEMHandler):
try:
slot = chassis['Location']['PartLocation']['LocationOrdinalValue']
slotnum = (2 * (slot >> 4) - 1) + ((slot & 15) % 10)
slotcoord = [slot >> 4, (slot & 15 - 9)]
slotcoord = [slot >> 4, (slot & 15) - 9]
return {'slot': slotnum, 'slotlabel': '{:02x}'.format(slot), 'slotcoord': slotcoord}
except KeyError:
continue