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

pointing_device ifdef indentation fix #22802

Merged
merged 1 commit into from
Jan 10, 2024

Conversation

JohSchneider
Copy link
Contributor

@JohSchneider JohSchneider commented Jan 1, 2024

the mutual exclusive POINTING_DEVICE_MOTION_PIN and SPLIT_POINTING_ENABLE influence if and how the pointing_device_driver.get_report is triggered. now the way the define is wrapping around an "unbraced" if leads clang-format to weirdly indent the first line in the 'SPLIT_POINTING_ENABLE' as the first command after the if.

this hints that any code addition in between the two - that possibly should run regardless, would break the if-def enabled code.

this can be solved by adding a pair of curly braces in the POINTING_DEVICE_MOTION_PIN part, to clearly denote which commands are to be skipped if the motion pin shows now activity.

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

@github-actions github-actions bot added core keyboard keymap documentation via Adds via keymap and/or updates keyboard for via support dependencies dd Data Driven Changes labels Jan 1, 2024
@JohSchneider JohSchneider changed the base branch from master to develop January 1, 2024 15:06
@JohSchneider JohSchneider changed the title Pointing device ifdef indentation pointing_device ifdef indentation fix Jan 1, 2024
@github-actions github-actions bot removed keyboard keymap documentation via Adds via keymap and/or updates keyboard for via support dependencies dd Data Driven Changes labels Jan 2, 2024
the mutual exclusive POINTING_DEVICE_MOTION_PIN and SPLIT_POINTING_ENABLE influence if and how the `pointing_device_driver.get_report` is triggered. now the way the define is wrapping around an "unbraced" if leads clang-format to weirdly indent the first line in the 'SPLIT_POINTING_ENABLE' as the first command after the if.

this hints that any code addition in between the two - that possibly should run regardless, would break the if-def enabled code.

this can be solved by adding a pair of curly braces in the POINTING_DEVICE_MOTION_PIN part, to clearly denote which commands are to be skipped if the motion pin shows now activity.
@JohSchneider JohSchneider force-pushed the pointing_device_ifdef_indentation branch from 2703f5e to 0c06578 Compare January 2, 2024 04:27
@tzarc tzarc requested a review from a team January 9, 2024 11:37
Copy link
Member

@KarlK90 KarlK90 left a comment

Choose a reason for hiding this comment

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

LGTM, thanks.

@KarlK90 KarlK90 merged commit d9b1ab9 into qmk:develop Jan 10, 2024
4 checks passed
@JohSchneider JohSchneider deleted the pointing_device_ifdef_indentation branch January 10, 2024 17:28
nuess0r pushed a commit to nuess0r/qmk_firmware that referenced this pull request Sep 8, 2024
the mutual exclusive POINTING_DEVICE_MOTION_PIN and SPLIT_POINTING_ENABLE influence if and how the `pointing_device_driver.get_report` is triggered. now the way the define is wrapping around an "unbraced" if leads clang-format to weirdly indent the first line in the 'SPLIT_POINTING_ENABLE' as the first command after the if.

this hints that any code addition in between the two - that possibly should run regardless, would break the if-def enabled code.

this can be solved by adding a pair of curly braces in the POINTING_DEVICE_MOTION_PIN part, to clearly denote which commands are to be skipped if the motion pin shows now activity.

Co-authored-by: Johannes <[email protected]>
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.

3 participants