Commit 2dbcb96f authored by Spencer Du's avatar Spencer Du

update

parent 9744b051
......@@ -277,7 +277,6 @@ class Ui_Laser(object):
except Exception as e:
pass
else:
# self.pushButton_9.clicked.connect(self.printValue)
self.pushButton_9.clicked.disconnect(self.printValue)
self.verticalSlider.setValue(0)
self.lineEdit.clear()
......@@ -340,7 +339,6 @@ class Ui_Laser(object):
except Exception as e:
pass
else:
# self.pushButton_10.clicked.connect(self.printValue2)
self.pushButton_10.clicked.disconnect(self.printValue2)
self.verticalSlider_2.setValue(0)
self.lineEdit_2.clear()
......@@ -405,7 +403,6 @@ class Ui_Laser(object):
pass
else:
# self.pushButton_11.clicked.connect(self.printValue3)
self.pushButton_11.clicked.disconnect(self.printValue3)
self.verticalSlider_3.setValue(0)
self.lineEdit_3.clear()
......@@ -470,7 +467,6 @@ class Ui_Laser(object):
pass
else:
# self.pushButton_12.clicked.connect(self.printValue4)
self.pushButton_12.clicked.disconnect(self.printValue4)
self.verticalSlider_4.setValue(0)
self.lineEdit_4.clear()
......@@ -535,7 +531,6 @@ class Ui_Laser(object):
pass
else:
# self.pushButton_13.clicked.connect(self.printValue5)
self.pushButton_13.clicked.disconnect(self.printValue5)
self.verticalSlider_5.setValue(0)
self.lineEdit_5.clear()
......@@ -600,7 +595,6 @@ class Ui_Laser(object):
pass
else:
# self.pushButton_14.clicked.connect(self.printValue6)
self.pushButton_14.clicked.disconnect(self.printValue6)
self.verticalSlider_6.setValue(0)
self.lineEdit_6.clear()
......@@ -619,36 +613,6 @@ class Ui_Laser(object):
client.loop_stop()
print("638nm laser turned off")
# else:
# try:
# self.pushButton_9.clicked.disconnect(self.printValue)
# self.verticalSlider.setValue(0)
# self.lineEdit.clear()
# except Exception as e:
# config = configparser.RawConfigParser()
# config.read("laser.ini")
# self.verticalSlider.setValue(config.getint("445nm", "intensity"))
# self.lineEdit.setText(str(config.getint("445nm", "intensity")))
# except:
# if os.path.exists("laser.ini"):
# try:
# config = configparser.RawConfigParser()
# config.read("laser.ini")
# self.verticalSlider.setValue(config.getint("445nm", "intensity"))
# self.lineEdit.setText(str(config.getint("445nm", "intensity")))
# except Exception as e:
# print("Laser config does not exist")
# self.pushButton_10.clicked.connect(self.printValue2)
# self.pushButton_11.clicked.connect(self.printValue3)
# self.pushButton_12.clicked.connect(self.printValue4)
# self.pushButton_13.clicked.connect(self.printValue5)
# self.pushButton_14.clicked.connect(self.printValue6)
def printValue(self):
if not os.path.exists("laser.ini"):
textboxValue = self.lineEdit.text()
......@@ -851,7 +815,10 @@ class Ui_Laser(object):
except Exception as e:
pass
config.set("515nm", "intensity", textboxValue)
config.add_section("Subscriptions")
try:
config.add_section("Subscriptions")
except Exception as e:
pass
config.set("Subscriptions", "515nm", "microscope/light_sheet_microscope/UI/laser/445nm")
config.write(f)
......@@ -917,7 +884,10 @@ class Ui_Laser(object):
except Exception as e:
pass
config.set("561nm", "intensity", textboxValue4)
config.add_section("Subscriptions")
try:
config.add_section("Subscriptions")
except Exception as e:
pass
config.set("Subscriptions", "561nm", "microscope/light_sheet_microscope/UI/laser/561nm")
config.write(f)
......@@ -983,6 +953,10 @@ class Ui_Laser(object):
except Exception as e:
pass
config.set("594nm", "intensity", textboxValue5)
try:
config.add_section("Subscriptions")
except Exception as e:
pass
config.set("Subscriptions", "594nm", "microscope/light_sheet_microscope/UI/laser/594nm")
config.write(f)
......@@ -1049,6 +1023,10 @@ class Ui_Laser(object):
except Exception as e:
pass
config.set("638nm", "intensity", textboxValue6)
try:
config.add_section("Subscriptions")
except Exception as e:
pass
config.set("Subscriptions", "638nm", "microscope/light_sheet_microscope/UI/laser/638nm")
config.write(f)
......@@ -1168,7 +1146,7 @@ class Ui_Laser(object):
client.loop_stop()
self.pushButton_8.setChecked(False)
self.pushButton.setChecked(False)
self.pushButton.setCheckable(False)
# self.pushButton.setCheckable(False)
try:
self.pushButton.clicked.disconnect(self.btnstate)
except Exception as e:
......@@ -1181,7 +1159,7 @@ class Ui_Laser(object):
self.lineEdit.clear()
self.pushButton_2.setChecked(False)
self.pushButton_2.setCheckable(False)
# self.pushButton_2.setCheckable(False)
try:
self.pushButton_2.clicked.disconnect(self.btnstate2)
except Exception as e:
......@@ -1194,7 +1172,7 @@ class Ui_Laser(object):
self.lineEdit_2.clear()
self.pushButton_3.setChecked(False)
self.pushButton_3.setCheckable(False)
# self.pushButton_3.setCheckable(False)
try:
self.pushButton_3.clicked.disconnect(self.btnstate3)
except Exception as e:
......@@ -1207,7 +1185,7 @@ class Ui_Laser(object):
self.lineEdit_3.clear()
self.pushButton_4.setChecked(False)
self.pushButton_4.setCheckable(False)
# self.pushButton_4.setCheckable(False)
try:
self.pushButton_4.clicked.disconnect(self.btnstate4)
except Exception as e:
......@@ -1220,7 +1198,7 @@ class Ui_Laser(object):
self.lineEdit_4.clear()
self.pushButton_5.setChecked(False)
self.pushButton_5.setCheckable(False)
# self.pushButton_5.setCheckable(False)
try:
self.pushButton_5.clicked.disconnect(self.btnstate5)
except Exception as e:
......@@ -1233,7 +1211,7 @@ class Ui_Laser(object):
self.lineEdit_5.clear()
self.pushButton_6.setChecked(False)
self.pushButton_6.setCheckable(False)
# self.pushButton_6.setCheckable(False)
try:
self.pushButton_6.clicked.disconnect(self.btnstate6)
except Exception as e:
......
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