1
0
mirror of https://github.com/craigerl/aprsd.git synced 2026-03-31 04:05:32 -04:00

19 Commits

Author SHA1 Message Date
314f4da180 fix: Restore max_delta after custom stale_timeout test
The singleton's max_delta was being modified by test_init_custom_stale_timeout
and not restored, causing test_is_stale_connection_false to fail because
it expected 2 minutes but got 60 seconds.
2026-03-27 10:18:07 -04:00
f6eb383caf fix: Update test to work with singleton pattern
The APRSISDriver uses @singleton decorator which transforms the class
into a function. The test was incorrectly trying to use __new__ which
doesn't work with decorated singletons. Instead, re-initialize the
existing instance after changing the config.
2026-03-27 10:13:55 -04:00
930339d4cf feat: Add configurable stale_timeout for APRS-IS connections
Add a new 'stale_timeout' configuration option to the aprs_network config
group that allows users to customize how long to wait before considering
an APRS-IS connection stale.

Problem:
The stale connection threshold was hardcoded to 2 minutes. In environments
with frequent network hiccups or when using certain APRS-IS servers that
may drop connections silently, 2 minutes can be too long to wait before
reconnecting, resulting in significant data loss.

Solution:
- Add 'stale_timeout' option to aprsd/conf/client.py with default of 120s
- Update APRSISDriver.__init__ to use the config value
- Maintain backward compatibility by defaulting to 120s if not configured
- Update tests to handle the new configuration option

Usage:
  [aprs_network]
  stale_timeout = 60  # Reconnect after 60 seconds without data

The default remains 120 seconds (2 minutes) for backward compatibility.
2026-03-27 10:05:44 -04:00
6ea9889369 make consumer call signature consistent. 2026-02-18 14:11:25 -05:00
2b7e42802b update the keepalive for kiss 2026-02-18 14:00:52 -05:00
3bcd03a514 Fix client / driver inconsistencies from protocol
The client registry defined a protocol that all drivers had
to implement.  This patch ensures that all methods are
consistent in the protocol definition.
2026-01-23 09:18:35 -05:00
cc8d834e5c Remove the login callsign in aprs_network
It's been confusing for a while that when we configured aprsd,
we had to enter the callsign in the [DEFAULT] section and
the [aprs_network] section.

This patch removes the login from the aprs_network section.  aprsd
will now use the main callsign in the [DEFAULT] section as the callsign
to login to the aprsis network.
2026-01-18 21:21:09 -05:00
6cbd6452d5 kiss consumer update
this patch updates the kiss consumer to call the callback with the frame
as arg[0] just like aprslib does.
2026-01-12 23:25:06 -05:00
d0dfaa42e6 Added unit tests 2025-12-09 17:20:23 -05:00
c34a82108b fixed tox failures 2025-11-26 20:28:25 -05:00
961d3e946a Fixed unit tests 2025-10-11 20:23:44 -04:00
af0feaf9c8 Fixed some unit tests
Fixed unit tests related to the updated static method signatures
of the client and drivers.
2025-10-07 14:18:50 -04:00
1c39546bb9 Reworked the entire client and drivers
This patch includes a completely reworked client structure.
There is now only 1 client object, that loads the appropriate
drivers.  The drivers are fake, aprsis and tcpkiss.

The TCPKISS client was written from scratch to avoid using asyncio.
Asyncion is nothing but a pain in the ass.
2025-04-23 20:52:02 -04:00
72d068c0b8 Changed to ruff
This patch changes to the ruff linter.  SO MUCH quicker.
Removed grey and mypy as well.
2024-12-20 22:00:54 -05:00
f66b96288f Fixed issue with packet object and prepare()
If any part of the code had a packet object and called prepare()
on it, it would create a msgNo if it wasn't set.  Sometimes we
get packets on the wire/RF that don't have a msgNo, so adding one
locally is wrong.   We should ONLY create a msgNo on a packet that
is destined for transmission.

This patch ensures that even if prepare() is called, that only
packets that are created locally for TX get a msgNo unless it
already exists from RX'd packets.
2024-11-26 16:52:39 -05:00
c82e9ba597 Fixed broken unit tests
This patch fixes some broken unit tests with the aprsis client.
2024-11-21 09:01:49 -05:00
224686cac5 Added unit test for APRSISClient 2024-11-05 13:39:44 -05:00
ab2de86726 Added unit test for ClientFactory 2024-11-05 12:32:16 -05:00
f1d066b8a9 Added unit test for client base
This patch adds a unit test for the APRSClient base class.
2024-11-05 12:15:59 -05:00