Skip to content

Commit

Permalink
Experimental LED support (untested)
Browse files Browse the repository at this point in the history
  • Loading branch information
chrislewisdev committed Aug 18, 2018
1 parent 7e0ca8d commit 97b7a6e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion quantum/quantum.c
Original file line number Diff line number Diff line change
Expand Up @@ -1194,7 +1194,10 @@ static inline uint16_t scale_backlight(uint16_t v) {
*/
ISR(TIMER1_OVF_vect)
{
uint16_t interval = (uint16_t) breathing_period * 244 / BREATHING_STEPS;
uint16_t interval = momentum_enabled()
? match_momentum(1, 10)
: (uint16_t) breathing_period * 244 / BREATHING_STEPS;

// resetting after one period to prevent ugly reset at overflow.
breathing_counter = (breathing_counter + 1) % (breathing_period * 244);
uint8_t index = breathing_counter / interval % BREATHING_STEPS;
Expand Down

0 comments on commit 97b7a6e

Please sign in to comment.