Revert "Keep track of last matrix activity (#10730)"

This reverts commit 79d1db3324.
This commit is contained in:
Nick Brassel 2021-01-15 06:55:07 +11:00
parent 4b44452900
commit ab375d3d07
3 changed files with 15 additions and 30 deletions

View file

@ -97,10 +97,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
# include "dip_switch.h"
#endif
static uint32_t last_matrix_modification_time = 0;
uint32_t last_matrix_activity_time(void) { return last_matrix_modification_time; }
uint32_t last_matrix_activity_elapsed(void) { return timer_elapsed32(last_matrix_modification_time); }
// Only enable this if console is enabled to print to
#if defined(DEBUG_MATRIX_SCAN_RATE) && defined(CONSOLE_ENABLE)
static uint32_t matrix_timer = 0;
@ -342,8 +338,11 @@ void keyboard_task(void) {
housekeeping_task_kb();
housekeeping_task_user();
uint8_t matrix_changed = matrix_scan();
if (matrix_changed) last_matrix_modification_time = timer_read32();
#if defined(OLED_DRIVER_ENABLE) && !defined(OLED_DISABLE_TIMEOUT)
uint8_t ret = matrix_scan();
#else
matrix_scan();
#endif
if (should_process_keypress()) {
for (uint8_t r = 0; r < MATRIX_ROWS; r++) {
@ -410,7 +409,7 @@ MATRIX_LOOP_END:
oled_task();
# ifndef OLED_DISABLE_TIMEOUT
// Wake up oled if user is using those fabulous keys!
if (matrix_changed) oled_on();
if (ret) oled_on();
# endif
#endif