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

Support for Intel Hex firmware file. More...

#include <FirmwareImage.h>

+ Inheritance diagram for FirmwareImage:
+ Collaboration diagram for FirmwareImage:

Signals

void errorMessage (const QString &errorString)
 
void statusMessage (const QString &warningtring)
 

Public Member Functions

 FirmwareImage (QObject *parent=0)
 
bool load (const QString &imageFilename, uint32_t boardId)
 
uint32_t imageSize (void) const
 Returns the number of bytes in the image.
 
bool imageIsBinFormat (void) const
 
QString binFilename (void) const
 
uint16_t ihxBlockCount (void) const
 
bool ihxGetBlock (uint16_t index, uint16_t &address, QByteArray &bytes) const
 
bool isCompatible (uint32_t boardId, uint32_t firmwareId)
 

Detailed Description

Support for Intel Hex firmware file.

Definition at line 10 of file FirmwareImage.h.

Constructor & Destructor Documentation

◆ FirmwareImage()

FirmwareImage::FirmwareImage ( QObject *  parent = 0)

Definition at line 15 of file FirmwareImage.cc.

Member Function Documentation

◆ binFilename()

QString FirmwareImage::binFilename ( void  ) const
inline
Returns
Filename for .bin file

Definition at line 31 of file FirmwareImage.h.

◆ errorMessage

void FirmwareImage::errorMessage ( const QString &  errorString)
signal

◆ ihxBlockCount()

uint16_t FirmwareImage::ihxBlockCount ( void  ) const
Returns
Block count from .ihx image

Definition at line 392 of file FirmwareImage.cc.

Referenced by ihxGetBlock().

◆ ihxGetBlock()

bool FirmwareImage::ihxGetBlock ( uint16_t  index,
uint16_t &  address,
QByteArray &  bytes 
) const

Retrieves the specified block from the .ihx image

Parameters
indexIndex of block to return
addressAddress of returned block
byetsBytes of returned block
Returns
true: block retrieved

Definition at line 397 of file FirmwareImage.cc.

References ihxBlockCount().

◆ imageIsBinFormat()

bool FirmwareImage::imageIsBinFormat ( void  ) const
inline
Returns
true: image format is .bin

Definition at line 28 of file FirmwareImage.h.

Referenced by Bootloader::program(), and Bootloader::verify().

◆ imageSize()

uint32_t FirmwareImage::imageSize ( void  ) const
inline

Returns the number of bytes in the image.

Definition at line 25 of file FirmwareImage.h.

◆ isCompatible()

bool FirmwareImage::isCompatible ( uint32_t  boardId,
uint32_t  firmwareId 
)
Returns
true: actual boardId is compatible with firmware boardId

Definition at line 173 of file FirmwareImage.cc.

References Bootloader::boardIDPX4FMUV3.

◆ load()

bool FirmwareImage::load ( const QString &  imageFilename,
uint32_t  boardId 
)

Loads the specified image file. Supported formats: .px4, .bin, .ihx. Emits errorMesssage and statusMessage signals while loading.

Parameters
imageFilenameImage file to load
boardIdBoard id that we are going to load this image onto
Returns
true: success, false: failure

Definition at line 22 of file FirmwareImage.cc.

References statusMessage().

◆ statusMessage

void FirmwareImage::statusMessage ( const QString &  warningtring)
signal

Referenced by load().


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