Use # prefix for color channel hex value

This commit is contained in:
Paul C Diem 2021-02-09 21:40:37 -06:00
parent 83298b2a9e
commit d8fa00fa07
1 changed files with 5 additions and 2 deletions

View File

@ -625,9 +625,12 @@ bool _SendDeviceGroupMessage(uint32_t device, DevGroupMessageType message_type,
switch (item) {
case DGR_ITEM_LIGHT_CHANNELS:
{
bool hex = false;
char * endptr;
value = strtoul((char *)value_ptr, &endptr, 10);
bool hex = (*endptr != ',');
if (*value_ptr == '#') {
value_ptr++;
hex = true;
}
for (int i = 0; i < 6; i++) {
*out_ptr = 0;
if (*value_ptr != ' ') {