openftc / dsktop Goto Github PK
View Code? Open in Web Editor NEWAn unofficial driver station app for your computer
An unofficial driver station app for your computer
You'll need to implement RobotCoreGamepadManager
.
My suggestion is that you convert Gamepad
into an abstract class that will handle all of the Robocol conversion stuff, but leave the interactions with the physical gamepad up to subclasses.
Assuming that we're using a library that requires us to poll the gamepads (as opposed to the event driven model we have in the Android gamepad API), I think we'll need to have a loop in its own thread that's updating the gamepad continuously. Polling the gamepads every time we want to send data sounds OK if it's fast enough, but probably isn't a good option if we want to set the "User" via the usual button combo.
This is the current code to actually send the joystick data to the RC. It can be tweaked, ofc. It gets called every 40 ms.
// send gamepads if we have the info to do so (which will only be on the DS)
if(parameters.gamepadManager != null) {
long now = MyApp.Companion.getRuntime().msLong();
for (Gamepad gamepad : parameters.gamepadManager.getGamepadsForTransmission()) {
// don't send stale gamepads
if (now - gamepad.timestamp > GAMEPAD_UPDATE_THRESHOLD && gamepad.atRest()) {
continue;
}
gamepad.setSequenceNumber();
RobocolDatagram packetGamepad = new RobocolDatagram(gamepad);
send(packetGamepad);
}
}
Where by "telemetry" I don't just mean the feature built into the SDK, but a more capable version that sends arbitrary data over websockets.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.