Issue #411 - Adding pause button compatibility in imager service#930
Closed
Issue #411 - Adding pause button compatibility in imager service#930
Conversation
Collaborator
|
This was already merged in #929 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Acquisition Pause/Resume Feature
Branch (Python):
Feature-PauseDashboard Branch (Node-RED):
Feature-PauseDate: 2026-03-30
Summary
Adds the ability to pause and resume an active acquisition. Pause takes effect between frames — it will not interrupt a pump mid-flow or a capture mid-save, keeping the acquisition state clean and resumable.
Python Changes
controller/imager/stopflow.py— Core pause logicNew state: Added
_pausedthreading.Event toRoutine.__init__().Modified
run_step()— Added a blocking loop at the top of each step (after completion/interruption checks, before the pump runs):This means:
New methods:
New property:
controller/imager/main.py— MQTT integrationImager._handle_new_message()— Added two new action handlers:ImageAcquisitionRoutine— Addedpause()andresume()methods that delegate to the routine and publish MQTT status:Node-RED Changes
All changes are in
flows.jsonon the Acquisition tab (71ede8b7dd88d90e).UI Template (
bodynode —79bccc0355eb5d87)New data property:
acq_paused: falseNew button (below Start/Stop, visible only during acquisition):
New method:
Updated computed properties:
formattedStatus: "Paused" → "Acquisition paused. You may adjust settings.", "Resumed" → "Acquisition resumed."statusColor: "Paused" → orange, "Resumed" → greenUpdated status watcher:
acq_paused = trueon "paused" status,falseon "resumed"acq_paused = falsewhen acquisition ends (done/stopped/error)New Flow Nodes
pause?a1b2c3d4e5f60001pause_controltopic separately from normal acq messagespause/resumea1b2c3d4e5f60002msg.topic = "imager/image"for MQTT publishMessage Routing
MQTT API
New Actions
imager/image{"action": "pause"}imager/image{"action": "resume"}New Status Messages
status/imager{"status": "Paused"}status/imager{"status": "Resumed"}Behavior
acq_status === 'on')