Skip to content

Commit 7ef2cc6

Browse files
authored
Update character_lcd.py
1 parent 5bc8ec5 commit 7ef2cc6

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

adafruit_character_lcd/character_lcd.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -356,8 +356,10 @@ def message(self, message):
356356
# If cursor_position is set then starts at the specified location for
357357
# LEFT_TO_RIGHT. If RIGHT_TO_LEFT cursor_position is determined from right.
358358
# allows for cursor_position to work in RIGHT_TO_LEFT mode
359-
col = self.column if self.displaymode & _LCD_ENTRYLEFT > 0
360-
else self.columns - 1 - self.column
359+
if self.displaymode & _LCD_ENTRYLEFT > 0:
360+
col = self.column
361+
else:
362+
col = self.columns - 1 - self.column
361363
self.cursor_position(col, line)
362364
initial_character += 1
363365
# If character is \n, go to next line

0 commit comments

Comments
 (0)