Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
P
Programmable RF Attenuator
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
image/svg+xml
Discourse
Discourse
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Projects
Programmable RF Attenuator
Commits
9d0d145b
Commit
9d0d145b
authored
Nov 05, 2021
by
Juan David González Cobas
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cli: add an attenuation reset command
parent
077c3895
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
0 deletions
+11
-0
oautest
software/lib/oautest
+11
-0
No files found.
software/lib/oautest
View file @
9d0d145b
...
...
@@ -106,6 +106,17 @@ class OauTest(cmd.Cmd):
print
(
'error setting attenuation {} for channel {}'
.
format
(
attn
,
ch
))
return
def
do_reset
(
self
,
args
):
"""reset all channel attns to the default (-40dB)."""
if
self
.
fd
is
None
or
self
.
nchannels
is
None
:
print
(
'no active connection'
)
return
for
ch
in
range
(
1
,
self
.
nchannels
+
1
):
err
=
self
.
api
.
oau_att_set_relay
(
self
.
fd
,
ch
,
attn_values
[
'-40dB'
])
if
err
<
0
:
print
(
'error resetting attenuation in channel {}'
.
format
(
ch
))
return
def
do_EOF
(
self
,
arg
):
return
True
...
...
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