Skip to content

scan: Set stopping at _runctx_scan_runner finalization

Valentin Valls requested to merge set-stopping-state into master

Closes #4251 (closed)

This enforce to have the following state machine when the scan is aborted:

  • PREPARINGSTOPPINGUSER_ABORTED/FAILED

Previously the state machine was the following:

  • PREPARINGUSER_ABORTED/FAILED

Notice that a ctrl-c durring the STARTING was already working this way:

  • PREPARINGSTARTING (which is RUNNING) → STOPPINGUSER_ABORTED/FAILED
    • With my patch, in this case, _set_state(STOPPING) will be called twice, but the second will basically do nothing.

During STOPPING, presets are stopped, and sometimes motors are returning to the origin, that's an important step.

No idea if it's the good way to fix this missing step. Also, this maybe this have side effects on other sub systems (flint/blissdata/writer), i can't tell.

Edited by Valentin Valls

Merge request reports