Browse Source

Merge branch 'joystick_commands' of github.com:Susurrus/qgroundcontrol into joystick_commands

Conflicts:
	src/input/JoystickInput.cc
	src/input/JoystickInput.h
	src/ui/JoystickAxis.cc
	src/ui/JoystickAxis.h
	src/ui/JoystickAxis.ui
	src/ui/JoystickWidget.cc
QGC4.4
Bryant 12 years ago
parent
commit
24af948fa3
  1. 4
      src/input/JoystickInput.cc
  2. 3
      src/ui/JoystickAxis.cc

4
src/input/JoystickInput.cc

@ -113,7 +113,6 @@ void JoystickInput::setActiveUAS(UASInterface* uas) @@ -113,7 +113,6 @@ void JoystickInput::setActiveUAS(UASInterface* uas)
connect(this, SIGNAL(joystickChanged(double,double,double,double,int,int,int)), tmp, SLOT(setManualControlCommands(double,double,double,double,int,int,int)));
connect(this, SIGNAL(buttonPressed(int)), tmp, SLOT(receiveButton(int)));
uasCanReverse = tmp->systemCanReverse();
qDebug() << "Current system can reverse: " << uasCanReverse;
}
}
}
@ -157,7 +156,6 @@ void JoystickInput::init() @@ -157,7 +156,6 @@ void JoystickInput::init()
// And attach to the first joystick found to start.
setActiveJoystick(0);
// Make sure the active UAS is set and that we're tracking UAS changes.
setActiveUAS(UASManager::instance()->getActiveUAS());
connect(UASManager::instance(), SIGNAL(activeUASSet(UASInterface*)), this, SLOT(setActiveUAS(UASInterface*)));
}
@ -274,8 +272,8 @@ void JoystickInput::setActiveJoystick(int id) @@ -274,8 +272,8 @@ void JoystickInput::setActiveJoystick(int id)
joystick = NULL;
joystickID = -1;
}
}
joystickID = id;
joystick = SDL_JoystickOpen(joystickID);
if (joystick && SDL_JoystickOpened(joystickID))
{

3
src/ui/JoystickAxis.cc

@ -1,7 +1,10 @@ @@ -1,7 +1,10 @@
#include "JoystickAxis.h"
#include "JoystickInput.h"
#include "ui_JoystickAxis.h"
<<<<<<< HEAD
#include "UASManager.h"
=======
>>>>>>> 64d0741ee82db3d5dac2108f3f6d03c6fa66e5c6
#include <QString>
JoystickAxis::JoystickAxis(int id, QWidget *parent) :

Loading…
Cancel
Save