6#include <QtCore/QObject>
9#include <QtCore/QVariantList>
36 void status (
const QString& statusText);
44 void _startFindBoardLoop(
void);
47 void _findBoardOnce (
void);
48 void _updateProgress (
int curr,
int total) { emit
updateProgress(curr, total); }
50 void _setTargetPort (
const QString& systemLocation);
54 QVariantList _buildPortDescriptors()
const;
55 void _resumeDiscovery (
void);
60 QTimer* _findBoardTimer =
nullptr;
62 bool _foundBoard =
false;
63 bool _findBoardFirstAttempt =
true;
64 bool _targetSeenAtLeastOnce =
false;
65 QString _targetSystemLocation;
66 QString _targetSerialNumber;
67 QSet<QString> _ignoredPorts;
120 void _foundBoard (
bool firstAttempt,
const QGCSerialPortInfo& portInfo,
int type, QString name) { emit
foundBoard(firstAttempt, portInfo, type, name); }
122 void _boardGone (
void) { emit
boardGone(); }
123 void _foundBoardInfo (
int bootloaderVersion,
int boardID,
int flashSize) { emit
foundBoardInfo(bootloaderVersion, boardID, flashSize); }
125 void _status (
const QString& statusText) { emit
status(statusText); }
129 void _portsAvailable (
const QVariantList& ports) { emit
portsAvailable(ports); }
132 void _updateProgress(
int curr,
int total) { emit
updateProgress(curr, total); }
135 QThread* _workerThread =
nullptr;
Bootloader Utility routines. Works with PX4 and 3DR Radio bootloaders.
Support for Intel Hex firmware file.
Provides methods to interact with the bootloader. The commands themselves are signalled across to PX4...
void _setTargetPortOnThread(const QString &systemLocation)
~PX4FirmwareUpgradeThreadController(void)
void _rebootOnThread(void)
void updateProgress(int curr, int total)
void portsAvailable(const QVariantList &ports)
void setTargetPort(const QString &systemLocation)
Tells the worker to flash a specific port (selected by the user) when it appears in bootloader mode.
void _flashOnThread(void)
void _startFindBoardLoopOnThread(void)
void reboot(void)
Sends a reboot command to the bootloader.
void _initThreadWorker(void)
void error(const QString &errorString)
void startFindBoardLoop(void)
Begins the process of searching for a supported board connected to any serial port....
void flash(const FirmwareImage *image)
void foundBoard(bool firstAttempt, const QGCSerialPortInfo &portInfo, int boardType, QString boardName)
void status(const QString &status)
void foundBoardInfo(int bootloaderVersion, int boardID, int flashSize)
const FirmwareImage * image(void)
Used to run bootloader commands on a separate thread. These routines are mainly meant to to be called...
void foundBoard(bool firstAttempt, const QGCSerialPortInfo &portInfo, int type, QString boardName)
void portsAvailable(const QVariantList &ports)
void error(const QString &errorString)
void foundBoardInfo(int bootloaderVersion, int boardID, int flashSize)
~PX4FirmwareUpgradeThreadWorker()
void status(const QString &statusText)
void updateProgress(int curr, int total)
QGC's version of Qt QSerialPortInfo. It provides additional information about board types that QGC ca...