Store a copy of params in CurveCommand._add_to_command_stack.
authorW. Trevor King <wking@drexel.edu>
Mon, 30 Aug 2010 17:56:49 +0000 (13:56 -0400)
committerW. Trevor King <wking@drexel.edu>
Mon, 30 Aug 2010 17:56:49 +0000 (13:56 -0400)
commitff5770d43d76d7a96652cd887b30a66d87afd5a9
tree908346acec48ef15e62e9d5aea8dc5a02b6a7bb7
parent78e658614176dcca603f9a38323084a169943b26
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 <class 'hooke.command.Failure'>:
      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