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

BT LEDs are no longer hard coded #18934

Merged
merged 1 commit into from
Nov 15, 2022
Merged

BT LEDs are no longer hard coded #18934

merged 1 commit into from
Nov 15, 2022

Conversation

SgoSkz
Copy link
Contributor

@SgoSkz SgoSkz commented Nov 2, 2022

Description

The keyboard BT LEDs are no longer hard coded into the keyboard but will move according to the corresponding mapping of BT Key

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).

@drashna drashna requested a review from a team November 12, 2022 22:23
@drashna drashna merged commit ed70f42 into qmk:master Nov 15, 2022
Comment on lines 155 to 159
case KC_AP2_BT1:
annepro2_ble_broadcast(0);
/* FIXME: This hardcodes col/row position */
ap2_led_blink(0, 1, blue, 8, 50);
ap2_led_blink(record->event.key.row, record->event.key.col, blue, 8, 50);
return false;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note that if someone decides to put KC_AP2_BT1 on a combo, record->event.key will contain {KEYLOC_COMBO, KEYLOC_COMBO} ({254, 254}) instead of real row and column numbers. If the LED firmware won't handle such out of range values correctly, you should add range checks somewhere.

And the FIXME can probably be removed too.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know too much about the way combo keys work, I will look into that when I can. Thanks

dkruyt pushed a commit to dkruyt/qmk_firmware that referenced this pull request Nov 18, 2022
thystips pushed a commit to thystips/qmk_firmware that referenced this pull request Nov 24, 2022
ramonimbao pushed a commit to ramonimbao/qmk_firmware that referenced this pull request Nov 28, 2022
elpekenin pushed a commit to elpekenin/qmk_firmware that referenced this pull request Dec 7, 2022
crembz pushed a commit to crembz/qmk_firmware that referenced this pull request Dec 18, 2022
nolanseaton pushed a commit to nolanseaton/qmk_firmware that referenced this pull request Jan 23, 2023
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