bugs
Line 526: "now - lastRedraw" equates to a negative number and forces the screen into sleep mode Line 646, 660: if the array size isn't at least the length of the longest name of an effect or palette, then it will not fully print. "Fireworks Starburst" is the longest one at 19 characters. this it kinda a bandaid fix because a longer name may come in the future.
This commit is contained in:
parent
cb4c736fab
commit
a841e1fb2e
@ -523,7 +523,7 @@ class FourLineDisplayUsermod : public Usermod {
|
|||||||
if (!needRedraw) {
|
if (!needRedraw) {
|
||||||
// Nothing to change.
|
// Nothing to change.
|
||||||
// Turn off display after 1 minutes with no change.
|
// Turn off display after 1 minutes with no change.
|
||||||
if (sleepMode && !displayTurnedOff && (now - lastRedraw > screenTimeout)) {
|
if (sleepMode && !displayTurnedOff && (millis() - lastRedraw > screenTimeout)) {
|
||||||
// We will still check if there is a change in redraw()
|
// We will still check if there is a change in redraw()
|
||||||
// and turn it back on if it changed.
|
// and turn it back on if it changed.
|
||||||
sleepOrClock(true);
|
sleepOrClock(true);
|
||||||
@ -643,7 +643,7 @@ class FourLineDisplayUsermod : public Usermod {
|
|||||||
//Display the current effect or palette (desiredEntry)
|
//Display the current effect or palette (desiredEntry)
|
||||||
// on the appropriate line (row).
|
// on the appropriate line (row).
|
||||||
void showCurrentEffectOrPalette(int inputEffPal, const char *qstring, uint8_t row) {
|
void showCurrentEffectOrPalette(int inputEffPal, const char *qstring, uint8_t row) {
|
||||||
char lineBuffer[LINE_BUFFER_SIZE];
|
char lineBuffer[MAX_JSON_CHARS];
|
||||||
knownMode = effectCurrent;
|
knownMode = effectCurrent;
|
||||||
knownPalette = effectPalette;
|
knownPalette = effectPalette;
|
||||||
if (overlayUntil == 0) {
|
if (overlayUntil == 0) {
|
||||||
@ -657,7 +657,7 @@ class FourLineDisplayUsermod : public Usermod {
|
|||||||
uint8_t smallChars3 = 0;
|
uint8_t smallChars3 = 0;
|
||||||
|
|
||||||
// Find the mode name in JSON
|
// Find the mode name in JSON
|
||||||
printedChars = extractModeName(inputEffPal, qstring, lineBuffer, LINE_BUFFER_SIZE-1);
|
printedChars = extractModeName(inputEffPal, qstring, lineBuffer, MAX_JSON_CHARS-1);
|
||||||
|
|
||||||
if (lineHeight == 2) { // use this code for 8 line display
|
if (lineHeight == 2) { // use this code for 8 line display
|
||||||
if (printedChars < MAX_MODE_LINE_SPACE) { // use big font if the text fits
|
if (printedChars < MAX_MODE_LINE_SPACE) { // use big font if the text fits
|
||||||
|
Loading…
Reference in New Issue
Block a user