Commit 344acaf6 authored by Tomaz Canabrava's avatar Tomaz Canabrava

Modernize the C++ to accept variadic templates for signals with 6+ arguments

C++2003 didn't had variadic templates so different number of
arguments must have been already implemented in the templates
and since it's impossible to get the amount ot different methods
that paople write, a variadic template was neede.

now we can connect signal / slots with 6+ arguments.
Signed-off-by: 's avatarTomaz Canabrava <>
parent f0e2e153
......@@ -63,7 +63,8 @@ LinuxBuild {
# Qt configuration
CONFIG += qt \
thread \
QT += \
concurrent \
......@@ -74,8 +74,7 @@ ParameterLoader::ParameterLoader(AutoPilotPlugin* autopilot, Vehicle* vehicle, Q
connect(&_cacheTimeoutTimer, &QTimer::timeout, this, &ParameterLoader::refreshAllParameters);
// FIXME: Why not direct connect?
connect(_vehicle->uas(), SIGNAL(parameterUpdate(int, int, QString, int, int, int, QVariant)), this, SLOT(_parameterUpdate(int, int, QString, int, int, int, QVariant)));
connect(_vehicle->uas(), &UASInterface::parameterUpdate, this, &ParameterLoader::_parameterUpdate);
/* Initially attempt a local cache load, refresh over the link if it fails */
......@@ -56,11 +56,9 @@ public:
/// Returns true if the full set of facts are ready
bool parametersAreReady(void) { return _parametersReady; }
public slots:
/// Re-request the full set of parameters from the autopilot
void refreshAllParameters(void);
/// Request a refresh on the specific parameter
void refreshParameter(int componentId, const QString& name);
......@@ -102,7 +100,6 @@ protected:
Vehicle* _vehicle;
MAVLinkProtocol* _mavlink;
private slots:
void _parameterUpdate(int uasId, int componentId, QString parameterName, int parameterCount, int parameterId, int mavType, QVariant value);
void _valueUpdated(const QVariant& value);
void _restartWaitingParamTimer(void);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment