QGroundControl
Ground Control Station for MAVLink Drones
Loading...
Searching...
No Matches
PX4SerialPortsController Class Reference

#include <PX4SerialPortsController.h>

Inheritance diagram for PX4SerialPortsController:
Collaboration diagram for PX4SerialPortsController:

Signals

void changedPortCountChanged ()
Signals inherited from FactPanelController
void missingParametersAvailable ()
void suppressRebootMessageChanged ()

Public Member Functions

 PX4SerialPortsController (QObject *parent=nullptr)
QmlObjectListModel * ports () const
int changedPortCount () const
Q_INVOKABLE void setPortFunction (int portId, int functionIndex)
Q_INVOKABLE void setPortFunctionEnabled (int portId, int functionIndex, bool enabled)
 Turns the function at functionIndex on or off on a shared port, leaving the port's other functions alone.
Q_INVOKABLE void revertChanges ()
 Writes back the values each parameter had when the page opened. Ignored while parameter writes are pending.
Public Member Functions inherited from FactPanelController
 FactPanelController (QObject *parent=nullptr)
virtual ~FactPanelController ()
Q_INVOKABLE Fact * getParameterFact (int componentId, const QString &name, bool reportMissing=true) const
Q_INVOKABLE bool parameterExists (int componentId, const QString &name) const
Q_INVOKABLE void getMissingParameters (const QStringList &rgNames)
bool suppressRebootMessage () const
void setSuppressRebootMessage (bool suppress)

Additional Inherited Members

Protected Member Functions inherited from FactPanelController
bool _allParametersExists (int componentId, const QStringList &names) const
void _reportMissingParameter (int componentId, const QString &name) const
 Report a missing parameter.
Protected Attributes inherited from FactPanelController
Vehicle * _vehicle = nullptr

Detailed Description

Backs the PX4 Ports page: shows PX4's per-function serial port parameters as one row per port. Changes are written immediately. All of them need a reboot, so the page shows that itself instead of the reboot notice.

Definition at line 129 of file PX4SerialPortsController.h.

Constructor & Destructor Documentation

◆ PX4SerialPortsController()

Member Function Documentation

◆ changedPortCount()

int PX4SerialPortsController::changedPortCount ( ) const
inline

Definition at line 142 of file PX4SerialPortsController.h.

◆ changedPortCountChanged

void PX4SerialPortsController::changedPortCountChanged ( )
signal

◆ ports()

QmlObjectListModel * PX4SerialPortsController::ports ( ) const
inline

Definition at line 140 of file PX4SerialPortsController.h.

◆ revertChanges()

void PX4SerialPortsController::revertChanges ( )

Writes back the values each parameter had when the page opened. Ignored while parameter writes are pending.

Definition at line 190 of file PX4SerialPortsController.cc.

◆ setPortFunction()

void PX4SerialPortsController::setPortFunction ( int portId,
int functionIndex )

Makes the function at functionIndex (0 for none) the only function on the port. Ignored for shared ports, which use setPortFunctionEnabled.

Definition at line 166 of file PX4SerialPortsController.cc.

References PX4SerialPortConfig::assignPort(), PX4SerialPortRow::functionParamName(), and PX4SerialPortRow::shared().

◆ setPortFunctionEnabled()

void PX4SerialPortsController::setPortFunctionEnabled ( int portId,
int functionIndex,
bool enabled )

Turns the function at functionIndex on or off on a shared port, leaving the port's other functions alone.

Definition at line 177 of file PX4SerialPortsController.cc.

References PX4SerialPortConfig::assignPort(), PX4SerialPortRow::functionParamName(), PX4SerialPortConfig::removeFromPort(), and PX4SerialPortRow::shared().


The documentation for this class was generated from the following files: