Skip to content

Commit

Permalink
Check if configuration has been observed in auto-pilot preload
Browse files Browse the repository at this point in the history
  • Loading branch information
albireox committed May 28, 2024
1 parent 0ba7784 commit c866385
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# Changelog

## Next version

### 🔧 Fixed

* Fix an issue with the new auto-pilot loading a new design during an exposure when a fully loaded one was available.


## 1.2.0 - May 26th, 2024

### 🚀 New
Expand Down
9 changes: 6 additions & 3 deletions src/hal/macros/auto_pilot.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,10 +107,13 @@ async def prepare(self):
if self.system_state.boss_exposure_state is None:
raise MacroError("Cannot determine BOSS exposure state.")

time_remaining = self.system_state.exposure_time_remaining
if time_remaining > 0:
# Is there a configuration loaded and has it been observed?
configuration = self.helpers.jaeger.configuration
observed = configuration and configuration.observed

if self.system_state.exposure_time_remaining > 0:
# We are exposing.
if self.helpers.jaeger.preloaded:
if self.helpers.jaeger.preloaded or not observed:
# There is already a preloaded configuration. Just wait
# until the exposure is done.
self._auto_pilot_message("Waiting for exposure before loading design")
Expand Down

0 comments on commit c866385

Please sign in to comment.