Skip to content

Commit

Permalink
using lambda read + get(read=read) instead of .value()
Browse files Browse the repository at this point in the history
  • Loading branch information
ruck314 committed May 9, 2024
1 parent 345b245 commit c5eddd7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions python/surf/devices/ti/_Ina237.py
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ def __init__(self,
name = 'Vin',
description = 'Voltage Measurement',
mode = 'RO',
linkedGet = lambda: self.VBUS.value()*3.125E-3, # Conversion factor: 3.125 mV/LSB
linkedGet = lambda read: self.VBUS.get(read=read)*3.125E-3, # Conversion factor: 3.125 mV/LSB
typeStr = "Float32",
disp = '{:1.3f}',
units = 'V',
Expand All @@ -220,7 +220,7 @@ def __init__(self,
name = 'Pin',
description = 'Power Measurement',
mode = 'RO',
linkedGet = lambda: (self.Vin.value())*(self.Iin.value()),
linkedGet = lambda read: (self.Vin.get(read=read))*(self.Iin.get(read=read)),
typeStr = "Float32",
disp = '{:1.3f}',
units = 'W',
Expand All @@ -230,7 +230,7 @@ def __init__(self,
self.add(pr.LinkVariable(
name = "DieTempature",
mode = 'RO',
linkedGet = lambda: self.DIETEMP.value()*0.125, # Conversion factor: 0.125 degC/LSB
linkedGet = lambda read: self.DIETEMP.get(read=read)*0.125, # Conversion factor: 0.125 degC/LSB
typeStr = "Float32",
disp = '{:1.3f}',
units = 'degC',
Expand Down

0 comments on commit c5eddd7

Please sign in to comment.