Comments (3)
After doing it on my local files, I just realized that it doesn't really work, but I think there should be a way to create an XInputUSB api without modifying the Arduino installation files.
from arduinoxinput.
As you discovered, the preprocessor checks can't be moved to the header because the .ino
and the library .cpp
are in two separate compilation units. The preprocessor checks don't carry over.
I agree with you that it would be nice not to have to modify the Arduino installation files but I can't think of a good way to do it. This is mostly a quirk with how the Arduino build system is so rigid. If you want to modify the "makefile" you need to modify the Arduino core. The library and the API are designed to function independent of one another, so the API must be defined elsewhere in the core in order for the library to see it.
If you can think of a clean solution I'd be happy to implement it.
from arduinoxinput.
I couldn't find a solution either, so I added #include "MyHeader.h"
in XInput.h, it's not a good solution, but it works.
from arduinoxinput.
Related Issues (20)
- Question: USB serial read and xinput HOT 1
- send data to arduino while emulating HOT 1
- XInput.h not found HOT 3
- bluetooth feature HOT 1
- Raspberry Pi Pico support HOT 3
- BUTTON_LOGO Does Not Result in Any Button Press HOT 2
- esp32 support HOT 1
- Non-debug mode in PlatformIO IDE HOT 2
- A question about Xinput device identification HOT 2
- Not able to get teensy board to have xinput mode Help HOT 1
- error: recipe.preproc.macros pattern is missing HOT 4
- XInput.getRumbleLeft() and XInput.getRumbleRight() byte structure HOT 2
- Is it possible to send additional 'keypresses' or buttons outside of what's provided? HOT 7
- Not issue: I just want to tip my hat. HOT 1
- Is there a way to have two ArduinoXinput devices and have them show up as two Joysticks? HOT 2
- Arduino uno R4 minima support HOT 1
- More than 1 controller like the wireless receiver HOT 1
- is it possible to use a bluetooth module(like hc06)、Pro Micro together with XInput to make gamepad wireless? HOT 1
- Using along with other libraries HOT 1
- Support with other libraries and button matrix HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from arduinoxinput.