bitbank2 / ss_oled

Simple and small library to control 1-bpp OLED displays (Linux + Arduino)
GNU General Public License v3.0
190 stars 34 forks source link

[feature request] add control characters to oledWriteString() #32

Closed cyberman54 closed 4 years ago

cyberman54 commented 4 years ago

I want to use control characters for simple print positioning. Can we enhance oledWriteString() to parse (at least) some simple control characters like CR, LF and BS ?

bitbank2 commented 4 years ago

It's a reasonable idea, but I don't want to go down that path. Writing your own string pre-processor which in turn calls oledWriteString() would be a good way to do it.

cyberman54 commented 4 years ago

But i can't use the lib internal cursor control then, so that makes no sense.

bitbank2 commented 4 years ago

The cursor position is exposed with oledSetCursor() and each time you use oledWriteString you can either continue from the current position or specify a new one. The control is 100% in your hands.

cyberman54 commented 4 years ago

Yes, that's true, but only to print a newline i need to build my own cursor tracking.