hidjoystick: Added check for HID

master
Erik Andresen 2020-04-28 07:20:40 +02:00
parent 33c5d61f82
commit b45caf8e02
2 changed files with 7 additions and 2 deletions

View File

@ -1518,7 +1518,7 @@
"shortName": "Joystick", "shortName": "Joystick",
"icon": "app.png", "icon": "app.png",
"version":"0.01", "version":"0.01",
"description": "Emulate a 2 axis/5 button Joystick using the accelerometer as stick input and buttons 1-3, touch left and touch right.", "description": "Emulate a 2 axis/5 button Joystick using the accelerometer as stick input and buttons 1-3, touch left as button 4 and touch right as button 5.",
"tags": "bluetooth", "tags": "bluetooth",
"storage": [ "storage": [
{"name":"hidjoystick.app.js","url":"app.js"}, {"name":"hidjoystick.app.js","url":"app.js"},

View File

@ -57,4 +57,9 @@ function update() {
} }
drawApp(); drawApp();
setInterval(update, 100); // 10 Hz if (settings.HID) {
setInterval(update, 100); // 10 Hz
} else {
E.showMessage('HID disabled');
setTimeout(load, 1000);
}