Skip to content

Commit

Permalink
Unhide raw variables for debug
Browse files Browse the repository at this point in the history
  • Loading branch information
bengineerd committed Oct 24, 2023
1 parent b4c249a commit 3a9991f
Showing 1 changed file with 16 additions and 16 deletions.
32 changes: 16 additions & 16 deletions python/surf/devices/linear/_Ltc4151.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,19 +34,19 @@ def __init__(self,
base = pr.UInt,
mode = 'RO',
pollInterval = pollInterval,
hidden = True,
hidden = False,
))

self.add(pr.RemoteVariable(
name = 'SenseLsb',
description = 'Sense LSB Data',
offset = (0x1 << 2),
bitSize = 4,
bitOffset = 4,
bitSize = 8,
bitOffset = 0,
base = pr.UInt,
mode = 'RO',
pollInterval = pollInterval,
hidden = True,
hidden = False,
))

self.add(pr.LinkVariable(
Expand All @@ -56,7 +56,7 @@ def __init__(self,
units = 'A',
disp = '{:1.3f}',
dependencies = [self.SenseMsb,self.SenseLsb],
linkedGet = lambda: (int(self.SenseMsb.value()<<4)|int(self.SenseLsb.value()&0xF))*20.0E-6/self.senseRes
linkedGet = lambda: (int(self.SenseMsb.value()<<4)|int(self.SenseLsb.value()>>4))*20.0E-6/self.senseRes
))

self.add(pr.RemoteVariable(
Expand All @@ -68,19 +68,19 @@ def __init__(self,
base = pr.UInt,
mode = 'RO',
pollInterval = pollInterval,
hidden = True,
hidden = False,
))

self.add(pr.RemoteVariable(
name = 'VinLsb',
description = 'Vin LSB Data',
offset = (0x3 << 2),
bitSize = 4,
bitOffset = 4,
bitSize = 8,
bitOffset = 0,
base = pr.UInt,
mode = 'RO',
pollInterval = pollInterval,
hidden = True,
hidden = False,
))

self.add(pr.LinkVariable(
Expand All @@ -90,7 +90,7 @@ def __init__(self,
units = 'V',
disp = '{:1.3f}',
dependencies = [self.VinMsb,self.VinLsb],
linkedGet = lambda: (int(self.VinMsb.value()<<4)|int(self.VinLsb.value()&0xF))*25.0E-3
linkedGet = lambda: (int(self.VinMsb.value()<<4)|int(self.VinLsb.value()>>4))*25.0E-3
))

self.add(pr.LinkVariable(
Expand All @@ -112,19 +112,19 @@ def __init__(self,
base = pr.UInt,
mode = 'RO',
pollInterval = pollInterval,
hidden = True,
hidden = False,
))

self.add(pr.RemoteVariable(
name = 'AdinLsb',
description = 'Adin LSB Data',
offset = (0x5 << 2),
bitSize = 4,
bitOffset = 4,
bitSize = 8,
bitOffset = 0,
base = pr.UInt,
mode = 'RO',
pollInterval = pollInterval,
hidden = True,
hidden = False,
))

self.add(pr.LinkVariable(
Expand All @@ -134,7 +134,7 @@ def __init__(self,
units = 'V',
disp = '{:1.3f}',
dependencies = [self.AdinMsb,self.AdinLsb],
linkedGet = lambda: (int(self.AdinMsb.value()<<4)|int(self.AdinLsb.value()&0xF))*500.0E-6
linkedGet = lambda: (int(self.AdinMsb.value()<<4)|int(self.AdinLsb.value()>>4))*500.0E-6
))

self.add(pr.RemoteVariable(
Expand All @@ -145,5 +145,5 @@ def __init__(self,
bitOffset = 0,
base = pr.UInt,
mode = 'RW',
hidden = True,
hidden = False,
))

0 comments on commit 3a9991f

Please sign in to comment.