Skip to content

Commit

Permalink
minor fixes to docs (#42)
Browse files Browse the repository at this point in the history
* minor fixes to docs

* minor fixes to doc

* fix grammar
  • Loading branch information
CleoQc authored Apr 5, 2018
1 parent 8dbf4c1 commit 633fae2
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 15 deletions.
5 changes: 2 additions & 3 deletions Python/di_sensors/easy_distance_sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 <hardware-interface-section>` 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.
Expand Down
4 changes: 2 additions & 2 deletions Python/di_sensors/easy_light_color_sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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`.
Expand Down
20 changes: 10 additions & 10 deletions docs/source/structure.rst
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ Instantiating the :ref:`4 sensors<getting-started-chapter>` 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 <gopigo3:hardware-ports-section>`, 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 <gopigo3:hardware-ports-section>`, such as:

* ``"I2C"`` instead of ``"RPI_1"``.
* ``"AD1/AD2"`` instead of ``"GPG3_AD1/GPG3_AD2"``.
Expand All @@ -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
Expand Down Expand Up @@ -109,7 +109,7 @@ Easy - TempHumPress


^^^^^^^^^^^^^^^^^^^^
Easy - Light
Easy - Light & Color
^^^^^^^^^^^^^^^^^^^^

.. autosummary::
Expand Down Expand Up @@ -150,7 +150,7 @@ Easy - IMU
di_sensors.easy_inertial_measurement_unit.EasyIMUSensor.safe_north_point

^^^^^^^^^^^^^^^^^^^^^^^^^^^
Non-Easy - TempHumPress
TempHumPress
^^^^^^^^^^^^^^^^^^^^^^^^^^^

.. autosummary::
Expand All @@ -164,7 +164,7 @@ Non-Easy - TempHumPress
di_sensors.temp_hum_press.TempHumPress.get_humidity

^^^^^^^^^^^^^^^^^^^^
Non-Easy - Light
Light & Color
^^^^^^^^^^^^^^^^^^^^

.. autosummary::
Expand All @@ -175,7 +175,7 @@ Non-Easy - Light
di_sensors.light_color_sensor.LightColorSensor.get_raw_colors

^^^^^^^^^^^^^^^^^^^^
Non-Easy - Distance
Distance
^^^^^^^^^^^^^^^^^^^^

.. autosummary::
Expand All @@ -188,7 +188,7 @@ Non-Easy - Distance
di_sensors.distance_sensor.DistanceSensor.timeout_occurred

^^^^^^^^^^^^^^^^^^^^
Non-Easy - IMU
IMU
^^^^^^^^^^^^^^^^^^^^

.. autosummary::
Expand Down

0 comments on commit 633fae2

Please sign in to comment.