aboutsummaryrefslogtreecommitdiff
path: root/pwm.c
diff options
context:
space:
mode:
authorLars-Dominik Braun <lars@6xq.net>2014-07-08 15:15:31 +0200
committerLars-Dominik Braun <lars@6xq.net>2014-07-08 15:15:31 +0200
commit58c6c18733fb36a23e906e99df7f9a5956bb4a24 (patch)
tree3f95a57a1ba0e2e6bd6f3a3bdb4f35e5e4d93c87 /pwm.c
parente0bb8f76e529f96a58329c073c58776cdcb35b49 (diff)
downloadhourglass-58c6c18733fb36a23e906e99df7f9a5956bb4a24.tar.gz
hourglass-58c6c18733fb36a23e906e99df7f9a5956bb4a24.tar.bz2
hourglass-58c6c18733fb36a23e906e99df7f9a5956bb4a24.zip
Coarse/fine selection modes
Diffstat (limited to 'pwm.c')
-rw-r--r--pwm.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/pwm.c b/pwm.c
index a37acc9..c38a162 100644
--- a/pwm.c
+++ b/pwm.c
@@ -42,12 +42,12 @@ ISR(TIMER0_COMPA_vect) {
if (comphit >= 13) {
comphit = 0;
++state;
- if (state == 10) {
+ if (state == 12) {
state = 0;
}
val[0] = init[0];
val[1] = init[1];
- if (state == 8 || state % 2 == 0) {
+ if (state >= 10 || state % 2 == 0) {
/* end of blink/off state */
} else {
for (uint8_t i = 0; i < PWM_LED_COUNT; i++) {