QGroundControl
Ground Control Station for MAVLink Drones
Loading...
Searching...
No Matches
APMSubMotorComponentController.cc
Go to the documentation of this file.
2#include "Vehicle.h"
3
5 : FactPanelController(parent)
6{
7 (void) connect(_vehicle, &Vehicle::textMessageReceived, this, &APMSubMotorComponentController::_handleNewMessages);
8}
9
10void APMSubMotorComponentController::_handleNewMessages(quint32 sysid, int componentid, int severity,
11 const QString& text, const QString& description)
12{
13 Q_UNUSED(sysid); Q_UNUSED(componentid); Q_UNUSED(severity); Q_UNUSED(description);
14
15 if ((_vehicle->flightMode() == _vehicle->motorDetectionFlightMode()) && (text.toLower().contains("thruster") || text.toLower().contains("motor"))) {
16 _motorDetectionMessages += text + QStringLiteral("\n");
18 }
19}
APMSubMotorComponentController(QObject *parent=nullptr)
FactPanelController(QObject *parent=nullptr)
QString flightMode() const
Definition Vehicle.cc:1515
QString motorDetectionFlightMode() const
Definition Vehicle.cc:2655
void textMessageReceived(quint32 sysid, int componentid, int severity, QString text, QString description)