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
6
FunctionState::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.h
FunctionState::FunctionState
FunctionState(const QString &stateName, QState *parentState, std::function< void()>)
Executes a function when the state is entered.
Definition
FunctionState.cc:6
QGCAbstractState::advance
void advance()
QGCState
Definition
QGCState.h:22
src
Utilities
StateMachine
States
FunctionState.cc
Generated by
1.9.8