Skip to content

Move the cursor after putting a char #7

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 20, 2017
Merged

Conversation

mcauser
Copy link
Contributor

@mcauser mcauser commented Feb 19, 2017

I moved the move_to() after the hal_write_data() in putstr() so that when you add the last visible character in the 32 character window, the cursor moves back to the home 0,0 position.

Previously, the blinking cursor was moving off screen to 16,1 and jumped to 1,0 on the next putchar().

lcd.blink_cursor_on()
lcd.move_to(0,0)
lcd.putstr("12345678901234561234567890123456")
# cursor offscreen (should be 0,0)
lcd.putstr("A")
# cursor at 1,0
lcd.blink_cursor_on()
lcd.move_to(15,1)
lcd.putstr("Z")
# cursor offscreen (should be 0,0)
lcd.putstr("A")
# cursor at 1,0

@dhylands dhylands merged commit 4a4ecfc into dhylands:master Feb 20, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants