qmk / qmk_firmware

Open-source keyboard firmware for Atmel AVR and Arm USB families
https://qmk.fm
GNU General Public License v2.0
18.28k stars 39.38k forks source link

Dynamic Macros on Ergodox infinity not working #1772

Closed ckaros closed 7 years ago

ckaros commented 7 years ago

When I try to make ergodox infinity firmware with dynamic macros enabled I get the following error:

./quantum/dynamic_macro.h: In function 'dynamic_macro_led_blink':

./quantum/dynamic_macro.h:53:5: error: implicit declaration of function '_delay_ms' [-Werror=implicit-function-declaration] _delay_ms(100); ^ cc1: all warnings being treated as errors

I followed the instructions in the docs step by step. Don't think I missed anything there

jayliu50 commented 7 years ago

Ooo, nice. Was just about to write up a bug on this one, but you beat me to it. Add this to your rules.mk as a workaround:

BACKLIGHT_ENABLE     = no

To whomever is resolving this, it would be nice if we could have BACKLIGHT_ENABLE = no by default.

ckaros commented 7 years ago

This does solve the make error.....but it would be nice to have backlight and dynamic macro support together. I have leds installed on my keyboard and they do not turn on with this setting change.

ckaros commented 7 years ago

Also, now that I have the make issue work around....I am finding that the dynamic macro capability is quite buggy on the ergodox infinity. After recording a macro, if I try to replay, most of the time the keyboard will crash and become unresponsive. I have to unplug and replug to get it to work again. Sometimes it will only type one key then crash.

It's super weird, because sometimes it works, But most of the time it just crashes.

jayliu50 commented 7 years ago

Ah, I see.. Well, you could open up ./quantum/dynamic_macro.h , and comment out line 53, if you want to keep the backlight enabled. It's by no means a solution, but perhaps a better workaround.

Yeah, the dynamic macro has either changed in how it's set up, or is plain broken in recent builds. I compiled QMK recently on my original ergodox using updated code and dynamic macro doesn't work anymore at all.

fredizzimo commented 7 years ago

The problem is the _delay_ms, it should be changed to wait. Could you test that and send a pull request if it works?

olivierpons commented 7 years ago

I've compiled on my Infinity Ergodox with my customized macros and it works very well... that's strange. I've made my own layout, and in the layouts/community/ergodox/azerty/rules.mk file I have:

LCD_BACKLIGHT_ENABLE = yes                                                       
LCD_ENABLE = yes                                                                 
BACKLIGHT_ENABLE = yes                                                           
BACKLIGHT_BREATHING = yes                                                        
NKRO_ENABLE = yes                                                                
KEY_LOCK_ENABLE = yes 

For your information, I've copied-paste the 333fred layout which worked very well. Could you try with it with sudo make ergodox_infinity-333fred-dfu-util MASTER=left and then same for the right?

jayliu50 commented 7 years ago

@olivierpons Just an FYI, I believe you are referring to standard macros, and not dynamic macros.

fredizzimo commented 7 years ago

I just submitted a pull request with the fix that I mentioned earlier.

olivierpons commented 7 years ago

@jayliu50 You're 100% right, not dynamic. I un-plug often my keyboard, do dynamic imply that the macros is lost when you un-plug your keyboard... if it's the case there's no point for me, but if I'm wrong then tell me I'm interested!

fredizzimo commented 7 years ago

@olivierpons, yes, that's exactly what the documentation says