Skip to content
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

Added lcdClear and lcdPrint CLI functions #107

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

etomzak
Copy link

@etomzak etomzak commented May 5, 2016

lcdPrint prints text to the display. Printing based on character codes is supported. lcdClear clears the display.

@haata
Copy link
Member

haata commented May 5, 2016

Oh, neat!
This may take me a bit to merge, but it's definitely something I was planning for the LCD :D

@etomzak
Copy link
Author

etomzak commented May 5, 2016

I'm happy to make changes, additions, code style tweaks, etc. There's so much that could be done with displaying text. I just tried to implement the absolute bare minimum.

LCD_writeControlReg( 0x00 );

// See SPI_write()
for ( unsigned int i = 0; i < 128; ++i)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please use uint8_t/uint16_t/uint32_t.

@etomzak
Copy link
Author

etomzak commented May 10, 2016

I've fixed the code style issues.

A systematic way for converting fonts sounds like a great idea. I hand-converted this first set of characters to have something to display, but it really isn't a sustainable way of doing it.

A couple of things I was thinking of when I was putting this together:

  • Storing fonts in memory the way I have done seems unsustainable. A user might want to have access to several fonts in various styes and resolutions. An ErgoDox could display 32x32 characters, but these need 16x more memory than the 8x8 set. Some way of dynamically selecting and loading fonts from flash could be useful.
  • Is there a better way to draw to the display than over TTY? Some days it works great, but sometimes it drops data. I wonder if there's a more resilient way of talking to the keyboard.

I might be up for contributing some font conversion code. It could be the reason I need to finally learn python :P

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