Explain functionality of message method more detailed in comment

This commit is contained in:
Jan Bechstein 2016-01-21 11:12:28 +01:00
parent 6f7ca982e9
commit b4e81c48a2

View file

@ -232,7 +232,11 @@ class Adafruit_CharLCD(object):
self.write8(LCD_ENTRYMODESET | self.displaymode)
def message(self, text):
"""Write text to display. Note that text can include newlines."""
"""Write text to display. Note that text can include newlines.
The message will always start on the first character of the first line.
Note that it does not clear the LCD by itself, therefore you may still
encounter fragment from previous messages, in case they were longer.
"""
line = 0
# Move to left or right side depending on text direction.
col = 0 if self.displaymode & LCD_ENTRYLEFT > 0 else self._cols-1