Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
D
distributed oscilloscope
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
image/svg+xml
Discourse
Discourse
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Projects
distributed oscilloscope
Commits
82891b04
Commit
82891b04
authored
Jun 24, 2019
by
Milosz Malczak
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gui: Channels refactoring, made attributes private, removed channel
enable button, removed properties class
parent
b8a0643c
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
127 additions
and
170 deletions
+127
-170
GUI.py
software/pyqt_app/GUI.py
+4
-5
channels.py
software/pyqt_app/channels.py
+119
-160
triggers.py
software/pyqt_app/triggers.py
+4
-5
No files found.
software/pyqt_app/GUI.py
View file @
82891b04
...
...
@@ -100,11 +100,10 @@ class GUI_Class:
for
GUI_channel_idx
,
channel_params
in
channel_params
.
items
():
GUI_channel_idx
=
int
(
GUI_channel_idx
)
"""to be removed with xmlrpc"""
channel_prop
=
self
.
channels
[
GUI_channel_idx
]
.
properties
channel_prop
.
set_channel_params
(
channel_params
[
'active'
],
channel_params
[
'range'
],
channel_params
[
'termination'
],
channel_params
[
'offset'
])
channel
=
self
.
channels
[
GUI_channel_idx
]
channel
.
set_channel_params
(
channel_params
[
'range'
],
channel_params
[
'termination'
],
channel_params
[
'offset'
])
def
set_trigger_params
(
self
,
trigger_params
):
trig_prop
=
self
.
triggers
[
0
]
.
properties
...
...
software/pyqt_app/channels.py
View file @
82891b04
This diff is collapsed.
Click to expand it.
software/pyqt_app/triggers.py
View file @
82891b04
...
...
@@ -233,8 +233,8 @@ class IntTriggersMenu(TriggersMenu):
none
=
self
.
ADCs_menu
.
addAction
(
"Disconnect"
)
none
.
triggered
.
connect
(
self
.
remove_trigger
)
for
channel
in
self
.
channels
:
if
channel
.
propertie
s
is
not
None
:
channel_disp
=
str
(
channel
.
channel_count
+
1
)
if
channel
.
channel_exist
s
is
not
None
:
channel_disp
=
str
(
channel
.
GUI_channel_idx
+
1
)
chan
=
self
.
ADCs_menu
.
addAction
(
"Channel: "
+
channel_disp
)
chan
.
triggered
.
connect
(
self
.
select_trigger
)
self
.
actions
.
append
(
chan
)
...
...
@@ -251,13 +251,12 @@ class IntTriggersMenu(TriggersMenu):
def
add_trigger
(
self
):
self
.
remove_trigger
()
selected_ADC
=
self
.
channels
[
self
.
GUI_channel_idx
]
.
properties
.
\
unique_ADC_name
selected_ADC
=
self
.
channels
[
self
.
GUI_channel_idx
]
.
unique_ADC_name
chan_disp
=
str
(
self
.
GUI_channel_idx
+
1
)
self
.
ADCs_menu
.
setTitle
(
"Channel "
+
chan_disp
)
"""+1 is beacuse channels are indexed from 0, but displayed from 1"""
if
selected_ADC
is
not
None
:
ADC_idx
=
self
.
channels
[
self
.
GUI_channel_idx
]
.
properties
.
idx
ADC_idx
=
self
.
channels
[
self
.
GUI_channel_idx
]
.
ADC_channel_
idx
self
.
trigger_closure
.
set_trigger_properties
(
selected_ADC
,
ADC_idx
)
self
.
plot
.
add_trigger
(
self
.
GUI_channel_idx
)
rpc
=
self
.
trigger_closure
.
zmq_rpc
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a 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