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

[Infinity ErgoDox] How to enable backlight support? #720

Closed
ickerwx opened this issue Sep 4, 2016 · 8 comments
Closed

[Infinity ErgoDox] How to enable backlight support? #720

ickerwx opened this issue Sep 4, 2016 · 8 comments

Comments

@ickerwx
Copy link
Contributor

ickerwx commented Sep 4, 2016

I have BACKLIGHT_ENABLE = yes set in my keymap's Makefile and have a key that essentially calls backlight_step() when pressed. The code is copied from my Preonic keymap where it works like it should. Still, when I press the respective key on my Infinity Ergodox the backlight stays off.

I flashed the Kiibohd firmware, the LEDs light up like they should here, so it's not a hardware issue.
Do I have to do anything else beside setting BACKLIGHT_ENABLE in the Makefile and calling backlight_step()?

@fredizzimo
Copy link
Contributor

Hi @ickerwx,

Yes, the Infinity Ergodox backlight support is not properly integrated into the QMK firmware yet.

In my TMK fork, which I made before moving over to QMK, things worked a bit differently. Although even there I didn't have support for dynamically changing the backlight.

I could have got the same system working for QMK quite quickly, but I didn't want to do that. Instead I have been thinking about something that would work well with all kinds of keyboards and described in #717.

The progress towards that have been quite slow, because first I needed proper unit test support, which in turn required some bigger changes to the makefile system. However now that those two things are done, I will finally have the time to start fixing the LCD and backlight support for the Infinity Ergodox.

So I hope that we will have something working pretty soon.

@ickerwx
Copy link
Contributor Author

ickerwx commented Sep 4, 2016

Alright, thanks for the info. I wasn't aware how much of the Infinitx Ergodox support is your work, thanks a lot for this, you're awesome.

@b4lthazar
Copy link

Hey buddy, any news on this? I'd love to program the backlights and LCD screens :).

@ec1oud
Copy link

ec1oud commented Feb 1, 2017

keyboards/ergodox/keymaps/swissgerman/keymap.c shows one way to change the LCD backlight color to show the current layer. So I did that in my fork too, plus using the hacks from last summer to have layer information on the LCD, and setting a constant key backlight level. I don't have the increment/decrement working yet.

Seems like it needs a better architecture though: one should be able to choose basic behavioral features without needing to copy code like this into every keymap.

@b4lthazar
Copy link

@ec1oud Nice. Can you please elaborate on the "hacks from last summer" ? And if I were to clone your fork, what other changes have you made? Thank you sir!

@ec1oud
Copy link

ec1oud commented Feb 3, 2017

It was based on some sample visualization code from fredizzimo. The LCD has text showing which layer you are on, and the LCD backlight color changes depending on the layer, and I just want to have my keys illuminated so I didn't retain fredizzimo's visualization which put those backlight LEDs in motion, but the startup_animation is there, commented out. The code is in my keymap: keyboards/ergodox/keymaps/ecloud-qwerty, so you'll probably have to port such changes to your own favorite layout, unless you like mine. ;-)

Other changes you probably don't need are the previous patches where I was modifying the default OS X keymap (that was from before the subproject restructuring, and before there were so many keymaps to choose from). But if you aren't building with that keymap, they won't matter.

I could make it less of a mess, but figured I'd see what architecture fredizzimo is going to come up with.

@jH4nn3s
Copy link

jH4nn3s commented Feb 5, 2017

Hey you guys,
I'm using @ec1oud 's tip/code and now want to adjust the visualizer.c file in the display_welcome method. In particular, I would like to display .bmp files. According to the documentation at https://wiki.ugfx.io/index.php/Images this is possible with ugfx and they provide example code. In this example code, 3 methods are called to actually open, draw and close the bmp, such as gdispImageOpenFile etc.
In the ugfx example code, only gfx.h is included. Since gfx.h is already included in the visualizer code and functions like gdispDrawString can be freely called in the visualizer.c, I assumed these image functions might be available too.
However, upon compiling my adaptation of the example code, I get the error message
undefined reference to gdispImageOpenFile. I admit to being somewhat of a dilettante with C and header files. I assume something has to be activated in the gfxconf.h that shows up in the visualizer example folder by @fredizzimo.
Like
#define GDISP_NEED_IMAGE TRUE #define GDISP_NEED_IMAGE_BMP TRUE
I guess?
If I put the changed gfxconf.h then into my keymap folder, I get the following error:
Compiling: ./tmk_core/protocol/chibios/main.c In file included from ./lib/ugfx/gfx.h:208:0, from ./quantum/visualizer/visualizer.h:31, from ./tmk_core/protocol/chibios/main.c:42: ./lib/ugfx/src/gdisp/gdisp.h:157:31: fatal error: gdisp_lld_config.h: No such file or directory #include "gdisp_lld_config.h" ^ compilation terminated.

Am I working on a lost cause here?

@fredizzimo
Copy link
Contributor

The LCD support is now merged and working. Not using the effect system that I was planning to do, but using the old visualizer code. The effect system is still on my roadmap, but it won't be too different from what we have now, it will just make things easier to use.

So I'm closing this.

BlueTufa pushed a commit to BlueTufa/qmk_firmware that referenced this issue Aug 6, 2021
- check for and remove trailing extension for JSON when importing keymap

Issue qmk#719
bdjohnson79 pushed a commit to bdjohnson79/qmk_firmware that referenced this issue Oct 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants