brentaro / QMK_HID_Gamepad_with_SOCD

QMK Keymap to emulate a Gamepad/All Button Controller with SOCD cleaning.
25 stars 3 forks source link

Unable to compile; greeted with error #4

Closed Mandydeth closed 1 year ago

Mandydeth commented 1 year ago
`Compiling: quantum/keymap_introspection.c In file included from quantum/keymap_introspection.c:5: ./keyboards/preonic/keymaps/via/keymap.c:43:19: error: conflicting types for 'joystick_axes' 43 joystick_config_t joystick_axes[JOYSTICK_AXIS_COUNT] = { ^~~~~ In file included from quantum/quantum.h:210, from keyboards/preonic/preonic.h:20, from ./keyboards/preonic/keymaps/via/keymap.c:3, from quantum/keymap_introspection.c:5: quantum/joystick.h:55:26: note: previous declaration of 'joystick_axes' was here 55 extern joystick_config_t joystick_axes[JOYSTICK_AXES_COUNT]; ^~~~~ In file included from quantum/keymap_introspection.c:5: ./keyboards/preonic/keymaps/via/keymap.c: In function 'process_record_user': ./keyboards/preonic/keymaps/via/keymap.c:123:6: error: implicit declaration of function 'joystick_set_axis'; did you mean 'joystick_task'? [-Werror=implicit-function-declaration] 123 joystick_set_axis(1, 0); ^~~~~ joystick_task ./keyboards/preonic/keymaps/via/keymap.c:143:6: error: expected '}' before 'else' 143 } else { ^~~~ cc1.exe: all warnings being treated as errors [ERRORS]

make[1]: *** [builddefs/common_rules.mk:359: .build/obj_preonic_rev3_drop_via/quantum/keymap_introspection.o] Error 1 Make finished with errors`

Not sure how to go about resolving this one.

brentaro commented 1 year ago

Have you setup QMK with the latest branch? When running QMK MSYS and compiling the environment, you have to either delete or rename your old environment folder (usually located "C:\Users\ [USER NAME]\qmk_firmware" in Windows) and run QMK MSYS "qmk setup" command again.

Also make sure you have "JOYSTICK_DRIVER = digital" in rules.mk.

Mandydeth commented 1 year ago

I went ahead and deleted my existing QMK repository with a new installation. I ensured 'joystick_driver = digital' included in rules.mk I'm still being met by errors:

`QMK Firmware 0.21.6 Making preonic/rev3_drop with keymap hitbox

arm-none-eabi-gcc.exe (GCC) 10.1.0 Copyright (C) 2020 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: quantum/keymap_introspection.c In file included from quantum/keymap_introspection.c:5: ./keyboards/preonic/keymaps/hitbox/keymap.c: In function 'process_record_user': ./keyboards/preonic/keymaps/hitbox/keymap.c:249:26: error: expected ')' before numeric constant 249 joystick_set_axis(4. 0); ^~ ) ./keyboards/preonic/keymaps/hitbox/keymap.c:249:6: error: too few arguments to function 'joystick_set_axis' 249 joystick_set_axis(4. 0); ^~~~~ In file included from quantum/quantum.h:213, from ./.build/obj_preonic_rev3_drop/src/default_keyboard.h:27, from ./keyboards/preonic/keymaps/hitbox/keymap.c:3, from quantum/keymap_introspection.c:5: quantum/joystick.h:128:6: note: declared here 128 void joystick_set_axis(uint8_t axis, int16_t value); ^~~~~ [ERRORS]

make[1]: [builddefs/common_rules.mk:361: .build/obj_preonic_rev3_drop_hitbox/quantum/keymap_introspection.o] Error 1 Make finished with errors make: [Makefile:392: preonic/rev3_drop:hitbox] Error 1`

Mandydeth commented 1 year ago

It looks like line 249 of the sample code has a period instead of a comma. Was able to resolve it by changing it. Would recommend updating the sample so that others don't run into the same issue. I'm going to check the neutral SOCD syntax to make sure that one doesn't have any issues here in a moment.

Mandydeth commented 1 year ago

Line 142 of the neutral SOCD cleaning code also has an error. Missing a '}' above line 142.

brentaro commented 1 year ago

Thanks. I’ll go and correct the samples as soon as I can.

brentaro commented 1 year ago

Formatting Errors corrected on both readme and sample code. Will close issue for now.