Skip to content
Snippets Groups Projects
Commit 2d600720 authored by Sai Lakhan Ekal's avatar Sai Lakhan Ekal
Browse files

Imported whole module rather than class

parent eced859a
No related branches found
No related tags found
No related merge requests found
......@@ -2,7 +2,7 @@
import pyvisa
import time
from climate_chamber_dummy import ClimateChamberDummy
import climate_chamber_dummy
MONITOR_COMMAND_DELAY = 0.2 # program-related delay is 0.3
......@@ -13,12 +13,14 @@ connect to either climate chamber or climate chamber dummy
depends on the hostname
'''
def create_chamber(hostname, target_accuracy):
if hostname == 'localhost':
return ClimateChamberDummy(hostname, target_accuracy)
return climate_chamber_dummy.get_climate_chamber_dummy(target_accuracy)
else:
return ClimateChamber(hostname, target_accuracy)
class ClimateChamber:
def __init__(self, ip_address, target_accuracy):
"""
......@@ -227,7 +229,7 @@ class ClimateChamber:
def is_temperature_reached(self):
# read_temperature returns measurement value and setpoint. Cache it so we don't have to query the chamber twice
# read_temperature returns measurement value and setpoint. Cache it, so we don't have to query the chamber twice
temperature_response = self.read_temperature()
if abs(temperature_response[0] - temperature_response[1]) < self.target_accuracy[0]:
return True
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment