Skip to content

Commit

Permalink
fix Ardulight color processing
Browse files Browse the repository at this point in the history
  • Loading branch information
Anisan committed Dec 11, 2013
1 parent 3ec49dd commit 238caa1
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions Software/src/LedDeviceArdulight.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,9 @@ void LedDeviceArdulight::setColors(const QList<QRgb> & colors)
applyColorModifications(colors, m_colorsBuffer);

for(int i=0; i < m_colorsBuffer.count(); i++) {
m_colorsBuffer[i].r = m_colorsBuffer[i].r << 4;
m_colorsBuffer[i].g = m_colorsBuffer[i].g << 4;
m_colorsBuffer[i].b = m_colorsBuffer[i].b << 4;
m_colorsBuffer[i].r = m_colorsBuffer[i].r >> 4;
m_colorsBuffer[i].g = m_colorsBuffer[i].g >> 4;
m_colorsBuffer[i].b = m_colorsBuffer[i].b >> 4;
PrismatikMath::maxCorrection(254, m_colorsBuffer[i]);
}

Expand All @@ -91,7 +91,6 @@ void LedDeviceArdulight::setColors(const QList<QRgb> & colors)
{
StructRgb color = m_colorsBuffer[i];


if (m_colorSequence == "RBG")
{
m_writeBuffer.append(color.r);
Expand Down

0 comments on commit 238caa1

Please sign in to comment.