|
QGroundControl
Ground Control Station for MAVLink Drones
|
#include <Common.h>
Public Types | |
| enum class | Operation { AlwaysTrue , AlwaysFalse , GreaterThan , GreaterEqual , Equal , NotEqual , LessThan , LessEqual } |
Public Member Functions | |
| Condition ()=default | |
| Condition (const QString &condition, ParameterManager *parameterManager, const QString &label=QString()) | |
| bool | evaluate () const |
| bool | hasCondition () const |
| Fact * | fact () const |
Evaluates a string expression containing a vehicle parameter name and comparison to a constant value
|
strong |
|
default |
| Condition::Condition | ( | const QString & | condition, |
| ParameterManager * | parameterManager, | ||
| const QString & | label = QString() |
||
| ) |
Constructor
| condition | generic form: true|false|<param_name><operation><signed integer> where: <operation>: [>,>=,==,!=,<,<=] |
| parameterManager | parameter manager to resolve parameter names |
| label | optional label for debug logging (e.g., "show-ui-if") |
Definition at line 98 of file Common.cc.
References AlwaysFalse, AlwaysTrue, ParameterManager::defaultComponentId, Equal, ParameterManager::getParameter(), GreaterEqual, GreaterThan, LessEqual, LessThan, NotEqual, ParameterManager::parameterExists(), FactMetaData::valueTypeBool, and FactMetaData::valueTypeInt32.
| bool Condition::evaluate | ( | ) | const |
Definition at line 176 of file Common.cc.
References AlwaysFalse, AlwaysTrue, Equal, GreaterEqual, GreaterThan, LessEqual, LessThan, and NotEqual.
Referenced by ActuatorOutputs::ActuatorOutput::groupsVisible(), Actuators::showUi(), and ActuatorOutputs::ChannelConfig::visible().
|
inline |
Definition at line 105 of file Common.h.
Referenced by ActuatorOutputs::ActuatorOutput::ActuatorOutput().
|
inline |
Definition at line 103 of file Common.h.
References AlwaysTrue.