Skip to content

Commit 8c9755d

Browse files
committed
Switch back to comments for private method docs (style and memory saving).
1 parent 14a7df0 commit 8c9755d

File tree

2 files changed

+15
-17
lines changed

2 files changed

+15
-17
lines changed

adafruit_character_lcd/character_lcd.py

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -101,8 +101,8 @@
101101
#pylint: enable-msg=bad-whitespace
102102

103103
def _set_bit(byte_value, position, val):
104-
"""Given the specified byte_value set the bit at position to the provided
105-
boolean value val and return the modified byte."""
104+
# Given the specified byte_value set the bit at position to the provided
105+
# boolean value val and return the modified byte.
106106
ret = None
107107
if val:
108108
ret = byte_value | (1 << position)
@@ -124,7 +124,7 @@ class Character_LCD(object):
124124
:param lines: The lines on the charLCD
125125
:param ~digitalio.DigitalInOut backlight: The backlight pin, usually
126126
the last pin. Check with your datasheet
127-
"""
127+
"""
128128
#pylint: disable-msg=too-many-arguments
129129
def __init__(self, rs, en, d4, d5, d6, d7, cols, lines,
130130
backlight=None #,
@@ -239,11 +239,10 @@ def enable_display(self, enable):
239239
self._write8(LCD_DISPLAYCONTROL | self.displaycontrol)
240240

241241
def _write8(self, value, char_mode=False):
242-
"""Sends 8b ``value`` in ``char_mode``.
243-
:param value: bytes
244-
:param char_mode: character/data mode selector. False (default) for
245-
data only, True for character bits.
246-
"""
242+
# Sends 8b ``value`` in ``char_mode``.
243+
# :param value: bytes
244+
# :param char_mode: character/data mode selector. False (default) for
245+
# data only, True for character bits.
247246
# one ms delay to prevent writing too quickly.
248247
time.sleep(0.001)
249248
# set character/data bit. (charmode = False)
@@ -263,7 +262,7 @@ def _write8(self, value, char_mode=False):
263262
self._pulse_enable()
264263

265264
def _pulse_enable(self):
266-
""" Pulses (lo->hi->lo) to send commands. """
265+
# Pulses (lo->hi->lo) to send commands.
267266
self.enable.value = False
268267
# 1microsec pause
269268
time.sleep(0.0000001)

adafruit_character_lcd/character_lcd_rgb.py

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@
8484
#pylint: enable-msg=bad-whitespace
8585

8686
def _map(xval, in_min, in_max, out_min, out_max):
87-
""" Affine transfer/map with constrained output. """
87+
# Affine transfer/map with constrained output.
8888
outrange = float(out_max - out_min)
8989
inrange = float(in_max - in_min)
9090
ret = (xval - in_min) * (outrange / inrange) + out_min
@@ -112,7 +112,7 @@ class Character_LCD_RGB(object):
112112
:param ~digitalio.DigitalInOut backlight: The backlight pin, usually the last pin.
113113
Consult the datasheet. Note that Pin value 0 means backlight is lit.
114114
115-
"""
115+
"""
116116
#pylint: disable-msg=too-many-arguments
117117
def __init__(self, rs, en, d4, d5, d6, d7, cols, lines,
118118
red,
@@ -206,11 +206,10 @@ def enable_display(self, enable):
206206
self._write8(_LCD_DISPLAYCONTROL | self.displaycontrol)
207207

208208
def _write8(self, value, char_mode=False):
209-
"""Sends 8b ``value`` in ``char_mode``.
210-
:param value: bytes
211-
:param char_mode: character/data mode selector. False (default) for
212-
data only, True for character bits.
213-
"""
209+
# Sends 8b ``value`` in ``char_mode``.
210+
# :param value: bytes
211+
# :param char_mode: character/data mode selector. False (default) for
212+
# data only, True for character bits.
214213
# one ms delay to prevent writing too quickly.
215214
time.sleep(0.001)
216215
# set character/data bit. (charmode = False)
@@ -230,7 +229,7 @@ def _write8(self, value, char_mode=False):
230229
self._pulse_enable()
231230

232231
def _pulse_enable(self):
233-
""" Pulses (lo->hi->lo) to send commands. """
232+
# Pulses (lo->hi->lo) to send commands.
234233
self.enable.value = False
235234
# 1microsec pause
236235
time.sleep(0.0000001)

0 commit comments

Comments
 (0)