Anze Kolar
182f9518a4
Add kill flag to AprsClient
...
When starting an AprsClient with AprsClient.run(...) the client enters
a loop without an exit condition (i.e. a while True loop). If autoreconnect
is set to True, it is impossible to exit the aforementioned loop even if
AprsClient.disconnect() is called.
This causes problems when running the client in a thread (or as a
background service, etc.) as the process will not join nor terminate
unless explicitly shutdown with SIGKILL.
Minimal example:
```
import signal
from ogn.client import AprsClient
from ogn.parser import parse_aprs, parse_ogn_beacon, ParseError
def process_beacon(raw_message):
print('Received message')
client = AprsClient(aprs_user='N0CALL')
signal.signal(signal.SIGTERM, lambda signo, stackno: client.disconnect())
client.connect()
client.run(callback=process_beacon, autoreconnect=True)
```
This commit fixes such issues by adding a kill flag that is raised when
calling AprsClien.disconnect() to the while conditions of both loops inside
AprsClient.run().
Note: the outermost loop could still remain a while True loop as the
exit condition is checked at the end of the loop body.
2017-07-20 11:12:04 +02:00
Konstantin Gründger
d0044deb47
Release v0.7.1
2017-06-05 10:07:04 +02:00
Konstantin Gründger
e7cc73b220
Bugfix: error_count in AircraftBeacon is a int, not a float
2017-06-05 09:54:49 +02:00
Fabian P. Schmidt
24336cf689
Release v0.7.0
2017-06-04 07:22:39 +02:00
Fabian P. Schmidt
3ba39c266f
parser: Fix copy-and-paste error
2017-06-04 07:17:04 +02:00
Meisterschueler
b772ae7b47
Merge pull request #24 from Meisterschueler/fix/aprs_empty_comment
...
Empty APRS comment belongs to a receiver beacon
2017-05-16 14:42:18 +02:00
Konstantin Gründger
36ce45fe20
Empty APRS comment belongs to a receiver beacon
2017-05-16 14:36:38 +02:00
Meisterschueler
5b131855a3
Merge pull request #23 from Meisterschueler/feature/protocol_026
...
Feature/protocol 026
2017-05-15 10:41:24 +02:00
Konstantin Gründger
d2973c1b93
Updated descriptions
2017-05-07 13:20:04 +02:00
Konstantin Gründger
44cc855d6c
Regex patterns are more tolerant, so remove the „incomplete xy“ tests
...
Remove unused imports
2017-05-07 13:13:21 +02:00
Konstantin Gründger
c98c8eca04
The comment is just optional
2017-05-07 12:56:06 +02:00
Konstantin Gründger
a90f3ed1a9
Sync aircraft regex patter with ogn_client-ruby
2017-05-07 12:29:05 +02:00
Konstantin Gründger
539562c708
Sync receiver regex patter with ogn_client-ruby
2017-05-07 12:14:32 +02:00
Konstantin Gründger
00eaffd2aa
Protocol parts not available will set to None instead of 0.0
2017-05-07 11:47:58 +02:00
Konstantin Gründger
5465f23c83
„heared aircrafts“ not supported yet
2017-05-07 11:37:39 +02:00
Konstantin Gründger
c3742b874c
Added tests for 0.2.6
...
no message
2017-05-07 11:34:11 +02:00
Fabian P. Schmidt
7565de6c16
Release v0.6.0
2016-10-21 22:11:40 +02:00
Fabian P. Schmidt
b05de4ee69
Merge pull request #17 from kerel-fs/feature/py35
...
CI: Enable tests for Python version 3.5
2016-10-21 21:55:26 +02:00
Fabian P. Schmidt
74e32267eb
CI: Enable tests for Python version 3.5
2016-10-21 21:52:34 +02:00
Fabian P. Schmidt
6a2282c28d
Merge pull request #16 from kerel-fs/fix/test_v025
...
parser/test_v025: Add missing reference_date
2016-10-17 00:56:09 +02:00
Fabian P. Schmidt
305f4c1602
Update Changelog
2016-10-17 00:51:14 +02:00
Fabian P. Schmidt
56caf6fed3
parser/test_v025: Add missing reference_date
2016-10-17 00:48:46 +02:00
Fabian P. Schmidt
e3de256060
Merge pull request #15 from Meisterschueler/feature/+protocol_0.2.5
...
Implemented new receiver protocol for 0.2.5
2016-10-17 00:34:16 +02:00
Konstantin Gründger
43f2f344f5
Renaming signal_strength -> signal_quality, power -> signal_power
2016-10-13 19:34:34 +02:00
Konstantin Gründger
0deec409af
Test voltage and amperage
2016-10-10 22:57:51 +02:00
Konstantin Gründger
81758975f8
Removed debug code
2016-10-10 19:29:03 +02:00
Konstantin Gründger
b5b85d7e1b
Added "power", "voltage" and "amperage"
2016-10-10 19:26:46 +02:00
Konstantin Gründger
d33cd5b7b9
Bugfix
2016-10-09 22:27:44 +02:00
Konstantin Gründger
6e2c59594f
Adopt naming from ruby-client_ogn
2016-10-09 22:01:06 +02:00
Konstantin Gründger
5bcd04fe20
Implemented new receiver protocol for 0.2.5
...
Update for 0.2.5 protocol
2016-10-07 22:27:24 +02:00
Fabian P. Schmidt
13adb3efed
Release v0.5.0
2016-09-29 18:42:26 +02:00
Fabian P. Schmidt
8a6a0d1985
Merge pull request #13 from Meisterschueler/reference_datetime
...
Split reference_datetime to reference_date and reference_time
2016-09-29 17:28:25 +02:00
Fabian P. Schmidt
d8677f83fe
README: Fix example code
2016-09-29 15:57:01 +02:00
Fabian P. Schmidt
6d8540b0a0
Update Changelog
2016-09-29 15:54:23 +02:00
Konstantin Gründger
1b485e7629
Split reference_datetime to reference_date and reference_time
2016-09-28 11:08:44 +02:00
Fabian P. Schmidt
a0c4d8ea8e
Changelog: Add issue reference
2016-09-01 14:11:25 +02:00
Fabian P. Schmidt
a20be37f9b
Merge pull request #11 from kerel-fs/fix/parser
...
Add aprs position enhancement before the sign adjustment
2016-09-01 14:02:53 +02:00
Fabian P. Schmidt
d48b360141
Add aprs position enhancement before the sign adjustment
...
Patch provided by shortjonescipher.
Fixes #7 .
2016-09-01 13:58:56 +02:00
Fabian P. Schmidt
9adbe68082
Merge pull request #10 from kerel-fs/fix/relaxed-aprs-dstcall
...
Fix/relaxed aprs dstcall
2016-09-01 11:45:10 +02:00
Fabian P. Schmidt
36641584ae
README: Remove newlines in code listing
2016-09-01 11:41:40 +02:00
Fabian P. Schmidt
e564fa48d1
Update Changelog
2016-09-01 11:41:40 +02:00
Heikki Hannikainen
de99c3b052
Relax APRS packet parser pattern to allow other destination calls than APRS
...
APRS spec allows any callsign-like string, and it is widely used to signal
which software or device generated the packet.
For OGN use, I would recommend using OGN-specific destination callsigns,
maybe software/tracker-specific OGN-prefixed calls. APRS tocall
index is found here, AP-prefixed tocalls are used for APRS devices.
https://github.com/hessu/aprs-deviceid/blob/master/tocalls.yaml
Fixes #9 .
2016-09-01 11:28:46 +02:00
Fabian P. Schmidt
58cceb9aa2
Release v0.4.0
2016-03-29 15:24:09 +02:00
Fabian P. Schmidt
af3614ec5e
setup.py: Fix package list
2016-03-29 15:24:09 +02:00
Fabian P. Schmidt
9034e44442
README: Add PyPi badge
2016-03-29 14:08:22 +02:00
Meisterschueler
9053ba792a
Merge pull request #5 from kerel-fs/feature/+ddb
...
Add submodule ddb
2016-03-29 13:10:24 +02:00
Fabian P. Schmidt
763826953a
Add submodule ddb
2016-03-29 12:02:00 +02:00
Meisterschueler
4f66218ef7
Merge pull request #4 from kerel-fs/feature/+timed_callback
...
client: Add timed callback
2016-03-29 10:37:28 +02:00
Fabian P. Schmidt
fd53e6a3df
client: Add timed callback
...
A timed callback allows the modification of server-side filters
during runtime (the client instance provided as callback argument
includes the socket and its send function).
Since sock_file.readline() is blocking, a secure scheduling can't
be guaranteed but is likely due to regular server-sent status messages.
2016-03-25 19:11:14 +01:00
Fabian P. Schmidt
03cb921e51
tests: Skip failing test test_50_live_messages
...
Test fails because of new messages from receiver version 0.2.5.
Skip it until 0.2.5 is a stable release.
see issue #1
2016-03-25 19:07:09 +01:00