Commit d68ff943 authored by Spencer Du's avatar Spencer Du

update

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