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 PS2_MOUSE_ROTATE to compensate for device orientation #8650

Merged
merged 3 commits into from
Apr 9, 2020

Conversation

manna-harbour
Copy link
Contributor

Description

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

Copy link
Member

@drashna drashna left a comment

Choose a reason for hiding this comment

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

LGTM!

And has documentation! Thank you for that!

@drashna drashna requested a review from a team April 2, 2020 07:33
@zvecr zvecr requested a review from a team April 2, 2020 12:10
tmk_core/protocol/ps2_mouse.c Outdated Show resolved Hide resolved
Copy link
Member

@noroadsleft noroadsleft left a comment

Choose a reason for hiding this comment

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

I like this feature, but the base rotation direction seems counter-intuitive to me – when I see #define PS2_MOUSE_ROTATE 270, my instinct is that 270 would be degrees clockwise rather than anti-clockwise.

All that would need to be done to switch them is to switch the mouse_report->[xy] statements between PS2_MOUSE_ROTATE == 90 and PS2_MOUSE_ROTATE == 270.

@vomindoraan
Copy link
Contributor

To me the current setup makes sense, since counterclockwise is traditionally the positive direction of rotation in math and engineering.

@manna-harbour
Copy link
Contributor Author

I've updated the docs to clarify the rotation direction.

@noroadsleft noroadsleft merged commit 07c75fe into qmk:master Apr 9, 2020
@noroadsleft
Copy link
Member

Thanks!

@manna-harbour
Copy link
Contributor Author

Thanks everyone!

loadedsith added a commit to loadedsith/qmk_firmware that referenced this pull request Apr 9, 2020
* master: (3035 commits)
  [Keymap] Update personal userspace and keymaps (qmk#8747)
  Add PS2_MOUSE_ROTATE to compensate for device orientation (qmk#8650)
  Add RGB support in via to launchpad (qmk#8621)
  VIA support for the KBDFans KBD6x (qmk#8680)
  Set the correct RGB LED count on YD60MQ (qmk#8629)
  [Keymap] Updates to personal keymaps (qmk#8665)
  Fix compile issues related to NO_ACTION_MACRO/FUNCTION and LTO_ENABLE (qmk#8663)
  [Keymap] Userspace update Rgb layers code (qmk#8659)
  Add Choconum (qmk#8709)
  Add Via keymap for BM16-A (qmk#8681)
  Fix edge-case with config
  Don't hide for devs...
  Apply @skullydazed's suggestions, move 'import milc'
  Make dedicated sections for user/dev commands in docs
  Rebase on master, hide some other subcommands
  Use milc for config check, requirements fixes
  CLI: Add development mode support
  Update info.json (qmk#8723)
  format code according to conventions [skip ci]
  spi_master for AVR (qmk#8299)
  ...

# Conflicts:
#	layouts/community/ortho_4x12/grahampheath/keymap.c
#	lib/lufa
loadedsith added a commit to loadedsith/qmk_firmware that referenced this pull request Apr 9, 2020
* master: (208 commits)
  [Keymap] Update personal userspace and keymaps (qmk#8747)
  Add PS2_MOUSE_ROTATE to compensate for device orientation (qmk#8650)
  Add RGB support in via to launchpad (qmk#8621)
  VIA support for the KBDFans KBD6x (qmk#8680)
  Set the correct RGB LED count on YD60MQ (qmk#8629)
  [Keymap] Updates to personal keymaps (qmk#8665)
  Fix compile issues related to NO_ACTION_MACRO/FUNCTION and LTO_ENABLE (qmk#8663)
  [Keymap] Userspace update Rgb layers code (qmk#8659)
  Add Choconum (qmk#8709)
  Add Via keymap for BM16-A (qmk#8681)
  Fix edge-case with config
  Don't hide for devs...
  Apply @skullydazed's suggestions, move 'import milc'
  Make dedicated sections for user/dev commands in docs
  Rebase on master, hide some other subcommands
  Use milc for config check, requirements fixes
  CLI: Add development mode support
  Update info.json (qmk#8723)
  format code according to conventions [skip ci]
  spi_master for AVR (qmk#8299)
  ...
loadedsith added a commit to loadedsith/qmk_firmware that referenced this pull request Apr 9, 2020
* master: (208 commits)
  [Keymap] Update personal userspace and keymaps (qmk#8747)
  Add PS2_MOUSE_ROTATE to compensate for device orientation (qmk#8650)
  Add RGB support in via to launchpad (qmk#8621)
  VIA support for the KBDFans KBD6x (qmk#8680)
  Set the correct RGB LED count on YD60MQ (qmk#8629)
  [Keymap] Updates to personal keymaps (qmk#8665)
  Fix compile issues related to NO_ACTION_MACRO/FUNCTION and LTO_ENABLE (qmk#8663)
  [Keymap] Userspace update Rgb layers code (qmk#8659)
  Add Choconum (qmk#8709)
  Add Via keymap for BM16-A (qmk#8681)
  Fix edge-case with config
  Don't hide for devs...
  Apply @skullydazed's suggestions, move 'import milc'
  Make dedicated sections for user/dev commands in docs
  Rebase on master, hide some other subcommands
  Use milc for config check, requirements fixes
  CLI: Add development mode support
  Update info.json (qmk#8723)
  format code according to conventions [skip ci]
  spi_master for AVR (qmk#8299)
  ...
violet-fish pushed a commit to violet-fish/qmk_firmware that referenced this pull request Apr 12, 2020
* Add PS2_MOUSE_ROTATE to compensate for device orientation

* fixup! Add PS2_MOUSE_ROTATE to compensate for device orientation

* Reformat with IndentPPDirectives: AfterHash as per qmk#6316
@manna-harbour manna-harbour deleted the ps2_mouse_rotate branch April 15, 2020 00:40
Quarren42 pushed a commit to Quarren42/qmk_firmware that referenced this pull request Apr 15, 2020
* Add PS2_MOUSE_ROTATE to compensate for device orientation

* fixup! Add PS2_MOUSE_ROTATE to compensate for device orientation

* Reformat with IndentPPDirectives: AfterHash as per qmk#6316
kylekuj pushed a commit to kylekuj/qmk_firmware that referenced this pull request Apr 21, 2020
* Add PS2_MOUSE_ROTATE to compensate for device orientation

* fixup! Add PS2_MOUSE_ROTATE to compensate for device orientation

* Reformat with IndentPPDirectives: AfterHash as per qmk#6316
bitherder pushed a commit to bitherder/qmk_firmware that referenced this pull request May 15, 2020
* Add PS2_MOUSE_ROTATE to compensate for device orientation

* fixup! Add PS2_MOUSE_ROTATE to compensate for device orientation

* Reformat with IndentPPDirectives: AfterHash as per qmk#6316
drashna pushed a commit to zsa/qmk_firmware that referenced this pull request May 24, 2020
* Add PS2_MOUSE_ROTATE to compensate for device orientation

* fixup! Add PS2_MOUSE_ROTATE to compensate for device orientation

* Reformat with IndentPPDirectives: AfterHash as per qmk#6316
sowbug pushed a commit to sowbug/qmk_firmware that referenced this pull request May 24, 2020
* Add PS2_MOUSE_ROTATE to compensate for device orientation

* fixup! Add PS2_MOUSE_ROTATE to compensate for device orientation

* Reformat with IndentPPDirectives: AfterHash as per qmk#6316
fdidron pushed a commit to zsa/qmk_firmware that referenced this pull request Jun 12, 2020
* Add PS2_MOUSE_ROTATE to compensate for device orientation

* fixup! Add PS2_MOUSE_ROTATE to compensate for device orientation

* Reformat with IndentPPDirectives: AfterHash as per qmk#6316
turky pushed a commit to turky/qmk_firmware that referenced this pull request Jun 13, 2020
* Add PS2_MOUSE_ROTATE to compensate for device orientation

* fixup! Add PS2_MOUSE_ROTATE to compensate for device orientation

* Reformat with IndentPPDirectives: AfterHash as per qmk#6316
jakobaa pushed a commit to jakobaa/qmk_firmware that referenced this pull request Jul 7, 2020
* Add PS2_MOUSE_ROTATE to compensate for device orientation

* fixup! Add PS2_MOUSE_ROTATE to compensate for device orientation

* Reformat with IndentPPDirectives: AfterHash as per qmk#6316
thorstenweber83 pushed a commit to thorstenweber83/qmk_firmware that referenced this pull request Sep 2, 2020
* Add PS2_MOUSE_ROTATE to compensate for device orientation

* fixup! Add PS2_MOUSE_ROTATE to compensate for device orientation

* Reformat with IndentPPDirectives: AfterHash as per qmk#6316
BorisTestov pushed a commit to BorisTestov/qmk_firmware that referenced this pull request May 23, 2024
* Add PS2_MOUSE_ROTATE to compensate for device orientation

* fixup! Add PS2_MOUSE_ROTATE to compensate for device orientation

* Reformat with IndentPPDirectives: AfterHash as per qmk#6316
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.

6 participants