diff --git a/Python/di_sensors/easy_distance_sensor.py b/Python/di_sensors/easy_distance_sensor.py index 7c61127..226a642 100644 --- a/Python/di_sensors/easy_distance_sensor.py +++ b/Python/di_sensors/easy_distance_sensor.py @@ -16,13 +16,12 @@ class EasyDistanceSensor(distance_sensor.DistanceSensor): This class compared to :py:class:`~di_sensors.distance_sensor.DistanceSensor` uses mutexes that allows a given object to be accessed simultaneously from multiple threads/processes. - Apart from this difference, there may - also be functions that are more user-friendly than the latter. + Apart from this difference, there may also be functions that are more user-friendly than the latter. """ def __init__(self, use_mutex=False): """ - Creates a :py:class:`~easygopigo3.DistanceSensor` object which can be used for interfacing with a `distance sensor`_. + Creates a :py:class:`~easygopigo3.EasyDistanceSensor` object which can be used for interfacing with a `distance sensor`_. :param bool use_mutex = False: When using multiple threads/processes that access the same resource/device, mutexes should be enabled. Check the :ref:`hardware specs ` for more information about the ports. :raises ~exceptions.OSError: When the distance sensor is not connected to the designated bus/port, where in this case it must be ``"I2C"``. Most probably, this means the distance sensor is not connected at all. diff --git a/Python/di_sensors/easy_light_color_sensor.py b/Python/di_sensors/easy_light_color_sensor.py index 9d1dca3..d7ad6f0 100644 --- a/Python/di_sensors/easy_light_color_sensor.py +++ b/Python/di_sensors/easy_light_color_sensor.py @@ -147,7 +147,7 @@ def translate_to_hsv(self, in_color): def safe_raw_colors(self): """ - Returns the color read off of the `Light Color Sensor`_. + Returns the color as read by the `Light Color Sensor`_. The colors detected vary depending on the lighting conditions of the nearby environment. @@ -178,7 +178,7 @@ def safe_rgb(self): def guess_color_hsv(self, in_color): """ - Determine to which color `in_color` parameter is closest to in the :py:attr:`~di_sensors.easy_light_color_sensor.EasyLightColorSensor.known_colors` list. + Determines which color `in_color` parameter is closest to in the :py:attr:`~di_sensors.easy_light_color_sensor.EasyLightColorSensor.known_colors` list. This method uses the euclidean algorithm for detecting the nearest center to it out of :py:attr:`~di_sensors.easy_light_color_sensor.EasyLightColorSensor.known_colors` list. It does work exactly the same as KNN (K-Nearest-Neighbors) algorithm, where `K = 1`. diff --git a/docs/source/structure.rst b/docs/source/structure.rst index 08852ef..0df1dc5 100644 --- a/docs/source/structure.rst +++ b/docs/source/structure.rst @@ -43,7 +43,7 @@ Instantiating the :ref:`4 sensors` in Python is a matte * :py:class:`~di_sensors.light_color_sensor.LightColorSensor` * :py:class:`~di_sensors.temp_hum_press.TempHumPress` - For these sensors *that start* with the **Easy** word, you can use the same notations as those used and mentioned in the GoPiGo3's :ref:`documentation `, such as: + If you choose to use a sensor library *that starts* with the **Easy** word, you can use the same notations as those used and mentioned in the GoPiGo3's :ref:`documentation `, such as: * ``"I2C"`` instead of ``"RPI_1"``. * ``"AD1/AD2"`` instead of ``"GPG3_AD1/GPG3_AD2"``. @@ -58,13 +58,13 @@ Library Structure Classes Short-List ------------------ -The classes that are of interest for the user are graphically displayed shortly after this. In this graphic you can also notice inheritance links -between different classes. In this graphic, we can notice 3 groups of classes: +The classes that are more likely to be of interest are graphically displayed shortly after this. In this graphic you can also notice inheritance links +between different classes. We can notice 3 groups of classes: -* Those that start with the **Easy** word in them and are really simple to use. +* Those that start with the **Easy** word in them and are easier to use and may provide some high-level functionalities. * Those that don't start with the **Easy** word and yet are related to those that are. These are generally intented for power users. * Those that look like they might represent a model number (that belong to modules such as :py:mod:`di_sensors.VL53L0X`, :py:mod:`di_sensors.BME280`, etc). - Intented for those who want to extend the functionalities of our library. These are not documented here. + These are intented for those who want to extend the functionalities of our library and are not documented here. .. inheritance-diagram:: di_sensors.easy_distance_sensor @@ -109,7 +109,7 @@ Easy - TempHumPress ^^^^^^^^^^^^^^^^^^^^ -Easy - Light +Easy - Light & Color ^^^^^^^^^^^^^^^^^^^^ .. autosummary:: @@ -150,7 +150,7 @@ Easy - IMU di_sensors.easy_inertial_measurement_unit.EasyIMUSensor.safe_north_point ^^^^^^^^^^^^^^^^^^^^^^^^^^^ -Non-Easy - TempHumPress +TempHumPress ^^^^^^^^^^^^^^^^^^^^^^^^^^^ .. autosummary:: @@ -164,7 +164,7 @@ Non-Easy - TempHumPress di_sensors.temp_hum_press.TempHumPress.get_humidity ^^^^^^^^^^^^^^^^^^^^ -Non-Easy - Light +Light & Color ^^^^^^^^^^^^^^^^^^^^ .. autosummary:: @@ -175,7 +175,7 @@ Non-Easy - Light di_sensors.light_color_sensor.LightColorSensor.get_raw_colors ^^^^^^^^^^^^^^^^^^^^ -Non-Easy - Distance +Distance ^^^^^^^^^^^^^^^^^^^^ .. autosummary:: @@ -188,7 +188,7 @@ Non-Easy - Distance di_sensors.distance_sensor.DistanceSensor.timeout_occurred ^^^^^^^^^^^^^^^^^^^^ -Non-Easy - IMU +IMU ^^^^^^^^^^^^^^^^^^^^ .. autosummary::