Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds a flag to disable Ettus Auto DC offset #1129

Merged
merged 18 commits into from
Feb 8, 2024

Conversation

robotastic
Copy link
Member

By default, the Ettus B200 mini applies a DC offset to help remove the DC Spike. This PR adds an argument for turning off this DC Spike correction.

The flag is:
--disable_ettus_dc_offset

@anarkiwi
Copy link
Member

Suggest boolean action style, eg:

parser.add_argument(
    "--sigmf",
    dest="sigmf",
    default=True,
    action=BooleanOptionalAction,
    help="add sigmf meta file",
)

Then we get an automatic option for --no-option

Also request a log message with the state of the option as sent to the ettus driver.

Changes the Argument for DC block and adds a logging message on the configuration of DC Blocking
forgot a comma
Missed an import
Changed the flag to match BooleanOptionalAction convention
@robotastic
Copy link
Member Author

I made updates to include those changes. There is now a logging message in ettus_source.py that prints out whether DC Offset is set or not.

When the --ettus-dc-offset argument is present the output is:

gamutrf-1     | 2024-02-01 17:25:56,592 Ettus source configured with Sample Rate: 20480000.0	Center Freq: 700000000.0	Ettus DC Offset enabled: True

When the --no-ettus-dc-offset argument is present the output is:

gamutrf-1     | 2024-02-01 17:25:56,592 Ettus source configured with Sample Rate: 20480000.0	Center Freq: 700000000.0	Ettus DC Offset enabled: True

The default when neither argument is present is for it to be enabled. The output for this is:

gamutrf-1     | 2024-02-01 17:26:33,220 Ettus source configured with Sample Rate: 20480000.0	Center Freq: 700000000.0	Ettus DC Offset enabled: True

@anarkiwi
Copy link
Member

anarkiwi commented Feb 6, 2024

Looks like still need to run "black" and this should be able to go in?

Copy link

codecov bot commented Feb 8, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (fcbb954) 74.53% compared to head (4aca8d1) 74.57%.
Report is 3 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1129      +/-   ##
==========================================
+ Coverage   74.53%   74.57%   +0.04%     
==========================================
  Files          39       39              
  Lines        3691     3697       +6     
==========================================
+ Hits         2751     2757       +6     
  Misses        940      940              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@robotastic
Copy link
Member Author

All the CI tests are passing!

@anarkiwi anarkiwi merged commit 06912ad into IQTLabs:main Feb 8, 2024
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants