Rev 935 | Rev 942 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 935 | Rev 940 | ||
---|---|---|---|
Line 163... | Line 163... | ||
163 | 163 | ||
164 | 164 | ||
165 | // ----------------------------------------------------------------------- |
165 | // ----------------------------------------------------------------------- |
166 | uint16_t SetDelay (uint16_t t) |
166 | uint16_t SetDelay (uint16_t t) |
167 | { |
167 | { |
Line 168... | Line 168... | ||
168 | return(CountMilliseconds + t + 1); |
168 | return(CountMilliseconds + t - 1); |
169 | } |
169 | } |
170 | 170 | ||
171 | // ----------------------------------------------------------------------- |
171 | // ----------------------------------------------------------------------- |
172 | int8_t CheckDelay(uint16_t t) |
172 | int8_t CheckDelay(uint16_t t) |
Line 173... | Line 173... | ||
173 | { |
173 | { |
174 | return(((t - CountMilliseconds) & 0x8000) >> 9); // check sign bit |
174 | return(((t - CountMilliseconds) & 0x8000) >> 8); // check sign bit |
175 | } |
175 | } |