13 qCDebug(JoystickComponentLog) <<
this;
23 qCDebug(JoystickComponentLog) <<
this;
28 return tr(
"Configure axis calibration, button assignments, and input settings.");
38 return QUrl::fromUserInput(QStringLiteral(
"qrc:/qml/QGroundControl/VehicleSetup/JoystickComponent.qml"));
43 return QUrl::fromUserInput(QStringLiteral(
"qrc:/qml/QGroundControl/AutoPilotPlugins/Common/JoystickComponentSummary.qml"));
48 if (!_activeJoystick) {
49 return tr(
"No joystick detected");
53 return tr(
"Buttons only");
60 return _activeJoystick->
settings()->calibrated()->rawValue().toBool() ? tr(
"Calibrated") : tr(
"Needs calibration");
65 if (!_activeJoystick) {
72 features.append(tr(
"Rumble"));
75 features.append(tr(
"Trigger Rumble"));
77 if (_activeJoystick->
hasLED()) {
78 features.append(tr(
"LED"));
81 features.append(tr(
"Gyro"));
84 features.append(tr(
"Accel"));
87 features.append(tr(
"Touchpad"));
90 return features.join(QStringLiteral(
", "));
93void JoystickComponent::_activeJoystickChanged(
Joystick *joystick)
95 if (_activeJoystick) {
99 _activeJoystick =
nullptr;
103 _activeJoystick = joystick;
113void JoystickComponent::_joystickCalibrationChanged()
118void JoystickComponent::_joystickBatteryChanged()
#define QGC_LOGGING_CATEGORY(name, categoryStr)
The AutoPilotPlugin class is an abstract base class which represents the methods and objects which ar...
void rawValueChanged(const QVariant &value)
void joystickStatusChanged()
~JoystickComponent() override
QString joystickFeaturesText() const
QString description() const final
QUrl summaryQmlSource() const final
bool setupComplete() const final
QString joystickStatusText() const
QUrl setupSource() const final
void activeJoystickChanged()
static JoystickManager * instance()
Joystick * activeJoystick()
void activeJoystickChanged(Joystick *joystick)
virtual Q_INVOKABLE bool hasGyroscope() const
virtual bool hasRumbleTriggers() const
virtual bool requiresCalibration() const
void batteryStateChanged()
virtual Q_INVOKABLE bool hasAccelerometer() const
virtual bool hasRumble() const
JoystickSettings * settings()
virtual bool hasLED() const
virtual Q_INVOKABLE int touchpadCount() const
A vehicle component is an object which abstracts the physical portion of a vehicle into a set of conf...
void setupCompleteChanged()