Skip to content

Commit

Permalink
Merge pull request #122 from DiamondLightSource/artemis_808_pin_faili…
Browse files Browse the repository at this point in the history
…ng_in_tests

Fix tests and race condition in finding pin tip
  • Loading branch information
dperl-dls authored Jul 18, 2023
2 parents 77d9ee6 + 521239e commit b625b9e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/dodal/devices/areadetector/plugins/MXSC.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,13 @@ class PinTipDetect(Device):
def update_tip_if_valid(self, value, **_):
current_value = (value, self.tip_y.get())
if current_value != self.INVALID_POSITION:
self.triggered_tip.set(current_value)
self.triggered_tip.put(current_value)
return True

def trigger(self) -> Status:
subscription_status = SubscriptionStatus(
self.tip_x, self.update_tip_if_valid, run=False
) # Do not run on creation as the PV updates often and can cause race conditions
self.tip_x, self.update_tip_if_valid, run=True
)

def set_to_default_and_finish(timeout_status: Status):
try:
Expand Down

0 comments on commit b625b9e

Please sign in to comment.