From 6794e846da0b840188b50e63df82be8093af61d2 Mon Sep 17 00:00:00 2001 From: David Panusch Date: Sun, 30 Apr 2023 01:23:40 +0200 Subject: [PATCH] Fix for Colorization of Letters --- include/Animation.hpp | 3 ++- include/led.h | 2 +- include/led.hpp | 5 ++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/include/Animation.hpp b/include/Animation.hpp index bfbf1385..355533c2 100644 --- a/include/Animation.hpp +++ b/include/Animation.hpp @@ -332,7 +332,8 @@ void Animation::copy2Stripe(RgbfColor **source) { for (uint8_t col = 0; col < maxCols; col++) { led.setPixel(usedUhrType->getFrontMatrixIndex(row + rowStart, col + colStart), - Color{source[row][col]}); + Color{RgbColor(source[row][col].R, source[row][col].G, + source[row][col].B)}); } } set_minutes(); diff --git a/include/led.h b/include/led.h index 9a6e0905..fd0ea6f5 100644 --- a/include/led.h +++ b/include/led.h @@ -54,7 +54,7 @@ class Led { //------------------------------------------------------------------------------ // Pixel get Functions //------------------------------------------------------------------------------ - HsbColor getPixel(uint16_t i); + RgbColor getPixel(uint16_t i); //------------------------------------------------------------------------------ // Pixel Clear Functions diff --git a/include/led.hpp b/include/led.hpp index b562d717..fcaf313b 100644 --- a/include/led.hpp +++ b/include/led.hpp @@ -290,10 +290,9 @@ void Led::set(bool changed) { // Pixel get Functions //------------------------------------------------------------------------------ -HsbColor Led::getPixel(uint16_t i) { +RgbColor Led::getPixel(uint16_t i) { if (G.Colortype == Grbw) { - RgbwColor rgbw = strip_RGBW->GetPixelColor(i); - return HsbColor(rgbw.R / 255.f, rgbw.G / 255.f, rgbw.B / 255.f); + return RgbColor(strip_RGBW->GetPixelColor(i)); } return strip_RGB->GetPixelColor(i); }