00001 #include <iostream>
00002
00003
00004 #include <GameController.H>
00005
00006 void configureJoystick(std::string config, GameController &joystick);
00007
00008 int main() {
00009 GameController joystick;
00010
00011 configureJoystick("joystick-config.xml",joystick);
00012
00013 while (true) {
00014 printf("\015");
00015 for(int i = 0; i < joystick.numAxes(); ++i)
00016 printf("% 6i ", joystick.axis(i));
00017 for(int i = 0; i < joystick.numButtons(); ++i)
00018 if (joystick.button(i))
00019 printf("1");
00020 else
00021 printf("0");
00022 fflush(stdout);
00023 usleep(1000);
00024 }
00025
00026 return 0;
00027 }
00028