Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MX Energy Scan GUI changes #223

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions lsdcGui.py
Original file line number Diff line number Diff line change
Expand Up @@ -3670,6 +3670,18 @@ def calcLifetimeCB(self):
self.sampleLifetimeReadback_ledit.setText(lifeTime_s)
self.sampleLifetimeReadback_ledit.setStyleSheet("color : green");

def setEscanTransCB(self):
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this should have been with the previous commit so that you have a cohesive change where you can check the callback while having the GUI connection

try:
if (float(self.escan_transmission_ledit.text()) > 1.0 or float(self.escan_transmission_ledit.text()) < 0.001):
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is there any fundamental difference between this and setTransCB? couldn't you refactor setTransCB so it can work with this?

self.popupServerMessage("Transmission must be 0.001-1.0")
return
except ValueError as e:
self.popupServerMessage("Please enter a valid number")
return
comm_s = "setTrans(" + str(self.escan_transmission_ledit.text()) + ")"
logger.info(comm_s)
self.send_to_server(comm_s)


def setTransCB(self):
if (float(self.transmission_ledit.text()) > 1.0 or float(self.transmission_ledit.text()) < 0.001):
Expand Down