@@ -98,7 +98,7 @@ def sendCameraSettings(self):
98
98
sens : int = int (self .camera_sensitivity_line .text ())
99
99
self .ws .send (f"CAMERA_SETTINGS@@{ exp_ns } ,{ sens } " )
100
100
except Exception as e :
101
- self .show_error_popup (f"Can't start recording : { e } " )
101
+ self .show_error_popup (f"Can't set camera parameters : { e } " )
102
102
self .save_user_prefs ()
103
103
sys .exit ()
104
104
@@ -115,25 +115,21 @@ def startRec(self):
115
115
self .save_user_prefs ()
116
116
sys .exit ()
117
117
118
- def enableFocus (self ):
118
+ def startAutofocus (self ):
119
119
try :
120
- if self .unlock_focus_btn .isEnabled ():
121
- self .ws .send ("UNLOCK_FOCUS" )
122
- self .unlock_focus_btn .setEnabled (False )
123
- self .lock_focus_btn .setEnabled (True )
120
+ if self .start_autofocus_btn .isEnabled ():
121
+ self .ws .send ("START_AUTOFOCUS" )
124
122
except Exception as e :
125
- self .show_error_popup (f"Can't send enable focus command: { e } " )
123
+ self .show_error_popup (f"Can't send start autofocus command: { e } " )
126
124
self .save_user_prefs ()
127
125
sys .exit ()
128
126
129
- def lockFocus (self ):
127
+ def stopAutofocus (self ):
130
128
try :
131
- if self .lock_focus_btn .isEnabled ():
132
- self .ws .send ("LOCK_FOCUS" )
133
- self .unlock_focus_btn .setEnabled (True )
134
- self .lock_focus_btn .setEnabled (False )
129
+ if self .stop_autofocus_btn .isEnabled ():
130
+ self .ws .send ("STOP_AUTOFOCUS" )
135
131
except Exception as e :
136
- self .show_error_popup (f"Can't send lock focus command: { e } " )
132
+ self .show_error_popup (f"Can't send stop autofocus focus command: { e } " )
137
133
self .save_user_prefs ()
138
134
sys .exit ()
139
135
@@ -246,7 +242,7 @@ def setupUi(self, MainWindow):
246
242
font .setPointSize (20 )
247
243
248
244
#
249
- # SESSION
245
+ # SESSION panel (left side)
250
246
sess_label = QtWidgets .QLabel ("Session ID:" )
251
247
sess_label .setFont (font )
252
248
@@ -262,22 +258,19 @@ def setupUi(self, MainWindow):
262
258
263
259
#
264
260
# FOCUS CONTROL
265
- self .unlock_focus_btn = QtWidgets .QPushButton ()
266
- self .unlock_focus_btn .setFont (font )
267
- self .unlock_focus_btn .setObjectName ("unlock_focus_button" )
268
- self .unlock_focus_btn .clicked .connect (self .enableFocus )
261
+ self .start_autofocus_btn = QtWidgets .QPushButton ()
262
+ self .start_autofocus_btn .setFont (font )
263
+ self .start_autofocus_btn .clicked .connect (self .startAutofocus )
269
264
270
- self .lock_focus_btn = QtWidgets .QPushButton ()
271
- self .lock_focus_btn .setFont (font )
272
- self .lock_focus_btn .setObjectName ("lock_focus_button" )
273
- self .lock_focus_btn .clicked .connect (self .lockFocus )
274
- self .lock_focus_btn .setEnabled (False )
265
+ self .stop_autofocus_btn = QtWidgets .QPushButton ()
266
+ self .stop_autofocus_btn .setFont (font )
267
+ self .stop_autofocus_btn .clicked .connect (self .stopAutofocus )
275
268
276
269
focus_layout = QHBoxLayout ()
277
270
focus_layout .addStretch (1 )
278
- focus_layout .addWidget (self .unlock_focus_btn , 1 )
271
+ focus_layout .addWidget (self .start_autofocus_btn , 1 )
279
272
# focus_layout.addStretch(1)
280
- focus_layout .addWidget (self .lock_focus_btn , 1 )
273
+ focus_layout .addWidget (self .stop_autofocus_btn , 1 )
281
274
focus_layout .addStretch (1 )
282
275
283
276
#
@@ -403,19 +396,30 @@ def setupUi(self, MainWindow):
403
396
remote_control_layout .addLayout (clients_info_layout )
404
397
405
398
#
406
- # Local Analysis layout
399
+ #
400
+ # Local Analysis layout (Right side panel)
401
+
402
+ #
403
+ # DOWNLOAD PATH
407
404
local_dir_label = QtWidgets .QLabel ("Local download dir:" )
408
405
local_dir_label .setFont (font )
409
406
self .local_dir_path_edit = QtWidgets .QLineEdit ()
410
407
local_dir_layout = QHBoxLayout ()
411
408
local_dir_layout .addWidget (local_dir_label )
412
409
local_dir_layout .addStretch (1 )
413
410
414
-
411
+ #
412
+ # PLAY
415
413
show_latest_video_btn = QtWidgets .QPushButton (text = "Play Leader" )
416
414
show_latest_video_btn .setFont (font )
417
415
show_latest_video_btn .clicked .connect (self .showLatestMasterVideo )
418
416
417
+ #
418
+ #
419
+
420
+
421
+ #
422
+ # Compose session panel layout
419
423
local_analysis_layout = QVBoxLayout ()
420
424
local_analysis_layout .addLayout (local_dir_layout )
421
425
local_analysis_layout .addWidget (self .local_dir_path_edit )
@@ -470,8 +474,8 @@ def retranslateUi(self, MainWindow):
470
474
471
475
self .download_prefix_text .setPlaceholderText (_translate ("MainWindow" , " Enter Session Prefix" ))
472
476
self .download_btn .setText (_translate ("MainWindow" , "Download" ))
473
- self .unlock_focus_btn .setText (_translate ("MainWindow" , "Unlock Focus " ))
474
- self .lock_focus_btn .setText (_translate ("MainWindow" , "Lock Focus " ))
477
+ self .start_autofocus_btn .setText (_translate ("MainWindow" , "Start Autofocus " ))
478
+ self .stop_autofocus_btn .setText (_translate ("MainWindow" , "Stop Autofocus " ))
475
479
476
480
self .prefix_list_btn .setText (_translate ("MainWindow" , "Prefix List" ))
477
481
self .phase_align_btn .setText (_translate ("MainWindow" , "Align Phases" ))
0 commit comments