#include <PX4BatteryController.h>
Signals | |
| void | pendingParamsChanged () |
| void | addedParamCountChanged () |
| Signals inherited from FactPanelController | |
| void | missingParametersAvailable () |
| void | suppressRebootMessageChanged () |
Public Member Functions | |
| PX4BatteryController (QObject *parent=nullptr) | |
| Q_INVOKABLE void | requestParameters (const QStringList &names) |
| Q_INVOKABLE bool | parameterReady (const QString &name) const |
| True when the vehicle has the parameter and it is not waiting for its requested value. | |
| QStringList | pendingParams () const |
| int | addedParamCount () const |
| 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 |
Controller for PX4BatteryComponent.qml. PX4 only streams the parameters a running module has looked up, such as a power monitor driver's settings once the driver runs, so the page requests the rest by name.
Definition at line 14 of file PX4BatteryController.h.
|
explicit |
Definition at line 34 of file PX4BatteryController.cc.
References ParameterManager::_paramRequestReadFailure(), FactPanelController::_vehicle, ParameterManager::factAdded(), and FactPanelController::FactPanelController().
|
inline |
Number of parameters the vehicle has added since the page opened, requested or not. Changes once the new parameter has its value and is ready, and before pendingParams signals the change, so bindings on it have updated by then. A failed read does not change it.
Definition at line 37 of file PX4BatteryController.h.
|
signal |
| bool PX4BatteryController::parameterReady | ( | const QString & | name | ) | const |
True when the vehicle has the parameter and it is not waiting for its requested value.
Definition at line 73 of file PX4BatteryController.cc.
References ParameterManager::defaultComponentId.
|
inline |
Definition at line 32 of file PX4BatteryController.h.
|
signal |
Referenced by requestParameters().
| void PX4BatteryController::requestParameters | ( | const QStringList & | names | ) |
Requests each named parameter the vehicle has not sent. A name stays in pendingParams until its value arrives or the read fails. Parameters the firmware does not have are dropped without telling the user, and are not requested again for the same vehicle.
Definition at line 50 of file PX4BatteryController.cc.
References ParameterManager::defaultComponentId, and pendingParamsChanged().