Commit 2e1efdc2 authored by Lorenz Meier's avatar Lorenz Meier

Hotfix: Do not assert on missing param

parent 94e718b6
...@@ -27,6 +27,7 @@ ...@@ -27,6 +27,7 @@
#include "FactBinder.h" #include "FactBinder.h"
#include "UASManager.h" #include "UASManager.h"
#include "AutoPilotPluginManager.h" #include "AutoPilotPluginManager.h"
#include <QDebug>
FactBinder::FactBinder(void) : FactBinder::FactBinder(void) :
_autopilotPlugin(NULL), _autopilotPlugin(NULL),
...@@ -60,13 +61,13 @@ void FactBinder::setName(const QString& name) ...@@ -60,13 +61,13 @@ void FactBinder::setName(const QString& name)
if (_autopilotPlugin->factExists(name)) { if (_autopilotPlugin->factExists(name)) {
_fact = _autopilotPlugin->getFact(name); _fact = _autopilotPlugin->getFact(name);
connect(_fact, &Fact::valueChanged, this, &FactBinder::valueChanged); connect(_fact, &Fact::valueChanged, this, &FactBinder::valueChanged);
emit valueChanged();
emit nameChanged();
} else { } else {
Q_ASSERT(false); qDebug() << "FAILED BINDING PARAM" << name << ": PARAM DOES NOT EXIST ON SYSTEM!";
} }
} }
emit valueChanged();
emit nameChanged();
} }
QVariant FactBinder::value(void) const QVariant FactBinder::value(void) const
...@@ -83,7 +84,7 @@ void FactBinder::setValue(const QVariant& value) ...@@ -83,7 +84,7 @@ void FactBinder::setValue(const QVariant& value)
if (_fact) { if (_fact) {
_fact->setValue(value); _fact->setValue(value);
} else { } else {
Q_ASSERT(false); qDebug() << "FAILED SETTING PARAM VALUE" << value.toString() << ": PARAM DOES NOT EXIST ON SYSTEM!";
} }
} }
......
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