mirror of
https://github.com/craigerl/aprsd.git
synced 2026-08-19 10:13:44 -04:00
Compare commits
6 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| e06305fceb | |||
| 33c7871dbe | |||
| b2f95b0f4e | |||
| ae9e4d31ad | |||
| 65a5a90458 | |||
| 182887c20a |
@@ -1,9 +1,23 @@
|
||||
CHANGES
|
||||
=======
|
||||
|
||||
v3.1.3
|
||||
------
|
||||
|
||||
* Forcefully allow development webchat flask
|
||||
|
||||
v3.1.2
|
||||
------
|
||||
|
||||
* Updated Changelog for 3.1.2
|
||||
* Added support for ThirdParty packet types
|
||||
* Disable the Send GPS Beacon button
|
||||
* Removed adhoc ssl support in webchat
|
||||
|
||||
v3.1.1
|
||||
------
|
||||
|
||||
* Updated Changelog for v3.1.1
|
||||
* Fixed pep8 failures
|
||||
* re-enable USWeatherPlugin to use mapClick
|
||||
* Fix sending packets over KISS interface
|
||||
|
||||
+5
-1
@@ -235,7 +235,11 @@ class KISSClient(Client):
|
||||
# LOG.debug(f"Decoding {msg}")
|
||||
|
||||
raw = aprslib.parse(str(frame))
|
||||
return core.Packet.factory(raw)
|
||||
packet = core.Packet.factory(raw)
|
||||
if isinstance(packet, core.ThirdParty):
|
||||
return packet.subpacket
|
||||
else:
|
||||
return packet
|
||||
|
||||
@trace.trace
|
||||
def setup_connection(self):
|
||||
|
||||
@@ -485,9 +485,12 @@ def webchat(ctx, flush, port):
|
||||
LOG.info("Start socketio.run()")
|
||||
socketio.run(
|
||||
flask_app,
|
||||
ssl_context="adhoc",
|
||||
# This is broken for now after removing cryptography
|
||||
# and pyopenssl
|
||||
# ssl_context="adhoc",
|
||||
host=CONF.admin.web_ip,
|
||||
port=port,
|
||||
allow_unsafe_werkzeug=True,
|
||||
)
|
||||
|
||||
LOG.info("WebChat exiting!!!! Bye.")
|
||||
|
||||
@@ -25,6 +25,7 @@ PACKET_TYPE_OBJECT = "object"
|
||||
PACKET_TYPE_UNKNOWN = "unknown"
|
||||
PACKET_TYPE_STATUS = "status"
|
||||
PACKET_TYPE_BEACON = "beacon"
|
||||
PACKET_TYPE_THIRDPARTY = "thirdparty"
|
||||
PACKET_TYPE_UNCOMPRESSED = "uncompressed"
|
||||
|
||||
|
||||
@@ -115,6 +116,7 @@ class Packet(metaclass=abc.ABCMeta):
|
||||
|
||||
@staticmethod
|
||||
def factory(raw_packet):
|
||||
"""Factory method to create a packet from a raw packet string."""
|
||||
raw = raw_packet
|
||||
raw["raw_dict"] = raw.copy()
|
||||
translate_fields = {
|
||||
@@ -133,6 +135,19 @@ class Packet(metaclass=abc.ABCMeta):
|
||||
packet_type = get_packet_type(raw)
|
||||
raw["packet_type"] = packet_type
|
||||
class_name = TYPE_LOOKUP[packet_type]
|
||||
if packet_type == PACKET_TYPE_THIRDPARTY:
|
||||
# We have an encapsulated packet!
|
||||
# So we need to decode it and return the inner packet
|
||||
# as the packet we are going to process.
|
||||
# This is a recursive call to the factory
|
||||
subpacket_raw = raw["subpacket"]
|
||||
subpacket = Packet.factory(subpacket_raw)
|
||||
del raw["subpacket"]
|
||||
# raw["subpacket"] = subpacket
|
||||
packet = dacite.from_dict(data_class=class_name, data=raw)
|
||||
packet.subpacket = subpacket
|
||||
return packet
|
||||
|
||||
if packet_type == PACKET_TYPE_UNKNOWN:
|
||||
# Try and figure it out here
|
||||
if "latitude" in raw:
|
||||
@@ -552,6 +567,22 @@ class WeatherPacket(GPSPacket):
|
||||
)
|
||||
|
||||
|
||||
class ThirdParty(Packet):
|
||||
# Holds the encapsulated packet
|
||||
subpacket: Packet = None
|
||||
|
||||
def __repr__(self):
|
||||
"""Build the repr version of the packet."""
|
||||
repr_str = (
|
||||
f"{self.__class__.__name__}:"
|
||||
f" From: {self.from_call} "
|
||||
f" To: {self.to_call} "
|
||||
f" Subpacket: {repr(self.subpacket)}"
|
||||
)
|
||||
|
||||
return repr_str
|
||||
|
||||
|
||||
TYPE_LOOKUP = {
|
||||
PACKET_TYPE_WX: WeatherPacket,
|
||||
PACKET_TYPE_MESSAGE: MessagePacket,
|
||||
@@ -562,6 +593,7 @@ TYPE_LOOKUP = {
|
||||
PACKET_TYPE_STATUS: StatusPacket,
|
||||
PACKET_TYPE_BEACON: GPSPacket,
|
||||
PACKET_TYPE_UNKNOWN: Packet,
|
||||
PACKET_TYPE_THIRDPARTY: ThirdParty,
|
||||
}
|
||||
|
||||
|
||||
@@ -588,6 +620,8 @@ def get_packet_type(packet: dict):
|
||||
elif pkt_format == PACKET_TYPE_UNCOMPRESSED:
|
||||
if packet.get("symbol", None) == "_":
|
||||
packet_type = PACKET_TYPE_WX
|
||||
elif pkt_format == PACKET_TYPE_THIRDPARTY:
|
||||
packet_type = PACKET_TYPE_THIRDPARTY
|
||||
return packet_type
|
||||
|
||||
|
||||
|
||||
@@ -26,6 +26,11 @@
|
||||
start_update();
|
||||
init_chat();
|
||||
reset_Tabs();
|
||||
|
||||
if (location.protocol != 'https:') {
|
||||
// Have to disable the beacon button.
|
||||
$('#send_beacon').prop('disabled', true);
|
||||
}
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
|
||||
+27
-27
@@ -4,7 +4,7 @@
|
||||
#
|
||||
# pip-compile --annotation-style=line dev-requirements.in
|
||||
#
|
||||
add-trailing-comma==3.0.0 # via gray
|
||||
add-trailing-comma==3.0.1 # via gray
|
||||
alabaster==0.7.13 # via sphinx
|
||||
attrs==23.1.0 # via jsonschema, referencing
|
||||
autoflake==1.5.3 # via gray
|
||||
@@ -13,75 +13,75 @@ black==23.7.0 # via gray
|
||||
build==0.10.0 # via pip-tools
|
||||
cachetools==5.3.1 # via tox
|
||||
certifi==2023.7.22 # via requests
|
||||
cfgv==3.3.1 # via pre-commit
|
||||
chardet==5.1.0 # via tox
|
||||
cfgv==3.4.0 # via pre-commit
|
||||
chardet==5.2.0 # via tox
|
||||
charset-normalizer==3.2.0 # via requests
|
||||
click==8.1.6 # via black, pip-tools
|
||||
colorama==0.4.6 # via tox
|
||||
commonmark==0.9.1 # via rich
|
||||
configargparse==1.7 # via gray
|
||||
coverage[toml]==7.2.7 # via pytest-cov
|
||||
coverage[toml]==7.3.0 # via pytest-cov
|
||||
distlib==0.3.7 # via virtualenv
|
||||
docutils==0.20.1 # via sphinx
|
||||
exceptiongroup==1.1.2 # via pytest
|
||||
exceptiongroup==1.1.3 # via pytest
|
||||
filelock==3.12.2 # via tox, virtualenv
|
||||
fixit==0.1.4 # via gray
|
||||
flake8==6.0.0 # via -r dev-requirements.in, fixit, pep8-naming
|
||||
flake8==6.1.0 # via -r dev-requirements.in, fixit, pep8-naming
|
||||
gray==0.13.0 # via -r dev-requirements.in
|
||||
identify==2.5.26 # via pre-commit
|
||||
idna==3.4 # via requests
|
||||
imagesize==1.4.1 # via sphinx
|
||||
importlib-resources==6.0.0 # via fixit
|
||||
importlib-resources==6.0.1 # via fixit
|
||||
iniconfig==2.0.0 # via pytest
|
||||
isort==5.12.0 # via -r dev-requirements.in, gray
|
||||
jinja2==3.1.2 # via sphinx
|
||||
jsonschema==4.18.4 # via fixit
|
||||
jsonschema==4.19.0 # via fixit
|
||||
jsonschema-specifications==2023.7.1 # via jsonschema
|
||||
libcst==1.0.1 # via fixit
|
||||
markupsafe==2.1.3 # via jinja2
|
||||
mccabe==0.7.0 # via flake8
|
||||
mypy==1.4.1 # via -r dev-requirements.in
|
||||
mypy==1.5.0 # via -r dev-requirements.in
|
||||
mypy-extensions==1.0.0 # via black, mypy, typing-inspect
|
||||
nodeenv==1.8.0 # via pre-commit
|
||||
packaging==23.1 # via black, build, pyproject-api, pytest, sphinx, tox
|
||||
pathspec==0.11.1 # via black
|
||||
pathspec==0.11.2 # via black
|
||||
pep8-naming==0.13.3 # via -r dev-requirements.in
|
||||
pip-tools==7.1.0 # via -r dev-requirements.in
|
||||
platformdirs==3.9.1 # via black, tox, virtualenv
|
||||
pip-tools==7.3.0 # via -r dev-requirements.in
|
||||
platformdirs==3.10.0 # via black, tox, virtualenv
|
||||
pluggy==1.2.0 # via pytest, tox
|
||||
pre-commit==3.3.3 # via -r dev-requirements.in
|
||||
pycodestyle==2.10.0 # via flake8
|
||||
pyflakes==3.0.1 # via autoflake, flake8
|
||||
pygments==2.15.1 # via rich, sphinx
|
||||
pycodestyle==2.11.0 # via flake8
|
||||
pyflakes==3.1.0 # via autoflake, flake8
|
||||
pygments==2.16.1 # via rich, sphinx
|
||||
pyproject-api==1.5.3 # via tox
|
||||
pyproject-hooks==1.0.0 # via build
|
||||
pytest==7.4.0 # via -r dev-requirements.in, pytest-cov
|
||||
pytest-cov==4.1.0 # via -r dev-requirements.in
|
||||
pyupgrade==3.9.0 # via gray
|
||||
pyupgrade==3.10.1 # via gray
|
||||
pyyaml==6.0.1 # via fixit, libcst, pre-commit
|
||||
referencing==0.30.0 # via jsonschema, jsonschema-specifications
|
||||
referencing==0.30.2 # via jsonschema, jsonschema-specifications
|
||||
requests==2.31.0 # via sphinx
|
||||
rich==12.6.0 # via gray
|
||||
rpds-py==0.9.2 # via jsonschema, referencing
|
||||
snowballstemmer==2.2.0 # via sphinx
|
||||
sphinx==7.0.1 # via -r dev-requirements.in
|
||||
sphinxcontrib-applehelp==1.0.4 # via sphinx
|
||||
sphinxcontrib-devhelp==1.0.2 # via sphinx
|
||||
sphinxcontrib-htmlhelp==2.0.1 # via sphinx
|
||||
sphinx==7.1.2 # via -r dev-requirements.in, sphinxcontrib-applehelp, sphinxcontrib-devhelp, sphinxcontrib-htmlhelp, sphinxcontrib-qthelp, sphinxcontrib-serializinghtml
|
||||
sphinxcontrib-applehelp==1.0.7 # via sphinx
|
||||
sphinxcontrib-devhelp==1.0.5 # via sphinx
|
||||
sphinxcontrib-htmlhelp==2.0.4 # via sphinx
|
||||
sphinxcontrib-jsmath==1.0.1 # via sphinx
|
||||
sphinxcontrib-qthelp==1.0.3 # via sphinx
|
||||
sphinxcontrib-serializinghtml==1.1.5 # via sphinx
|
||||
tokenize-rt==5.1.0 # via add-trailing-comma, pyupgrade
|
||||
sphinxcontrib-qthelp==1.0.6 # via sphinx
|
||||
sphinxcontrib-serializinghtml==1.1.8 # via sphinx
|
||||
tokenize-rt==5.2.0 # via add-trailing-comma, pyupgrade
|
||||
toml==0.10.2 # via autoflake
|
||||
tomli==2.0.1 # via black, build, coverage, mypy, pip-tools, pyproject-api, pyproject-hooks, pytest, tox
|
||||
tox==4.6.4 # via -r dev-requirements.in
|
||||
tox==4.8.0 # via -r dev-requirements.in
|
||||
typing-extensions==4.7.1 # via libcst, mypy, typing-inspect
|
||||
typing-inspect==0.9.0 # via libcst
|
||||
unify==0.5 # via gray
|
||||
untokenize==0.1.1 # via unify
|
||||
urllib3==2.0.4 # via requests
|
||||
virtualenv==20.24.1 # via pre-commit, tox
|
||||
wheel==0.41.0 # via pip-tools
|
||||
virtualenv==20.24.3 # via pre-commit, tox
|
||||
wheel==0.41.1 # via pip-tools
|
||||
|
||||
# The following packages are considered to be unsafe in a requirements file:
|
||||
# pip
|
||||
|
||||
@@ -29,14 +29,12 @@ kiss3
|
||||
attrs
|
||||
# for mobile checking
|
||||
user-agents
|
||||
pyopenssl
|
||||
dataclasses
|
||||
dacite2
|
||||
oslo.config
|
||||
rpyc
|
||||
# Pin this here so it doesn't require a compile on
|
||||
# raspi
|
||||
cryptography
|
||||
shellingham
|
||||
geopy
|
||||
rush
|
||||
|
||||
+7
-16
@@ -4,39 +4,33 @@
|
||||
#
|
||||
# pip-compile --annotation-style=line requirements.in
|
||||
#
|
||||
anyio==3.7.1 # via httpcore
|
||||
aprslib==0.7.2 # via -r requirements.in
|
||||
attrs==23.1.0 # via -r requirements.in, ax253, kiss3, rush
|
||||
ax253==0.1.5.post1 # via kiss3
|
||||
beautifulsoup4==4.12.2 # via -r requirements.in
|
||||
bidict==0.22.1 # via python-socketio
|
||||
bitarray==2.8.0 # via ax253, kiss3
|
||||
bitarray==2.8.1 # via ax253, kiss3
|
||||
blinker==1.6.2 # via flask
|
||||
certifi==2023.7.22 # via httpcore, requests
|
||||
cffi==1.15.1 # via cryptography
|
||||
certifi==2023.7.22 # via requests
|
||||
charset-normalizer==3.2.0 # via requests
|
||||
click==8.1.6 # via -r requirements.in, click-completion, click-params, flask
|
||||
click-completion==0.5.2 # via -r requirements.in
|
||||
click-params==0.4.1 # via -r requirements.in
|
||||
commonmark==0.9.1 # via rich
|
||||
cryptography==41.0.2 # via -r requirements.in, pyopenssl
|
||||
dacite2==2.0.0 # via -r requirements.in
|
||||
dataclasses==0.6 # via -r requirements.in
|
||||
debtcollector==2.5.0 # via oslo-config
|
||||
decorator==5.1.1 # via validators
|
||||
dnspython==2.4.0 # via eventlet
|
||||
dnspython==2.4.2 # via eventlet
|
||||
eventlet==0.33.3 # via -r requirements.in
|
||||
exceptiongroup==1.1.2 # via anyio
|
||||
flask==2.3.2 # via -r requirements.in, flask-httpauth, flask-socketio
|
||||
flask-httpauth==4.8.0 # via -r requirements.in
|
||||
flask-socketio==5.3.4 # via -r requirements.in
|
||||
flask-socketio==5.3.5 # via -r requirements.in
|
||||
geographiclib==2.0 # via geopy
|
||||
geopy==2.3.0 # via -r requirements.in
|
||||
gevent==23.7.0 # via -r requirements.in
|
||||
greenlet==2.0.2 # via eventlet, gevent
|
||||
h11==0.14.0 # via httpcore
|
||||
httpcore==0.17.3 # via dnspython
|
||||
idna==3.4 # via anyio, requests
|
||||
idna==3.4 # via requests
|
||||
imapclient==2.3.1 # via -r requirements.in
|
||||
importlib-metadata==6.8.0 # via ax253, kiss3
|
||||
itsdangerous==2.1.2 # via flask
|
||||
@@ -49,9 +43,7 @@ oslo-i18n==6.0.0 # via oslo-config
|
||||
pbr==5.11.1 # via -r requirements.in, oslo-i18n, stevedore
|
||||
pluggy==1.2.0 # via -r requirements.in
|
||||
plumbum==1.8.2 # via rpyc
|
||||
pycparser==2.21 # via cffi
|
||||
pygments==2.15.1 # via rich
|
||||
pyopenssl==23.2.0 # via -r requirements.in
|
||||
pygments==2.16.1 # via rich
|
||||
pyserial==3.5 # via pyserial-asyncio
|
||||
pyserial-asyncio==0.6 # via kiss3
|
||||
python-engineio==4.5.1 # via python-socketio
|
||||
@@ -65,7 +57,6 @@ rpyc==5.3.1 # via -r requirements.in
|
||||
rush==2021.4.0 # via -r requirements.in
|
||||
shellingham==1.5.0.post1 # via -r requirements.in, click-completion
|
||||
six==1.16.0 # via -r requirements.in, click-completion, eventlet, imapclient
|
||||
sniffio==1.3.0 # via anyio, dnspython, httpcore
|
||||
soupsieve==2.4.1 # via beautifulsoup4
|
||||
stevedore==5.1.0 # via oslo-config
|
||||
tabulate==0.9.0 # via -r requirements.in
|
||||
@@ -75,7 +66,7 @@ update-checker==0.18.0 # via -r requirements.in
|
||||
urllib3==2.0.4 # via requests
|
||||
user-agents==2.2.0 # via -r requirements.in
|
||||
validators==0.20.0 # via click-params
|
||||
werkzeug==2.3.6 # via -r requirements.in, flask
|
||||
werkzeug==2.3.7 # via -r requirements.in, flask
|
||||
wrapt==1.15.0 # via -r requirements.in, debtcollector
|
||||
zipp==3.16.2 # via importlib-metadata
|
||||
zope-event==5.0 # via gevent
|
||||
|
||||
Reference in New Issue
Block a user