Comments (3)
The Gamepad API we have been using has been deprecated. The maintainer suggests just using the provided Web APIs
from openrov-software.
As per your steps for recreating the bug, I am having difficulty recreating it in MOCK mode on my machine. The PS4 controller always comes up when I start cockpit and plug in the gamepad. Am I missing something?
I do realize that these steps produce a bug:
- Start cockpit
- Unplug gamepad
- Plug in gamepad
Expected: Full control
Actually: No control
from openrov-software.
I suspect this might fix it:
diff --git a/src/static/js/libs/gamepad.js b/src/static/js/libs/gamepad.js
index 5dc89de..9225f0a 100644
--- a/src/static/js/libs/gamepad.js
+++ b/src/static/js/libs/gamepad.js
@@ -582,7 +582,13 @@
console.log('Not supposed to go here!');
return; // should not happen
}
- if (gamepads.length !== this.gamepads.length) {
+ gamepads.nonNulllength = 0;
+ for (i = 0; i < gamepads.length; i++) {
+ if (gamepads[i]!==null){
+ gamepads.nonNulllength++;
+ }
+ }
+ if (gamepads.nonNulllength !== this.gamepads.length) {
var gamepad, i;
for (i = 0; i < gamepads.length; i++) {
gamepad = gamepads[i];
Trying to find a gamepad to test with
from openrov-software.
Related Issues (20)
- The system appears to be sending multiple commands on keyboard press HOT 6
- Tilt control target position adjust too quickly using the gamepad HOT 2
- Toggle controls on the gamepad should only fire on button release HOT 3
- On boot, between the greeting and whatever else, the lights can get stuck on
- The automatic expansion on to the SD card script is failing to work HOT 1
- Recoded video does not playback on windows media player
- Throttle power level off when switching back to cockpit applet from another
- Recorded Video Files not Appending Files Correctly
- Report of BBB not being recognized HOT 1
- How to deploy the cockpit to the beagleboneblack?
- How to deploy cockpit to the other platform(except rasp and bb) ? HOT 1
- RC4: depth hold not working
- HD Camera feed not coming up HOT 2
- The ROV embedded computer has been struggling to process messages
- How does Tether communication works? HOT 4
- HomePlug and cameras HOT 1
- npm install : Mock HOT 2
- No Video Export when Mocking
- Can't build cockpit
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 openrov-software.