From f594ae9b34ac822e3fb4f658fe4031cae6e1dd53 Mon Sep 17 00:00:00 2001 From: mmcwilliams Date: Mon, 11 Apr 2016 15:59:48 -0400 Subject: [PATCH] Caught incorrect parsing of B value --- ino/mcopy_light/mcopy_light.ino | 2 +- ino/mcopy_light_tests/mcopy_light_tests.ino | 5 +---- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/ino/mcopy_light/mcopy_light.ino b/ino/mcopy_light/mcopy_light.ino index 62354d5..156a1a9 100644 --- a/ino/mcopy_light/mcopy_light.ino +++ b/ino/mcopy_light/mcopy_light.ino @@ -62,7 +62,7 @@ void colorString () { strR = color.substring(0, commaR); strG = color.substring(commaR + 1, commaG); - strB = color.substring(commaG + 1, commaB); + strB = color.substring(commaG + 1); r = strR.toInt(); g = strG.toInt(); diff --git a/ino/mcopy_light_tests/mcopy_light_tests.ino b/ino/mcopy_light_tests/mcopy_light_tests.ino index 893e4a8..dd0a550 100644 --- a/ino/mcopy_light_tests/mcopy_light_tests.ino +++ b/ino/mcopy_light_tests/mcopy_light_tests.ino @@ -19,17 +19,14 @@ String color = "000,000,000,000"; volatile int commaR = 0; volatile int commaG = 0; -volatile int commaB = 0; String strR = "000"; String strG = "000"; String strB = "000"; -String strA = "000"; // To the end of the string volatile int r = 0; volatile int g = 0; volatile int b = 0; -volatile int a = 0; volatile char cmd_char = 'z'; @@ -75,7 +72,7 @@ void colorString () { strR = color.substring(0, commaR); strG = color.substring(commaR + 1, commaG); - strB = color.substring(commaG + 1, commaB); + strB = color.substring(commaG + 1); r = strR.toInt(); g = strG.toInt();