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

Fix helix/rev2 not working properly when using split_common. #16512

Merged
merged 1 commit into from
Mar 3, 2022

Conversation

mtei
Copy link
Contributor

@mtei mtei commented Mar 3, 2022

Description

When helix/rev2 was using split_common, it didn't work properly and I couldn't type on the right hand side.

The cause is that the following code, added in 0.16.0 to quantum/keyboard.c, does not include quantum/split_common/split_util.h but instead includes keyboards/helix/rev2/split_util.h. Therefore, split_pre_init()/split_post_init() in quantum/split_common/split_util.c was not called.

  #ifdef SPLIT_KEYBOARD
  #    include "split_util.h"
  #endif
 % make clean; make VERBOSE_C_INCLUDE=keyboard.c helix/rev2/back:default
QMK Firmware 0.16.0
Deleting .build/ ... done.
QMK Firmware 0.16.0
Making helix/rev2/back with keymap default

avr-gcc (Homebrew AVR GCC 8.4.0_2) 8.4.0
Copyright (C) 2018 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Compiling: keyboards/helix/rev2/keymaps/default/oled_display.c                                      [OK]

.......................
Compiling: quantum/keyboard.c
. quantum/quantum.h
.. platforms/avr/platform_deps.h
... /usr/local/Cellar/avr-gcc@8/8.4.0_2/avr/include/avr/pgmspace.h
.... /usr/local/Cellar/avr-gcc@8/8.4.0_2/lib/avr-gcc/8/gcc/avr/8.4.0/include/stddef.h
... /usr/local/Cellar/avr-gcc@8/8.4.0_2/avr/include/avr/interrupt.h
.. platforms/wait.h
.......................
. quantum/bootmagic/magic.h
. quantum/command.h
. quantum/crc.h
. keyboards/helix/rev2/split_util.h ◆◆◆◆◆ LOOK ◆◆◆◆◆
Multiple include guards may be useful for:
./quantum/rgblight/rgblight_post_config.h
./quantum/split_common/post_config.h
/usr/local/Cellar/avr-gcc@8/8.4.0_2/avr/include/avr/iom32u4.h
quantum/rgblight/rgblight_modes.h
.......................
Compiling: lib/lufa/LUFA/Drivers/USB/Core/USBTask.c                                                 [OK]
Compiling: tmk_core/protocol/lufa/usb_util.c                                                        [OK]
Linking: .build/helix_rev2_back_default.elf                                                         [OK]
Creating load file for flashing: .build/helix_rev2_back_default.hex                                 [OK]
Copying helix_rev2_back_default.hex to qmk_firmware folder                                          [OK]
Checking file size of helix_rev2_back_default.hex                                                   [OK]
 * The firmware size is fine - 26054/28672 (90%, 2618 bytes free)

Types of Changes

  • Core
  • Bugfix
  • New feature
  • Enhancement/optimization
  • Keyboard (addition or update)
  • Keymap/layout/userspace (addition or update)
  • Documentation

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

When helix/rev2 was using split_common, it didn't work properly and I couldn't type on the right hand side.

The cause is that the following code, added in 0.16.0 to `quantum/keyboard.c`, does not include `quantum/split_common/split_util.h` but instead includes `keyboards/helix/rev2/split_util.h`. Therefore, `split_pre_init()/split_post_init()` in `quantum/split_common/split_util.c` was not called.

```c
  #ifdef SPLIT_KEYBOARD
  #    include "split_util.h"
  #endif
```
@mtei mtei added the bug label Mar 3, 2022
@mtei mtei marked this pull request as ready for review March 3, 2022 18:43
@mtei mtei requested a review from a team March 3, 2022 18:43
Copy link
Member

@zvecr zvecr left a comment

Choose a reason for hiding this comment

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

The cause is that the following code, added in 0.16.0

For completeness, it was the merge of #16432 that is the cause of the issue. It probably should have been rebased/retested after the develop merge.

@zvecr zvecr merged commit 4a66bdf into qmk:master Mar 3, 2022
@mtei mtei deleted the fix_helix_rev2_dont_work_with_split_common branch April 22, 2022 13:42
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.

3 participants