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

Updated slave encoder sync to reduce dropped pulses #7325

Merged
merged 6 commits into from
Nov 15, 2019

Conversation

XScorpion2
Copy link
Contributor

@XScorpion2 XScorpion2 commented Nov 10, 2019

Description

Fixes the slave encoder state syncing to reduce dropped pulses.

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

@splitkb
Copy link
Contributor

splitkb commented Nov 13, 2019

I've tested the code, and come to the following observations:

  • The code performs equally well on both halves now;
  • Both encoders now execute the code for one direction only, regardless of the direction you turn them. In my case, turning the encoder I assigned VOLU and VOLD to now performs VOLU for both directions.

@splitkb
Copy link
Contributor

splitkb commented Nov 13, 2019

@drashna You said you have this code running on your Kyria too, do your observations match mine?

@XScorpion2
Copy link
Contributor Author

@splitkb Just pushed a fix for the direction issue. My bad, bad copy & paste.

@splitkb
Copy link
Contributor

splitkb commented Nov 13, 2019

@XScorpion2 Are you sure the code is pushed? I've copied over the encoder code into my local encoder.c and executed make clean followed by make kyria:thomasbaart, which did recompile the file into my firmware. I still see the same behaviour as before.

@XScorpion2
Copy link
Contributor Author

XScorpion2 commented Nov 13, 2019

Check now @splitkb 6b4f0a2

@splitkb
Copy link
Contributor

splitkb commented Nov 13, 2019

It seems as though there's still the same problem, but now in the opposite direction. I did make clean and flashed both halves, for what it's worth, and used the code from your latest commit.

@XScorpion2
Copy link
Contributor Author

at work, will check again tonight

@drashna
Copy link
Member

drashna commented Nov 13, 2019

Yeah, that's the same issues that I was seeing, and can confirm that the changes don't fix it.

@XScorpion2 XScorpion2 marked this pull request as ready for review November 14, 2019 20:30
@XScorpion2
Copy link
Contributor Author

@splitkb @drashna Fixed and managed to find time to test it this time.

To make fauxpark happy

Co-Authored-By: fauxpark <[email protected]>
@splitkb
Copy link
Contributor

splitkb commented Nov 15, 2019

Confirmed to work, like a charm! Thank you very much for your efforts, @XScorpion2, it's much appreciated by myself and Kyria users!

@drashna
Copy link
Member

drashna commented Nov 15, 2019

Can also confirm that this fixes the issue.

However, it does not work on with #5998. But that's out of scope for this PR

@drashna
Copy link
Member

drashna commented Nov 15, 2019

Also, could the keyboard and keymap stuff be removed from the PR

@XScorpion2
Copy link
Contributor Author

@drashna fixed

@drashna drashna added the bug label Nov 15, 2019
@drashna drashna requested a review from a team November 15, 2019 18:12
@drashna drashna removed the keymap label Nov 15, 2019
@drashna drashna merged commit 0f0c73f into qmk:master Nov 15, 2019
drashna pushed a commit to zsa/qmk_firmware that referenced this pull request Nov 18, 2019
* Updated slave encoder sync to reduce dropped pulses

* Fixing encoder direction

* Encoder behavior fixes, tested

* Update keyboards/rgbkb/sol/keymaps/xulkal/rules.mk

To make fauxpark happy

Co-Authored-By: fauxpark <[email protected]>

* Update custom_encoder.c

* Update rules.mk
drashna added a commit to drashna/qmk_firmware that referenced this pull request Nov 19, 2019
To allow for simple change of direction

In fixing the Split Encoder issues in qmk#7325, the direction was flipped for all encoders.

However, this flip actually corrects the direction to be correct, but this was an unintended change in behavior.
Rather than reverting the dirction (because, now it's actually correctly processing CW vs CCW), lets add an option to flip this, so that users can revert to the older behavior if they want, without having to redefine the pins/pads.
@drashna drashna mentioned this pull request Nov 19, 2019
12 tasks
ripxorip pushed a commit to ripxorip/qmk_firmware that referenced this pull request Dec 3, 2019
* Updated slave encoder sync to reduce dropped pulses

* Fixing encoder direction

* Encoder behavior fixes, tested

* Update keyboards/rgbkb/sol/keymaps/xulkal/rules.mk

To make fauxpark happy

Co-Authored-By: fauxpark <[email protected]>

* Update custom_encoder.c

* Update rules.mk
patrl pushed a commit to patrl/qmk_firmware that referenced this pull request Dec 29, 2019
* Updated slave encoder sync to reduce dropped pulses

* Fixing encoder direction

* Encoder behavior fixes, tested

* Update keyboards/rgbkb/sol/keymaps/xulkal/rules.mk

To make fauxpark happy

Co-Authored-By: fauxpark <[email protected]>

* Update custom_encoder.c

* Update rules.mk
drashna added a commit to drashna/qmk_firmware that referenced this pull request Jan 9, 2020
To allow for simple change of direction

In fixing the Split Encoder issues in qmk#7325, the direction was flipped for all encoders.

However, this flip actually corrects the direction to be correct, but this was an unintended change in behavior.
Rather than reverting the dirction (because, now it's actually correctly processing CW vs CCW), lets add an option to flip this, so that users can revert to the older behavior if they want, without having to redefine the pins/pads.
noroadsleft pushed a commit that referenced this pull request Jan 9, 2020
* Add `ENCODER_DIRECTION_FLIP` setting

To allow for simple change of direction

In fixing the Split Encoder issues in #7325, the direction was flipped for all encoders.

However, this flip actually corrects the direction to be correct, but this was an unintended change in behavior.
Rather than reverting the dirction (because, now it's actually correctly processing CW vs CCW), lets add an option to flip this, so that users can revert to the older behavior if they want, without having to redefine the pins/pads.

* Revert direction to old behavior

* Make setting easier to read and understand

* Use physically correct direction by default

* Wordsmithing in documentation

* Fix indenting in example

* Add changelog
noroadsleft pushed a commit that referenced this pull request Jan 11, 2020
* Add `ENCODER_DIRECTION_FLIP` setting

To allow for simple change of direction

In fixing the Split Encoder issues in #7325, the direction was flipped for all encoders.

However, this flip actually corrects the direction to be correct, but this was an unintended change in behavior.
Rather than reverting the dirction (because, now it's actually correctly processing CW vs CCW), lets add an option to flip this, so that users can revert to the older behavior if they want, without having to redefine the pins/pads.

* Revert direction to old behavior

* Make setting easier to read and understand

* Use physically correct direction by default

* Wordsmithing in documentation

* Fix indenting in example

* Add changelog
noroadsleft pushed a commit that referenced this pull request Jan 21, 2020
* Add `ENCODER_DIRECTION_FLIP` setting

To allow for simple change of direction

In fixing the Split Encoder issues in #7325, the direction was flipped for all encoders.

However, this flip actually corrects the direction to be correct, but this was an unintended change in behavior.
Rather than reverting the dirction (because, now it's actually correctly processing CW vs CCW), lets add an option to flip this, so that users can revert to the older behavior if they want, without having to redefine the pins/pads.

* Revert direction to old behavior

* Make setting easier to read and understand

* Use physically correct direction by default

* Wordsmithing in documentation

* Fix indenting in example

* Add changelog
noroadsleft pushed a commit to noroadsleft/qmk_firmware that referenced this pull request Jan 24, 2020
* Add `ENCODER_DIRECTION_FLIP` setting

To allow for simple change of direction

In fixing the Split Encoder issues in qmk#7325, the direction was flipped for all encoders.

However, this flip actually corrects the direction to be correct, but this was an unintended change in behavior.
Rather than reverting the dirction (because, now it's actually correctly processing CW vs CCW), lets add an option to flip this, so that users can revert to the older behavior if they want, without having to redefine the pins/pads.

* Revert direction to old behavior

* Make setting easier to read and understand

* Use physically correct direction by default

* Wordsmithing in documentation

* Fix indenting in example

* Add changelog
noroadsleft pushed a commit to noroadsleft/qmk_firmware that referenced this pull request Feb 1, 2020
* Add `ENCODER_DIRECTION_FLIP` setting

To allow for simple change of direction

In fixing the Split Encoder issues in qmk#7325, the direction was flipped for all encoders.

However, this flip actually corrects the direction to be correct, but this was an unintended change in behavior.
Rather than reverting the dirction (because, now it's actually correctly processing CW vs CCW), lets add an option to flip this, so that users can revert to the older behavior if they want, without having to redefine the pins/pads.

* Revert direction to old behavior

* Make setting easier to read and understand

* Use physically correct direction by default

* Wordsmithing in documentation

* Fix indenting in example

* Add changelog
noroadsleft pushed a commit to noroadsleft/qmk_firmware that referenced this pull request Feb 1, 2020
* Add `ENCODER_DIRECTION_FLIP` setting

To allow for simple change of direction

In fixing the Split Encoder issues in qmk#7325, the direction was flipped for all encoders.

However, this flip actually corrects the direction to be correct, but this was an unintended change in behavior.
Rather than reverting the dirction (because, now it's actually correctly processing CW vs CCW), lets add an option to flip this, so that users can revert to the older behavior if they want, without having to redefine the pins/pads.

* Revert direction to old behavior

* Make setting easier to read and understand

* Use physically correct direction by default

* Wordsmithing in documentation

* Fix indenting in example

* Add changelog
noroadsleft pushed a commit to noroadsleft/qmk_firmware that referenced this pull request Feb 8, 2020
* Add `ENCODER_DIRECTION_FLIP` setting

To allow for simple change of direction

In fixing the Split Encoder issues in qmk#7325, the direction was flipped for all encoders.

However, this flip actually corrects the direction to be correct, but this was an unintended change in behavior.
Rather than reverting the dirction (because, now it's actually correctly processing CW vs CCW), lets add an option to flip this, so that users can revert to the older behavior if they want, without having to redefine the pins/pads.

* Revert direction to old behavior

* Make setting easier to read and understand

* Use physically correct direction by default

* Wordsmithing in documentation

* Fix indenting in example

* Add changelog
noroadsleft pushed a commit to noroadsleft/qmk_firmware that referenced this pull request Feb 14, 2020
* Add `ENCODER_DIRECTION_FLIP` setting

To allow for simple change of direction

In fixing the Split Encoder issues in qmk#7325, the direction was flipped for all encoders.

However, this flip actually corrects the direction to be correct, but this was an unintended change in behavior.
Rather than reverting the dirction (because, now it's actually correctly processing CW vs CCW), lets add an option to flip this, so that users can revert to the older behavior if they want, without having to redefine the pins/pads.

* Revert direction to old behavior

* Make setting easier to read and understand

* Use physically correct direction by default

* Wordsmithing in documentation

* Fix indenting in example

* Add changelog
HokieGeek pushed a commit to HokieGeek/qmk_firmware that referenced this pull request Feb 21, 2020
* Updated slave encoder sync to reduce dropped pulses

* Fixing encoder direction

* Encoder behavior fixes, tested

* Update keyboards/rgbkb/sol/keymaps/xulkal/rules.mk

To make fauxpark happy

Co-Authored-By: fauxpark <[email protected]>

* Update custom_encoder.c

* Update rules.mk
noroadsleft pushed a commit to noroadsleft/qmk_firmware that referenced this pull request Feb 21, 2020
* Add `ENCODER_DIRECTION_FLIP` setting

To allow for simple change of direction

In fixing the Split Encoder issues in qmk#7325, the direction was flipped for all encoders.

However, this flip actually corrects the direction to be correct, but this was an unintended change in behavior.
Rather than reverting the dirction (because, now it's actually correctly processing CW vs CCW), lets add an option to flip this, so that users can revert to the older behavior if they want, without having to redefine the pins/pads.

* Revert direction to old behavior

* Make setting easier to read and understand

* Use physically correct direction by default

* Wordsmithing in documentation

* Fix indenting in example

* Add changelog
noroadsleft pushed a commit that referenced this pull request Feb 27, 2020
* Add `ENCODER_DIRECTION_FLIP` setting

To allow for simple change of direction

In fixing the Split Encoder issues in #7325, the direction was flipped for all encoders.

However, this flip actually corrects the direction to be correct, but this was an unintended change in behavior.
Rather than reverting the dirction (because, now it's actually correctly processing CW vs CCW), lets add an option to flip this, so that users can revert to the older behavior if they want, without having to redefine the pins/pads.

* Revert direction to old behavior

* Make setting easier to read and understand

* Use physically correct direction by default

* Wordsmithing in documentation

* Fix indenting in example

* Add changelog
BorisTestov pushed a commit to BorisTestov/qmk_firmware that referenced this pull request May 23, 2024
* Updated slave encoder sync to reduce dropped pulses

* Fixing encoder direction

* Encoder behavior fixes, tested

* Update keyboards/rgbkb/sol/keymaps/xulkal/rules.mk

To make fauxpark happy

Co-Authored-By: fauxpark <[email protected]>

* Update custom_encoder.c

* Update rules.mk
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.

Rotary encoder unresponsive on slave half of split keyboard
10 participants