Open CrossLAN opened 3 years ago
@dhylands
I walked through your code and the following change in lcd_api.py will fix this issue:
def putchar(self, char):
"""Writes the indicated character to the LCD at the current cursor
position, and advances the cursor by one position.
"""
if char != '\n':
self.hal_write_data(ord(char))
self.cursor_x += 1
if self.cursor_x >= self.num_columns or char == '\n':
self.cursor_x = 0
if char == '\n':
self.cursor_y += 1
if self.cursor_y >= self.num_lines:
self.cursor_y = 0
self.move_to(self.cursor_x, self.cursor_y)
@dhylands I created a pull request #29 to get this fixed.
@dhylands In a 4x20 display, if I fill the line to the last row, it skips the following line without replacement and the following line remains empty. This is independent of whether I put a \n at the end of the line or not.
If I fill the display only with 19 characters instead of the 20 possible characters, the line jump to the following line works.
Is this intentional or is it possible to turn it off? Or am I doing something wrong?
Here is my code for testing