X-Git-Url: https://oss.titaniummirror.com/gitweb?a=blobdiff_plain;f=tmr.c;h=1dbca1ab86f1004184085c0e924d0c048d5cff8f;hb=0da409308ec3acb8b3ed8fc62ba6ed2aac1d33ff;hp=670d0e142398c57313573e21b8e9666bc814ce6e;hpb=be367d7f046a080f1575ac4e918a94dfad24fa73;p=rgblamp.git diff --git a/tmr.c b/tmr.c index 670d0e1..1dbca1a 100644 --- a/tmr.c +++ b/tmr.c @@ -108,7 +108,7 @@ void tmr_isr() TMR0IF = 0; _tmr_ticks++; for (tmr_bitno_t t = 0; t < TMR_COUNT; t++) { - if (bit_get(_tmr_on, t) && _tmr_ticks - _tmr_t0[t] <= _tmr_elapsed[t]) { + if (bit_get(_tmr_on, t) && _tmr_ticks - _tmr_t0[t] >= _tmr_elapsed[t]) { bit_set(_tmr_flag, t); if (bit_get(_tmr_periodic, t)) _tmr_t0[t] += _tmr_elapsed[t];