Skip to content

Commit

Permalink
Fix V display update when Vread is not supplied in the callback
Browse files Browse the repository at this point in the history
Function `updateHistory` can be called with or without a supplied Vread.
If Vread was not supplied that defaulted to `g.Vread` (global
read-out voltage). However the default parameter assignment is taken
at the moment the function is instantiated. So it was impossible to
implicitly propagate the update Vread value to `updateHistory`. That
now defaults to None and the value is read the moment the function is
called.

This is a backport from the pypify branch
  • Loading branch information
foucault committed Jan 13, 2021
1 parent 943f379 commit 7631db0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion Globals/GlobalFunctions.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,9 @@


# Update history function
def updateHistory(w,b,m,a,pw,tag,Vread=g.Vread):
def updateHistory(w,b,m,a,pw,tag,Vread=None):
if Vread is None:
Vread = g.Vread
readTag='R'+str(g.readOption)
if g.sessionMode==1:
g.Mnow=m/2
Expand Down
2 changes: 1 addition & 1 deletion source/version.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
DO NOT MODIFY!
1.5.1
1.5.2

0 comments on commit 7631db0

Please sign in to comment.