#include <PX4SerialPortsController.h>
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 |
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.
|
explicit |
Definition at line 129 of file PX4SerialPortsController.cc.
References ParameterManager::_paramRequestReadFailure(), FactPanelController::_vehicle, ParameterManager::factAdded(), FactPanelController::FactPanelController(), PX4SerialPortsComponent::functionFacts(), PX4SerialPortConfig::functionsForPort(), PX4SerialPortConfig::ports(), and FactPanelController::setSuppressRebootMessage().
|
inline |
Definition at line 142 of file PX4SerialPortsController.h.
|
signal |
|
inline |
Definition at line 140 of file PX4SerialPortsController.h.
| 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.
| 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().
| 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().