Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
Climate Lab Test Stand
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
MSK-SW
Low-Level Radio Frequency
Climate Lab
Climate Lab Test Stand
Commits
2d600720
Commit
2d600720
authored
2 years ago
by
Sai Lakhan Ekal
Browse files
Options
Downloads
Patches
Plain Diff
Imported whole module rather than class
parent
eced859a
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Python_script/climate_chamber.py
+5
-3
5 additions, 3 deletions
Python_script/climate_chamber.py
with
5 additions
and
3 deletions
Python_script/climate_chamber.py
+
5
−
3
View file @
2d600720
...
...
@@ -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
C
limate
C
hamber
D
ummy
(
hostname
,
target_accuracy
)
return
c
limate
_c
hamber
_d
ummy
.
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
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment