20 return tr(
"Configure and calibrate your transmitter and assign control channels.");
25 return "/qmlimages/RadioComponentIcon.png";
30 return _vehicle->parameterManager()->getParameter(-1,
"COM_RC_IN_MODE")->rawValue().toInt() == 1 ? false :
true;
35 if (
_vehicle->parameterManager()->getParameter(-1,
"COM_RC_IN_MODE")->rawValue().toInt() != 1) {
38 for(
const char*
const&mapParam : {
"RC_MAP_ROLL",
"RC_MAP_PITCH",
"RC_MAP_YAW",
"RC_MAP_THROTTLE"}) {
50 return {
"COM_RC_IN_MODE",
"RC_MAP_ROLL",
"RC_MAP_PITCH",
"RC_MAP_YAW",
"RC_MAP_THROTTLE"};
55 return QUrl::fromUserInput(
"qrc:/qml/QGroundControl/AutoPilotPlugins/Common/RadioComponent.qml");
60 return {
"RC_MAP_FLAPS",
"RC_MAP_AUX1",
"RC_MAP_AUX2"};
75 setupComplete() ? VehicleSummaryItem::Muted : VehicleSummaryItem::Attention;
77 QList<VehicleSummaryItem> items;
78 const auto addChannel = [
this, &items](
const char* param,
const QString& caption,
const QString& unmappedText,
87 items.append({caption, unmappedText, unmappedState});
91 addChannel(
"RC_MAP_ROLL", tr(
"Roll"), tr(
"Setup required"), attitudeState);
92 addChannel(
"RC_MAP_PITCH", tr(
"Pitch"), tr(
"Setup required"), attitudeState);
93 addChannel(
"RC_MAP_YAW", tr(
"Yaw"), tr(
"Setup required"), attitudeState);
94 addChannel(
"RC_MAP_THROTTLE", tr(
"Throttle"), tr(
"Setup required"), attitudeState);
96 addChannel(
"RC_MAP_FLAPS", tr(
"Flaps"), tr(
"Disabled"), VehicleSummaryItem::Muted);
98 addChannel(
"RC_MAP_AUX1", tr(
"Aux1"), tr(
"Disabled"), VehicleSummaryItem::Muted);
99 addChannel(
"RC_MAP_AUX2", tr(
"Aux2"), tr(
"Disabled"), VehicleSummaryItem::Muted);
The AutoPilotPlugin class is an abstract base class which represents the methods and objects which ar...
A Fact is used to hold a single value within the system.
QString cookedValueString() const
QVariant rawValue() const
void valueChanged(const QVariant &value)
This signal is only meant for use by the QT property system. It should not be connected to by client ...
virtual QStringList summaryChangedTriggerList() const
Parameters whose change emits summaryItemsChanged, besides those that change setupComplete.
virtual QUrl setupSource(void) const
virtual bool requiresSetup(void) const
virtual QString iconResource(void) const
virtual void setupTriggerSignals()
PX4RadioComponent(Vehicle *vehicle, AutoPilotPlugin *autopilot, QObject *parent=nullptr)
virtual QString name(void) const
virtual bool setupComplete(void) const
virtual QString description(void) const
virtual QStringList setupCompleteChangedTriggerList(void) const
virtual QList< VehicleSummaryItem > summaryItems() const
Values for this component's card on the Summary page. A component with none falls back to summaryQmlS...
static constexpr int defaultComponentId
VehicleComponent(Vehicle *vehicle, AutoPilotPlugin *autopilot, AutoPilotPlugin::KnownVehicleComponent KnownVehicleComponent, QObject *parent=nullptr)
Fact * _parameterFact(const QString &name) const
Fact of a parameter of the default component, nullptr when the vehicle does not have it.
void requiresSetupChanged()
virtual void setupTriggerSignals()
VehicleSummaryState::State State