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
931e8daf
Commit
931e8daf
authored
Aug 16, 2019
by
Milosz Malczak
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
server, gui: removed function set_adc_parameter
parent
86617c8b
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
9 deletions
+8
-9
devices_access.py
...tributedOscilloscope/nodes/adc_lib_node/devices_access.py
+3
-1
server_expose.py
...stributedOscilloscope/nodes/adc_lib_node/server_expose.py
+0
-3
ADC.py
software/DistributedOscilloscope/server/ADC.py
+5
-5
No files found.
software/DistributedOscilloscope/nodes/adc_lib_node/devices_access.py
View file @
931e8daf
...
...
@@ -94,10 +94,12 @@ class DevicesAccess():
'LC-O1'
)
self
.
__WRTD
.
enable_rule
(
self
.
receive_triggers_name
)
def
configure_adc_parameter
(
self
,
function_name
,
args
):
def
configure_adc_parameter
(
self
,
function_name
,
*
args
):
if
(
function_name
==
'set_presamples'
and
self
.
__WRTD_master
is
False
):
self
.
__required_presamples
=
args
[
0
]
args
=
list
(
args
)
args
[
0
]
+=
delay_samples
args
=
tuple
(
args
)
getattr
(
self
.
__ADC
,
function_name
)(
*
args
)
if
(
function_name
==
(
'set_presamples'
or
'set_postsamples'
)):
buf_size
=
self
.
__get_required_buffer_size
()
...
...
software/DistributedOscilloscope/nodes/adc_lib_node/server_expose.py
View file @
931e8daf
...
...
@@ -30,9 +30,6 @@ class ServerExpose():
def
set_server_address
(
self
,
addr
):
self
.
server_publisher
=
Publisher
(
addr
,
self
.
__port_server
)
def
set_adc_parameter
(
self
,
function_name
,
*
args
):
self
.
__devices_access
.
configure_adc_parameter
(
function_name
,
[
*
args
])
def
set_user_app_name
(
self
,
user_app_name
):
self
.
__devices_access
.
set_user_app_name
(
user_app_name
)
...
...
software/DistributedOscilloscope/server/ADC.py
View file @
931e8daf
...
...
@@ -181,14 +181,14 @@ class ADC:
multiplication
=
multiplier
[(
previous_range
,
new_range
)]
threshold
=
int
(
curr_threshold
*
multiplication
)
if
(
threshold
>
2
**
15
-
1
or
threshold
<
-
2
**
15
):
ADC
.
send_RPC
(
'
set
_adc_parameter'
,
ADC
.
send_RPC
(
'
configure
_adc_parameter'
,
'set_internal_trigger_enable'
,
0
,
channel_idx
)
ADC
.
send_RPC
(
'
set
_adc_parameter'
,
ADC
.
send_RPC
(
'
configure
_adc_parameter'
,
'set_internal_trigger_threshold'
,
0
,
channel_idx
)
logger
.
warning
(
"Internal trigger disabled: value out of range"
)
"""TODO send information to the user_app"""
else
:
ADC
.
send_RPC
(
'
set
_adc_parameter'
,
ADC
.
send_RPC
(
'
configure
_adc_parameter'
,
'set_internal_trigger_threshold'
,
threshold
,
channel_idx
)
...
...
@@ -212,10 +212,10 @@ class ADC:
logger
.
error
(
"Mapping error {}"
.
format
(
e
))
try
:
if
idx
!=
None
:
self
.
send_RPC
(
'
set
_adc_parameter'
,
function_name
,
mapped_value
,
self
.
send_RPC
(
'
configure
_adc_parameter'
,
function_name
,
mapped_value
,
idx
)
else
:
self
.
send_RPC
(
'
set
_adc_parameter'
,
function_name
,
mapped_value
)
self
.
send_RPC
(
'
configure
_adc_parameter'
,
function_name
,
mapped_value
)
except
Exception
as
e
:
logger
.
error
(
"Function invocation error {}"
.
format
(
e
))
self
.
update_conf
()
...
...
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