comparison OSTC4Operations.h @ 5:115cfa4a3239 default tip

Added icon upload function for OSTC 4/5 For the upload the same process as the one for the firmware update is used => CRC functionality has been copied from the ostc_pack SW
author Ideenmodellierer
date Tue, 30 Dec 2025 21:41:02 +0100
parents 0b3630a29ad8
children
comparison
equal deleted inserted replaced
4:e30f00f760d3 5:115cfa4a3239
43 43
44 #include "OSTC3Operations.h" 44 #include "OSTC3Operations.h"
45 #include <QRegularExpression> 45 #include <QRegularExpression>
46 46
47 #include "AES/Adler16.h" 47 #include "AES/Adler16.h"
48 #include "ostc45_icon.h"
49 #include "crc_wrapper.h"
48 #include "Export.h" 50 #include "Export.h"
49 #include <QFile> 51 #include <QFile>
52 #include <QString>
50 53
51 ////////////////////////////////////////////////////////////////////////////// 54 //////////////////////////////////////////////////////////////////////////////
52 /// \brief Implementing various operations for H&W OSTC4 dive computer 55 /// \brief Implementing various operations for H&W OSTC4 dive computer
53 class OSTC4Operations 56 class OSTC4Operations
54 : public OSTC3Operations 57 : public OSTC3Operations
77 } version; 80 } version;
78 }; 81 };
79 82
80 QFile _file; 83 QFile _file;
81 84
85 std::unique_ptr<BmpToArray> bmp;
86
82 /// \param[in] dryRun: If TRUE, do not upload FW, just check file structure. 87 /// \param[in] dryRun: If TRUE, do not upload FW, just check file structure.
83 void openFirmware(const QString& fileName, bool dryRun); 88 void openFirmware(const QString& fileName, bool dryRun);
84 89
85 void loadFirmwarePart(FirmwareOSTC4& header, 90 void loadFirmwarePart(FirmwareOSTC4& header,
86 QByteArray& bin, int part, 91 QByteArray& bin, int part,
89 void getSignal() override; 94 void getSignal() override;
90 void getAllHeader(unsigned char* pBuffer) override; 95 void getAllHeader(unsigned char* pBuffer) override;
91 void writeAllHeader(unsigned char* pBuffer) override; 96 void writeAllHeader(unsigned char* pBuffer) override;
92 void getAllSamples(unsigned char* pBuffer) override; 97 void getAllSamples(unsigned char* pBuffer) override;
93 void writeAllSamples(unsigned char* pBuffer) override; 98 void writeAllSamples(unsigned char* pBuffer) override;
99 void setIcons(const QString& fileName) override;
94 100
95 EXPORT QString firmwareTemplate() const override; 101 EXPORT QString firmwareTemplate() const override;
96 // EXPORT QRegExp portTemplate() const override; 102 // EXPORT QRegExp portTemplate() const override;
97 EXPORT QRegularExpression portTemplate() const override; 103 EXPORT QRegularExpression portTemplate() const override;
98 EXPORT QStringList listPorts() const override; 104 EXPORT QStringList listPorts() const override;
99 EXPORT void upgradeFW(const QString &fileName) override; 105 EXPORT void upgradeFW(const QString &fileName) override;
100 106
101 Adler32 fileChecksum; 107 Adler32 fileChecksum;
102 108
109 CrcWrapper* m_crcWrapper;
110
103 public: 111 public:
104 EXPORT OSTC4Operations(); 112 EXPORT OSTC4Operations();
105 }; 113 };
106 114
107 #endif // OSTC4_OPERATIONS_H 115 #endif // OSTC4_OPERATIONS_H