Commit d68ff943 authored by Spencer Du's avatar Spencer Du

update

parent 98b4c49e
...@@ -65,7 +65,7 @@ class MainWindow(QtWidgets.QMainWindow): ...@@ -65,7 +65,7 @@ class MainWindow(QtWidgets.QMainWindow):
client.run() client.run()
client.loop_start() client.loop_start()
print("Connected to broker") print("\n" + "Connected to broker")
time.sleep(1) time.sleep(1)
print("Subscribing to topic", "microscope/light_sheet_microscope/UI/add device") print("Subscribing to topic", "microscope/light_sheet_microscope/UI/add device")
client.subscribe("microscope/light_sheet_microscope/UI/add device") client.subscribe("microscope/light_sheet_microscope/UI/add device")
...@@ -82,7 +82,7 @@ class MainWindow(QtWidgets.QMainWindow): ...@@ -82,7 +82,7 @@ class MainWindow(QtWidgets.QMainWindow):
client.run() client.run()
client.loop_start() client.loop_start()
print("Connected to broker") print("\n" + "Connected to broker")
time.sleep(1) time.sleep(1)
print("Subscribing to topic", "microscope/light_sheet_microscope/UI/laser") print("Subscribing to topic", "microscope/light_sheet_microscope/UI/laser")
client.subscribe("microscope/light_sheet_microscope/UI/laser") client.subscribe("microscope/light_sheet_microscope/UI/laser")
......
...@@ -330,7 +330,7 @@ class Ui_Laser(object): ...@@ -330,7 +330,7 @@ class Ui_Laser(object):
client = device() client = device()
client.run() client.run()
client.loop_start() client.loop_start()
print("Connected to broker") print("\n" + "Connected to broker")
time.sleep(1) time.sleep(1)
print("Subscribing to topic", "microscope/light_sheet_microscope/UI/laser/445nm") print("Subscribing to topic", "microscope/light_sheet_microscope/UI/laser/445nm")
client.subscribe("microscope/light_sheet_microscope/UI/laser/445nm") client.subscribe("microscope/light_sheet_microscope/UI/laser/445nm")
...@@ -360,7 +360,7 @@ class Ui_Laser(object): ...@@ -360,7 +360,7 @@ class Ui_Laser(object):
client.run() client.run()
client.loop_start() client.loop_start()
print("Connected to broker") print("\n" + "Connected to broker")
time.sleep(1) time.sleep(1)
print("Subscribing to topic", "microscope/light_sheet_microscope/UI/laser/445nm") print("Subscribing to topic", "microscope/light_sheet_microscope/UI/laser/445nm")
client.subscribe("microscope/light_sheet_microscope/UI/laser/445nm") client.subscribe("microscope/light_sheet_microscope/UI/laser/445nm")
...@@ -392,7 +392,7 @@ class Ui_Laser(object): ...@@ -392,7 +392,7 @@ class Ui_Laser(object):
client.run() client.run()
client.loop_start() client.loop_start()
print("Connected to broker") print("\n" + "Connected to broker")
time.sleep(1) time.sleep(1)
print("Subscribing to topic", "microscope/light_sheet_microscope/UI/laser/488nm") print("Subscribing to topic", "microscope/light_sheet_microscope/UI/laser/488nm")
client.subscribe("microscope/light_sheet_microscope/UI/laser/488nm") client.subscribe("microscope/light_sheet_microscope/UI/laser/488nm")
...@@ -422,7 +422,7 @@ class Ui_Laser(object): ...@@ -422,7 +422,7 @@ class Ui_Laser(object):
client.run() client.run()
client.loop_start() client.loop_start()
print("Connected to broker") print("\n" + "Connected to broker")
time.sleep(1) time.sleep(1)
print("Subscribing to topic", "microscope/light_sheet_microscope/UI/laser/488nm") print("Subscribing to topic", "microscope/light_sheet_microscope/UI/laser/488nm")
client.subscribe("microscope/light_sheet_microscope/UI/laser/488nm") client.subscribe("microscope/light_sheet_microscope/UI/laser/488nm")
...@@ -455,7 +455,7 @@ class Ui_Laser(object): ...@@ -455,7 +455,7 @@ class Ui_Laser(object):
client.run() client.run()
client.loop_start() client.loop_start()
print("Connected to broker") print("\n" + "Connected to broker")
time.sleep(1) time.sleep(1)
print("Subscribing to topic", "microscope/light_sheet_microscope/UI/laser/515nm") print("Subscribing to topic", "microscope/light_sheet_microscope/UI/laser/515nm")
client.subscribe("microscope/light_sheet_microscope/UI/laser/515nm") client.subscribe("microscope/light_sheet_microscope/UI/laser/515nm")
...@@ -485,7 +485,7 @@ class Ui_Laser(object): ...@@ -485,7 +485,7 @@ class Ui_Laser(object):
client.run() client.run()
client.loop_start() client.loop_start()
print("Connected to broker") print("\n" + "Connected to broker")
time.sleep(1) time.sleep(1)
print("Subscribing to topic", "microscope/light_sheet_microscope/UI/laser/515nm") print("Subscribing to topic", "microscope/light_sheet_microscope/UI/laser/515nm")
client.subscribe("microscope/light_sheet_microscope/UI/laser/515nm") client.subscribe("microscope/light_sheet_microscope/UI/laser/515nm")
...@@ -517,7 +517,7 @@ class Ui_Laser(object): ...@@ -517,7 +517,7 @@ class Ui_Laser(object):
client.run() client.run()
client.loop_start() client.loop_start()
print("Connected to broker") print("\n" + "Connected to broker")
time.sleep(1) time.sleep(1)
print("Subscribing to topic", "microscope/light_sheet_microscope/UI/laser/561nm") print("Subscribing to topic", "microscope/light_sheet_microscope/UI/laser/561nm")
client.subscribe("microscope/light_sheet_microscope/UI/laser/561nm") client.subscribe("microscope/light_sheet_microscope/UI/laser/561nm")
...@@ -547,7 +547,7 @@ class Ui_Laser(object): ...@@ -547,7 +547,7 @@ class Ui_Laser(object):
client.run() client.run()
client.loop_start() client.loop_start()
print("Connected to broker") print("\n" + "Connected to broker")
time.sleep(1) time.sleep(1)
print("Subscribing to topic", "microscope/light_sheet_microscope/UI/laser/561nm") print("Subscribing to topic", "microscope/light_sheet_microscope/UI/laser/561nm")
client.subscribe("microscope/light_sheet_microscope/UI/laser/561nm") client.subscribe("microscope/light_sheet_microscope/UI/laser/561nm")
...@@ -579,7 +579,7 @@ class Ui_Laser(object): ...@@ -579,7 +579,7 @@ class Ui_Laser(object):
client.run() client.run()
client.loop_start() client.loop_start()
print("Connected to broker") print("\n" + "Connected to broker")
time.sleep(1) time.sleep(1)
print("Subscribing to topic", "microscope/light_sheet_microscope/UI/laser/594nm") print("Subscribing to topic", "microscope/light_sheet_microscope/UI/laser/594nm")
client.subscribe("microscope/light_sheet_microscope/UI/laser/594nm") client.subscribe("microscope/light_sheet_microscope/UI/laser/594nm")
...@@ -609,7 +609,7 @@ class Ui_Laser(object): ...@@ -609,7 +609,7 @@ class Ui_Laser(object):
client.run() client.run()
client.loop_start() client.loop_start()
print("Connected to broker") print("\n" + "Connected to broker")
time.sleep(1) time.sleep(1)
print("Subscribing to topic", "microscope/light_sheet_microscope/UI/laser/594nm") print("Subscribing to topic", "microscope/light_sheet_microscope/UI/laser/594nm")
client.subscribe("microscope/light_sheet_microscope/UI/laser/594nm") client.subscribe("microscope/light_sheet_microscope/UI/laser/594nm")
...@@ -641,7 +641,7 @@ class Ui_Laser(object): ...@@ -641,7 +641,7 @@ class Ui_Laser(object):
client.run() client.run()
client.loop_start() client.loop_start()
print("Connected to broker") print("\n" + "Connected to broker")
time.sleep(1) time.sleep(1)
print("Subscribing to topic", "microscope/light_sheet_microscope/UI/laser/638nm") print("Subscribing to topic", "microscope/light_sheet_microscope/UI/laser/638nm")
client.subscribe("microscope/light_sheet_microscope/UI/laser/638nm") client.subscribe("microscope/light_sheet_microscope/UI/laser/638nm")
...@@ -671,7 +671,7 @@ class Ui_Laser(object): ...@@ -671,7 +671,7 @@ class Ui_Laser(object):
client.run() client.run()
client.loop_start() client.loop_start()
print("Connected to broker") print("\n" + "Connected to broker")
time.sleep(1) time.sleep(1)
print("Subscribing to topic", "microscope/light_sheet_microscope/UI/laser/638nm") print("Subscribing to topic", "microscope/light_sheet_microscope/UI/laser/638nm")
client.subscribe("microscope/light_sheet_microscope/UI/laser/638nm") client.subscribe("microscope/light_sheet_microscope/UI/laser/638nm")
......
import random import random
import asyncio import asyncio
from actorio import Actor, Message, DataMessage, ask, EndMainLoop, Reference from actorio import Actor, Message, DataMessage, ask, EndMainLoop, Reference
import configparser as configparser
import os
from mqtt2 import * from mqtt2 import *
class Laser(Actor): class Laser(Actor):
......
...@@ -8,7 +8,7 @@ class embedded(mqtt.Client): ...@@ -8,7 +8,7 @@ class embedded(mqtt.Client):
def on_message(self, mqtt, userdata, message): def on_message(self, mqtt, userdata, message):
m_decode = str(message.payload.decode("utf-8")) m_decode = str(message.payload.decode("utf-8"))
print("message recieved= " + m_decode) print("\n" + "message recieved= " + m_decode)
# print("File which you want to import(with .py extension)") # print("File which you want to import(with .py extension)")
print("message topic=", message.topic) print("message topic=", message.topic)
print("message qos=", message.qos) print("message qos=", message.qos)
......
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