QGroundControl
Ground Control Station for MAVLink Drones
Loading...
Searching...
No Matches
GuardedTransition.cc
Go to the documentation of this file.
1#include "GuardedTransition.h"
2#include "QGCState.h"
3
4bool GuardedTransition::eventTest(QEvent* event)
5{
6 if (!QGCSignalTransition::eventTest(event)) {
7 return false;
8 }
9
10 if (_guard && !_guard()) {
11 qCDebug(QGCStateMachineLog) << "Guarded transition blocked by guard predicate";
12 return false;
13 }
14
15 return true;
16}
bool eventTest(QEvent *event) override
Override to check guard before allowing transition.