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

Fred/cleanup #27

Merged
merged 3 commits into from
Nov 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.8", "3.10", "3.11", "3.12"]
python-version: ["3.10", "3.11", "3.12"]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
Expand Down
1 change: 0 additions & 1 deletion pylintrc
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,6 @@ disable=raw-checker-failed,
missing-function-docstring,
missing-class-docstring,
missing-module-docstring,
too-many-positional-arguments

# Enable the message, report, category or checker with the given id(s). You can
# either give multiple identifier separated by comma (,) or put this option
Expand Down
5 changes: 4 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
flake8
isort
pre-commit
pylint
pyserial
setuptools
pre-commit
6 changes: 2 additions & 4 deletions sa818.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,10 +78,7 @@ def __init__(self, port=None, baud=DEFAULT_BAUDRATE):
# Send initialization command and check the reply
self.send(self.INIT)
reply = self.readline()
if reply == "+DMOCONNECT:0":
# if expected response, proceed
break
else:
if reply != "+DMOCONNECT:0":
# if unexpected response, try another port
logger.debug("Port %s not SA818: %s", _port, reply)
self.serial.close()
Expand Down Expand Up @@ -133,6 +130,7 @@ def version(self):
return version

def set_radio(self, frequency, offset, bw, squelch, ctcss, dcs, tail):
# pylint: disable=too-many-locals,too-many-positional-arguments
tone = ctcss if ctcss else dcs
if tone: # 0000 = No ctcss or dcs tone
tx_tone, rx_tone = tone
Expand Down
Loading