Skip to content

feature - update documentation for the latest #41

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 14 commits into from
Apr 5, 2018

Conversation

RobertLucian
Copy link
Contributor

Here's the long-awaited documentation for the DI-Sensors library.

@CleoQc @johnisanerd please check every section of this documentation and give it a good read. There had been quite a lot of changes, so we'd better be sure the documentation is good.

A link to the documentation can be found here: http://di-sensors-mine.readthedocs.io/en/feature-docs/index.html. It's a private project, so no one else can see it unless they've got a link to it.

disensors

CleoQc
CleoQc previously requested changes Apr 3, 2018
"""
If the port configuration got reset, call this method to reconfigure it.

The idea is that in case the `InertialMeasurementUnit Sensor`_ gets pulled out of the plug or if there's an error on then
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this sentence makes no sense

@@ -131,6 +155,17 @@ def safe_read_euler(self):
return x,y,z

def safe_read_magnetometer(self):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

those "safe" methods should be renamed to "easy" methods. They were written before it was decided to create an easy module . What do you think?


This class compared to :py:class:`~di_sensors.light_color_sensor.LightColorSensor` uses mutexes that allows a given
object to be accessed simultaneously from multiple threads/processes.
Apart from this difference, there may
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why a carriage return here?

"""
Constructor for initializing a link to the `Light Color Sensor`_.

:param str bus = "I2C-1": The bus to which the distance sensor is connected to. Check the :ref:`hardware specs <hardware-interface-section>` for more information about the ports.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

port, not bus

Constructor for initializing a link to the `Light Color Sensor`_.

:param str bus = "I2C-1": The bus to which the distance sensor is connected to. Check the :ref:`hardware specs <hardware-interface-section>` for more information about the ports.
:param bool led_state = False: The LED state. If it's set to ``True``, then the LED will turn on, otherwise the LED will stay off. By default, the LED is turned on.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the default is False, hence the LED is off

Returned values are h (0-360), s (0-100), v(0-100)
'''
"""
Standard algorithm to switch from one color system (**RGB**) to another (**HSV**).
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We already did it.

def get_safe_raw_colors(self, use_mutex=True):
def get_safe_raw_colors(self):
"""
Returns the color read off of the `Light Color Sensor`_.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we add that these colors are highly influenced by surrounding lighting?

"""
Constructor for initializing link with the `Temperature Humidity Pressure Sensor`_.

:param str port = "I2C-1": The bus to which the THP sensor is connected to. By default, it's set to bus ``"I2C-1"``. Check the :ref:`hardware specs <hardware-interface-section>` for more information about the ports.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

port, not bus.

@RobertLucian RobertLucian dismissed CleoQc’s stale review April 3, 2018 18:26

Checked and done.

@RobertLucian RobertLucian requested a review from CleoQc April 3, 2018 18:26
@RobertLucian
Copy link
Contributor Author

As we're pressed by time, I'm going to ignore my request for John's review.

@RobertLucian RobertLucian merged commit 8dbf4c1 into DexterInd:develop Apr 5, 2018
status = -1
finally:
ifMutexRelease(self.use_mutex)
return status

def get_heading(self, in_heading):
def safe_heading(self):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why was the parameter removed from get_heading now called safe_heading?

CleoQc pushed a commit that referenced this pull request Apr 26, 2018
* Add Line Follower drivers and example

* Update dexter_i2c.py

Update dexter_i2c.py to be simpler and more universal by combining
functions.

* Update line_follower.py

Update line_follower.py for recent dexter_i2c.py update

* Feature/easy libraries (#35)

* Move Distance Sensor and Line Follower in here

* remove dependency on mock_package

* remove alias for read_sensors until we know if we need it (probably not)

* Feature/system wide mutex+ easydi_sensors library  (#36)

* Move Distance Sensor and Line Follower in here

* remove dependency on mock_package

* remove alias for read_sensors until we know if we need it (probably not)

* get easydi_sensors from DexterOS

* Check for overall mutex need

* Add systemwide mutex comment

* Add license header and description

* Add license header

* change year in license header

* split easydi_sensors into 3 components for systematic naming convention

* Remove copies of ifMutexAcquire and ifMutexRelease. Keep them in one file

* Be more strict in what we're pulling in from easy_mutex

* poll overall_mutex each time

* remove print statement (#37)

reconfig_bus() is now mutex protected

* feature - update documentation for the latest (#41)

* feature - configuring the environment for RTD

* feature - bulk changes to docs

* feature - add comment on how to build documentation

* feature - add part of the documentation

* feature - completing the documentation for easy sensors + tutorials

* feature - work on the tutorials + other stuff

* feature - fix the mutexes tutorial

* feature - change organization of documentation

* feature - remove an unnecessary section

* feature - show the right command for installing di-sensors

* feature - small changes

* feature - fix documentation & and missing parts

* feature - fix naming of the package

* Revert commit

* minor fixes to docs (#42)

* minor fixes to docs

* minor fixes to doc

* fix grammar

* rename safe_heading to heading_name and re-instate the parameter (#43)

* rename safe_heading to heading_name and re-instate the parameter

* rename from heading_name to convert_heading

* add punctuation

* fix - change name of method in library description section

* Remove references to line follower (#45)
RobertLucian added a commit that referenced this pull request Jun 1, 2018
* Add Line Follower drivers and example

* Update dexter_i2c.py

Update dexter_i2c.py to be simpler and more universal by combining
functions.

* Update line_follower.py

Update line_follower.py for recent dexter_i2c.py update

* Feature/easy libraries (#35)

* Move Distance Sensor and Line Follower in here

* remove dependency on mock_package

* remove alias for read_sensors until we know if we need it (probably not)

* Feature/system wide mutex+ easydi_sensors library  (#36)

* Move Distance Sensor and Line Follower in here

* remove dependency on mock_package

* remove alias for read_sensors until we know if we need it (probably not)

* get easydi_sensors from DexterOS

* Check for overall mutex need

* Add systemwide mutex comment

* Add license header and description

* Add license header

* change year in license header

* split easydi_sensors into 3 components for systematic naming convention

* Remove copies of ifMutexAcquire and ifMutexRelease. Keep them in one file

* Be more strict in what we're pulling in from easy_mutex

* poll overall_mutex each time

* remove print statement (#37)

reconfig_bus() is now mutex protected

* feature - update documentation for the latest (#41)

* feature - configuring the environment for RTD

* feature - bulk changes to docs

* feature - add comment on how to build documentation

* feature - add part of the documentation

* feature - completing the documentation for easy sensors + tutorials

* feature - work on the tutorials + other stuff

* feature - fix the mutexes tutorial

* feature - change organization of documentation

* feature - remove an unnecessary section

* feature - show the right command for installing di-sensors

* feature - small changes

* feature - fix documentation & and missing parts

* feature - fix naming of the package

* Revert commit

* minor fixes to docs (#42)

* minor fixes to docs

* minor fixes to doc

* fix grammar

* rename safe_heading to heading_name and re-instate the parameter (#43)

* rename safe_heading to heading_name and re-instate the parameter

* rename from heading_name to convert_heading

* add punctuation

* fix - change name of method in library description section

* Remove references to line follower (#45)

* feature - add old line follower in (#46)

* feature - adding in the line follower and making basic fixes and adjusts

* feature - fixing paths

* feature - import both versions of the line follower

* feature - change paths accordingly

* feature - fix path issues with di_sensors

* feature - fix path issues

* feature - check if installer runs on GUI-enabled OS

* feature - yet another path issue fixed

* feature - go back to using the same import for the line follower

* feature - import line_sensor correctly in new module

* feature - fix the paths yet again

* feature - add python-periphery as required packafe for line follower

* feature - change how the installation of the sensors goes (#48)

* feature - add installer script for di-sensors

* feature - add install requires for python-periphery

* feature - use the name of the module when identifying the python package

* feature - resize logo to a better aspect ratio

* feature - adjust simple install command

* feature - add readme in installation directory

* feature - modify repo readme

* feature - fix global variable issue

* feature - change how the installation goes

* feature - add the red line follower to the installation

* feature - call configure function for the red line follower

* feature - add/remove feedback instructions in install script

* feature - change version of red line follower to 1.0.0

* fix Line Follower Calibration GUI (#49)

* fix - install sources (#50)

* fix - fix path issue for desktop icon (#51)

* feature - change references for script_tools (#52)

* fix Line Follower Calibration GUI

* Fix path to line_sensor_gui in the desktop file

* feature - change references for script_tools

* use direct links instead of redirects
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants