The breathe function is somewhat costly and is found to cause drag in mouse movements. This commit seeks to fix this problem. It is observed that the function doesn't change output value for every input value. It only causes the output brightness to increase by 128 units (from 80 to 208) over 2048 ms (the half-period). This means 1 unit for 16 ms. But a brightness change of 1 unit doesn't mean much visually especially considering persistence of vision. A refresh rate of 20 per second ie 50 ms between LED updates is found to be sufficient to avoid the drag effect while maintaining smoothness in brightness changes.pull/365/head
parent
9e99d858ef
commit
8321009ea4
Loading…
Reference in new issue