diff options
author | Travis Geiselbrecht <travisg@google.com> | 2012-06-25 13:19:37 -0700 |
---|---|---|
committer | Travis Geiselbrecht <travisg@google.com> | 2012-06-25 23:30:44 -0700 |
commit | 6e34707bd4efc6553815a4a9d9b1d8acce26fa02 (patch) | |
tree | 4845a152e9493f8aad1d03b7e72c496aa5e4ea49 | |
parent | 54297ccd7ba83c7b631b39f0aafb480c0d1d10dc (diff) | |
download | adk2012-6e34707bd4efc6553815a4a9d9b1d8acce26fa02.tar.gz |
fix slider bug + app problem
When the device is in the brightness panel, the slider value would tend
to override what is sent down by the app.
-rw-r--r-- | library/ADK2/examples/clock/clock.ino | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/library/ADK2/examples/clock/clock.ino b/library/ADK2/examples/clock/clock.ino index 909c72a..bc16a66 100644 --- a/library/ADK2/examples/clock/clock.ino +++ b/library/ADK2/examples/clock/clock.ino @@ -804,8 +804,8 @@ void loop(void) L.ledWrite(2, 0, 0, 0); slider = L.capSenseSlider(); + slider = ((((uint32_t)slider) * 191) >> 8) + 64; if(slider != briSlider){ - slider = ((((uint32_t)slider) * 191) >> 8) + 64; briSlider = slider; settings.bri = slider; } |