forked from qmk/qmk_firmware
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Ignore axis-related code when axis number=0
The analog joystick feature does not compile accross all platforms (see qmk#4226 (review)) All joystick related code is put between #if JOYSTICK_AXES_COUNT > 0 This also reduces the size of the compiled code when you only want to use joystick buttons. \### How to reproduce bug: 1. `qmk new-keyboard` 2. select the MCU `GD32VF103` (other options don't matter) 3. `rules.mk` Add `JOYSTICK_ENABLE = yes` 4. `config.h` : Add ```c #define JOYSTICK_BUTTON_COUNT 1 #define JOYSTICK_AXES_COUNT 0 ``` 5. (optional) Change a key to `JS_BUTTON0` in keymap 6. run `qmk compile` against new keyboard Errors will show related to the ADC. \### Disclaimer 1. I do not have the proper HW to debug on all keyboards, but it does work from the RP2040 branch which has a similar problem See qmk#14877 (comment) 2. I guess `ifeq ($(shell expr $(JOYSTICK_AXES_COUNT) \> 0), 1)` ain't so pretty, but it didn't work with `#ifneq ($(JOYSTICK_AXES_COUNT), 0) ??
- Loading branch information
Showing
2 changed files
with
38 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters