MHeironimus / ArduinoJoystickLibrary

An Arduino library that adds one or more joysticks to the list of HID devices an Arduino Leonardo or Arduino Micro can support.
GNU Lesser General Public License v3.0
2.06k stars 403 forks source link

You should give your library a world-wide-unique name to avoid library conflicts #211

Open StefanL38 opened 2 years ago

StefanL38 commented 2 years ago

Your library is named Joystick.h / Joystick.cpp

This is the exact same name as for any other incompatible Joystick-library. Then you try to solve this problem by causing more problems through naming the ZIP-file https://github.com/MHeironimus/ArduinoJoystickLibrary/archive/version-2.0.zip ArduinoJoystickLibrary-version-2.0.zip which puts your library when added as a ZIP-lib to the arduino-Ide in a folder with the same name.

Your include-filename is Joystick.h Whenever there exists a directory "Joystick" the compiler will take the Joystick.h from there Your joystick.h file will be installed into

...\libraries\ArduinoJoystickLibrary-version-2.0

and will NEVER be found by the compiler

This will cause a lot of frustration for beginners that don't know about these mechanisms So you should create a Version 2.1 and use a world-wide-unique-library-name to avoid such errors The name of the ZIP-file should be the EXACT same name as the .h / .cpp- file to make sure everything follows the arduino-standards

best regards Stefan

bwanaaa commented 2 years ago

I think I am sufferring from this. My code runs fine-when I push a button, the serial print shows the input. The pro micro even shows up in the usb game control panel. However, the buttons in the USB control panel do not light up when I push the buttons.