From 8230033ebfa2ed53a3a9cfb2b79fec74f112578f Mon Sep 17 00:00:00 2001 From: Andreas Motl Date: Fri, 24 Feb 2023 14:57:51 +0100 Subject: [PATCH] Rename `reading.compass` to `reading.heading` for better "naming things" --- CHANGES.rst | 1 + calypso_anemometer/fake.py | 4 ++-- calypso_anemometer/model.py | 6 +++--- calypso_anemometer/telemetry/signalk.py | 4 ++-- examples/calypso_telemetry_nmea0183.py | 2 +- examples/calypso_telemetry_signalk.py | 2 +- testing/data.py | 2 +- testing/test_cli.py | 10 +++++----- testing/test_core_reading.py | 2 +- testing/test_fake.py | 2 +- testing/test_model.py | 6 +++--- 11 files changed, 21 insertions(+), 20 deletions(-) diff --git a/CHANGES.rst b/CHANGES.rst index 3a16ed6..47cd0fe 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -5,6 +5,7 @@ calypso-anemometer changelog in progress =========== +- Rename ``reading.compass`` to ``reading.heading`` for better "naming things" 2022-08-03 0.5.1 diff --git a/calypso_anemometer/fake.py b/calypso_anemometer/fake.py index 437f583..1353e47 100644 --- a/calypso_anemometer/fake.py +++ b/calypso_anemometer/fake.py @@ -19,7 +19,7 @@ temperature=-100, roll=-90, pitch=-90, - compass=0, + heading=0, ) MAXIMUM_VALUES = CalypsoReading( @@ -29,7 +29,7 @@ temperature=+100, roll=+90, pitch=+90, - compass=360, + heading=360, ) diff --git a/calypso_anemometer/model.py b/calypso_anemometer/model.py index 8d784c1..b0ce28a 100644 --- a/calypso_anemometer/model.py +++ b/calypso_anemometer/model.py @@ -97,7 +97,7 @@ class CalypsoReading: temperature: int roll: int pitch: int - compass: int + heading: int @classmethod def from_buffer(cls, buffer: bytearray): @@ -134,7 +134,7 @@ def from_buffer(cls, buffer: bytearray): data = struct.unpack("