1
0
Fork 0
mirror of https://github.com/opentx/opentx.git synced 2025-07-25 17:25:13 +03:00

Prevents lines from wrapping when writing text

This commit is contained in:
bsongis 2014-07-01 22:53:10 +02:00
parent be0ebe833c
commit 72ef865c10
4 changed files with 9 additions and 1 deletions

View file

@ -56,6 +56,7 @@ uint8_t lcdNextPos;
void lcdPutPattern(xcoord_t x, uint8_t y, const uint8_t * pattern, uint8_t width, uint8_t height, LcdFlags flags)
{
uint8_t *p = &displayBuf[ y / 8 * LCD_W + x ];
uint8_t *end = &displayBuf[ y / 8 * LCD_W + LCD_W ];
bool blink = false;
bool inv = false;
@ -75,7 +76,7 @@ void lcdPutPattern(xcoord_t x, uint8_t y, const uint8_t * pattern, uint8_t width
// we need to work on the previous byte when INVERS
p--;
for (int8_t i=0; i<width+2; i++) {
for (int8_t i=0; i<width+2 && p<end; i++) {
uint8_t lines = (height+7)/8;
assert(lines <= 5);
uint8_t b[5] = { 0 };