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

fixed MOUSEKEY_INERTIA on AVR #19096

Merged
merged 1 commit into from
Nov 16, 2022
Merged

Conversation

ToyKeeper
Copy link
Contributor

Description

MouseKey "inertia" mode wasn't working on AVR. This one-word change fixes it.

The AVR compiler seems to need an explicit cast during fixed-point multiply, or it'll overflow and cause some strange behavior.

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

  • MouseKey "inertia" mode didn't work correctly on AVR.

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

(the AVR compiler seems to need an explicit datatype conversion
 during fixed-point multiply, or it'll overflow)
@github-actions github-actions bot added the core label Nov 16, 2022
@zvecr zvecr added the bug label Nov 16, 2022
@zvecr zvecr requested a review from a team November 16, 2022 14:08
Copy link
Contributor

@sigprof sigprof left a comment

Choose a reason for hiding this comment

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

Yes, on ARM an implicit cast to 32-bit int would happen here, but on AVR int is 16-bit and would overflow.

@drashna drashna merged commit 31fb55a into qmk:develop Nov 16, 2022
ramonimbao pushed a commit to ramonimbao/qmk_firmware that referenced this pull request Nov 28, 2022
Co-authored-by: Selene ToyKeeper <git@toykeeper.net>
elpekenin pushed a commit to elpekenin/qmk_firmware that referenced this pull request Dec 7, 2022
Co-authored-by: Selene ToyKeeper <git@toykeeper.net>
crembz pushed a commit to crembz/qmk_firmware that referenced this pull request Dec 18, 2022
Co-authored-by: Selene ToyKeeper <git@toykeeper.net>
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.

None yet

4 participants