From fbb63dd9f7eb402cc73abd8eeb00592fbd0c02b1 Mon Sep 17 00:00:00 2001 From: daniel-Jones Date: Wed, 22 Feb 2017 16:20:23 +1030 Subject: This time i did it correctly, all buttons, sliders etc work as intended when disconnected. --- arduino/rgb/.rgb.ino.swo | Bin 16384 -> 20480 bytes arduino/rgb/rgb.ino | 12 ++++++++++++ 2 files changed, 12 insertions(+) (limited to 'arduino') diff --git a/arduino/rgb/.rgb.ino.swo b/arduino/rgb/.rgb.ino.swo index c9a379b..2ab1ac4 100644 Binary files a/arduino/rgb/.rgb.ino.swo and b/arduino/rgb/.rgb.ino.swo differ diff --git a/arduino/rgb/rgb.ino b/arduino/rgb/rgb.ino index 7a0294b..195eff2 100644 --- a/arduino/rgb/rgb.ino +++ b/arduino/rgb/rgb.ino @@ -53,6 +53,10 @@ void setup() void red_thread() { + if (red < rf) + red = rf; + if (red > rt) + red = rf; if (red == rt) r_rev = true; if (red == rf) @@ -65,6 +69,10 @@ void red_thread() void green_thread() { + if (red < rf) + green = gf; + if (green > gt) + green = gf; if (green == gt) g_rev = true; if (green == gf) @@ -78,6 +86,10 @@ void green_thread() void blue_thread() { + if (blue < bf) + red = bf; + if (blue > bt) + blue = bf; if (blue == bt) b_rev = true; if (blue == bf) -- cgit v1.2.3