Skip to content

Commit

Permalink
Updated sphinx docs
Browse files Browse the repository at this point in the history
  • Loading branch information
Gadgetoid committed Jul 14, 2018
1 parent 10b6aee commit 87e73c4
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 86 deletions.
18 changes: 9 additions & 9 deletions sphinx/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
import site

import mock
PACKAGE_NAME = u"Scroll pHAT HD"
PACKAGE_HANDLE = "ScrollpHATHD"
PACKAGE_MODULE = "scrollphathd"
PACKAGE_NAME = u"LED SHIM"
PACKAGE_HANDLE = "LEDSHIM"
PACKAGE_MODULE = "ledshim"

# Prompte /usr/local/lib to the front of sys.path
#sys.path.insert(0,site.getsitepackages()[0])
Expand All @@ -20,7 +20,7 @@
sys.path.insert(0, '../library/')


import scrollphathd
import ledshim

from sphinx.ext import autodoc

Expand All @@ -38,7 +38,7 @@ def add_content(self, more_content, no_docstring=False):

def add_directive_header(self, sig):
if self.objpath[0] == u"Matrix":
self.objpath[0] = u'scrollphathd'
self.objpath[0] = u'ledshim'
autodoc.MethodDocumenter.add_directive_header(self, sig)

class OutlineFunctionDocumenter(autodoc.FunctionDocumenter):
Expand All @@ -49,15 +49,15 @@ def add_content(self, more_content, no_docstring=False):

def add_directive_header(self, sig):
if self.objpath[0] == u"Matrix":
self.objpath[0] = u'scrollphathd'
self.objpath[0] = u'ledshim'
autodoc.FunctionDocumenter.add_directive_header(self, sig)

class MethodDocumenter(autodoc.MethodDocumenter):
objtype = 'method'

def add_directive_header(self, sig):
if self.objpath[0] == u"Matrix":
self.objpath[0] = u'scrollphathd'
self.objpath[0] = u'ledshim'
autodoc.MethodDocumenter.add_directive_header(self, sig)

class ClassOutlineDocumenter(autodoc.ClassDocumenter):
Expand Down Expand Up @@ -127,9 +127,9 @@ def setup(app):
# built documents.
#
# The short X.Y version.
version = u'{}'.format(scrollphathd.__version__)
version = u'{}'.format(ledshim.__version__)
# The full version, including alpha/beta/rc tags.
release = u'{}'.format(scrollphathd.__version__)
release = u'{}'.format(ledshim.__version__)

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
Expand Down
91 changes: 14 additions & 77 deletions sphinx/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,21 @@
Welcome
-------

This documentation will guide you through the methods available in the Scroll pHAT HD python library.
This documentation will guide you through the methods available in the LED SHIM Python library.

Scroll pHAT provides a matrix of 119 individually brightness controlled white LED pixels that is ideal for writing messages, showing graphs, and drawing pictures. Use it to output your IP address, show CPU usage, or just play pong!
LED SHIM provides a row of 24 tiny RGB LEDs which you can light up with any colour you like!

* More information - https://shop.pimoroni.com/products/scroll-phat-hd
* Get the code - https://github.com/pimoroni/scroll-phat-hd
* GPIO pinout - https://pinout.xyz/pinout/scroll_phat_hd
* Soldering - https://learn.pimoroni.com/tutorial/sandyj/soldering-phats
* More information - https://shop.pimoroni.com/products/led-shim
* Get the code - https://github.com/pimoroni/led-shim
* GPIO pinout - https://pinout.xyz/pinout/led_shim
* Get help - http://forums.pimoroni.com/c/support

.. currentmodule:: scrollphathd.is31fl3731
.. currentmodule:: ledshim.is31fl3731.Matrix

At A Glance
-----------

.. autoclassoutline:: scrollphathd.is31fl3731.Matrix
.. autoclassoutline:: ledshim.is31fl3731.Matrix
:members:

.. toctree::
Expand All @@ -29,90 +28,28 @@ At A Glance
Set A Single Pixel In Buffer
----------------------------

Scroll pHAT HD uses white LEDs which can be brightness controlled.
When you set a pixel it will not immediately display on LED SHIM, you must call :python:`ledshim.show()`.

When you set a pixel it will not immediately display on Scroll pHAT HD, you must call :python:`scrollphathd.show()`.

.. automethod:: scrollphathd.is31fl3731.Matrix.set_pixel
:noindex:

Write A Text String
-------------------

.. automethod:: scrollphathd.is31fl3731.Matrix.write_string
:noindex:

Draw A Single Char
------------------

.. automethod:: scrollphathd.is31fl3731.Matrix.draw_char
:noindex:

Display A Graph
---------------

.. automethod:: scrollphathd.is31fl3731.Matrix.set_graph
:noindex:

Fill An Area
------------

.. automethod:: scrollphathd.is31fl3731.Matrix.fill
:noindex:

Clear An Area
-------------

.. automethod:: scrollphathd.is31fl3731.Matrix.clear_rect
.. automethod:: ledshim.is31fl3731.Matrix.set_pixel
:noindex:

Display Buffer
--------------

All of your changes to Scroll pHAT HD are stored in a Python buffer. To display them
on Scroll pHAT HD you must call :python:`scrollphathd.show()`.
All of your changes to LED SHIM are stored in a Python buffer. To display them
on LED SHIM you must call :python:`ledshim.show()`.

.. automethod:: scrollphathd.is31fl3731.Matrix.show
.. automethod:: ledshim.is31fl3731.Matrix.show
:noindex:

Clear Buffer
------------

.. automethod:: scrollphathd.is31fl3731.Matrix.clear
:noindex:

Scroll The Buffer
-----------------

.. automethod:: scrollphathd.is31fl3731.Matrix.scroll
:noindex:

Scroll To A Position
--------------------

.. automethod:: scrollphathd.is31fl3731.Matrix.scroll_to
:noindex:

Rotate The Display
------------------

.. automethod:: scrollphathd.is31fl3731.Matrix.rotate
:noindex:

Flip The Display
----------------

.. automethod:: scrollphathd.is31fl3731.Matrix.flip
.. automethod:: ledshim.is31fl3731.Matrix.clear
:noindex:

Get The Display Size
--------------------

.. automethod:: scrollphathd.is31fl3731.Matrix.get_shape
:noindex:

Get The Buffer Size
-------------------

.. automethod:: scrollphathd.is31fl3731.Matrix.get_buffer_shape
.. automethod:: ledshim.is31fl3731.Matrix.get_shape
:noindex:

0 comments on commit 87e73c4

Please sign in to comment.