Merge pull request #12 from Proto-molecule/patch-1

Patch 1
This commit is contained in:
Blaž Kristan 2022-01-02 11:37:30 +01:00 committed by GitHub
commit 518e1a6405
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 4 deletions

View File

@ -643,13 +643,12 @@ class FourLineDisplayUsermod : public Usermod {
//Display the current effect or palette (desiredEntry)
// on the appropriate line (row).
void showCurrentEffectOrPalette(int inputEffPal, const char *qstring, uint8_t row) {
char lineBuffer[LINE_BUFFER_SIZE];
char lineBuffer[MAX_JSON_CHARS];
knownMode = effectCurrent;
knownPalette = effectPalette;
if (overlayUntil == 0) {
// Find the mode name in JSON
uint8_t printedChars = extractModeName(inputEffPal, qstring, lineBuffer, LINE_BUFFER_SIZE-1);
uint8_t printedChars = extractModeName(inputEffPal, qstring, lineBuffer, MAX_JSON_CHARS-1);
if (lineHeight == 2) { // use this code for 8 line display
char smallBuffer1[MAX_MODE_LINE_SPACE];
char smallBuffer2[MAX_MODE_LINE_SPACE];

View File

@ -575,7 +575,7 @@ public:
#endif
if (increase) { if (currentHue1<256) currentHue1 += 4; else currentHue1 = 0; }
else { if (currentHue1>3) currentHue1 -= 4; else currentHue1 = 256; }
colorHStoRGB(currentHue1*255, currentSat1, col);
colorHStoRGB(currentHue1*256, currentSat1, col);
strip.applyToAllSelected = true;
strip.setColor(0, colorFromRgbw(col));
lampUdated();