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

Add direction to dynamic_macro_record_start_user #19689

Merged
merged 1 commit into from
Apr 3, 2023

Conversation

joh
Copy link
Contributor

@joh joh commented Jan 26, 2023

This provides a means for user code to know which macro is being recorded, e.g., to display different indicators on an OLED.

Adds a direction argument to dynamic_macro_record_start_user(), just like the other dynamic_macro_*_user() functions.

Description

Change void dynamic_macro_record_start_user(void) to void dynamic_macro_record_start_user(int8_t direction).
direction is either +1 or -1 to indicate which dynamic macro is being recorded, making it similar to the other dynamic_macro_*_user() functions (which already take a direction).

Updated keyboard code with the new function signatures, as well as the documentation.

I did not touch the deprecated quantum/dynamic_macro.h which has a very different API.

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

None

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

This provides a means for user code to know which macro is being
recorded, e.g., to display different indicators on an OLED.
@joh
Copy link
Contributor Author

joh commented Jan 27, 2023

QMK CI Build failed for some keyboards, but all the errors seem unrelated to this PR.

@joh joh requested a review from drashna February 8, 2023 20:48
@drashna drashna requested a review from a team February 10, 2023 04:23
@tzarc tzarc merged commit 68efea7 into qmk:develop Apr 3, 2023
coquizen pushed a commit to coquizen/qmk_firmware that referenced this pull request Jun 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants