Skip to content

Commit

Permalink
Merge pull request #246 from dbambus/main
Browse files Browse the repository at this point in the history
Fix for Colorization of Letters
  • Loading branch information
dbambus committed Apr 29, 2023
2 parents 3cabc6b + 6794e84 commit a4c88f8
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
3 changes: 2 additions & 1 deletion include/Animation.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
2 changes: 1 addition & 1 deletion include/led.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ class Led {
//------------------------------------------------------------------------------
// Pixel get Functions
//------------------------------------------------------------------------------
HsbColor getPixel(uint16_t i);
RgbColor getPixel(uint16_t i);

//------------------------------------------------------------------------------
// Pixel Clear Functions
Expand Down
5 changes: 2 additions & 3 deletions include/led.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit a4c88f8

Please sign in to comment.