Comments (1)
This project is prepared only for RaspberryPi OS but you can do some changes in the code and then it will be working on Ubuntu as well. There is different in buffer frame between devices.
To run a gamepad on Ubuntu you have modify file ...\server\src\gamepad.js
and method sendEvent
.
There are to places where you have to uncomment code for Ubuntu and comment for RaspberryPi.
var input_event = Struct()
.struct('time', Struct()
// Raspberry Pi
.word32Sle('tv_sec')
.word32Sle('tv_usec')
// Ubuntu
//.word64Sle('tv_sec')
//.word64Sle('tv_usec')
)
.word16Ule('type')
.word16Ule('code')
.word32Sle('value');
and
var input_event_end = Struct()
.struct('time', Struct()
// Raspberry Pi
.word32Sle('tv_sec')
.word32Sle('tv_usec')
// Ubuntu
//.word64Sle('tv_sec')
//.word64Sle('tv_usec')
)
.word16Ule('type')
.word16Ule('code')
.word32Sle('value');
In next version I'll add command parameter and describe in README how run gamepade on Ubuntu without code changes.
from mobile-gamepad.
Related Issues (13)
- Analog Input HOT 2
- Analog Stick get's stuck HOT 4
- How do you use this on Ubuntu install?
- Suggestion: Make the controller number a Guide button HOT 2
- Sudo grant start HOT 1
- Error When installing HOT 1
- Libreelec HOT 1
- Certificate for Website Not Updated HOT 1
- [RetroPie] How to start? HOT 1
- Problem install
- no listen on port 8888 HOT 1
- uinput not found 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 mobile-gamepad.