Skip to content
Prev Previous commit
Next Next commit
Update character_lcd.py
  • Loading branch information
profbrady authored Apr 10, 2019
commit 7ef2cc6c23fdc3863c328d8cf5f5e99164a84efe
6 changes: 4 additions & 2 deletions adafruit_character_lcd/character_lcd.py
Original file line number Diff line number Diff line change
Expand Up @@ -356,8 +356,10 @@ def message(self, message):
# If cursor_position is set then starts at the specified location for
# LEFT_TO_RIGHT. If RIGHT_TO_LEFT cursor_position is determined from right.
# allows for cursor_position to work in RIGHT_TO_LEFT mode
col = self.column if self.displaymode & _LCD_ENTRYLEFT > 0
else self.columns - 1 - self.column
if self.displaymode & _LCD_ENTRYLEFT > 0:
col = self.column
else:
col = self.columns - 1 - self.column
self.cursor_position(col, line)
initial_character += 1
# If character is \n, go to next line
Expand Down