From ff5770d43d76d7a96652cd887b30a66d87afd5a9 Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Mon, 30 Aug 2010 13:56:49 -0400 Subject: [PATCH] Store a copy of params in CurveCommand._add_to_command_stack. We may modify the parameter dict later during the command's execution, and we want future runs via the command stack to replicate the first run from the raw initial parameters. If you don't do this, you'll get errors like $ ./bin/hk.py -c 'load_playlist test/data/vclamp_picoforce/playlist' -c 'start_command_capture' -c 'zero_surface_contact_point --block approach' -c 'zero_surface_contact_point --block retract' -c 'stop_command_capture' -c 'apply_command_stack_to_playlist --enable-evaluate' -c 'flat_filter_playlist --block retract --min_points 1' Success ... Failure Expected a list of Peaks, not : surface distance (m) not in retract (['z piezo (m)', 'deflection (m)', 'surface distance (m) (m)', 'surface deflection (m) (m)']):... where the units '(m)' were appended twice, once during the initial command run, and again during the reload's command stack exectution. --- hooke/plugin/curve.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hooke/plugin/curve.py b/hooke/plugin/curve.py index 5df5629..b287ee4 100644 --- a/hooke/plugin/curve.py +++ b/hooke/plugin/curve.py @@ -137,7 +137,7 @@ class CurveCommand (Command): pass # no need to place duplicate calls on the stack. else: curve.command_stack.append(CommandMessage( - self.name, params)) + self.name, dict(params))) class BlockCommand (CurveCommand): -- 2.26.2