QGroundControl
Ground Control Station for MAVLink Drones
Loading...
Searching...
No Matches
FunctionState.cc
Go to the documentation of this file.
1#include "FunctionState.h"
2
3#include <QtCore/QTimer>
4
6FunctionState::FunctionState(const QString& stateName, QState* parentState, std::function<void()> function)
7 : QGCState (stateName, parentState)
8 , _function (function)
9{
10 connect(this, &QState::entered, this, [this] () {
11 _function();
12 emit advance();
13 });
14}
FunctionState(const QString &stateName, QState *parentState, std::function< void()>)
Executes a function when the state is entered.