From 974c909a8750e125d8ef56a0aeff5e64fec90208 Mon Sep 17 00:00:00 2001 From: sommersoft Date: Sat, 3 Mar 2018 19:39:37 -0600 Subject: [PATCH 01/17] renamed example; 1 learn guide will need updates --- examples/{simpletest.py => thermal_printer_simpletest.py} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename examples/{simpletest.py => thermal_printer_simpletest.py} (100%) diff --git a/examples/simpletest.py b/examples/thermal_printer_simpletest.py similarity index 100% rename from examples/simpletest.py rename to examples/thermal_printer_simpletest.py From 366b50ea8e82d4570d79dfbbcb21b9928721aa85 Mon Sep 17 00:00:00 2001 From: sommersoft Date: Sat, 3 Mar 2018 19:43:05 -0600 Subject: [PATCH 02/17] setup docs folder --- api.rst | 5 ----- docs/_static/favicon.ico | Bin 0 -> 4414 bytes docs/api.rst | 11 +++++++++ conf.py => docs/conf.py | 15 ++++++++++--- docs/examples.rst | 8 +++++++ docs/index.rst | 47 +++++++++++++++++++++++++++++++++++++++ 6 files changed, 78 insertions(+), 8 deletions(-) delete mode 100644 api.rst create mode 100644 docs/_static/favicon.ico create mode 100644 docs/api.rst rename conf.py => docs/conf.py (90%) create mode 100644 docs/examples.rst create mode 100644 docs/index.rst diff --git a/api.rst b/api.rst deleted file mode 100644 index 1200bf7..0000000 --- a/api.rst +++ /dev/null @@ -1,5 +0,0 @@ - -.. If you created a package, create one automodule per module in the package. - -.. automodule:: adafruit_thermal_printer - :members: diff --git a/docs/_static/favicon.ico b/docs/_static/favicon.ico new file mode 100644 index 0000000000000000000000000000000000000000..5aca98376a1f7e593ebd9cf41a808512c2135635 GIT binary patch literal 4414 zcmd^BX;4#F6n=SG-XmlONeGrD5E6J{RVh+e928U#MG!$jWvO+UsvWh`x&VqGNx*en zx=qox7Dqv{kPwo%fZC$dDwVpRtz{HzTkSs8QhG0)%Y=-3@Kt!4ag|JcIo?$-F|?bXVS9UDUyev>MVZQ(H8K4#;BQW-t2CPorj8^KJrMX}QK zp+e<;4ldpXz~=)2GxNy811&)gt-}Q*yVQpsxr@VMoA##{)$1~=bZ1MmjeFw?uT(`8 z^g=09<=zW%r%buwN%iHtuKSg|+r7HkT0PYN*_u9k1;^Ss-Z!RBfJ?Un4w(awqp2b3 z%+myoFis_lTlCrGx2z$0BQdh+7?!JK#9K9@Z!VrG zNj6gK5r(b4?YDOLw|DPRoN7bdP{(>GEG41YcN~4r_SUHU2hgVtUwZG@s%edC;k7Sn zC)RvEnlq~raE2mY2ko64^m1KQL}3riixh?#J{o)IT+K-RdHae2eRX91-+g!y`8^># z-zI0ir>P%Xon)!@xp-BK2bDYUB9k613NRrY6%lVjbFcQc*pRqiK~8xtkNPLxt}e?&QsTB}^!39t_%Qb)~Ukn0O%iC;zt z<&A-y;3h++)>c1br`5VFM~5(83!HKx$L+my8sW_c#@x*|*vB1yU)_dt3vH;2hqPWx zAl^6@?ipx&U7pf`a*>Yq6C85nb+B=Fnn+(id$W#WB^uHAcZVG`qg;rWB}ubvi(Y>D z$ei>REw$#xp0SHAd^|1hq&9HJ=jKK8^zTH~nk)G?yUcmTh9vUM6Y0LMw4(gYVY$D$ zGl&WY&H<)BbJ&3sYbKjx1j^=3-0Q#f^}(aP1?8^`&FUWMp|rmtpK)bLQ1Zo?^s4jqK=Lfg*9&geMGVQ z#^-*!V`fG@;H&{M9S8%+;|h&Qrxym0Ar>WT4BCVLR8cGXF=JmEYN(sNT(9vl+S|%g z8r7nXQ(95i^`=+XHo|){$vf2$?=`F$^&wFlYXyXg$B{a>$-Fp+V}+D;9k=~Xl~?C4 zAB-;RKXdUzBJE{V&d&%R>aEfFe;vxqI$0@hwVM}gFeQR@j}a>DDxR+n+-*6|_)k%% z*mSpDV|=5I9!&VC&9tD%fcVygWZV!iIo2qFtm#!*(s|@ZT33*Ad;+<|3^+yrp*;oH zBSYLV(H1zTU?2WjrCQoQW)Z>J2a=dTriuvezBmu16`tM2fm7Q@d4^iqII-xFpwHGI zn9CL}QE*1vdj2PX{PIuqOe5dracsciH6OlAZATvE8rj6ykqdIjal2 z0S0S~PwHb-5?OQ-tU-^KTG@XNrEVSvo|HIP?H;7ZhYeZkhSqh-{reE!5di;1zk$#Y zCe7rOnlzFYJ6Z#Hm$GoidKB=2HBCwm`BbZVeZY4ukmG%1uz7p2URs6c9j-Gjj^oQV zsdDb3@k2e`C$1I5ML5U0Qs0C1GAp^?!*`=|Nm(vWz3j*j*8ucum2;r0^-6Aca=Gv) zc%}&;!+_*S2tlnnJnz0EKeRmw-Y!@9ob!XQBwiv}^u9MkaXHvM=!<3YX;+2#5Cj5pp?FEK750S3BgeSDtaE^ zXUM@xoV6yBFKfzvY20V&Lr0yC + +.. toctree:: + :caption: Other Links + + Download + CircuitPython Reference Documentation + CircuitPython Support Forum + Discord Chat + Adafruit Learning System + Adafruit Blog + Adafruit Store + +Indices and tables +================== + +* :ref:`genindex` +* :ref:`modindex` +* :ref:`search` From 952cd20be4507dd5a0c8e7977bcc0ba6699b37ad Mon Sep 17 00:00:00 2001 From: sommersoft Date: Sat, 3 Mar 2018 19:44:04 -0600 Subject: [PATCH 03/17] updated. travis & .readthedocs yml --- readthedocs.yml => .readthedocs.yml | 0 .travis.yml | 6 ++++-- 2 files changed, 4 insertions(+), 2 deletions(-) rename readthedocs.yml => .readthedocs.yml (100%) diff --git a/readthedocs.yml b/.readthedocs.yml similarity index 100% rename from readthedocs.yml rename to .readthedocs.yml diff --git a/.travis.yml b/.travis.yml index 8d00bcf..1254b9a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -16,15 +16,17 @@ deploy: provider: releases api_key: $GITHUB_TOKEN file_glob: true - file: bundles/* + file: $TRAVIS_BUILD_DIR/bundles/* skip_cleanup: true + overwrite: true on: tags: true install: - - pip install pylint circuitpython-build-tools + - pip install pylint circuitpython-build-tools Sphinx sphinx-rtd-theme script: - pylint --disable=missing-docstring adafruit_thermal_printer/*.py - ([[ ! -d "examples" ]] || pylint --disable=missing-docstring,invalid-name examples/*.py) - circuitpython-build-bundles --filename_prefix adafruit-circuitpython-thermal-printer --library_location . + - cd docs && sphinx-build -E -W -b html . _build/html From f034ac186535a0d54afd8a85ef824c307c3877ae Mon Sep 17 00:00:00 2001 From: sommersoft Date: Sat, 3 Mar 2018 19:46:10 -0600 Subject: [PATCH 04/17] updated README --- README.rst | 37 ++++++++++++++++++++++++++++--------- 1 file changed, 28 insertions(+), 9 deletions(-) diff --git a/README.rst b/README.rst index 4c066fb..4910c44 100644 --- a/README.rst +++ b/README.rst @@ -10,6 +10,10 @@ Introduction :target: https://discord.gg/nBQh6qu :alt: Discord +.. image:: https://travis-ci.org/adafruit/Adafruit_CircuitPython_Thermal_Printer.svg?branch=master + :target: https://travis-ci.org/adafruit/Adafruit_CircuitPython_Thermal_Printer + :alt: Build Status + CircuitPython module for control of various small serial thermal printers. Dependencies @@ -25,15 +29,7 @@ This is easily achieved by downloading Usage Example ============= -See examples/simpletest.py for a demo of basic printer usage. - -API Reference -============= - -.. toctree:: - :maxdepth: 2 - - api +See examples/thermal_printer_simpletest.py for a demo of basic printer usage. Contributing ============ @@ -65,3 +61,26 @@ Then run the build: .. code-block:: shell circuitpython-build-bundles --filename_prefix adafruit_circuitpython_thermal_printer --library_location . + +Sphinx documentation +----------------------- + +Sphinx is used to build the documentation based on rST files and comments in the code. First, +install dependencies (feel free to reuse the virtual environment from above): + +.. code-block:: shell + + python3 -m venv .env + source .env/bin/activate + pip install Sphinx sphinx-rtd-theme + +Now, once you have the virtual environment activated: + +.. code-block:: shell + + cd docs + sphinx-build -E -W -b html . _build/html + +This will output the documentation to ``docs/_build/html``. Open the index.html in your browser to +view them. It will also (due to -W) error out on any warning like Travis will. This is a good way to +locally verify it will pass. From df0b3b0e4c6f72c129dcdb965cd07931ab307836 Mon Sep 17 00:00:00 2001 From: sommersoft Date: Sat, 3 Mar 2018 19:50:18 -0600 Subject: [PATCH 05/17] updated info docstring; docstring formatting --- adafruit_thermal_printer/thermal_printer.py | 24 +++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/adafruit_thermal_printer/thermal_printer.py b/adafruit_thermal_printer/thermal_printer.py index 370f098..7a99aee 100644 --- a/adafruit_thermal_printer/thermal_printer.py +++ b/adafruit_thermal_printer/thermal_printer.py @@ -27,11 +27,26 @@ receipt printers. Note that these printers have many different firmware versions and care must be taken to select the appropriate module inside this package for your firmware printer: - - thermal_printer = The latest printers with firmware version 2.68+ - - thermal_printer_264 = Printers with firmware version 2.64 up to 2.68. - - thermal_printer_legacy = Printers with firmware version before 2.64. + +* thermal_printer = The latest printers with firmware version 2.68+ +* thermal_printer_264 = Printers with firmware version 2.64 up to 2.68. +* thermal_printer_legacy = Printers with firmware version before 2.64. * Author(s): Tony DiCola + +Implementation Notes +-------------------- + +**Hardware:** + +* Mini `Thermal Receipt Printer + `_ (Product ID: 597) + +**Software and Dependencies:** + +* Adafruit CircuitPython firmware for the ESP8622 and M0-based boards: + https://github.com/adafruit/circuitpython/releases + """ import time @@ -319,7 +334,8 @@ def _print_bitmap(self, width, height, data): pre-process your images with a script, you CANNOT send .jpg/.bmp/etc. image formats. See this Processing sketch for preprocessing: https://github.com/adafruit/Adafruit-Thermal-Printer-Library/blob/master/processing/bitmapImageConvert/bitmapImageConvert.pde - NOTE: This is currently not working because it appears the bytes are + + .. note:: This is currently not working because it appears the bytes are sent too slowly and the printer gets confused with not enough data being sent to it in the expected time. """ From a4e05c728ad00fbcddd3be417c19338e41bb3048 Mon Sep 17 00:00:00 2001 From: sommersoft Date: Sat, 3 Mar 2018 20:00:17 -0600 Subject: [PATCH 06/17] sphinx fixes; a new hope that this will work --- adafruit_thermal_printer/thermal_printer.py | 2 +- adafruit_thermal_printer/thermal_printer_264.py | 9 +++++---- adafruit_thermal_printer/thermal_printer_legacy.py | 13 ++++++++----- 3 files changed, 14 insertions(+), 10 deletions(-) diff --git a/adafruit_thermal_printer/thermal_printer.py b/adafruit_thermal_printer/thermal_printer.py index 7a99aee..8a0bc61 100644 --- a/adafruit_thermal_printer/thermal_printer.py +++ b/adafruit_thermal_printer/thermal_printer.py @@ -20,7 +20,7 @@ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN # THE SOFTWARE. """ -`adafruit_thermal_printer` +`adafruit_thermal_printer.thermal_printer` ==================================================== Thermal printer control module built to work with small serial thermal diff --git a/adafruit_thermal_printer/thermal_printer_264.py b/adafruit_thermal_printer/thermal_printer_264.py index 5151900..cb9b298 100644 --- a/adafruit_thermal_printer/thermal_printer_264.py +++ b/adafruit_thermal_printer/thermal_printer_264.py @@ -20,16 +20,17 @@ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN # THE SOFTWARE. """ -`adafruit_thermal_printer_264` +`adafruit_thermal_printer.thermal_printer_264` ==================================================== Thermal printer control module built to work with small serial thermal receipt printers. Note that these printers have many different firmware versions and care must be taken to select the appropriate module inside this package for your firmware printer: - - thermal_printer = The latest printers with firmware version 2.68+ - - thermal_printer_264 = Printers with firmware version 2.64 up to 2.68. - - thermal_printer_legacy = Printers with firmware version before 2.64. + +* thermal_printer = The latest printers with firmware version 2.68+ +* thermal_printer_264 = Printers with firmware version 2.64 up to 2.68. +* thermal_printer_legacy = Printers with firmware version before 2.64. * Author(s): Tony DiCola """ diff --git a/adafruit_thermal_printer/thermal_printer_legacy.py b/adafruit_thermal_printer/thermal_printer_legacy.py index b3a0abe..0d13273 100644 --- a/adafruit_thermal_printer/thermal_printer_legacy.py +++ b/adafruit_thermal_printer/thermal_printer_legacy.py @@ -20,16 +20,17 @@ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN # THE SOFTWARE. """ -`adafruit_thermal_printer_legacy` +`adafruit_thermal_printer.thermal_printer_legacy` ==================================================== Thermal printer control module built to work with small serial thermal receipt printers. Note that these printers have many different firmware versions and care must be taken to select the appropriate module inside this package for your firmware printer: - - thermal_printer = The latest printers with firmware version 2.68+ - - thermal_printer_264 = Printers with firmware version 2.64 up to 2.68. - - thermal_printer_legacy = Printers with firmware version before 2.64. + +* thermal_printer = The latest printers with firmware version 2.68+ +* thermal_printer_264 = Printers with firmware version 2.64 up to 2.68. +* thermal_printer_legacy = Printers with firmware version before 2.64. * Author(s): Tony DiCola """ @@ -128,7 +129,9 @@ def feed(self, lines): def has_paper(self): """Return a boolean indicating if the printer has paper. You MUST have - the serial RX line hooked up for this to work. NOTE: be VERY CAREFUL + the serial RX line hooked up for this to work. + + .. note:: be VERY CAREFUL to ensure your board can handle a 5V serial input before hooking up the RX line! """ From 36f17495f522f15b6c2066e6867ab8b225b31f9e Mon Sep 17 00:00:00 2001 From: sommersoft Date: Sat, 3 Mar 2018 20:11:48 -0600 Subject: [PATCH 07/17] sphinx fixes2; those were not the fixes I was looking for --- adafruit_thermal_printer/thermal_printer_264.py | 4 ++-- adafruit_thermal_printer/thermal_printer_legacy.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/adafruit_thermal_printer/thermal_printer_264.py b/adafruit_thermal_printer/thermal_printer_264.py index cb9b298..ed58920 100644 --- a/adafruit_thermal_printer/thermal_printer_264.py +++ b/adafruit_thermal_printer/thermal_printer_264.py @@ -20,8 +20,8 @@ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN # THE SOFTWARE. """ -`adafruit_thermal_printer.thermal_printer_264` -==================================================== +`adafruit_thermal_printer.thermal_printer_264.ThermalPrinter` +============================================================== Thermal printer control module built to work with small serial thermal receipt printers. Note that these printers have many different firmware diff --git a/adafruit_thermal_printer/thermal_printer_legacy.py b/adafruit_thermal_printer/thermal_printer_legacy.py index 0d13273..f26f963 100644 --- a/adafruit_thermal_printer/thermal_printer_legacy.py +++ b/adafruit_thermal_printer/thermal_printer_legacy.py @@ -20,8 +20,8 @@ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN # THE SOFTWARE. """ -`adafruit_thermal_printer.thermal_printer_legacy` -==================================================== +`adafruit_thermal_printer.thermal_printer_legacy.ThermalPrinter` +================================================================= Thermal printer control module built to work with small serial thermal receipt printers. Note that these printers have many different firmware From 24f49ed2d094c7d82c399722ab4bf57159f17384 Mon Sep 17 00:00:00 2001 From: sommersoft Date: Sun, 4 Mar 2018 09:49:12 -0600 Subject: [PATCH 08/17] sphinx fixes3; one more title dispute --- adafruit_thermal_printer/thermal_printer.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/adafruit_thermal_printer/thermal_printer.py b/adafruit_thermal_printer/thermal_printer.py index 8a0bc61..df03cd4 100644 --- a/adafruit_thermal_printer/thermal_printer.py +++ b/adafruit_thermal_printer/thermal_printer.py @@ -20,7 +20,7 @@ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN # THE SOFTWARE. """ -`adafruit_thermal_printer.thermal_printer` +`adafruit_thermal_printer.thermal_printer.ThermalPrinter` ==================================================== Thermal printer control module built to work with small serial thermal From fccd689dc63ca3994835dd209833c2bddda8babf Mon Sep 17 00:00:00 2001 From: sommersoft Date: Sun, 4 Mar 2018 10:04:45 -0600 Subject: [PATCH 09/17] sphinx fixes4; shot in the dark --- docs/conf.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/conf.py b/docs/conf.py index 34b104f..ca41d52 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -105,7 +105,7 @@ html_favicon = '_static/favicon.ico' # Output file base name for HTML help builder. -htmlhelp_basename = 'Adafruit_thermal_printerLibrarydoc' +htmlhelp_basename = 'adafruit_thermal_printerLibrarydoc' # -- Options for LaTeX output --------------------------------------------- From 53f697ecef689be09a9dcb69dd006e95b92bfba9 Mon Sep 17 00:00:00 2001 From: sommersoft Date: Sun, 4 Mar 2018 10:08:16 -0600 Subject: [PATCH 10/17] sphinx fixes5; starting step-by-step/one-at-a-time automodule build --- docs/api.rst | 6 ------ 1 file changed, 6 deletions(-) diff --git a/docs/api.rst b/docs/api.rst index af2d616..eb30881 100644 --- a/docs/api.rst +++ b/docs/api.rst @@ -3,9 +3,3 @@ .. automodule:: adafruit_thermal_printer.thermal_printer :members: - -.. automodule:: adafruit_thermal_printer.thermal_printer_264 - :members: - -.. automodule:: adafruit_thermal_printer.thermal_printer_legacy - :members: From e77de2d262915a3cf3579de713d9b4a93977d59e Mon Sep 17 00:00:00 2001 From: sommersoft Date: Sun, 4 Mar 2018 10:12:17 -0600 Subject: [PATCH 11/17] sphinx fixes6; added some plain text to title...maybe api.rst will build --- adafruit_thermal_printer/thermal_printer.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/adafruit_thermal_printer/thermal_printer.py b/adafruit_thermal_printer/thermal_printer.py index df03cd4..5e0f94c 100644 --- a/adafruit_thermal_printer/thermal_printer.py +++ b/adafruit_thermal_printer/thermal_printer.py @@ -20,8 +20,8 @@ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN # THE SOFTWARE. """ -`adafruit_thermal_printer.thermal_printer.ThermalPrinter` -==================================================== +`adafruit_thermal_printer.thermal_printer` - Thermal Printer Driver +===================================================================== Thermal printer control module built to work with small serial thermal receipt printers. Note that these printers have many different firmware From 67d9f111c317067ca00ef7bee313a830a076c2c1 Mon Sep 17 00:00:00 2001 From: sommersoft Date: Sun, 4 Mar 2018 11:06:26 -0600 Subject: [PATCH 12/17] sphinx fixes7; dropped thermal_printer autodoc mocking --- docs/conf.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/conf.py b/docs/conf.py index ca41d52..803ba9e 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -18,7 +18,7 @@ # Uncomment the below if you use native CircuitPython modules such as # digitalio, micropython and busio. List the modules you use. Without it, the # autodoc module docs will fail to generate with a warning. -autodoc_mock_imports = ["micropython", "adafruit_thermal_printer"] +autodoc_mock_imports = ["micropython"]#, "adafruit_thermal_printer"] intersphinx_mapping = {'python': ('https://docs.python.org/3.4', None),'CircuitPython': ('https://circuitpython.readthedocs.io/en/latest/', None)} From cffd7dd51fc5fb7b91b949f28a3b9899ce165018 Mon Sep 17 00:00:00 2001 From: sommersoft Date: Sun, 4 Mar 2018 11:09:29 -0600 Subject: [PATCH 13/17] sphinx fixes8; dropping autodoc mocking worked...adding other 2 automodules back --- docs/api.rst | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/docs/api.rst b/docs/api.rst index eb30881..fbaa471 100644 --- a/docs/api.rst +++ b/docs/api.rst @@ -3,3 +3,9 @@ .. automodule:: adafruit_thermal_printer.thermal_printer :members: + +.. automodule:: adafruit_thermal_printer.thermal_printer_264 + :members: + +.. automodule:: adafruit_thermal_printer.thermal_printer_legacy + :members: \ No newline at end of file From 6f89966794a2620456ed0c792658f453a3e425ea Mon Sep 17 00:00:00 2001 From: sommersoft Date: Sun, 4 Mar 2018 11:12:39 -0600 Subject: [PATCH 14/17] new sphinx fix; docstring formatting --- adafruit_thermal_printer/thermal_printer_legacy.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/adafruit_thermal_printer/thermal_printer_legacy.py b/adafruit_thermal_printer/thermal_printer_legacy.py index f26f963..587f22c 100644 --- a/adafruit_thermal_printer/thermal_printer_legacy.py +++ b/adafruit_thermal_printer/thermal_printer_legacy.py @@ -131,9 +131,9 @@ def has_paper(self): """Return a boolean indicating if the printer has paper. You MUST have the serial RX line hooked up for this to work. - .. note:: be VERY CAREFUL - to ensure your board can handle a 5V serial input before hooking up - the RX line! + .. note:: be VERY CAREFUL to ensure your board can handle a 5V serial + input before hooking up the RX line! + """ # The paper check command is different for older firmware: self.send_command('\x1Br\x00') # ESC + 'r' + 0 From a9f921a63a4d1c3290fc419ac2fbd91124d4a0d1 Mon Sep 17 00:00:00 2001 From: sommersoft Date: Sun, 4 Mar 2018 11:18:33 -0600 Subject: [PATCH 15/17] new sphinx fix2 --- adafruit_thermal_printer/thermal_printer_legacy.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/adafruit_thermal_printer/thermal_printer_legacy.py b/adafruit_thermal_printer/thermal_printer_legacy.py index 587f22c..4d30c4b 100644 --- a/adafruit_thermal_printer/thermal_printer_legacy.py +++ b/adafruit_thermal_printer/thermal_printer_legacy.py @@ -133,7 +133,7 @@ def has_paper(self): .. note:: be VERY CAREFUL to ensure your board can handle a 5V serial input before hooking up the RX line! - + """ # The paper check command is different for older firmware: self.send_command('\x1Br\x00') # ESC + 'r' + 0 From 7ed61584d0a05cc92234ea59953678da5aa6e153 Mon Sep 17 00:00:00 2001 From: sommersoft Date: Sun, 4 Mar 2018 11:28:28 -0600 Subject: [PATCH 16/17] new sphinx fix3; helps touse the proper syntax... --- adafruit_thermal_printer/thermal_printer_legacy.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/adafruit_thermal_printer/thermal_printer_legacy.py b/adafruit_thermal_printer/thermal_printer_legacy.py index 4d30c4b..6577078 100644 --- a/adafruit_thermal_printer/thermal_printer_legacy.py +++ b/adafruit_thermal_printer/thermal_printer_legacy.py @@ -131,8 +131,10 @@ def has_paper(self): """Return a boolean indicating if the printer has paper. You MUST have the serial RX line hooked up for this to work. - .. note:: be VERY CAREFUL to ensure your board can handle a 5V serial - input before hooking up the RX line! + .. note:: + + be VERY CAREFUL to ensure your board can handle a 5V serial + input before hooking up the RX line! """ # The paper check command is different for older firmware: From b8619cada480ad943b7600109f1d49e6f00de0f8 Mon Sep 17 00:00:00 2001 From: sommersoft Date: Sun, 4 Mar 2018 11:31:14 -0600 Subject: [PATCH 17/17] pylint fix; of course had to have one more whitespace... --- adafruit_thermal_printer/thermal_printer_legacy.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/adafruit_thermal_printer/thermal_printer_legacy.py b/adafruit_thermal_printer/thermal_printer_legacy.py index 6577078..94fed16 100644 --- a/adafruit_thermal_printer/thermal_printer_legacy.py +++ b/adafruit_thermal_printer/thermal_printer_legacy.py @@ -132,7 +132,7 @@ def has_paper(self): the serial RX line hooked up for this to work. .. note:: - + be VERY CAREFUL to ensure your board can handle a 5V serial input before hooking up the RX line!