Compare commits
2 Commits
312c55189e
...
9c387eff6a
Author | SHA1 | Date | |
---|---|---|---|
9c387eff6a | |||
a2905073a8 |
|
@ -83,7 +83,7 @@ target-version = ["py310"]
|
|||
exclude = '''
|
||||
/(
|
||||
\.git
|
||||
| \.github
|
||||
| \.riahub
|
||||
| \.tox
|
||||
| build
|
||||
| dist
|
||||
|
@ -94,6 +94,7 @@ exclude = '''
|
|||
| \.env
|
||||
| \.idea
|
||||
| \.vscode
|
||||
| _external
|
||||
)/
|
||||
'''
|
||||
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
# TODO: only use transfer->valid_length in callbacks
|
||||
# TODO: make error messages more informative
|
||||
# Original work by Dressel, from the pyhackrf project: https://github.com/dressel/pyhackrf
|
||||
|
||||
import logging
|
||||
import os
|
|
@ -1,12 +1,11 @@
|
|||
from typing import Optional
|
||||
|
||||
import numpy as np
|
||||
from bladerf import _bladerf
|
||||
|
||||
from ria_toolkit_oss.datatypes import Recording
|
||||
from ria_toolkit_oss.sdr import SDR
|
||||
|
||||
from bladerf import _bladerf
|
||||
|
||||
|
||||
class Blade(SDR):
|
||||
|
||||
|
|
|
@ -5,10 +5,9 @@ from typing import Optional
|
|||
import numpy as np
|
||||
|
||||
from ria_toolkit_oss.datatypes.recording import Recording
|
||||
from ria_toolkit_oss.sdr._external.libhackrf import HackRF as hrf
|
||||
from ria_toolkit_oss.sdr.sdr import SDR
|
||||
|
||||
from .libhackrf import HackRF as hrf
|
||||
|
||||
|
||||
class HackRF(SDR):
|
||||
def __init__(self, identifier=""):
|
||||
|
|
|
@ -12,7 +12,7 @@ from ria_toolkit_oss.datatypes.recording import Recording
|
|||
|
||||
class SDR(ABC):
|
||||
"""
|
||||
This class defines a common interface (a template) for all SDR devices.
|
||||
This class defines a common interface (a template) for all SDR devices.
|
||||
Each specific SDR implementation should subclass SDR and provide concrete implementations
|
||||
for the abstract methods.
|
||||
|
||||
|
@ -22,7 +22,7 @@ class SDR(ABC):
|
|||
"""
|
||||
|
||||
def __init__(self):
|
||||
|
||||
|
||||
self._rx_initialized = False
|
||||
self._tx_initialized = False
|
||||
self._enable_rx = False
|
||||
|
@ -36,7 +36,7 @@ class SDR(ABC):
|
|||
def record(self, num_samples: Optional[int] = None, rx_time: Optional[int | float] = None) -> Recording:
|
||||
"""
|
||||
Create a radio recording of a given length. Either ``num_samples`` or ``rx_time`` must be provided.
|
||||
|
||||
|
||||
Note that ``init_rx()`` must be called before ``record()``.
|
||||
|
||||
:param num_samples: The number of samples to record.
|
||||
|
|
2
tox.ini
2
tox.ini
|
@ -24,7 +24,7 @@ commands =
|
|||
[flake8]
|
||||
max-line-length = 119
|
||||
extend-ignore = W503, E203, E701
|
||||
exclude = .git, .github, build, dist, docs, venv, .venv, env, .env, .idea, .vscode, .tox
|
||||
exclude = .git, .riahub, build, dist, docs, venv, .venv, env, .env, .idea, .vscode, .tox, _external
|
||||
max-complexity = 15
|
||||
per-file-ignores = __init__.py:F401
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user