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

Allow encoder config from info.json #17295

Merged
merged 6 commits into from
Jun 21, 2022
Merged

Conversation

zvecr
Copy link
Member

@zvecr zvecr commented Jun 3, 2022

Description

Current plan is to munge https://docs.qmk.fm/#/feature_encoders into,

    "encoder": {
        "enabled": true,
        "rotary": [
            { "pin_a": "B5", "pin_b": "A2", "resolution": 2 }
        ]
    }

Once format has been decided, DD docs will be updated.

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 cli qmk cli command keyboard python labels Jun 3, 2022
@zvecr zvecr marked this pull request as ready for review June 13, 2022 16:59
@zvecr zvecr requested a review from a team June 13, 2022 17:00
@drashna drashna requested a review from a team June 13, 2022 18:22
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.

How much work would it be to support ENCODER_DIRECTION_FLIP and ENCODER_DEFAULT_POS in this PR? Because that would cover all the encoder features besides callbacks and encoder maps.

Once format has been decided, DD docs will be updated.

As the format seems pretty much nailed down this can be added now?

Otherwise LGTM!

@zvecr
Copy link
Member Author

zvecr commented Jun 14, 2022

ENCODER_DIRECTION_FLIP shouldnt exist at the keyboard level so wont have a ton of value (people should just swap a/b pins). ENCODER_DEFAULT_POS was only in 2 keymaps, though it could be added? Wasnt sure of its use case really to know how it factors in.

@github-actions github-actions bot removed the keyboard label Jun 14, 2022
@drashna
Copy link
Member

drashna commented Jun 16, 2022

ENCODER_DEFAULT_POS is very much like the flip. I think it should only be set in keymap config.

@drashna drashna merged commit 1a400d8 into qmk:develop Jun 21, 2022
0xcharly pushed a commit to Bastardkb/bastardkb-qmk that referenced this pull request Jul 4, 2022
@jvbroek
Copy link
Contributor

jvbroek commented Sep 27, 2022

Necro-ing here a tiny bit, I saw that the docs for encoders don't mention anything about info.json. Figured I'd draw attention to it.

nolanseaton pushed a commit to nolanseaton/qmk_firmware that referenced this pull request Jan 23, 2023
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.

4 participants