14 case Type::beep:
return QCoreApplication::translate(
"ActuatorAction",
"Beep");
15 case Type::set3DModeOn:
return QCoreApplication::translate(
"ActuatorAction",
"3D mode: On");
16 case Type::set3DModeOff:
return QCoreApplication::translate(
"ActuatorAction",
"3D mode: Off");
28 : _label(
label), _outputFunction(outputFunction), _type(action.type), _vehicle(vehicle)
34 if (_commandInProgress) {
43 action->ackHandler(
static_cast<MAV_RESULT
>(ack.result), failureCode);
48 _commandInProgress =
false;
54void Action::sendMavlinkRequest()
56 qCDebug(ActuatorActionsLog) <<
"Sending actuator action, function:" << _outputFunction <<
"type:" << (int)_type;
60 handlerInfo.resultHandlerData =
this;
62 _vehicle->sendMavCommandWithHandler(
64 MAV_COMP_ID_AUTOPILOT1,
65 MAV_CMD_CONFIGURE_ACTUATOR,
73 _commandInProgress =
true;
#define QGC_LOGGING_CATEGORY(name, categoryStr)
struct __mavlink_command_ack_t mavlink_command_ack_t
ActionGroup(QObject *parent, const QString &label, Config::Type type)
Config::Type type() const
const QString & label() const
Action(QObject *parent, const Config &action, const QString &label, int outputFunction, Vehicle *vehicle)
const QString & label() const
Q_INVOKABLE void trigger()
void showAppMessage(const QString &message, const QString &title)
Modal application message. Queued if the UI isn't ready yet.
@ set3DModeOn
motors: enable 3D mode (reversible)
@ setSpinDirection2
motors: set spin direction 2
@ set3DModeOff
motors: disable 3D mode (reversible)
@ setSpinDirection1
motors: set spin direction 1
QString typeToLabel() const
MavCmdResultHandler resultHandler
nullptr for no handler
struct VehicleTypes::MavCmdAckHandlerInfo_s MavCmdAckHandlerInfo_t
Callback info bundle for sendMavCommandWithHandler.
MavCmdResultFailureCode_t
@ MavCmdResultFailureNoResponseToCommand
No response from vehicle to command.