Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crkbd implementing return value for matrix_scan() #10422

Merged
merged 2 commits into from
Oct 1, 2020
Merged

Crkbd implementing return value for matrix_scan() #10422

merged 2 commits into from
Oct 1, 2020

Conversation

yhr0x43
Copy link
Contributor

@yhr0x43 yhr0x43 commented Sep 24, 2020

Description

The OLED screen on the keyboard never turns off with the timeout as it supposed to.

With debugging output, it appears keyboard_task() in tmk_core/common/keyboard.c is constantly calling oled_on(). This only happens when OLED_DRIVER_ENABLE is defined and OLED_DISABLE_TIMEOUT is not defined.

It appears that the return value of matrix_scam() is interpreted as a boolean of whether there are updates. And the custom implementation of that function in crkbd returns a constant 1.

Thus I imitate the way quantum/matrix.c implement this return value and applied it to the crkbd implementation.

Despite a required change of the return type for matrix_slave_scan() from void to uint8_t, this function is never meant to and never does be called anywhere else. This change should not affect anything else.

Types of Changes

  • Core
  • Bugfix
  • New feature
  • Enhancement/optimization
  • Keyboard (addition or update)
  • Keymap/layout/userspace (addition or update)
  • Documentation

Issues Fixed or Closed by This PR

Checklist

  • My code follows the code style of this project: C, Python
  • I have read the PR Checklist document and have made the appropriate changes.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • I have tested the changes and verified that they work and don't break anything (as well as I can manage).

@yhr0x43 yhr0x43 changed the title Crkbd matrix Crkbd implementing return value for matrix_scan() Sep 24, 2020
@zvecr zvecr added the keyboard label Sep 27, 2020
@zvecr zvecr requested review from mtei, a team and drashna September 27, 2020 00:05
@fauxpark
Copy link
Member

fauxpark commented Oct 1, 2020

Thanks!

@fauxpark fauxpark merged commit 7a2124d into qmk:master Oct 1, 2020
rgoulter pushed a commit to rgoulter/qmk_firmware that referenced this pull request Oct 4, 2020
kjganz pushed a commit to kjganz/qmk_firmware that referenced this pull request Oct 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants