McDermott-Group / servers

Public repo that stores LabRAD servers and other non-measurement related code
0 stars 2 forks source link

No need for setting `TemperaturesForGUI` in cryomech_cp2800_compressor.py #94

Closed patzinak closed 7 years ago

patzinak commented 7 years ago

@nmGit There is no need for this setting. The servers should know absolutely nothing about the existence of any GUI. If you really have to keep it, please rename it to Current Temperatures and remove the unnecessary print statement, whitespace and add a line to separate from the next method.

patzinak commented 7 years ago

@roboguy222 Do you use this setting anywhere in your ADR code? If not, I'll go ahead and rename it to 'Current Temperatures'.

nmGit commented 7 years ago

That is fine, you will need to change the setting names in LeidenGui.py:

Compressor = Device("Compressor") Compressor.connection(cxn) Compressor.setServerName("cp2800_compressor") Compressor.addButton("Turn Off", "You are about to turn the compressor off.", "stop", None) Compressor.addButton("Turn On", "You are about to turn the compressor on.", "start", None) Compressor.addParameter("Input Water Temperature", "temperaturesforgui", None, 0, 'degC', 1) Compressor.addParameter("Output Water Temperature", "temperaturesforgui", None, 1, 'degC', 1) Compressor.addParameter("Helium Temperature", "temperaturesforgui", None, 2, 'degC', 1) Compressor.addParameter("Oil Temperature", "temperaturesforgui", None, 3, 'degC', 1) Compressor.selectDeviceCommand("select_device", 0) Compressor.setYLabel("Temperature") Compressor.addPlot() Compressor.begin() self.devices.append(Compressor)

nmGit commented 7 years ago

All that that setting does is format the readings in a way that MView is happy with.

patzinak commented 7 years ago

Yes, I understand this. I'm totally fine to keep the setting but it should be renamed to "Only Current Temperatures" to reflect its actual difference from the other setting. Again, the existence of GUIs should not have any influence on the design of the servers.

roboguy222 commented 7 years ago

I do not use this feature anywhere, no.