diff --git a/README.md b/README.md index 0be8c2d..91cffd1 100644 --- a/README.md +++ b/README.md @@ -48,6 +48,14 @@ $ cd build $ ctest ``` +### Updates +In most cases, you can update this library by running: +``` +$ git pull +``` +and then following the build steps above from the `cd horusdemodlib` line. + + ### API Reference The main demodulator API is [horus_api.h](https://github.com/projecthorus/horusdemodlib/blob/master/src/horus_api.h). An example of it in use in a C program is available in [horus_demod.c](https://github.com/projecthorus/horusdemodlib/blob/master/src/horus_demod.c) @@ -72,6 +80,21 @@ $ pip install -r requirements.txt $ pip install -e . ``` +### Updating +If you have installed horusdemodlib via pypi, then you can simply run: +``` +$ pip install -U horusdemodlib +``` +This will also install any new dependencies. + +If you have installed 'directly', then you will need to run: +``` +$ git stash +$ git pull +$ pip install -r requirements.txt +$ pip install -e . +``` + ## Further Reading diff --git a/horusdemodlib/__init__.py b/horusdemodlib/__init__.py index 260c070..f9aa3e1 100755 --- a/horusdemodlib/__init__.py +++ b/horusdemodlib/__init__.py @@ -1 +1 @@ -__version__ = "0.3.1" +__version__ = "0.3.2" diff --git a/horusdemodlib/habitat.py b/horusdemodlib/habitat.py index 490b4dd..8f68fbb 100644 --- a/horusdemodlib/habitat.py +++ b/horusdemodlib/habitat.py @@ -62,6 +62,8 @@ class HabitatUploader(object): self.listener_antenna = listener_antenna self.position_uploaded = False + self.last_freq_hz = None + self.callsign_init = False self.uuids = [] @@ -94,6 +96,11 @@ class HabitatUploader(object): }, } + if self.last_freq_hz: + # Add in frequency information if we have it. + _data["receivers"][_user_call]["rig_info"] = {"frequency": self.last_freq_hz} + + # The URl to upload to. _url = f"{self.HABITAT_URL}{self.HABITAT_DB}/_design/payload_telemetry/_update/add_listener/{sha256(_sentence_b64).hexdigest()}" diff --git a/horusdemodlib/uploader.py b/horusdemodlib/uploader.py index 2539cd2..8741276 100644 --- a/horusdemodlib/uploader.py +++ b/horusdemodlib/uploader.py @@ -182,6 +182,7 @@ def main(): # Add in frequency estimate, if we have been supplied a receiver frequency. if args.freq_hz: _decoded['f_centre'] = int(demod_stats.fest_mean) + int(args.freq_hz) + habitat_uploader.last_freq_hz = _decoded['f_centre'] # Send via UDP send_payload_summary(_decoded, port=user_config['summary_port']) @@ -226,6 +227,7 @@ def main(): # Add in frequency estimate, if we have been supplied a receiver frequency. if args.freq_hz: _decoded['f_centre'] = int(demod_stats.fest_mean) + int(args.freq_hz) + habitat_uploader.last_freq_hz = _decoded['f_centre'] # Send via UDP send_payload_summary(_decoded, port=user_config['summary_port']) diff --git a/pyproject.toml b/pyproject.toml index f22704a..de415f0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "horusdemodlib" -version = "0.3.1" +version = "0.3.2" description = "Project Horus HAB Telemetry Demodulators" authors = ["Mark Jessop"] license = "LGPL-2.1-or-later"