vial-kb / vial-gui

Vial is an open-source cross-platform (Windows, Linux and Mac) GUI and a QMK fork for configuring your keyboard in real time.
https://get.vial.today
GNU General Public License v2.0
860 stars 151 forks source link

how to use tap_dance #77

Closed monkeychou closed 2 years ago

monkeychou commented 2 years ago

TAP_DANCE_ENABLE = yes in rules.mk

define TAPPING_TERM 175 in config.h

but errors

Linking: .build/choupad_via.elf [ERRORS] /usr/local/opt/avr-binutils/bin/avr-ld: .build/obj_choupad_via/quantum/process_keycode/process_tap_dance.o: in function `process_tap_dance_action_on_reset': /Users/chou/desktop/vial/vial-qmk/quantum/process_keycode/process_tap_dance.c:99: undefined reference to `tap_dance_actions' /usr/local/opt/avr-binutils/bin/avr-ld: /Users/chou/desktop/vial/vial-qmk/quantum/process_keycode/process_tap_dance.c:99: undefined reference to `tap_dance_actions' /usr/local/opt/avr-binutils/bin/avr-ld: .build/obj_choupad_via/quantum/process_keycode/process_tap_dance.o: in function `_process_tap_dance_action_fn': /Users/chou/desktop/vial/vial-qmk/quantum/process_keycode/process_tap_dance.c:83: undefined reference to `tap_dance_actions' /usr/local/opt/avr-binutils/bin/avr-ld: /Users/chou/desktop/vial/vial-qmk/quantum/process_keycode/process_tap_dance.c:83: undefined reference to `tap_dance_actions' /usr/local/opt/avr-binutils/bin/avr-ld: .build/obj_choupad_via/quantum/process_keycode/process_tap_dance.o: in function `process_tap_dance_action_on_reset': /Users/chou/desktop/vial/vial-qmk/quantum/process_keycode/process_tap_dance.c:100: undefined reference to `tap_dance_actions' /usr/local/opt/avr-binutils/bin/avr-ld: .build/obj_choupad_via/quantum/process_keycode/process_tap_dance.o:/Users/chou/desktop/vial/vial-qmk/quantum/process_keycode/process_tap_dance.c:100: more undefined references to `tap_dance_actions' follow collect2: error: ld returned 1 exit status
xyzz commented 2 years ago

Can you post a link to the repository with this keyboard and full configuration for it?

monkeychou commented 2 years ago

您可以使用此键盘和完整配置发布到存储库的链接吗?

https://github.com/monkeychou/choupad thanks

monkeychou commented 2 years ago

您可以使用此键盘和完整配置发布到存储库的链接吗?

https://github.com/monkeychou/choupad thanks

xyzz commented 2 years ago

Following these commands:

git clone https://github.com/monkeychou/choupad.git
git clone https://github.com/vial-kb/vial-qmk.git
mv choupad/choupad vial-qmk/keyboards
cd vial-qmk
python3 -m venv venv
. venv/bin/activate
pip install qmk
make git-submodule
make choupad:via

I get the following error:

Compiling: keyboards/choupad/keymaps/via/keymap.c                                                  keyboards/choupad/keymaps/via/keymap.c:62:6: error: conflicting types for 'encoder_update_user'; have 'void(uint8_t,  _Bool)' {aka 'void(unsigned char,  _Bool)'}
   62 | void encoder_update_user(uint8_t index, bool clockwise) {

It looks your copy of vial-qmk is out of date.

After resolving the error, the firmware links successfully however it is too large:

Linking: .build/choupad_via.elf                                                                     [OK]
Creating load file for flashing: .build/choupad_via.hex                                             [OK]
Copying choupad_via.hex to qmk_firmware folder                                                      [OK]
Checking file size of choupad_via.hex                                                              
 * The firmware is too large! 34758/28672 (6086 bytes over)
 [ERRORS]

make[1]: *** [tmk_core/rules.mk:490: check-size] Error 1
Make finished with errors
make: *** [Makefile:478: choupad:via] Error 1

Therefore, it looks like your vial-qmk is not fully updated, and there is no issue here.