Fix bug in Boblight server (no green and blue values)

Former-commit-id: fa5349a4945025151d81109f22c20c631eb87aee
This commit is contained in:
johan 2013-12-18 21:02:17 +01:00
parent 92bb518698
commit 7b401f26fb
3 changed files with 3 additions and 2 deletions

Binary file not shown.

View File

@ -0,0 +1 @@
c358364291c2377c26ef2912042fae6d7fe50d08

View File

@ -145,8 +145,8 @@ void BoblightClientConnection::handleMessage(const QString & message)
red = qMax(0, qMin(255, int(255 * messageParts[4].toFloat(&rc1)))); red = qMax(0, qMin(255, int(255 * messageParts[4].toFloat(&rc1))));
} }
uint8_t green = qMax(0, qMin(255, 255 * int(messageParts[5].toFloat(&rc2)))); uint8_t green = qMax(0, qMin(255, int(255 * messageParts[5].toFloat(&rc2))));
uint8_t blue = qMax(0, qMin(255, 255 * int(messageParts[6].toFloat(&rc3)))); uint8_t blue = qMax(0, qMin(255, int(255 * messageParts[6].toFloat(&rc3))));
if (rc1 && rc2 && rc3) if (rc1 && rc2 && rc3)
{ {