Repository navigation
I15-1: Add timeout calculations to slow attenuator - #2219
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2219 +/- ##
=======================================
Coverage 99.28% 99.28%
=======================================
Files 366 366
Lines 14418 14437 +19
=======================================
+ Hits 14315 14334 +19
Misses 103 103 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
| Will raise ValueError if the percentage is not possible. | ||
| """ | ||
| await self.transmission.set(value) | ||
| await self.transmission.set(value, timeout=self._timeout) |
There was a problem hiding this comment.
Is this timeout value ever going to change? If so, you only calculate it once on initial connect. Would it be better to calculate it dynamically every time on move?
E.g
timeout = await self._calculate_timeout()
await self.transmission.set(value, timeout=timeout)If it never would change, then your current approach is probably correct
There was a problem hiding this comment.
It will only change when the hardware changes, so like maybe if they rip it all out and put new things in, which they've never done before. This seemed a good middle ground between the overhead of recalculating it on every move and the flexibility of not having to worry about changing it again in the future. I can add some comments to that affect though
oliwenmandiamond
left a comment
There was a problem hiding this comment.
Can confirm dodal connect works. Nit: Add a comment in your connect method to say it shouldn't change dynamically and is okay to calculate once.
Fixes #2215
Instructions to reviewer on how to test:
dodal connect i15-1passesChecks for reviewer
dodal connect ${BEAMLINE}