Skip to content

Commit

Permalink
Merge pull request #5 from MaxIV-KitsControls/add_intant_current
Browse files Browse the repository at this point in the history
Add instant current axis attribute
  • Loading branch information
aureocarneiro authored Sep 19, 2019
2 parents 62eb37b + 1186425 commit a80f24d
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
9 changes: 9 additions & 0 deletions sardana_albaem/ctrl/Albaem2CoTiCtrl.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,12 @@ class Albaem2CoTiCtrl(CounterTimerController):
Access: DataAccess.ReadWrite,

},
"InstantCurrent": {
Type: float,
Description: 'Channel instant current',
Memorize: NotMemorized,
Access: DataAccess.ReadOnly
},
"FORMULA":
{
Type: str,
Expand Down Expand Up @@ -368,6 +374,9 @@ def GetExtraAttributePar(self, axis, name):
elif val.lower() == 'on':
ret = True
return ret
elif name == 'instantcurrent':
cmd = 'CHAN{0:02d}:INSCurrent?'.format(axis)
return eval(self.sendCmd(cmd))

def SetExtraAttributePar(self, axis, name, value):
if axis == 1:
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def main():
"""Main method collecting all the parameters to setup."""
name = "sardana-albaem"

version = "0.0.6"
version = "0.0.7"

description = "AlbaEM Sardana Controller"

Expand Down

0 comments on commit a80f24d

Please sign in to comment.