From cc069380240ca794722441f293b4ce4724e51d57 Mon Sep 17 00:00:00 2001 From: Tim Gates Date: Sat, 20 Nov 2021 21:41:29 +1100 Subject: [PATCH] docs: Fix a few typos There are small typos in: - docs/about/migrating.rst - docs/guide/vehicle_state_and_parameters.rst - dronekit/__init__.py Fixes: - Should read `significant` rather than `signficant`. - Should read `replaced` rather than `repaced`. - Should read `parameter` rather than `paremeter`. --- docs/about/migrating.rst | 2 +- docs/guide/vehicle_state_and_parameters.rst | 2 +- dronekit/__init__.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/about/migrating.rst b/docs/about/migrating.rst index 9654f9ce1..39b18da2a 100644 --- a/docs/about/migrating.rst +++ b/docs/about/migrating.rst @@ -249,7 +249,7 @@ Observing attribute changes The DroneKit-Python 1.x observer function ``vehicle.add_attribute_observer`` has been replaced by :py:func:`Vehicle.add_attribute_listener() ` or :py:func:`Vehicle.on_attribute() ` in DKYP2.x, and ``Vehicle.remove_attribute_observer`` -has been repaced by :py:func:`remove_attribute_listener() `. +has been replaced by :py:func:`remove_attribute_listener() `. The main difference is that the callback function now takes three arguments (the vehicle object, attribute name, attribute value) rather than just the attribute name. This allows you to more easily write callbacks that support attribute-specific and diff --git a/docs/guide/vehicle_state_and_parameters.rst b/docs/guide/vehicle_state_and_parameters.rst index 1bb23ddde..6bb7ba975 100644 --- a/docs/guide/vehicle_state_and_parameters.rst +++ b/docs/guide/vehicle_state_and_parameters.rst @@ -250,7 +250,7 @@ The example below shows how you can declare an attribute callback using the .. note:: The fragment above stores the result of the previous callback and only prints the output when there is a - signficant change in :py:attr:`Vehicle.rangefinder `. You might want to + significant change in :py:attr:`Vehicle.rangefinder `. You might want to perform caching like this to ignore updates that are not significant to your code. The examples above show how you can monitor a single attribute. You can pass the special name ('``*``') to specify a diff --git a/dronekit/__init__.py b/dronekit/__init__.py index e4a45bd40..c83bd6c2d 100644 --- a/dronekit/__init__.py +++ b/dronekit/__init__.py @@ -2851,7 +2851,7 @@ def thr_min_callback(self, attr_name, value): def remove_attribute_listener(self, attr_name, *args, **kwargs): """ - Remove a paremeter listener that was previously added using :py:func:`add_attribute_listener`. + Remove a parameter listener that was previously added using :py:func:`add_attribute_listener`. For example to remove the ``thr_min_callback()`` callback function: