FlashInterface rework (missing initialisations, a lot of errors in
valgrind, duplicated code, unused functions, etc.) Does it fix Issue #925?
This commit is contained in:
@@ -19,6 +19,7 @@
|
||||
#include <QtGui>
|
||||
#include <inttypes.h>
|
||||
#include "file.h"
|
||||
|
||||
#define MAX_FSIZE (512*1024)
|
||||
#define SPLASH_WIDTH (128)
|
||||
#define SPLASH_HEIGHT (64)
|
||||
@@ -27,18 +28,9 @@
|
||||
#define SPLASH_SIZE_MAX (SPLASHX9D_WIDTH*SPLASHX9D_HEIGHT/2)
|
||||
#define ERSPLASH_MARKER "Splash"
|
||||
#define ERSPLASH_OFFSET (10)
|
||||
#define OTX_SPS "SPS"
|
||||
#define OTX_SPE "SPE"
|
||||
#define OTX_OFFSET (6)
|
||||
#define ERSKY9X_SPS "SPS"
|
||||
#define ERSKY9X_SPE "SPE"
|
||||
#define ERSKY9X_OFFSET (7)
|
||||
#define VERS_MARK "VERS"
|
||||
#define SVN_MARK "SVN"
|
||||
#define DATE_MARK "DATE"
|
||||
#define TIME_MARK "TIME"
|
||||
#define BLD_MARK "BLD"
|
||||
#define EEPR_MARK "EEPR"
|
||||
|
||||
#define FILE_TYPE_BIN 1
|
||||
#define FILE_TYPE_HEX 2
|
||||
@@ -63,16 +55,18 @@ class FlashInterface
|
||||
bool hasSplash();
|
||||
int getSplashWidth();
|
||||
uint getSplashHeight();
|
||||
uint getSplashColors();
|
||||
QImage::Format getSplashFormat();
|
||||
uint saveFlash(QString fileName);
|
||||
bool isValid();
|
||||
|
||||
private:
|
||||
QByteArray flash;
|
||||
uint flash_size;
|
||||
QString seekString(const QString & string);
|
||||
QString seekLabel(const QString & label);
|
||||
void SeekSplash();
|
||||
bool SeekSplash(QByteArray sps, QByteArray spe, int size);
|
||||
bool SeekSplash(QByteArray splash);
|
||||
QString filename;
|
||||
QString date;
|
||||
QString time;
|
||||
@@ -81,13 +75,10 @@ class FlashInterface
|
||||
QString eeprom;
|
||||
QByteArray splash;
|
||||
uint splash_offset;
|
||||
uint splash_type;
|
||||
uint splash_size;
|
||||
uint splash_width;
|
||||
uint splash_height;
|
||||
uint splash_colors;
|
||||
QImage::Format splash_format;
|
||||
uint flash_size;
|
||||
bool isValidFlag;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user