Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
qutil
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
External wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
qutech
qutil
Commits
b0092b4d
Verified
Commit
b0092b4d
authored
1 month ago
by
Tobias Hangleiter
Browse files
Options
Downloads
Patches
Plain Diff
Add logging
parent
1dfc408e
No related branches found
No related tags found
1 merge request
!179
Get gate_layout back up to speed
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
qutil/ui/gate_layout/core.py
+6
-2
6 additions, 2 deletions
qutil/ui/gate_layout/core.py
with
6 additions
and
2 deletions
qutil/ui/gate_layout/core.py
+
6
−
2
View file @
b0092b4d
...
...
@@ -4,6 +4,7 @@ Created on Mon Apr 25 11:14:02 2022
@author: Hangleiter
"""
import
logging
import
pathlib
import
warnings
from
itertools
import
compress
...
...
@@ -26,7 +27,7 @@ DEFAULT_TEXT_KWARGS = dict(backgroundcolor='black',
horizontalalignment
=
'
center
'
,
verticalalignment
=
'
center
'
,
color
=
'
white
'
,
fontsize
=
8
)
LOG
=
logging
.
getLogger
(
__name__
)
class
GateLayout
:
...
...
@@ -100,7 +101,10 @@ class GateLayout:
self
.
get_voltages
(
force
)
elif
isinstance
(
voltages
,
dict
):
for
gate
,
voltage
in
voltages
.
items
():
self
.
_latest_voltages
[
self
.
gate_names
.
index
(
gate
)]
=
voltage
try
:
self
.
_latest_voltages
[
self
.
gate_names
.
index
(
gate
)]
=
voltage
except
ValueError
:
LOG
.
warning
(
f
'
Gate not found. Skipping:
{
gate
}
'
)
else
:
self
.
_latest_voltages
[:]
=
np
.
broadcast_to
(
voltages
,
self
.
_latest_voltages
.
shape
)
...
...
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