Skip to content

Commit

Permalink
more integration and fixing
Browse files Browse the repository at this point in the history
  • Loading branch information
ianohara committed Dec 28, 2024
1 parent 885a6e6 commit 093d1b7
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 640 deletions.
22 changes: 0 additions & 22 deletions software/control/core/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -789,18 +789,6 @@ def update_pos(self, microcontroller):
print('joystick button pressed')
microcontroller.signal_joystick_button_pressed_event = False

# TODO(imo): This should be don in the CephlaStage init since we have the encoder info there already
def configure_encoder(self, axis, transitions_per_revolution,flip_direction):
self.microcontroller.configure_stage_pid(axis, transitions_per_revolution=int(transitions_per_revolution), flip_direction=flip_direction)

# TODO(imo): This should be done in the CephlaStage init
def set_pid_control_enable(self, axis, enable_flag):
self.pid_enable_flag[axis] = enable_flag
if self.pid_enable_flag[axis] is True:
self.microcontroller.turn_on_stage_pid(axis)
else:
self.microcontroller.turn_off_stage_pid(axis)

# TODO(imo): This is only called from a closeEvent. This isn't guaranteed to run - do we need to do this?
def turnoff_axis_pid_control(self):
for i in range(len(self.pid_enable_flag)):
Expand All @@ -814,16 +802,6 @@ def keep_scan_begin_position(self, x, y):
self.scan_begin_position_x = x
self.scan_begin_position_y = y

# TODO(imo): This is only called in an init, so it should be done in CephlaStage init via CephlaStage specific axis config
def set_axis_PID_arguments(self, axis, pid_p, pid_i, pid_d):
self.microcontroller.set_pid_arguments(axis, pid_p, pid_i, pid_d)

# TODO(imo): Can we just have this be a part of move_z and move_z_to? Or does it need to be a separate axis concept?
def set_piezo_um(self, z_piezo_um):
dac = int(65535 * (z_piezo_um / OBJECTIVE_PIEZO_RANGE_UM))
dac = 65535 - dac if OBJECTIVE_PIEZO_FLIP_DIR else dac
self.microcontroller.analog_write_onboard_DAC(7, dac)


class SlidePositionControlWorker(QObject):

Expand Down
214 changes: 0 additions & 214 deletions software/control/gui.py

This file was deleted.

12 changes: 0 additions & 12 deletions software/control/gui_hcs.py
Original file line number Diff line number Diff line change
Expand Up @@ -587,16 +587,6 @@ def setupMultiWindowLayout(self):
def makeConnections(self):
self.streamHandler.signal_new_frame_received.connect(self.liveController.on_new_frame)
self.streamHandler.packet_image_to_write.connect(self.imageSaver.enqueue)
# self.streamHandler.packet_image_for_tracking.connect(self.trackingController.on_new_frame)
# TODO(imo): Fix ui position updates since removal of navigation controller
# self.navigationController.xPos.connect(lambda x: self.navigationWidget.label_Xpos.setText("{:.2f}".format(x) + " mm"))
# self.navigationController.yPos.connect(lambda x: self.navigationWidget.label_Ypos.setText("{:.2f}".format(x) + " mm"))
# self.navigationController.zPos.connect(lambda x: self.navigationWidget.label_Zpos.setText("{:.2f}".format(x) + " μm"))

# if SHOW_NAVIGATION_BAR:
# self.navigationController.xPos.connect(self.navigationBarWidget.update_x_position)
# self.navigationController.yPos.connect(self.navigationBarWidget.update_y_position)
# self.navigationController.zPos.connect(self.navigationBarWidget.update_z_position)

# TODO(imo): Fix joystick after removal of navigation controller
# if ENABLE_TRACKING:
Expand All @@ -609,15 +599,13 @@ def makeConnections(self):

if ENABLE_FLEXIBLE_MULTIPOINT:
self.flexibleMultiPointWidget.signal_acquisition_started.connect(self.toggleAcquisitionStart)
# self.flexibleMultiPointWidget.signal_z_stacking.connect(self.multipointController.set_z_stacking_config)
if ENABLE_STITCHER:
self.flexibleMultiPointWidget.signal_stitcher_widget.connect(self.toggleStitcherWidget)
self.flexibleMultiPointWidget.signal_acquisition_channels.connect(self.stitcherWidget.updateRegistrationChannels)
self.flexibleMultiPointWidget.signal_stitcher_z_levels.connect(self.stitcherWidget.updateRegistrationZLevels)

if ENABLE_WELLPLATE_MULTIPOINT:
self.wellplateMultiPointWidget.signal_acquisition_started.connect(self.toggleAcquisitionStart)
# self.wellplateMultiPointWidget.signal_z_stacking.connect(self.multipointController.set_z_stacking_config)
if ENABLE_STITCHER:
self.wellplateMultiPointWidget.signal_stitcher_widget.connect(self.toggleStitcherWidget)
self.wellplateMultiPointWidget.signal_acquisition_channels.connect(self.stitcherWidget.updateRegistrationChannels)
Expand Down
Loading

0 comments on commit 093d1b7

Please sign in to comment.