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
4APMSubMotorComponentController::APMSubMotorComponentController(QObject *parent)
5 : FactPanelController(parent)
6{
7 (void) connect(_vehicle, &Vehicle::textMessageReceived, this, &APMSubMotorComponentController::_handleNewMessages);
8}
9
10void APMSubMotorComponentController::_handleNewMessages(int sysid, int componentid, int severity, const QString &text, const QString &description)
11{
12 Q_UNUSED(sysid); Q_UNUSED(componentid); Q_UNUSED(severity); Q_UNUSED(description);
13
14 if ((_vehicle->flightMode() == _vehicle->motorDetectionFlightMode()) && (text.toLower().contains("thruster") || text.toLower().contains("motor"))) {
15 _motorDetectionMessages += text + QStringLiteral("\n");
17 }
18}
Used for handling missing Facts from C++ code.
QString flightMode() const
Definition Vehicle.cc:1549
void textMessageReceived(int sysid, int componentid, int severity, QString text, QString description)
QString motorDetectionFlightMode() const
Definition Vehicle.cc:3471