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

[Bug] Using only right side encoder in split keyboard #10096

Closed
3 tasks
karnadii opened this issue Aug 19, 2020 · 5 comments
Closed
3 tasks

[Bug] Using only right side encoder in split keyboard #10096

karnadii opened this issue Aug 19, 2020 · 5 comments

Comments

@karnadii
Copy link

Describe the Bug

I have this handwired keyboard that use only the right side of encoder
https://i.imgur.com/b0lezr6.jpg

defining only the right side of the encoder throw me error that ENCODERS_PAD_A is undeclared

#define ENCODERS_PAD_A_RIGHT { D1 }
#define ENCODERS_PAD_B_RIGHT { D0 }
Compiling: quantum/split_common/transport.c                                                        quantum/split_common/transport.c:20:31: error: 'ENCODERS_PAD_A' undeclared here (not in a function); did you mean 'ENCODER_ENABLE'?
 static pin_t encoders_pad[] = ENCODERS_PAD_A;
                               ^~~~~~~~~~~~~~
                               ENCODER_ENABLE

i have to declare ENCODERS_PAD_A too

// Right encoder
// I can not use only right encoder, I have to define left encoder as well
#define ENCODERS_PAD_A { D1 } // dummy encoder to passs error. there is no left encoder.
#define ENCODERS_PAD_B { D0 } // dummy encoder to passs error. there is no left encoder.
#define ENCODERS_PAD_A_RIGHT { D1 }
#define ENCODERS_PAD_B_RIGHT { D0 }
#define ENCODER_RESOLUTION 4

the left side D1 and D0 is used for oled. and the right side is used for the encoder.

System Information

  • Keyboard: qsplit (my own handwired keyboard)
    • Revision (if applicable):
  • Operating system: Macos
  • AVR GCC version: 8.4.0
  • ARM GCC version: 8.3.1
  • QMK Firmware version: 0.9.46
  • Any keyboard related software installed?
    • AutoHotKey
    • Karabiner
    • Other:

Additional Context

@drashna
Copy link
Member

drashna commented Dec 1, 2020

The "right" define is for when the right side encoder is different from the left side. (such as flipped, or wired up differently).

You want to use just the normal defines for the pads.

@karnadii
Copy link
Author

karnadii commented Dec 2, 2020

The master is on the left with the oled, if the master is on the right sure no need to declare the right encoder.

@karnadii
Copy link
Author

karnadii commented Dec 2, 2020

My point is if you have split keyboard and using encoder, don't force both side to have encoder. If I want to use only one encoder in my split, don't throw error.

@BalzGuenat
Copy link
Contributor

I have just encountered this limitation myself. My keyboard has the master side left and an encoder on the right half. Like @karnadii's board, mine is not symmetric and has no encoder pads on the left side. The current encoder code makes some assumptions about the halves being symmetric, at least in number of encoder pads.

I also had to resort to using some unused pins as a dummy encoder for left.

I will see if I can make some changes to encoder.c to make this work.

@zvecr
Copy link
Member

zvecr commented Aug 28, 2022

Fixed by #12090

@zvecr zvecr closed this as completed Aug 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants