mattdibi / redox-w-firmware

Firmware for nordic MCUs used in the Redox wireless keyboard
MIT License
77 stars 42 forks source link

Use a single RTC for the matrix scan and DEBOUNCING #17

Closed relokin closed 3 years ago

relokin commented 3 years ago

The use of the second RTC is not necessary. Currently, we debounce by checking that there are no changes in the matrix in 5 consecutive matrix scans. This set of changes implements a single tick() function and avoids the use of the second RTC.

In addition, it simplifies some part of the code in the tick function, eliminates the use of global variables and adds a fix to the matrix scan function.

relokin commented 3 years ago

Hey Mattia, I am currently looking at the code and I am trying to simplify and eliminate unnecessary functions. Hopefully that way we can reduce energy consumption. It would be great if we could find ways to reduce the peak power draw but my fear is that this is dominated by the radio and we can't do much about it. Please let me know if you have any questions.

mattdibi commented 3 years ago

Hi Nikos, thank you again for your contribution. I really appreciate what you're doing with the Redox firmware :) I'll give it a run on my daily driver in the following days and come back here for any feedback that might arise.

relokin commented 3 years ago

Thanks for the review and merging!