Conversation
Add "Wait for the camera before running the script" option to the sequence termination actions. When enabled together with "Warm the camera", the end-of-sequence script and the shutdown action are delayed until the camera actually reaches its end temperature (with a 15 minute safety timeout), instead of firing immediately after the warm-up command is issued. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014QDaXC2gRibCBcDyAaghEn
…finalize Replace the camera-temperature polling with a plain configurable delay (in minutes) before running the termination script and/or shutting down: simpler, doesn't depend on the camera driver reporting temperature correctly, and works for any reason to wait (e.g. giving the camera time to warm up). Also fixes a race flagged in review: starting the wait timer used to return from RunEndAction immediately, but callers still went on to fire onEndSequence and clear the "finalizing" state right away, before the deferred script/shutdown actually ran. A sequence could then be restarted while the previous one's termination action was still pending, and it would run with the new sequence's script settings. The finalize/cleanup code at each call site is now a callback invoked once the termination actions actually complete (immediately when no delay is requested, or from the timer once it fires). Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014QDaXC2gRibCBcDyAaghEn
RunErrorAction passed its completion callback straight into RunEndAction, so on the no-delay path the callback (finalize/notify) fired before OnErrorScript ran, and on the delay path OnErrorScript ran before the delayed end action instead of after it. Route OnErrorScript through its own step (RunErrorActionScript) that runs after RunEndAction's actions complete and only then invokes the original callback, so the ordering no longer depends on whether a delay is active. Also reset FWaiting in StopSequenceFinalize so a stopped/aborted sequence isn't left reporting as waiting. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014QDaXC2gRibCBcDyAaghEn
Owner
|
Just a general question for now. |
Contributor
Author
|
Because time.sleep in an external script can be less reliable than directly in CCDCiel. |
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.
Summary
/Termination/WaitScript,/Termination/WaitMinutes).Note: argument support for termination scripts (start/end/error script) already existed via the script selection dialog's parameter field, so it was not touched here. MQTT notifications for unattended mode are intentionally left out of this PR and will be addressed separately.
🤖 Generated with Claude Code
Summary by CodeRabbit