Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for Colorization of Letters #246

Merged
merged 1 commit into from
Apr 29, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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