-
-
Notifications
You must be signed in to change notification settings - Fork 37.8k
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
[Keyboard] Allow custom OLED on Helix Rev3 #12041
Conversation
This change is not necessary. Because if you create your own oled_display.c, everything will be overridden. Look here. qmk_firmware/keyboards/helix/rev3_5rows/oled_display.c Lines 17 to 26 in dd61f77
{qmk_firmware} % mkdir keyboards/helix/rev3_5rows/keymaps/newmap
{qmk_firmware} % cp keyboards/helix/rev3_5rows/keymaps/default/config.h keyboards/helix/rev3_5rows/keymaps/newmap
{qmk_firmware} % cp keyboards/helix/rev3_5rows/keymaps/default/keymap.c keyboards/helix/rev3_5rows/keymaps/newmap
{qmk_firmware} % touch keyboards/helix/rev3_5rows/keymaps/newmap/oled_display.c
{qmk_firmware} % make helix/rev3_5rows:newmap
QMK Firmware 0.11.70
WARNING: Some git submodules are out of date or modified.
Please consider running make git-submodule.
Making helix/rev3_5rows with keymap newmap
avr-gcc (Homebrew AVR GCC 8.4.0_1) 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/rev3_5rows/keymaps/newmap/oled_display.c [OK]
Compiling: keyboards/helix/helix.c [OK]
Compiling: keyboards/helix/rev3_5rows/rev3_5rows.c [OK]
Compiling: keyboards/helix/rev3_5rows/keymaps/newmap/keymap.c [OK]
Compiling: quantum/quantum.c [OK]
Compiling: quantum/bitwise.c [OK]
Compiling: quantum/led.c [OK]
Compiling: quantum/keymap_common.c [OK]
|
That's ... less than ideal, IMO. And it's not documented anywhere but in the c file for the oled itself. Which has led to at least one person running into issues when trying to customize their OLED display. Edit: I think that this change should be okay, as well. Or deed to add that information to the keyboard's readme. I can can do that, if you'd like. |
QMK Configurator does not generate any non-keymap data in keymap.c. So for QMK Configurator users, we (MakotoKurauchi and me) have moved the OLED related code from
Sure. I think that is the easiest way. |
That part I definitely understand. And I have done something similar with splitkb's zima keyboard. However, I feel that the way you have this set up is more complicated and involves additional complexity, when it comes to new users. Having it there (or even in the keyboard's c file) with the weak attribute is simpler, IMO, and less prone to "why is this erroring out when I compile" issues. |
Is it the keyboard's c file? Not keymap's c file? Could you give me a sample? For example, I assume that a user would work with the following steps:
|
Absolutely! I've verified that everything compiles and works correctly when:
|
However, When Therefore, it is recommended to change the keyboard level --- a/keyboards/helix/rev3_Xrows/rules.mk
+++ b/keyboards/helix/rev3_Xrows/rules.mk
@@ -8,4 +8,4 @@ ENCODER_ENABLE = yes
DIP_SWITCH_ENABLE = yes
LTO_ENABLE = yes
-SRC += oled_display.c
+LIB_SRC += oled_display_default.c Below, the same content will be repeated in Japanese for @MakotoKurauchi. splitkb/zima/zima.c のなかの oled_task_user() は、ひとつの関数のなかで OLED コードが完結しています。したがって、その関数一つだけオーバーライドすれば、解決します。 しかし、 ユーザのコードのなかに したがって keyboard level の |
10e02f6
to
4685926
Compare
I've changed the sourcing to |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The weak attribute is already useless, so let's remove it.
mtei, I've marked the requests as resolved, for the reasons state here: |
Thank you for your contribution! |
4685926
to
de604ae
Compare
de604ae
to
b51e067
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Slight __attribute__ ((weak))
, but LGTM.
About a week ago, I met Makoto Kurauchi to discuss this matter. As a result, it was agreed to change it to something like #14426. |
I saw that, and it's a nice middle ground, I think. Closing this PR in favor of those. |
Description
The rev3 of the Helix contains the oled_user functions but with no way to override them without editing keyboard files. This changes the functions to be weak, so that users can replace them if so desired.
Types of Changes
Issues Fixed or Closed by This PR
Checklist