Skip to content

Commit

Permalink
linter bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
ruck314 committed Jun 19, 2024
1 parent d976c33 commit e11a228
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 8 deletions.
2 changes: 1 addition & 1 deletion python/surf/devices/amphenol/_LeapXcvrLowerPage.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
import pyrogue as pr

class LeapXcvrLowerPage(pr.Device):
def __init__(self, isTx = True, writeEn=False, **kwargs):
def __init__(self, isTx=True, writeEn=False, **kwargs):
super().__init__(**kwargs)

rwType = 'RW' if writeEn else 'RO'
Expand Down
7 changes: 3 additions & 4 deletions python/surf/devices/amphenol/_LeapXcvrUpperPages.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ def __init__(self, **kwargs):
mode = 'RO',
disp = '0x{:x}',
typeStr = 'UInt16',
linkedGet = self,_getLsbMsb,
linkedGet = self._getLsbMsb,
dependencies = [self.LaserWavelengthLsb, self.LaserWavelengthMsb],
))

Expand Down Expand Up @@ -562,6 +562,5 @@ def _getLsbMsb(self, var, read):

def _setLsbMsb(self, var, value, write):
with self.root.updateGroup():
var.dependencies[0].set(value & 0xff, write=write)
var.dependencies[1].set((value >> 8) & 0xff, write=write)

var.dependencies[0].set(value=((value >> 0) & 0xff), write=write)
var.dependencies[1].set(value=((value >> 8) & 0xff), write=write)
2 changes: 1 addition & 1 deletion python/surf/devices/linear/_Ltc4151.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,4 +152,4 @@ def _getLsbMsb(self, var, read):
with self.root.updateGroup():
lsb = var.dependencies[0].get(read=read)
msb = var.dependencies[1].get(read=read)
return (msb << 4) | (lsb 0xf)
return (msb << 4) | (lsb & 0xf)
1 change: 0 additions & 1 deletion python/surf/xilinx/_AxiPciePhy.py
Original file line number Diff line number Diff line change
Expand Up @@ -304,4 +304,3 @@ def updateLinkStatus(self):
# Set the link speed and width status
self.LnkStaSpeed.set( (linkStatus>>0) & 0xF )
self.LnkStaWidth.set( (linkStatus>>4) & 0xFF )

1 change: 0 additions & 1 deletion python/surf/xilinx/_Xadc.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
# the terms contained in the LICENSE.txt file.
#-----------------------------------------------------------------------------

import rogue
import pyrogue as pr

class Xadc(pr.Device):
Expand Down

0 comments on commit e11a228

Please sign in to comment.