Commit bd8e2da4 authored by Spencer Du's avatar Spencer Du

update

parent cbde7737
......@@ -23,4 +23,12 @@ async def main():
# Then we'll just send it an empty message and wait for a response
reply : DataMessage = await ask(cameras, Message())
print(reply.data)
asyncio.get_event_loop().run_until_complete(main())
\ No newline at end of file
asyncio.get_event_loop().run_until_complete(main())
def subscribe():
client = embedded()
client.run()
client.loop_start()
client.subscribe("microscope/light_sheet_microscope/UI/cameras/#")
subscribe()
\ No newline at end of file
This diff is collapsed.
......@@ -23,4 +23,12 @@ async def main():
# Then we'll just send it an empty message and wait for a response
reply : DataMessage = await ask(fw, Message())
print(reply.data)
asyncio.get_event_loop().run_until_complete(main())
\ No newline at end of file
asyncio.get_event_loop().run_until_complete(main())
def subscribe():
client = embedded()
client.run()
client.loop_start()
client.subscribe("microscope/light_sheet_microscope/UI/filter wheel/#")
subscribe()
\ No newline at end of file
......@@ -1171,12 +1171,12 @@ class Ui_Laser(object):
config = configparser.RawConfigParser()
config.read("laser.ini")
try:
if config["laser"]["status"] == "off":
if config["Laser"]["status"] == "off":
self.pushButton_8.setChecked(False)
except Exception as e:
pass
try:
if config["laser"]["status"] == "on":
if config["Laser"]["status"] == "on":
try:
if config["445nm"]["status"] == "on":
self.pushButton.setCheckable(True)
......
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'design.ui'
#
# Created by: PyQt5 UI code generator 5.13.2
#
# WARNING! All changes made in this file will be lost!
......@@ -23,4 +23,12 @@ async def main():
# Then we'll just send it an empty message and wait for a response
reply : DataMessage = await ask(stages, Message())
print(reply.data)
asyncio.get_event_loop().run_until_complete(main())
\ No newline at end of file
asyncio.get_event_loop().run_until_complete(main())
def subscribe():
client = embedded()
client.run()
client.loop_start()
client.subscribe("microscope/light_sheet_microscope/UI/stage/#")
subscribe()
\ No newline at end of file
......@@ -18,7 +18,7 @@ import sys
import time
class Ui_Webcam(object):
class Ui_Webcam(QMainWindow):
def setupUi(self, Webcam):
Webcam.setObjectName("Webcam")
Webcam.resize(300, 300)
......@@ -40,8 +40,8 @@ class Ui_Webcam(object):
if not self.available_cameras:
pass #quit
# self.status = QStatusBar()
# self.setStatusBar(self.status)
self.status = QStatusBar()
self.setStatusBar(self.status)
self.save_path = ""
......@@ -58,12 +58,12 @@ class Ui_Webcam(object):
camera_toolbar.setIconSize(QSize(14, 14))
Webcam.addToolBar(camera_toolbar)
photo_action = QAction()
photo_action = QAction(QIcon(os.path.join('images', 'camera-black.png')), "Take photo...", self)
photo_action.setStatusTip("Take photo of current view")
photo_action.triggered.connect(self.take_photo)
camera_toolbar.addAction(photo_action)
change_folder_action = QAction()
change_folder_action = QAction(QIcon(os.path.join('images', 'blue-folder-horizontal-open.png')), "Change save location...", self)
change_folder_action.setStatusTip("Change folder where photos are saved.")
change_folder_action.triggered.connect(self.change_folder)
camera_toolbar.addAction(change_folder_action)
......@@ -76,7 +76,7 @@ class Ui_Webcam(object):
camera_toolbar.addWidget(camera_selector)
# self.setWindowTitle("NSAViewer")
self.setWindowTitle("NSAViewer")
# self.show()
def select_camera(self, i):
......@@ -101,6 +101,7 @@ class Ui_Webcam(object):
timestamp
)))
self.save_seq += 1
print("Image taken")
def change_folder(self):
path = QFileDialog.getExistingDirectory(self, "Snapshot save location", "")
......@@ -122,6 +123,7 @@ class Ui_Webcam(object):
if __name__ == "__main__":
import sys
app = QtWidgets.QApplication(sys.argv)
app.setApplicationName("NSAViewer")
Webcam = QtWidgets.QMainWindow()
ui = Ui_Webcam()
ui.setupUi(Webcam)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment