AutofocusAfterTimeTrigger and AutofocusAfterTemperatureChangeTrigger incorrectly fire during session start or target start without a reason

Issue #1267 closed
Oleg Ignat created an issue

I use advanced sequencer to capture two targets per imaging night. I use AutofocusAfterTimeTrigger and AutofocusAfterTemperatureChangeTrigger to make sure that my focus stays sharp. Unfortunately, I observed that these two triggers don’t track “last known temperature” or “last focus time” correctly. I have an explicit RunAutofocus instruction in my sequence to force the focus at the beginning of the sequence. Even though I do it. these two triggers fire shortly after the first exposure regardless and cause re-focus to occur. The same also happens when I move from one target to another, one of these two will fire even though I perform RunAutofocus explicitly.

Things get even weirder if I reset completed sequence from the previous night. These two will continuously fire after every frame, unless I delete these triggers and add them back into the sequence. They do not know when the last autofocus occurred.

The same is true after meridian flip. Even though meridian flip performs autofocus run, these two triggers fire regardless and force another refocus shortly after meridian flip (1 frame after meridian flip to be precise).

I am attaching a sample sequence log from a reset sequence. Notice that there is an explicit auto focus at this time:

2023-11-21T18:18:47.7915|INFO|SequenceTrigger.cs|Run|114|Starting Trigger: AutofocusAfterTemperatureChangeTrigger, Amount: 2.5°

Even though I just completed this run less than 7 minutes eariler:

2023-11-21T18:11:40.4042|INFO|SequenceItem.cs|Run|206|Starting Category: Focuser, Item: RunAutofocus

It is a usability bug. I can’t just setup a sequence and forget it. I have to explicilty delete and add these two triggers into my sequence every night.

Comments (5)

  1. Oleg Ignat reporter

    Thanks for looking into this so quickly! Is the bug in how history is resolved inside the ShouldTrigger() method?

  2. Stefan B repo owner

    They look into the history yes. When no image is available in the 2.x versions there was no autofocus entry then.

  3. Log in to comment