Added support for GPIO joystick

Users can now simply test on their own pc without argument added to the launch file
This commit is contained in:
jancoow
2015-05-24 15:50:01 +02:00
parent 3bf8280f79
commit 9be062fcd9
3 changed files with 117 additions and 45 deletions
+5 -3
View File
@@ -23,7 +23,7 @@ public class Window extends JFrame {
super("Arcade");
setSize(1280, 1024);
this.ON_RASP = ON_RASP;
Window.ON_RASP = ON_RASP;
System.out.println(ON_RASP);
//Set window close listener
@@ -56,8 +56,10 @@ public class Window extends JFrame {
setContentPane(view);
//Create EventListeners
new GPIOListener();
addKeyListener(jsh);
if(!Window.ON_RASP){
addKeyListener(bth);
addKeyListener(jsh);
}
bth.addButtonListener(control);
jsh.addJoystickListener(control);