Scrollrichtung korrigiert
This commit is contained in:
parent
a1e273a248
commit
92e3e42c71
|
@ -499,8 +499,8 @@ void NeoPatterns::Text(String text, uint8_t interval)
|
|||
Direction = REVERSE;
|
||||
Color1 = 16711680;
|
||||
textposition = 0;
|
||||
charposition = 8;
|
||||
// charposition = 0;
|
||||
charposition = 0;
|
||||
}
|
||||
|
||||
void NeoPatterns::TextUpdate()
|
||||
|
@ -560,13 +560,9 @@ void NeoPatterns::TextUpdate()
|
|||
// if (charx > charposition) {
|
||||
// x > 8-charposition
|
||||
if (8-x>charposition) {
|
||||
// Display the first character
|
||||
// Display the second character
|
||||
uint64_t mask = 1LL << (uint64_t)charxyToPos(charposition+x, y);
|
||||
Serial.print(".");
|
||||
Serial.print(charposition+x);
|
||||
Serial.print("=");
|
||||
Serial.print(charxyToPos(charposition+x, y));
|
||||
if ( (font[FontChar]&mask) == 0) {
|
||||
if ( (font[FontCharNext]&mask) == 0) {
|
||||
setPixelColor(currentpos, Color(0, 0, 100)); //bit is 0 at pos i
|
||||
} else {
|
||||
uint8_t _r = (uint8_t)(Color1 >> 16);
|
||||
|
@ -575,9 +571,9 @@ void NeoPatterns::TextUpdate()
|
|||
setPixelColor(currentpos, Color(_r, _g, _b)); //bit is 1 at pos i
|
||||
}
|
||||
} else {
|
||||
// Display the second character
|
||||
uint64_t mask = 1LL << (uint64_t)charxyToPos(charposition+x-9, y);
|
||||
if ( (font[FontCharNext]&mask) == 0) {
|
||||
// Display the first character
|
||||
uint64_t mask = 1LL << (uint64_t)charxyToPos(charposition+x-8, y);
|
||||
if ( (font[FontChar]&mask) == 0) {
|
||||
setPixelColor(currentpos, Color(0, 100, 0)); //bit is 0 at pos i
|
||||
} else {
|
||||
uint8_t _r = (uint8_t)(Color1 >> 16);
|
||||
|
@ -625,10 +621,10 @@ void NeoPatterns::TextUpdate()
|
|||
|
||||
show();
|
||||
|
||||
charposition++;
|
||||
if (charposition == 9)
|
||||
charposition--;
|
||||
if (charposition == 0)
|
||||
{
|
||||
charposition = 0;
|
||||
charposition = 8;
|
||||
textposition++;
|
||||
}
|
||||
Increment();
|
||||
|
|
Loading…
Reference in New Issue