Explorar el Código

fix color command in RGB

Chris Mullins hace 8 años
padre
commit
7fde23feae
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      lib/MiLight/RgbPacketFormatter.cpp

+ 1 - 1
lib/MiLight/RgbPacketFormatter.cpp

@@ -38,8 +38,8 @@ void RgbPacketFormatter::updateHue(uint16_t value) {
 }
 }
 
 
 void RgbPacketFormatter::updateColorRaw(uint8_t value) {
 void RgbPacketFormatter::updateColorRaw(uint8_t value) {
-  currentPacket[RGB_COLOR_INDEX] = value;
   command(0, 0);
   command(0, 0);
+  currentPacket[RGB_COLOR_INDEX] = value;
 }
 }
 
 
 void RgbPacketFormatter::updateBrightness(uint8_t value) {
 void RgbPacketFormatter::updateBrightness(uint8_t value) {