Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Bliss
bliss
Commits
0d900cac
Commit
0d900cac
authored
Jun 09, 2021
by
Valentin Valls
Browse files
Remove the public get_last_data from the loop object
parent
3613e743
Pipeline
#48256
passed with stages
in 113 minutes and 58 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
bliss/common/regulation.py
View file @
0d900cac
...
...
@@ -939,15 +939,6 @@ class Loop(SamplingCounterController):
def
is_in_idleband
(
self
):
return
self
.
_x_is_in_idleband
(
self
.
input
.
read
())
def
get_last_data
(
self
):
data
=
{
"time"
:
time
.
time
(),
"setpoint"
:
self
.
_get_working_setpoint
(),
"input"
:
self
.
_get_last_input_value
(),
"output"
:
self
.
_get_last_output_value
(),
}
return
data
def
_get_last_input_value
(
self
):
return
self
.
input
.
read
()
...
...
@@ -2032,16 +2023,20 @@ class RegPlot:
pass
try
:
data
=
self
.
loop
.
get_last_data
()
dbp
=
data
[
"setpoint"
]
+
self
.
loop
.
deadband
dbm
=
data
[
"setpoint"
]
-
self
.
loop
.
deadband
loop
=
self
.
loop
data_time
=
time
.
time
()
setpoint
=
loop
.
_get_working_setpoint
()
input_value
=
loop
.
_get_last_input_value
()
output_value
=
loop
.
_get_last_output_value
()
dbp
=
setpoint
+
loop
.
deadband
dbm
=
setpoint
-
loop
.
deadband
# Update curves plot (refreshes the plot widget)
self
.
fig
.
append_data
(
time
=
[
data
[
"
time
"
]
],
input
=
[
data
[
"input"
]
],
output
=
[
data
[
"output"
]
],
setpoint
=
[
data
[
"
setpoint
"
]
],
time
=
[
data
_
time
],
input
=
[
input_value
],
output
=
[
output_value
],
setpoint
=
[
setpoint
],
deadband_high
=
[
dbp
],
deadband_low
=
[
dbm
],
)
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment