Skip to content

Commit 8f6ee9f

Browse files
Annie's changes from PR 1107
1 parent 34b667d commit 8f6ee9f

File tree

2 files changed

+2
-14
lines changed

2 files changed

+2
-14
lines changed

src/navigate/model/device_startup_functions.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -624,11 +624,6 @@ def load_devices(
624624
]["hardware"]["type"]
625625

626626
if device_type not in devices_dict["daq"]:
627-
if device_type == "asi.ASI":
628-
devices_dict["daq"][device_type] = start_daq(
629-
configuration, device_type, microscope_name
630-
)
631-
else:
632-
devices_dict["daq"][device_type] = start_daq(configuration, device_type)
627+
devices_dict["daq"][device_type] = start_daq(configuration, device_type, microscope_name)
633628

634629
return devices_dict

src/navigate/model/devices/galvo/asi.py

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -199,14 +199,7 @@ def adjust(self, exposure_times, sweep_times):
199199
# Duty cycle must be either 0, 50, or 100
200200
# If the duty cycle is not 0, 50, or 100, it will round to the nearest value
201201
if duty_cycle not in (0, 50, 100):
202-
temp = duty_cycle
203-
remainder = duty_cycle % 100
204-
if remainder < 25:
205-
duty_cycle = temp - remainder
206-
elif remainder < 75:
207-
duty_cycle = temp - remainder + 50
208-
else:
209-
duty_cycle = 100
202+
duty_cycle = round(duty_cycle / 50) * 50
210203
logger.debug(
211204
f"Invalid duty cycle given. Duty cycle value corrected to {duty_cycle}"
212205
)

0 commit comments

Comments
 (0)