rand() returns an integer type value which is usually a very large value compared with the threshold in the current lottery logic with uint8_t. Because of this, most of the lottery fails and no twinkle is observed on the keyboard.
Cherry-picked from the original qmk repository: 571a9794af0249ef23a0af2ed2ee64191299faa7
Types of Changes
[ ] Core
[x] Bugfix
[ ] New feature
[ ] Enhancement/optimization
[ ] Keyboard (addition or update)
[ ] Keymap/layout/userspace (addition or update)
[ ] Documentation
Issues Fixed or Closed by This PR
(none)
Checklist
[x] My code follows the code style of this project: C, Python
Description
rand() returns an integer type value which is usually a very large value compared with the threshold in the current lottery logic with uint8_t. Because of this, most of the lottery fails and no twinkle is observed on the keyboard.
Cherry-picked from the original qmk repository: 571a9794af0249ef23a0af2ed2ee64191299faa7
Types of Changes
Issues Fixed or Closed by This PR
Checklist