Explorar el Código

fix bug where packets encoded with key 0xD4 are decoded incorrectly

Chris Mullins hace 8 años
padre
commit
5d561f652f
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      lib/MiLight/RgbCctPacketFormatter.cpp

+ 1 - 1
lib/MiLight/RgbCctPacketFormatter.cpp

@@ -4,7 +4,7 @@
 #define V2_OFFSET(byte, key, jumpStart) ( \
   pgm_read_byte(&V2_OFFSETS[byte-1][key%4]) \
     + \
-  ((jumpStart > 0 && key >= jumpStart && key <= jumpStart+0x80) ? 0x80 : 0) \
+  ((jumpStart > 0 && key >= jumpStart && key < jumpStart+0x80) ? 0x80 : 0) \
 )
 
 #define GROUP_COMMAND_ARG(status, groupId) ( groupId + (status == OFF ? 5 : 0) )