| 100 | } |
| 101 | |
| 102 | void LedDeviceManager::setColors(const QList<QRgb> & colors) |
| 103 | { |
| 104 | DEBUG_MID_LEVEL << Q_FUNC_INFO << "Is last command completed:" << m_isLastCommandCompleted |
| 105 | << " m_backlightStatus = " << m_backlightStatus; |
| 106 | |
| 107 | if (m_backlightStatus == Backlight::StatusOn) |
| 108 | { |
| 109 | m_savedColors = colors; |
| 110 | m_isColorsSaved = true; |
| 111 | if (m_isLastCommandCompleted) |
| 112 | { |
| 113 | m_cmdTimeoutTimer->start(); |
| 114 | m_isLastCommandCompleted = false; |
| 115 | emit ledDeviceSetColors(colors); |
| 116 | } else { |
| 117 | cmdQueueAppend(LedDeviceCommands::SetColors); |
| 118 | } |
| 119 | } |
| 120 | } |
| 121 | |
| 122 | void LedDeviceManager::switchOffLeds() |
| 123 | { |