Début firmware uploader
This commit is contained in:
parent
50d091c68c
commit
f7eeb9ecf4
7676
ChaletDuinoV2Base.X.production.hex
Normal file
7676
ChaletDuinoV2Base.X.production.hex
Normal file
File diff suppressed because it is too large
Load Diff
@ -235,6 +235,9 @@ int CChaletGui::UpdateChaletLogPlot(QByteArray *Log)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(x.size() == 0 || y.size() == 0)
|
||||||
|
return RET_ERROR;
|
||||||
|
|
||||||
mBatteryPlotWidget->graph(0)->data().clear();
|
mBatteryPlotWidget->graph(0)->data().clear();
|
||||||
mBatteryPlotWidget->graph(0)->setData(x,y);
|
mBatteryPlotWidget->graph(0)->setData(x,y);
|
||||||
mBatteryPlotWidget->xAxis->setRange(x.first(),x.last());
|
mBatteryPlotWidget->xAxis->setRange(x.first(),x.last());
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>1205</width>
|
<width>1024</width>
|
||||||
<height>598</height>
|
<height>598</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
@ -36,8 +36,8 @@
|
|||||||
<widget class="QLabel" name="mInverterRlyStatusLabel">
|
<widget class="QLabel" name="mInverterRlyStatusLabel">
|
||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
<rect>
|
<rect>
|
||||||
<x>198</x>
|
<x>238</x>
|
||||||
<y>50</y>
|
<y>120</y>
|
||||||
<width>210</width>
|
<width>210</width>
|
||||||
<height>16</height>
|
<height>16</height>
|
||||||
</rect>
|
</rect>
|
||||||
@ -49,8 +49,8 @@
|
|||||||
<widget class="QLabel" name="mWiFiModuleStatusLabel">
|
<widget class="QLabel" name="mWiFiModuleStatusLabel">
|
||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
<rect>
|
<rect>
|
||||||
<x>198</x>
|
<x>238</x>
|
||||||
<y>90</y>
|
<y>160</y>
|
||||||
<width>130</width>
|
<width>130</width>
|
||||||
<height>16</height>
|
<height>16</height>
|
||||||
</rect>
|
</rect>
|
||||||
@ -62,8 +62,8 @@
|
|||||||
<widget class="QLabel" name="mWiFiSectionLabel">
|
<widget class="QLabel" name="mWiFiSectionLabel">
|
||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
<rect>
|
<rect>
|
||||||
<x>26</x>
|
<x>66</x>
|
||||||
<y>90</y>
|
<y>160</y>
|
||||||
<width>31</width>
|
<width>31</width>
|
||||||
<height>16</height>
|
<height>16</height>
|
||||||
</rect>
|
</rect>
|
||||||
@ -75,8 +75,8 @@
|
|||||||
<widget class="QPushButton" name="mInverterRelayOFFBtn">
|
<widget class="QPushButton" name="mInverterRelayOFFBtn">
|
||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
<rect>
|
<rect>
|
||||||
<x>126</x>
|
<x>166</x>
|
||||||
<y>50</y>
|
<y>120</y>
|
||||||
<width>61</width>
|
<width>61</width>
|
||||||
<height>22</height>
|
<height>22</height>
|
||||||
</rect>
|
</rect>
|
||||||
@ -88,8 +88,8 @@
|
|||||||
<widget class="QPushButton" name="mWiFiModuleOFFBtn">
|
<widget class="QPushButton" name="mWiFiModuleOFFBtn">
|
||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
<rect>
|
<rect>
|
||||||
<x>126</x>
|
<x>166</x>
|
||||||
<y>90</y>
|
<y>160</y>
|
||||||
<width>61</width>
|
<width>61</width>
|
||||||
<height>23</height>
|
<height>23</height>
|
||||||
</rect>
|
</rect>
|
||||||
@ -101,8 +101,8 @@
|
|||||||
<widget class="QPushButton" name="mInverterRelayONBtn">
|
<widget class="QPushButton" name="mInverterRelayONBtn">
|
||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
<rect>
|
<rect>
|
||||||
<x>70</x>
|
<x>110</x>
|
||||||
<y>50</y>
|
<y>120</y>
|
||||||
<width>51</width>
|
<width>51</width>
|
||||||
<height>23</height>
|
<height>23</height>
|
||||||
</rect>
|
</rect>
|
||||||
@ -114,8 +114,8 @@
|
|||||||
<widget class="QPushButton" name="mWiFiModuleONBtn">
|
<widget class="QPushButton" name="mWiFiModuleONBtn">
|
||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
<rect>
|
<rect>
|
||||||
<x>70</x>
|
<x>110</x>
|
||||||
<y>90</y>
|
<y>160</y>
|
||||||
<width>51</width>
|
<width>51</width>
|
||||||
<height>23</height>
|
<height>23</height>
|
||||||
</rect>
|
</rect>
|
||||||
@ -127,8 +127,8 @@
|
|||||||
<widget class="QLabel" name="mWiFiSectionLabel_2">
|
<widget class="QLabel" name="mWiFiSectionLabel_2">
|
||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
<rect>
|
<rect>
|
||||||
<x>16</x>
|
<x>56</x>
|
||||||
<y>50</y>
|
<y>120</y>
|
||||||
<width>51</width>
|
<width>51</width>
|
||||||
<height>20</height>
|
<height>20</height>
|
||||||
</rect>
|
</rect>
|
||||||
@ -140,8 +140,8 @@
|
|||||||
<widget class="QPushButton" name="mRebootCPUBtn">
|
<widget class="QPushButton" name="mRebootCPUBtn">
|
||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
<rect>
|
<rect>
|
||||||
<x>66</x>
|
<x>106</x>
|
||||||
<y>130</y>
|
<y>200</y>
|
||||||
<width>75</width>
|
<width>75</width>
|
||||||
<height>23</height>
|
<height>23</height>
|
||||||
</rect>
|
</rect>
|
||||||
@ -156,8 +156,8 @@
|
|||||||
</property>
|
</property>
|
||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
<rect>
|
<rect>
|
||||||
<x>850</x>
|
<x>680</x>
|
||||||
<y>80</y>
|
<y>70</y>
|
||||||
<width>111</width>
|
<width>111</width>
|
||||||
<height>17</height>
|
<height>17</height>
|
||||||
</rect>
|
</rect>
|
||||||
@ -169,8 +169,8 @@
|
|||||||
<widget class="QGroupBox" name="groupBox">
|
<widget class="QGroupBox" name="groupBox">
|
||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
<rect>
|
<rect>
|
||||||
<x>830</x>
|
<x>660</x>
|
||||||
<y>50</y>
|
<y>40</y>
|
||||||
<width>151</width>
|
<width>151</width>
|
||||||
<height>81</height>
|
<height>81</height>
|
||||||
</rect>
|
</rect>
|
||||||
@ -195,8 +195,8 @@
|
|||||||
<widget class="QLabel" name="mBatteryVoltageLabel">
|
<widget class="QLabel" name="mBatteryVoltageLabel">
|
||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
<rect>
|
<rect>
|
||||||
<x>147</x>
|
<x>187</x>
|
||||||
<y>170</y>
|
<y>240</y>
|
||||||
<width>241</width>
|
<width>241</width>
|
||||||
<height>16</height>
|
<height>16</height>
|
||||||
</rect>
|
</rect>
|
||||||
@ -229,8 +229,8 @@
|
|||||||
<widget class="QLabel" name="mSolarPanelCurrentLabel">
|
<widget class="QLabel" name="mSolarPanelCurrentLabel">
|
||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
<rect>
|
<rect>
|
||||||
<x>147</x>
|
<x>187</x>
|
||||||
<y>190</y>
|
<y>260</y>
|
||||||
<width>241</width>
|
<width>241</width>
|
||||||
<height>16</height>
|
<height>16</height>
|
||||||
</rect>
|
</rect>
|
||||||
@ -242,8 +242,8 @@
|
|||||||
<widget class="QLabel" name="mBatterySOCLabel">
|
<widget class="QLabel" name="mBatterySOCLabel">
|
||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
<rect>
|
<rect>
|
||||||
<x>147</x>
|
<x>187</x>
|
||||||
<y>210</y>
|
<y>280</y>
|
||||||
<width>241</width>
|
<width>241</width>
|
||||||
<height>16</height>
|
<height>16</height>
|
||||||
</rect>
|
</rect>
|
||||||
@ -255,8 +255,8 @@
|
|||||||
<widget class="QLabel" name="mCurrentSensorStateLbl">
|
<widget class="QLabel" name="mCurrentSensorStateLbl">
|
||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
<rect>
|
<rect>
|
||||||
<x>147</x>
|
<x>187</x>
|
||||||
<y>230</y>
|
<y>300</y>
|
||||||
<width>241</width>
|
<width>241</width>
|
||||||
<height>16</height>
|
<height>16</height>
|
||||||
</rect>
|
</rect>
|
||||||
@ -268,8 +268,8 @@
|
|||||||
<widget class="QLabel" name="mLostReqPercentLbl">
|
<widget class="QLabel" name="mLostReqPercentLbl">
|
||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
<rect>
|
<rect>
|
||||||
<x>770</x>
|
<x>600</x>
|
||||||
<y>200</y>
|
<y>190</y>
|
||||||
<width>241</width>
|
<width>241</width>
|
||||||
<height>16</height>
|
<height>16</height>
|
||||||
</rect>
|
</rect>
|
||||||
@ -281,8 +281,8 @@
|
|||||||
<widget class="QWidget" name="mPlotWidget" native="true">
|
<widget class="QWidget" name="mPlotWidget" native="true">
|
||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
<rect>
|
<rect>
|
||||||
<x>590</x>
|
<x>420</x>
|
||||||
<y>250</y>
|
<y>240</y>
|
||||||
<width>571</width>
|
<width>571</width>
|
||||||
<height>321</height>
|
<height>321</height>
|
||||||
</rect>
|
</rect>
|
||||||
@ -291,8 +291,8 @@
|
|||||||
<widget class="QLCDNumber" name="mVoltageLCD">
|
<widget class="QLCDNumber" name="mVoltageLCD">
|
||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
<rect>
|
<rect>
|
||||||
<x>30</x>
|
<x>70</x>
|
||||||
<y>170</y>
|
<y>240</y>
|
||||||
<width>111</width>
|
<width>111</width>
|
||||||
<height>23</height>
|
<height>23</height>
|
||||||
</rect>
|
</rect>
|
||||||
@ -301,8 +301,8 @@
|
|||||||
<widget class="QLabel" name="mChaletCommActivityLbl">
|
<widget class="QLabel" name="mChaletCommActivityLbl">
|
||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
<rect>
|
<rect>
|
||||||
<x>770</x>
|
<x>600</x>
|
||||||
<y>180</y>
|
<y>170</y>
|
||||||
<width>47</width>
|
<width>47</width>
|
||||||
<height>16</height>
|
<height>16</height>
|
||||||
</rect>
|
</rect>
|
||||||
@ -314,8 +314,8 @@
|
|||||||
<widget class="QLabel" name="mLasCommRequestReceivedLbl">
|
<widget class="QLabel" name="mLasCommRequestReceivedLbl">
|
||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
<rect>
|
<rect>
|
||||||
<x>770</x>
|
<x>600</x>
|
||||||
<y>160</y>
|
<y>150</y>
|
||||||
<width>301</width>
|
<width>301</width>
|
||||||
<height>16</height>
|
<height>16</height>
|
||||||
</rect>
|
</rect>
|
||||||
@ -327,8 +327,8 @@
|
|||||||
<widget class="QDateEdit" name="mLogStartDateEdit">
|
<widget class="QDateEdit" name="mLogStartDateEdit">
|
||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
<rect>
|
<rect>
|
||||||
<x>950</x>
|
<x>780</x>
|
||||||
<y>220</y>
|
<y>210</y>
|
||||||
<width>110</width>
|
<width>110</width>
|
||||||
<height>22</height>
|
<height>22</height>
|
||||||
</rect>
|
</rect>
|
||||||
@ -337,8 +337,8 @@
|
|||||||
<widget class="QPushButton" name="mGetChaletLogButton">
|
<widget class="QPushButton" name="mGetChaletLogButton">
|
||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
<rect>
|
<rect>
|
||||||
<x>1070</x>
|
<x>900</x>
|
||||||
<y>220</y>
|
<y>210</y>
|
||||||
<width>75</width>
|
<width>75</width>
|
||||||
<height>23</height>
|
<height>23</height>
|
||||||
</rect>
|
</rect>
|
||||||
|
|||||||
@ -10,14 +10,16 @@ CGuiMain::CGuiMain(QWidget *parent)
|
|||||||
mMainTabWidget = new QTabWidget(this);
|
mMainTabWidget = new QTabWidget(this);
|
||||||
mChaletGui = new CChaletGui(this);
|
mChaletGui = new CChaletGui(this);
|
||||||
mTowerLightShowGui = new CTowerLightShowGui;
|
mTowerLightShowGui = new CTowerLightShowGui;
|
||||||
|
mPICUploaderGui = new CPICUploaderGui;
|
||||||
setCentralWidget(mMainTabWidget);
|
setCentralWidget(mMainTabWidget);
|
||||||
mMainTabWidget->addTab(mSMSGui,"SMS");
|
mMainTabWidget->addTab(mSMSGui,"SMS");
|
||||||
mMainTabWidget->addTab(mSprinklerGui,"Sprinkler");
|
mMainTabWidget->addTab(mSprinklerGui,"Sprinkler");
|
||||||
mMainTabWidget->addTab(mAvReceiverGui,"AV Receiver");
|
mMainTabWidget->addTab(mAvReceiverGui,"AV Receiver");
|
||||||
mMainTabWidget->addTab(mChaletGui,"Chalet");
|
mMainTabWidget->addTab(mChaletGui,"Chalet");
|
||||||
mMainTabWidget->addTab(mTowerLightShowGui,"Lightshow");
|
mMainTabWidget->addTab(mTowerLightShowGui,"Lightshow");
|
||||||
|
mMainTabWidget->addTab(mPICUploaderGui,"Firmware Upload");
|
||||||
|
|
||||||
resize(1500,768);
|
resize(1024,768);
|
||||||
}
|
}
|
||||||
|
|
||||||
CGuiMain::~CGuiMain()
|
CGuiMain::~CGuiMain()
|
||||||
|
|||||||
@ -9,6 +9,7 @@
|
|||||||
#include "AvReceiverGui.h"
|
#include "AvReceiverGui.h"
|
||||||
#include "ChaletGui.h"
|
#include "ChaletGui.h"
|
||||||
#include "TowerLightShowGui.h"
|
#include "TowerLightShowGui.h"
|
||||||
|
#include "PICUploaderGui.h"
|
||||||
|
|
||||||
class CGuiMain : public QMainWindow
|
class CGuiMain : public QMainWindow
|
||||||
{
|
{
|
||||||
@ -24,6 +25,7 @@ public:
|
|||||||
CChaletGui *mChaletGui;
|
CChaletGui *mChaletGui;
|
||||||
QTabWidget *mMainTabWidget;
|
QTabWidget *mMainTabWidget;
|
||||||
CTowerLightShowGui *mTowerLightShowGui;
|
CTowerLightShowGui *mTowerLightShowGui;
|
||||||
|
CPICUploaderGui *mPICUploaderGui;
|
||||||
int RespawnMainWindow();
|
int RespawnMainWindow();
|
||||||
int HideMainWindow();
|
int HideMainWindow();
|
||||||
|
|
||||||
|
|||||||
258
Sources/PICUploader/HexFile.cpp
Normal file
258
Sources/PICUploader/HexFile.cpp
Normal file
@ -0,0 +1,258 @@
|
|||||||
|
#include "HexFile.h"
|
||||||
|
#include <QTextStream>
|
||||||
|
#include <QMessageBox>
|
||||||
|
|
||||||
|
#define USE_BIG_RECORDS
|
||||||
|
#define MAX_RECORDS_IN_BIG_RECORDS 512 //16 bytes by record, 512 bytes by row --> 16 rows / big record
|
||||||
|
|
||||||
|
CHexFile::CHexFile(void)
|
||||||
|
{
|
||||||
|
mFileOpened = false;
|
||||||
|
mFileParsed = false;
|
||||||
|
mRecordsListValid = false;
|
||||||
|
mHighAddress = 0;
|
||||||
|
mDiscardedRecords = 0;
|
||||||
|
mTotalParsedRecords = 0;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
CHexFile::~CHexFile(void)
|
||||||
|
{
|
||||||
|
for(int i = 0; i < mRecordsList.size(); i++)
|
||||||
|
delete mRecordsList.at(i);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
int CHexFile::CloseOpenedHexFile()
|
||||||
|
{
|
||||||
|
for(int i = 0; i < mRecordsList.size(); i++)
|
||||||
|
delete mRecordsList.at(i);
|
||||||
|
|
||||||
|
mFileOpened = false;
|
||||||
|
mFileParsed = false;
|
||||||
|
mHexfileHandle = 0;
|
||||||
|
mRecordsListValid = false;
|
||||||
|
mHighAddress = 0;
|
||||||
|
mDiscardedRecords = 0;
|
||||||
|
mTotalParsedRecords = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
int CHexFile::OpenDataFile(QString FilePath, bool CloseIfAlreadyParsed)
|
||||||
|
{
|
||||||
|
|
||||||
|
//Check if file exists
|
||||||
|
if(QFile::exists(FilePath) == false)
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
if(mFileParsed == true)
|
||||||
|
{
|
||||||
|
if(CloseIfAlreadyParsed == false)
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
CloseOpenedHexFile();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
mHexfileHandle = new QFile(FilePath);
|
||||||
|
|
||||||
|
if(mHexfileHandle->open(QIODevice::ReadOnly|QIODevice::Text|QIODevice::Unbuffered) == false)
|
||||||
|
{
|
||||||
|
delete mHexfileHandle;
|
||||||
|
mHexfileHandle = 0;
|
||||||
|
qDebug("Cannot open specified HEX file...");
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
mHexFileSize = mHexfileHandle->size();
|
||||||
|
|
||||||
|
mFileOpened = true;
|
||||||
|
|
||||||
|
mRecordsTableSize = 0;
|
||||||
|
mFirmwareDataSize = 0;
|
||||||
|
|
||||||
|
return ParseData();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
int CHexFile::ParseData(void)
|
||||||
|
{
|
||||||
|
if(!mFileOpened)
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
int Ret;
|
||||||
|
bool Finished = false;
|
||||||
|
unsigned int CurAddress;
|
||||||
|
|
||||||
|
// CArray<CHexRecord*,CHexRecord*> TempArray;
|
||||||
|
QList<CHexRecord*> TempList;
|
||||||
|
QString RecordString;
|
||||||
|
QTextStream RecordFileStream(mHexfileHandle);
|
||||||
|
// CArchive ar(&mHexfileHandle,CArchive::load);
|
||||||
|
|
||||||
|
while(!Finished)
|
||||||
|
{
|
||||||
|
CHexRecord *NewRecord = new CHexRecord;
|
||||||
|
RecordString.clear();
|
||||||
|
// ar.ReadString(mRecordString);
|
||||||
|
RecordString = RecordFileStream.readLine();
|
||||||
|
// Ret = NewRecord.DecodeRawRecord(&mRecordString,mHighAddress);
|
||||||
|
Ret = NewRecord->DecodeRawRecord(&RecordString,mHighAddress);
|
||||||
|
mTotalParsedRecords++;
|
||||||
|
|
||||||
|
switch(Ret)
|
||||||
|
{
|
||||||
|
case CHexRecord::RET_DATA_RECORD:
|
||||||
|
{
|
||||||
|
#ifdef USE_BIG_RECORDS
|
||||||
|
TempList.append(NewRecord);
|
||||||
|
// mRecordsTable[mRecordsTableSize] = NewRecord;
|
||||||
|
// mRecordsTableSize++;
|
||||||
|
#else
|
||||||
|
mRecordsList.append(NewRecord);
|
||||||
|
mRecordsTable[mRecordsTableSize] = NewRecord;
|
||||||
|
mRecordsTableSize++;
|
||||||
|
#endif
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case CHexRecord::RET_EOF_RECORD:
|
||||||
|
{
|
||||||
|
mHexfileHandle->close();
|
||||||
|
mFileOpened = false;
|
||||||
|
delete mHexfileHandle;
|
||||||
|
mRecordsListValid = true;
|
||||||
|
Finished = true;
|
||||||
|
delete NewRecord;
|
||||||
|
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
case CHexRecord::RET_EXTENDED_LINEAR_ADDRESS:
|
||||||
|
{
|
||||||
|
// mHighAddress = NewRecord.GetExtenedAddress();
|
||||||
|
mHighAddress = NewRecord->GetExtenedAddress();
|
||||||
|
CurAddress = mHighAddress;
|
||||||
|
delete NewRecord;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case CHexRecord::RET_IGNORED_ALL_FF_RECORD:
|
||||||
|
{
|
||||||
|
delete NewRecord;
|
||||||
|
mDiscardedRecords++;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case CHexRecord::RET_EXTENDED_ADDRESS:
|
||||||
|
case CHexRecord::RET_START_SEGMENT_ADDRESS:
|
||||||
|
case CHexRecord::RET_START_LINEAR_ADDRESS:
|
||||||
|
case CHexRecord::RET_UNKNOWN_RECORD_TYPE:
|
||||||
|
case CHexRecord::RET_INVALID_RECORD:
|
||||||
|
case CHexRecord::RET_BAD_RECORD_CHECKSUM:
|
||||||
|
case CHexRecord::RET_UNMANAGED_RECORD_TYPE:
|
||||||
|
{
|
||||||
|
mHexfileHandle->close();
|
||||||
|
mFileOpened = false;
|
||||||
|
delete mHexfileHandle;
|
||||||
|
Finished = true;
|
||||||
|
//MessageBox(NULL,"Parsing Error", "Cannot Parse Hex File",MB_OK);
|
||||||
|
QMessageBox::warning(0,"Parsing Error","Cannot parse HEX file",QMessageBox::Ok);
|
||||||
|
delete NewRecord;
|
||||||
|
return 0;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#ifdef USE_BIG_RECORDS
|
||||||
|
int i;
|
||||||
|
int RecordCount;
|
||||||
|
CHexRecord *TempRecordPtr;
|
||||||
|
CHexRecord *BigRecord = new CHexRecord;
|
||||||
|
|
||||||
|
TempRecordPtr = TempList.at(0);
|
||||||
|
CurAddress = TempRecordPtr->GetStartAddress();
|
||||||
|
*BigRecord = *TempRecordPtr;
|
||||||
|
RecordCount = 1;
|
||||||
|
|
||||||
|
for(i = 1; i < TempList.size(); i++)
|
||||||
|
{
|
||||||
|
// if(CurAddress == 0x1d0097F0)
|
||||||
|
// {
|
||||||
|
// CurAddress = CurAddress;
|
||||||
|
// }
|
||||||
|
CurAddress += (TempRecordPtr->GetRecordSizeInBytes());
|
||||||
|
TempRecordPtr = TempList.at(i);
|
||||||
|
if(CurAddress == TempRecordPtr->GetStartAddress() && RecordCount<MAX_RECORDS_IN_BIG_RECORDS && (i != (TempList.size()-1)))
|
||||||
|
{
|
||||||
|
BigRecord->AppendRecord(TempRecordPtr);
|
||||||
|
RecordCount++;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
RecordCount = 1; //Init to 1 because we load the record right below...
|
||||||
|
mRecordsList.append(BigRecord);
|
||||||
|
BigRecord = new CHexRecord;
|
||||||
|
|
||||||
|
if(i == TempList.size()-1) //Manage the last record.
|
||||||
|
{
|
||||||
|
*BigRecord = *TempRecordPtr;
|
||||||
|
mRecordsList.append(BigRecord);
|
||||||
|
BigRecord->mRecordSize += TempRecordPtr->mRecordSize;
|
||||||
|
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
*BigRecord = *TempRecordPtr;
|
||||||
|
CurAddress = TempRecordPtr->GetStartAddress();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
for(i = 0; i < TempList.size(); i++)
|
||||||
|
{
|
||||||
|
delete TempList[i];
|
||||||
|
}
|
||||||
|
|
||||||
|
for(i = 0; i < mRecordsList.size(); i++)
|
||||||
|
{
|
||||||
|
mFirmwareDataSize += mRecordsList.at(i)->GetRecordSizeInBytes();
|
||||||
|
}
|
||||||
|
|
||||||
|
mFileParsed = true;
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
unsigned int CHexFile::GetNBRecords(void)
|
||||||
|
{
|
||||||
|
// return mRecordsTableSize;
|
||||||
|
|
||||||
|
return mRecordsList.size();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
unsigned long CHexFile::GetFileSize(void)
|
||||||
|
{
|
||||||
|
return mHexFileSize;
|
||||||
|
}
|
||||||
|
|
||||||
|
CHexRecord * CHexFile::GetRecord(int RecordIndex, int &Status)
|
||||||
|
{
|
||||||
|
|
||||||
|
if(RecordIndex > mRecordsList.size())
|
||||||
|
// if(RecordIndex > mRecordsTableSize)
|
||||||
|
{
|
||||||
|
Status = ERR_INDEX_OUT_OF_BOUND;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
//CHexRecord *mRecordPtr = (CHexRecord*)&mRecordsList.GetAt(RecordIndex);
|
||||||
|
CHexRecord *mRecordPtr = mRecordsList.at(RecordIndex);
|
||||||
|
// CHexRecord *mRecordPtr = mRecordsTable[RecordIndex];
|
||||||
|
return mRecordPtr;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
53
Sources/PICUploader/HexFile.h
Normal file
53
Sources/PICUploader/HexFile.h
Normal file
@ -0,0 +1,53 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "HexRecord.h"
|
||||||
|
#include <QString>
|
||||||
|
#include <QList>
|
||||||
|
#include <QFile>
|
||||||
|
|
||||||
|
|
||||||
|
class CHexFile
|
||||||
|
{
|
||||||
|
|
||||||
|
enum eHexFileStatus
|
||||||
|
{
|
||||||
|
STATUS_OK,
|
||||||
|
STATUS_OK_LAST_INDEX,
|
||||||
|
ERR_INDEX_OUT_OF_BOUND
|
||||||
|
};
|
||||||
|
|
||||||
|
public:
|
||||||
|
CHexFile(void);
|
||||||
|
~CHexFile(void);
|
||||||
|
|
||||||
|
int OpenDataFile(QString FilePath, bool CloseIfAlreadyParsed = true);
|
||||||
|
int CloseOpenedHexFile();
|
||||||
|
int ParseData(void);
|
||||||
|
unsigned int GetNBRecords(void);
|
||||||
|
unsigned long GetFileSize(void);
|
||||||
|
unsigned long GetFirmwareSize(void){return mFirmwareDataSize;}
|
||||||
|
bool HexFileLoaded(void){return mFileOpened;}
|
||||||
|
bool HexDataValid(void){return mFileParsed;}
|
||||||
|
unsigned long GetTotalParsedRecords(void){return mTotalParsedRecords;}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
CHexRecord * GetRecord(int RecordIndex, int &Status);
|
||||||
|
unsigned long mDiscardedRecords;
|
||||||
|
unsigned long mTotalParsedRecords;
|
||||||
|
|
||||||
|
private:
|
||||||
|
QFile *mHexfileHandle;
|
||||||
|
bool mFileOpened;
|
||||||
|
bool mFileParsed;
|
||||||
|
bool mRecordsListValid;
|
||||||
|
//CArray<CHexRecord*,CHexRecord*> mRecordsList;
|
||||||
|
QList<CHexRecord*> mRecordsList;
|
||||||
|
// CHexRecord* mRecordsTable[0x3000];
|
||||||
|
unsigned int mRecordsTableSize;
|
||||||
|
unsigned int mHighAddress;
|
||||||
|
unsigned long mHexFileSize;
|
||||||
|
unsigned long mFirmwareDataSize;
|
||||||
|
|
||||||
|
|
||||||
|
};
|
||||||
177
Sources/PICUploader/HexRecord.cpp
Normal file
177
Sources/PICUploader/HexRecord.cpp
Normal file
@ -0,0 +1,177 @@
|
|||||||
|
#include "HexRecord.h"
|
||||||
|
|
||||||
|
|
||||||
|
CHexRecord::CHexRecord(void)
|
||||||
|
{
|
||||||
|
mRecordData = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
CHexRecord::~CHexRecord(void)
|
||||||
|
{
|
||||||
|
mStartAddress = 0;
|
||||||
|
mRecordSize = 0;
|
||||||
|
mRecordType = 0;
|
||||||
|
mExtendedAddress = 0;
|
||||||
|
// delete[] mRecordData;
|
||||||
|
}
|
||||||
|
|
||||||
|
int CHexRecord::DecodeRawRecord(QString *RawRecordData, unsigned int HighAddress)
|
||||||
|
{
|
||||||
|
bool OK;
|
||||||
|
// CString RecordString;
|
||||||
|
QString RecordString;
|
||||||
|
bool IsAllFF = true;
|
||||||
|
int StartIndex = RawRecordData->indexOf(QChar(':'));
|
||||||
|
|
||||||
|
if(StartIndex == -1)
|
||||||
|
return -1;
|
||||||
|
|
||||||
|
RecordString = RawRecordData->right(RawRecordData->length()-1); //Remove all that is left of ':'
|
||||||
|
|
||||||
|
QString RecordSizeString;
|
||||||
|
RecordSizeString = RecordString.mid(0,2);
|
||||||
|
//sscanf_s(RecordSizeString.GetBuffer(),"%x",&mRecordSize);
|
||||||
|
mRecordSize = RecordSizeString.toUInt(&OK,16);
|
||||||
|
|
||||||
|
QString RecordAddress;
|
||||||
|
RecordAddress = RecordString.mid(2,4);
|
||||||
|
//sscanf_s(RecordAddress.GetBuffer(),"%x",&mStartAddress);
|
||||||
|
mStartAddress = RecordAddress.toUInt(&OK,16);
|
||||||
|
mStartAddress |= (HighAddress & 0xFFFF0000);
|
||||||
|
|
||||||
|
if(mStartAddress == 0x1d0097F0)
|
||||||
|
{
|
||||||
|
mStartAddress = mStartAddress;
|
||||||
|
}
|
||||||
|
|
||||||
|
QString RecordTypeString;
|
||||||
|
RecordTypeString = RecordString.mid(6,2);
|
||||||
|
//sscanf_s(RecordTypeString.GetBuffer(),"%x",&mRecordType);
|
||||||
|
mRecordType = RecordTypeString.toUInt(&OK,16);
|
||||||
|
|
||||||
|
RecordString = RecordString.right(RecordString.length()- 8);
|
||||||
|
|
||||||
|
if(mRecordType >= MAX_RECORD_TYPE)
|
||||||
|
return RET_UNKNOWN_RECORD_TYPE;
|
||||||
|
|
||||||
|
if(mRecordSize %2 != 0)
|
||||||
|
{
|
||||||
|
mRecordSize++;//Pad the last word if we do not have an even number of bytes in the record.
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
switch(mRecordType)
|
||||||
|
{
|
||||||
|
case DATA_RECORD_TYPE: //0x00
|
||||||
|
{
|
||||||
|
char *DataPtr;
|
||||||
|
QString DataString;
|
||||||
|
// mRecordData = new char[mRecordSize/*+10*/]; //I have no clue why I have to allocate more space but if I don't delete[] crashes. I think it's a scanf bug...
|
||||||
|
// DataPtr = mRecordData.data();
|
||||||
|
|
||||||
|
for(unsigned int i = 0; i < mRecordSize; i++)
|
||||||
|
{
|
||||||
|
DataString = RecordString.mid(2*i,2);
|
||||||
|
char DataByte = (char)DataString.toUShort(&OK,16);
|
||||||
|
//sscanf_s(DataString.GetBuffer(),"%x",&mRecordData[i],sizeof(char)/*DataPtr*/);
|
||||||
|
//mRecordData[i] = (char)DataString.toUShort(&OK,16);
|
||||||
|
mRecordData.append(DataByte);
|
||||||
|
if((unsigned char)DataByte != 0xFF)
|
||||||
|
IsAllFF = false;
|
||||||
|
//DataPtr++;
|
||||||
|
}
|
||||||
|
if(mRecordSize %2 != 0) //Is this really needed?
|
||||||
|
{
|
||||||
|
//*DataPtr++ = 0xFF; //Pad the last word if we do not have an even number of bytes in the record.
|
||||||
|
mRecordData.append(0xFF);
|
||||||
|
}
|
||||||
|
|
||||||
|
mRecordSize /= 4; //Transfom the size in WORD size...
|
||||||
|
|
||||||
|
//#ifdef IGNORE_ALL_FF_RECORDS
|
||||||
|
if(IsAllFF)
|
||||||
|
{
|
||||||
|
|
||||||
|
return RET_IGNORED_ALL_FF_RECORD;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
return RET_DATA_RECORD;
|
||||||
|
//#else
|
||||||
|
// return RET_DATA_RECORD;
|
||||||
|
//#endif
|
||||||
|
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case EOF_RECORD_TYPE: //0x01
|
||||||
|
{
|
||||||
|
return RET_EOF_RECORD;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case EXTENDED_ADDRESS_TYPE: //0x02
|
||||||
|
{
|
||||||
|
return RET_UNMANAGED_RECORD_TYPE;
|
||||||
|
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case START_SEGMENT_ADDRESS_TYPE: //0x03
|
||||||
|
{
|
||||||
|
return RET_UNMANAGED_RECORD_TYPE;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case EXTENDED_LINEAR_ADDRESS_TYPE: //0x04
|
||||||
|
{
|
||||||
|
QString ExtendedAddressString;
|
||||||
|
ExtendedAddressString = RecordString.mid(0,4);
|
||||||
|
//sscanf_s(ExtendedAddressString.GetBuffer(),"%x",&mExtendedAddress);
|
||||||
|
mExtendedAddress = ExtendedAddressString.toUInt(&OK,16);
|
||||||
|
mExtendedAddress <<= 16;
|
||||||
|
return RET_EXTENDED_LINEAR_ADDRESS;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case START_LINEAR_ADDRESS_TYPE: //0x05
|
||||||
|
{
|
||||||
|
return RET_UNMANAGED_RECORD_TYPE;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
default:
|
||||||
|
{
|
||||||
|
return RET_UNKNOWN_RECORD_TYPE;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
unsigned int CHexRecord::AppendRecord(CHexRecord *NewRecord)
|
||||||
|
{
|
||||||
|
unsigned int NewSize;
|
||||||
|
|
||||||
|
NewSize = GetRecordSizeInBytes() + NewRecord->GetRecordSizeInBytes();
|
||||||
|
|
||||||
|
// char *NewBuff = new char[NewSize];
|
||||||
|
// memcpy(NewBuff,mRecordData,GetRecordSizeInBytes());
|
||||||
|
// memcpy(&NewBuff[GetRecordSizeInBytes()],NewRecord->GetDataBuffer(),NewRecord->GetRecordSizeInBytes());
|
||||||
|
|
||||||
|
//delete[] mRecordData;
|
||||||
|
//mRecordData = NewBuff;
|
||||||
|
|
||||||
|
mRecordData.append(NewRecord->GetData());
|
||||||
|
mRecordSize = NewSize/4;
|
||||||
|
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
CHexRecord& CHexRecord::operator = (const CHexRecord &rhs)
|
||||||
|
{
|
||||||
|
if(this == &rhs)
|
||||||
|
return *this;
|
||||||
|
|
||||||
|
mExtendedAddress = rhs.mExtendedAddress;
|
||||||
|
mRecordSize = rhs.mRecordSize;
|
||||||
|
mStartAddress = rhs.mStartAddress;
|
||||||
|
mRecordType = rhs.mRecordType;
|
||||||
|
mRecordData = rhs.mRecordData;
|
||||||
|
|
||||||
|
// mRecordData = new char[mRecordSize*4];
|
||||||
|
// memcpy(mRecordData,rhs.mRecordData,mRecordSize*4);
|
||||||
|
|
||||||
|
return *this;
|
||||||
|
}
|
||||||
64
Sources/PICUploader/HexRecord.h
Normal file
64
Sources/PICUploader/HexRecord.h
Normal file
@ -0,0 +1,64 @@
|
|||||||
|
#pragma once
|
||||||
|
#include <QString>
|
||||||
|
#include <QByteArray>
|
||||||
|
|
||||||
|
#define IGNORE_ALL_FF_RECORDS
|
||||||
|
|
||||||
|
class CHexRecord
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
|
||||||
|
enum eRecordTypes
|
||||||
|
{
|
||||||
|
DATA_RECORD_TYPE, //0x00
|
||||||
|
EOF_RECORD_TYPE, //0x01
|
||||||
|
EXTENDED_ADDRESS_TYPE, //0x02
|
||||||
|
START_SEGMENT_ADDRESS_TYPE, //0x03
|
||||||
|
EXTENDED_LINEAR_ADDRESS_TYPE, //0x04
|
||||||
|
START_LINEAR_ADDRESS_TYPE, //0x05
|
||||||
|
MAX_RECORD_TYPE
|
||||||
|
};
|
||||||
|
|
||||||
|
enum eRetValues
|
||||||
|
{
|
||||||
|
RET_DATA_RECORD,
|
||||||
|
RET_EOF_RECORD,
|
||||||
|
RET_EXTENDED_ADDRESS,
|
||||||
|
RET_START_SEGMENT_ADDRESS,
|
||||||
|
RET_EXTENDED_LINEAR_ADDRESS,
|
||||||
|
RET_IGNORED_ALL_FF_RECORD,
|
||||||
|
RET_START_LINEAR_ADDRESS,
|
||||||
|
RET_UNKNOWN_RECORD_TYPE,
|
||||||
|
RET_INVALID_RECORD,
|
||||||
|
RET_BAD_RECORD_CHECKSUM,
|
||||||
|
RET_UNMANAGED_RECORD_TYPE
|
||||||
|
};
|
||||||
|
|
||||||
|
//char *mRecordData;
|
||||||
|
QByteArray mRecordData;
|
||||||
|
unsigned int mStartAddress;
|
||||||
|
unsigned int mRecordSize;
|
||||||
|
unsigned int mRecordType;
|
||||||
|
unsigned int mExtendedAddress;
|
||||||
|
|
||||||
|
|
||||||
|
CHexRecord(void);
|
||||||
|
~CHexRecord(void);
|
||||||
|
|
||||||
|
int SetRecordStartAddress(unsigned int Address);
|
||||||
|
int SetRecordSize(unsigned int size);
|
||||||
|
int DecodeRawRecord(QString *RawRecordData, unsigned int HighAddress);
|
||||||
|
|
||||||
|
unsigned int GetExtenedAddress(void){return mExtendedAddress;}
|
||||||
|
unsigned int GetStartAddress(void){return mStartAddress;}
|
||||||
|
char *GetDataBuffer(void){return mRecordData.data();}
|
||||||
|
QByteArray GetData(void){return mRecordData;}
|
||||||
|
unsigned int GetRecordSize(void){return mRecordData.size()/4;}
|
||||||
|
unsigned int GetRecordSizeInBytes(void){return mRecordData.size();}
|
||||||
|
unsigned int GetRecordType(void){return mRecordType;}
|
||||||
|
unsigned int AppendRecord(CHexRecord *RecordToAppend);
|
||||||
|
|
||||||
|
CHexRecord& operator=(const CHexRecord &rhs);
|
||||||
|
|
||||||
|
|
||||||
|
};
|
||||||
30
Sources/PICUploader/PICUploader.cpp
Normal file
30
Sources/PICUploader/PICUploader.cpp
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
#include "PICUploader.h"
|
||||||
|
#include "GlobalDefine.h"
|
||||||
|
|
||||||
|
CPICUploader::CPICUploader(CPICUploaderGui *Gui)
|
||||||
|
{
|
||||||
|
mPICUploaderGui = Gui;
|
||||||
|
mPICUploaderGui->mProgramHandle = this;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
int CPICUploader::Start()
|
||||||
|
{
|
||||||
|
return RET_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
int CPICUploader::OpenHexFileRequest(QString FilePath)
|
||||||
|
{
|
||||||
|
int ret = mHexFile.OpenDataFile(FilePath);
|
||||||
|
|
||||||
|
if(ret == 0)
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
QString HexFileStats = QString("HexFileSize: %1\nFirmware Size: %4\nNb analyzed Records: %2\nNb Big Records: %3").arg(mHexFile.GetFileSize()).arg(mHexFile.GetTotalParsedRecords()).arg(mHexFile.GetNBRecords()).arg(mHexFile.GetFirmwareSize());
|
||||||
|
|
||||||
|
mPICUploaderGui->SetHexFileStats(HexFileStats);
|
||||||
|
|
||||||
|
//HexFileStats << "HexFileSize: " << mHexFile.GetFileSize() << "\n";
|
||||||
|
// HexFileStats <<
|
||||||
|
}
|
||||||
27
Sources/PICUploader/PICUploader.h
Normal file
27
Sources/PICUploader/PICUploader.h
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
#ifndef PICUPLOADER_H
|
||||||
|
#define PICUPLOADER_H
|
||||||
|
|
||||||
|
#include <QObject>
|
||||||
|
#include "PICUploaderGui.h"
|
||||||
|
#include "HexFile.h"
|
||||||
|
|
||||||
|
class CPICUploader : public QObject
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
public:
|
||||||
|
explicit CPICUploader(CPICUploaderGui *Gui);
|
||||||
|
int OpenHexFileRequest(QString FilePath);
|
||||||
|
|
||||||
|
int Start();
|
||||||
|
|
||||||
|
CPICUploaderGui *mPICUploaderGui;
|
||||||
|
|
||||||
|
CHexFile mHexFile;
|
||||||
|
|
||||||
|
|
||||||
|
signals:
|
||||||
|
|
||||||
|
public slots:
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // PICUPLOADER_H
|
||||||
34
Sources/PICUploader/PICUploaderGui.cpp
Normal file
34
Sources/PICUploader/PICUploaderGui.cpp
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
#include "PICUploaderGui.h"
|
||||||
|
#include "ui_PICUploaderGui.h"
|
||||||
|
#include <QFileDialog>
|
||||||
|
#include "PICUploader.h"
|
||||||
|
|
||||||
|
CPICUploaderGui::CPICUploaderGui(QWidget *parent) :
|
||||||
|
QDialog(parent),
|
||||||
|
ui(new Ui::CPICUploaderGui)
|
||||||
|
{
|
||||||
|
ui->setupUi(this);
|
||||||
|
|
||||||
|
connect(ui->mHexFileSelectBtn,SIGNAL(clicked(bool)),this,SLOT(OpenHexFileBtnClicked(bool)));
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
CPICUploaderGui::~CPICUploaderGui()
|
||||||
|
{
|
||||||
|
delete ui;
|
||||||
|
}
|
||||||
|
|
||||||
|
void CPICUploaderGui::OpenHexFileBtnClicked(bool checked)
|
||||||
|
{
|
||||||
|
QString FileName = QFileDialog::getOpenFileName(0,"Select Firmware Hex File",QString(),"Hex files (*.hex)");
|
||||||
|
if(mProgramHandle->OpenHexFileRequest(FileName) != 0)
|
||||||
|
{
|
||||||
|
ui->mOpenedHexFilePathLbl->setText(FileName);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void CPICUploaderGui::SetHexFileStats(QString Stats)
|
||||||
|
{
|
||||||
|
ui->mHexFileStatsLbl->setText(Stats);
|
||||||
|
}
|
||||||
31
Sources/PICUploader/PICUploaderGui.h
Normal file
31
Sources/PICUploader/PICUploaderGui.h
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
#ifndef PICUPLOADERGUI_H
|
||||||
|
#define PICUPLOADERGUI_H
|
||||||
|
|
||||||
|
#include <QDialog>
|
||||||
|
|
||||||
|
class CPICUploader;
|
||||||
|
|
||||||
|
namespace Ui {
|
||||||
|
class CPICUploaderGui;
|
||||||
|
}
|
||||||
|
|
||||||
|
class CPICUploaderGui : public QDialog
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
|
||||||
|
public:
|
||||||
|
explicit CPICUploaderGui(QWidget *parent = nullptr);
|
||||||
|
~CPICUploaderGui();
|
||||||
|
|
||||||
|
void SetHexFileStats(QString Stats);
|
||||||
|
|
||||||
|
CPICUploader *mProgramHandle;
|
||||||
|
|
||||||
|
private:
|
||||||
|
Ui::CPICUploaderGui *ui;
|
||||||
|
|
||||||
|
public slots:
|
||||||
|
void OpenHexFileBtnClicked(bool);
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // PICUPLOADERGUI_H
|
||||||
88
Sources/PICUploader/PICUploaderGui.ui
Normal file
88
Sources/PICUploader/PICUploaderGui.ui
Normal file
@ -0,0 +1,88 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<ui version="4.0">
|
||||||
|
<class>CPICUploaderGui</class>
|
||||||
|
<widget class="QDialog" name="CPICUploaderGui">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>0</x>
|
||||||
|
<y>0</y>
|
||||||
|
<width>1024</width>
|
||||||
|
<height>768</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="windowTitle">
|
||||||
|
<string>Dialog</string>
|
||||||
|
</property>
|
||||||
|
<widget class="QLabel" name="label">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>260</x>
|
||||||
|
<y>20</y>
|
||||||
|
<width>191</width>
|
||||||
|
<height>31</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<pointsize>14</pointsize>
|
||||||
|
<weight>75</weight>
|
||||||
|
<bold>true</bold>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Firmware Uploader</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
<widget class="QPushButton" name="mHexFileSelectBtn">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>70</x>
|
||||||
|
<y>110</y>
|
||||||
|
<width>81</width>
|
||||||
|
<height>23</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Open Hex File</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
<widget class="QLineEdit" name="lineEdit">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>690</x>
|
||||||
|
<y>120</y>
|
||||||
|
<width>181</width>
|
||||||
|
<height>20</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
<widget class="QLabel" name="mOpenedHexFilePathLbl">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>70</x>
|
||||||
|
<y>140</y>
|
||||||
|
<width>521</width>
|
||||||
|
<height>16</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>No File Opened</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
<widget class="QLabel" name="mHexFileStatsLbl">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>70</x>
|
||||||
|
<y>170</y>
|
||||||
|
<width>471</width>
|
||||||
|
<height>131</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string/>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</widget>
|
||||||
|
<resources/>
|
||||||
|
<connections/>
|
||||||
|
</ui>
|
||||||
@ -9,6 +9,7 @@ CSystemGui::CSystemGui(QObject *parent) : QObject(parent)
|
|||||||
mSprinklers = new CSprinkler(mGui->mSprinklerGui);
|
mSprinklers = new CSprinkler(mGui->mSprinklerGui);
|
||||||
mAvReceiver = new CAvReceiver(mGui->mAvReceiverGui);
|
mAvReceiver = new CAvReceiver(mGui->mAvReceiverGui);
|
||||||
mChalet = new CChalet(mGui->mChaletGui);
|
mChalet = new CChalet(mGui->mChaletGui);
|
||||||
|
mPICUploader = new CPICUploader(mGui->mPICUploaderGui);
|
||||||
|
|
||||||
mSysTrayMgr = new CSystemTrayManager();
|
mSysTrayMgr = new CSystemTrayManager();
|
||||||
mSysTrayMgr->mProgramHandle=this;
|
mSysTrayMgr->mProgramHandle=this;
|
||||||
@ -24,6 +25,7 @@ CSystemGui::~CSystemGui()
|
|||||||
delete mSysTrayMgr;
|
delete mSysTrayMgr;
|
||||||
delete mAvReceiver;
|
delete mAvReceiver;
|
||||||
delete mChalet;
|
delete mChalet;
|
||||||
|
delete mPICUploader;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -34,6 +36,7 @@ void CSystemGui::Start()
|
|||||||
mSMSClient->Start();
|
mSMSClient->Start();
|
||||||
mAvReceiver->Start();
|
mAvReceiver->Start();
|
||||||
mChalet->Start();
|
mChalet->Start();
|
||||||
|
mPICUploader->Start();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -10,6 +10,7 @@
|
|||||||
#include "AvReceiverGui.h"
|
#include "AvReceiverGui.h"
|
||||||
#include "AvReceiver.h"
|
#include "AvReceiver.h"
|
||||||
#include "CChalet.h"
|
#include "CChalet.h"
|
||||||
|
#include "PICUploader.h"
|
||||||
|
|
||||||
|
|
||||||
class CSystemGui : public QObject
|
class CSystemGui : public QObject
|
||||||
@ -35,6 +36,7 @@ private:
|
|||||||
CSprinkler *mSprinklers;
|
CSprinkler *mSprinklers;
|
||||||
CAvReceiver *mAvReceiver;
|
CAvReceiver *mAvReceiver;
|
||||||
CChalet *mChalet;
|
CChalet *mChalet;
|
||||||
|
CPICUploader *mPICUploader;
|
||||||
|
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
|
|||||||
@ -28,6 +28,7 @@ INCLUDEPATH += Sources\
|
|||||||
Sources/AvReceiver\
|
Sources/AvReceiver\
|
||||||
Sources/Chalet\
|
Sources/Chalet\
|
||||||
Sources/Tower\
|
Sources/Tower\
|
||||||
|
Sources/PICUploader\
|
||||||
|
|
||||||
SOURCES += \
|
SOURCES += \
|
||||||
Sources/Chalet/CChalet.cpp \
|
Sources/Chalet/CChalet.cpp \
|
||||||
@ -36,6 +37,7 @@ SOURCES += \
|
|||||||
Sources/Chalet/ChaletMasterCtrlInterface.cpp \
|
Sources/Chalet/ChaletMasterCtrlInterface.cpp \
|
||||||
Sources/GuiMain.cpp \
|
Sources/GuiMain.cpp \
|
||||||
Sources/NetworkProtocol.cpp \
|
Sources/NetworkProtocol.cpp \
|
||||||
|
Sources/PICUploader/PICUploaderGui.cpp \
|
||||||
Sources/ProgramSettings.cpp \
|
Sources/ProgramSettings.cpp \
|
||||||
Sources/SystemGui.cpp \
|
Sources/SystemGui.cpp \
|
||||||
Sources/SMSClient/SMSConversation.cpp \
|
Sources/SMSClient/SMSConversation.cpp \
|
||||||
@ -64,7 +66,10 @@ SOURCES += \
|
|||||||
Sources/Tower/LedStringWidget.cpp \
|
Sources/Tower/LedStringWidget.cpp \
|
||||||
Sources/Tower/LEDAnimator.cpp \
|
Sources/Tower/LEDAnimator.cpp \
|
||||||
Sources/Tower/LEDAnimation.cpp \
|
Sources/Tower/LEDAnimation.cpp \
|
||||||
Sources/main.cpp
|
Sources/main.cpp \
|
||||||
|
Sources/PICUploader/PICUploader.cpp \
|
||||||
|
Sources/PICUploader/HexFile.cpp \
|
||||||
|
Sources/PICUploader/HexRecord.cpp
|
||||||
|
|
||||||
HEADERS += Sources/AbstractNetworkInterface.h \
|
HEADERS += Sources/AbstractNetworkInterface.h \
|
||||||
Sources/Chalet/CChalet.h \
|
Sources/Chalet/CChalet.h \
|
||||||
@ -73,6 +78,7 @@ HEADERS += Sources/AbstractNetworkInterface.h \
|
|||||||
Sources/Chalet/ChaletMasterCtrlInterface.h \
|
Sources/Chalet/ChaletMasterCtrlInterface.h \
|
||||||
Sources/GuiMain.h \
|
Sources/GuiMain.h \
|
||||||
Sources/NetworkProtocol.h \
|
Sources/NetworkProtocol.h \
|
||||||
|
Sources/PICUploader/PICUploaderGui.h \
|
||||||
Sources/ProgramSettings.h \
|
Sources/ProgramSettings.h \
|
||||||
Sources/ProtocolDefs.h \
|
Sources/ProtocolDefs.h \
|
||||||
Sources/SystemGui.h \
|
Sources/SystemGui.h \
|
||||||
@ -102,11 +108,15 @@ HEADERS += Sources/AbstractNetworkInterface.h \
|
|||||||
Sources/Tower/RGBLedWidget.h \
|
Sources/Tower/RGBLedWidget.h \
|
||||||
Sources/Tower/LedStringWidget.h \
|
Sources/Tower/LedStringWidget.h \
|
||||||
Sources/Tower/LEDAnimator.h \
|
Sources/Tower/LEDAnimator.h \
|
||||||
Sources/Tower/LEDAnimation.h
|
Sources/Tower/LEDAnimation.h \
|
||||||
|
Sources/PICUploader/PICUploader.h \
|
||||||
|
Sources/PICUploader/HexFile.h \
|
||||||
|
Sources/PICUploader/HexRecord.h
|
||||||
|
|
||||||
FORMS += \
|
FORMS += \
|
||||||
SMSGui.ui \
|
SMSGui.ui \
|
||||||
Sources/Chalet/ChaletGui.ui \
|
Sources/Chalet/ChaletGui.ui \
|
||||||
|
Sources/PICUploader/PICUploaderGui.ui \
|
||||||
Sources/Sprinkler/SprinklerGui.ui \
|
Sources/Sprinkler/SprinklerGui.ui \
|
||||||
Sources/Sprinkler/SprinklerDeviceGuiItem.ui \
|
Sources/Sprinkler/SprinklerDeviceGuiItem.ui \
|
||||||
Sources/AvReceiver/AvReceiverGui.ui \
|
Sources/AvReceiver/AvReceiverGui.ui \
|
||||||
|
|||||||
@ -54,7 +54,7 @@ public:
|
|||||||
{
|
{
|
||||||
if (CChaletGui->objectName().isEmpty())
|
if (CChaletGui->objectName().isEmpty())
|
||||||
CChaletGui->setObjectName(QString::fromUtf8("CChaletGui"));
|
CChaletGui->setObjectName(QString::fromUtf8("CChaletGui"));
|
||||||
CChaletGui->resize(1205, 598);
|
CChaletGui->resize(1024, 598);
|
||||||
MainPageLabel = new QLabel(CChaletGui);
|
MainPageLabel = new QLabel(CChaletGui);
|
||||||
MainPageLabel->setObjectName(QString::fromUtf8("MainPageLabel"));
|
MainPageLabel->setObjectName(QString::fromUtf8("MainPageLabel"));
|
||||||
MainPageLabel->setGeometry(QRect(460, 10, 71, 31));
|
MainPageLabel->setGeometry(QRect(460, 10, 71, 31));
|
||||||
@ -65,44 +65,44 @@ public:
|
|||||||
MainPageLabel->setFont(font);
|
MainPageLabel->setFont(font);
|
||||||
mInverterRlyStatusLabel = new QLabel(CChaletGui);
|
mInverterRlyStatusLabel = new QLabel(CChaletGui);
|
||||||
mInverterRlyStatusLabel->setObjectName(QString::fromUtf8("mInverterRlyStatusLabel"));
|
mInverterRlyStatusLabel->setObjectName(QString::fromUtf8("mInverterRlyStatusLabel"));
|
||||||
mInverterRlyStatusLabel->setGeometry(QRect(198, 50, 210, 16));
|
mInverterRlyStatusLabel->setGeometry(QRect(238, 120, 210, 16));
|
||||||
mWiFiModuleStatusLabel = new QLabel(CChaletGui);
|
mWiFiModuleStatusLabel = new QLabel(CChaletGui);
|
||||||
mWiFiModuleStatusLabel->setObjectName(QString::fromUtf8("mWiFiModuleStatusLabel"));
|
mWiFiModuleStatusLabel->setObjectName(QString::fromUtf8("mWiFiModuleStatusLabel"));
|
||||||
mWiFiModuleStatusLabel->setGeometry(QRect(198, 90, 130, 16));
|
mWiFiModuleStatusLabel->setGeometry(QRect(238, 160, 130, 16));
|
||||||
mWiFiSectionLabel = new QLabel(CChaletGui);
|
mWiFiSectionLabel = new QLabel(CChaletGui);
|
||||||
mWiFiSectionLabel->setObjectName(QString::fromUtf8("mWiFiSectionLabel"));
|
mWiFiSectionLabel->setObjectName(QString::fromUtf8("mWiFiSectionLabel"));
|
||||||
mWiFiSectionLabel->setGeometry(QRect(26, 90, 31, 16));
|
mWiFiSectionLabel->setGeometry(QRect(66, 160, 31, 16));
|
||||||
mInverterRelayOFFBtn = new QPushButton(CChaletGui);
|
mInverterRelayOFFBtn = new QPushButton(CChaletGui);
|
||||||
mInverterRelayOFFBtn->setObjectName(QString::fromUtf8("mInverterRelayOFFBtn"));
|
mInverterRelayOFFBtn->setObjectName(QString::fromUtf8("mInverterRelayOFFBtn"));
|
||||||
mInverterRelayOFFBtn->setGeometry(QRect(126, 50, 61, 22));
|
mInverterRelayOFFBtn->setGeometry(QRect(166, 120, 61, 22));
|
||||||
mWiFiModuleOFFBtn = new QPushButton(CChaletGui);
|
mWiFiModuleOFFBtn = new QPushButton(CChaletGui);
|
||||||
mWiFiModuleOFFBtn->setObjectName(QString::fromUtf8("mWiFiModuleOFFBtn"));
|
mWiFiModuleOFFBtn->setObjectName(QString::fromUtf8("mWiFiModuleOFFBtn"));
|
||||||
mWiFiModuleOFFBtn->setGeometry(QRect(126, 90, 61, 23));
|
mWiFiModuleOFFBtn->setGeometry(QRect(166, 160, 61, 23));
|
||||||
mInverterRelayONBtn = new QPushButton(CChaletGui);
|
mInverterRelayONBtn = new QPushButton(CChaletGui);
|
||||||
mInverterRelayONBtn->setObjectName(QString::fromUtf8("mInverterRelayONBtn"));
|
mInverterRelayONBtn->setObjectName(QString::fromUtf8("mInverterRelayONBtn"));
|
||||||
mInverterRelayONBtn->setGeometry(QRect(70, 50, 51, 23));
|
mInverterRelayONBtn->setGeometry(QRect(110, 120, 51, 23));
|
||||||
mWiFiModuleONBtn = new QPushButton(CChaletGui);
|
mWiFiModuleONBtn = new QPushButton(CChaletGui);
|
||||||
mWiFiModuleONBtn->setObjectName(QString::fromUtf8("mWiFiModuleONBtn"));
|
mWiFiModuleONBtn->setObjectName(QString::fromUtf8("mWiFiModuleONBtn"));
|
||||||
mWiFiModuleONBtn->setGeometry(QRect(70, 90, 51, 23));
|
mWiFiModuleONBtn->setGeometry(QRect(110, 160, 51, 23));
|
||||||
mWiFiSectionLabel_2 = new QLabel(CChaletGui);
|
mWiFiSectionLabel_2 = new QLabel(CChaletGui);
|
||||||
mWiFiSectionLabel_2->setObjectName(QString::fromUtf8("mWiFiSectionLabel_2"));
|
mWiFiSectionLabel_2->setObjectName(QString::fromUtf8("mWiFiSectionLabel_2"));
|
||||||
mWiFiSectionLabel_2->setGeometry(QRect(16, 50, 51, 20));
|
mWiFiSectionLabel_2->setGeometry(QRect(56, 120, 51, 20));
|
||||||
mRebootCPUBtn = new QPushButton(CChaletGui);
|
mRebootCPUBtn = new QPushButton(CChaletGui);
|
||||||
mRebootCPUBtn->setObjectName(QString::fromUtf8("mRebootCPUBtn"));
|
mRebootCPUBtn->setObjectName(QString::fromUtf8("mRebootCPUBtn"));
|
||||||
mRebootCPUBtn->setGeometry(QRect(66, 130, 75, 23));
|
mRebootCPUBtn->setGeometry(QRect(106, 200, 75, 23));
|
||||||
mEnableHarakiriChkBx = new QCheckBox(CChaletGui);
|
mEnableHarakiriChkBx = new QCheckBox(CChaletGui);
|
||||||
mEnableHarakiriChkBx->setObjectName(QString::fromUtf8("mEnableHarakiriChkBx"));
|
mEnableHarakiriChkBx->setObjectName(QString::fromUtf8("mEnableHarakiriChkBx"));
|
||||||
mEnableHarakiriChkBx->setEnabled(false);
|
mEnableHarakiriChkBx->setEnabled(false);
|
||||||
mEnableHarakiriChkBx->setGeometry(QRect(850, 80, 111, 17));
|
mEnableHarakiriChkBx->setGeometry(QRect(680, 70, 111, 17));
|
||||||
groupBox = new QGroupBox(CChaletGui);
|
groupBox = new QGroupBox(CChaletGui);
|
||||||
groupBox->setObjectName(QString::fromUtf8("groupBox"));
|
groupBox->setObjectName(QString::fromUtf8("groupBox"));
|
||||||
groupBox->setGeometry(QRect(830, 50, 151, 81));
|
groupBox->setGeometry(QRect(660, 40, 151, 81));
|
||||||
mDoHarakiriButton = new QPushButton(groupBox);
|
mDoHarakiriButton = new QPushButton(groupBox);
|
||||||
mDoHarakiriButton->setObjectName(QString::fromUtf8("mDoHarakiriButton"));
|
mDoHarakiriButton->setObjectName(QString::fromUtf8("mDoHarakiriButton"));
|
||||||
mDoHarakiriButton->setGeometry(QRect(20, 50, 101, 23));
|
mDoHarakiriButton->setGeometry(QRect(20, 50, 101, 23));
|
||||||
mBatteryVoltageLabel = new QLabel(CChaletGui);
|
mBatteryVoltageLabel = new QLabel(CChaletGui);
|
||||||
mBatteryVoltageLabel->setObjectName(QString::fromUtf8("mBatteryVoltageLabel"));
|
mBatteryVoltageLabel->setObjectName(QString::fromUtf8("mBatteryVoltageLabel"));
|
||||||
mBatteryVoltageLabel->setGeometry(QRect(147, 170, 241, 16));
|
mBatteryVoltageLabel->setGeometry(QRect(187, 240, 241, 16));
|
||||||
mChaletOnlineStatusLbl = new QLabel(CChaletGui);
|
mChaletOnlineStatusLbl = new QLabel(CChaletGui);
|
||||||
mChaletOnlineStatusLbl->setObjectName(QString::fromUtf8("mChaletOnlineStatusLbl"));
|
mChaletOnlineStatusLbl->setObjectName(QString::fromUtf8("mChaletOnlineStatusLbl"));
|
||||||
mChaletOnlineStatusLbl->setGeometry(QRect(450, 50, 91, 21));
|
mChaletOnlineStatusLbl->setGeometry(QRect(450, 50, 91, 21));
|
||||||
@ -114,34 +114,34 @@ public:
|
|||||||
mChaletOnlineStatusLbl->setFont(font1);
|
mChaletOnlineStatusLbl->setFont(font1);
|
||||||
mSolarPanelCurrentLabel = new QLabel(CChaletGui);
|
mSolarPanelCurrentLabel = new QLabel(CChaletGui);
|
||||||
mSolarPanelCurrentLabel->setObjectName(QString::fromUtf8("mSolarPanelCurrentLabel"));
|
mSolarPanelCurrentLabel->setObjectName(QString::fromUtf8("mSolarPanelCurrentLabel"));
|
||||||
mSolarPanelCurrentLabel->setGeometry(QRect(147, 190, 241, 16));
|
mSolarPanelCurrentLabel->setGeometry(QRect(187, 260, 241, 16));
|
||||||
mBatterySOCLabel = new QLabel(CChaletGui);
|
mBatterySOCLabel = new QLabel(CChaletGui);
|
||||||
mBatterySOCLabel->setObjectName(QString::fromUtf8("mBatterySOCLabel"));
|
mBatterySOCLabel->setObjectName(QString::fromUtf8("mBatterySOCLabel"));
|
||||||
mBatterySOCLabel->setGeometry(QRect(147, 210, 241, 16));
|
mBatterySOCLabel->setGeometry(QRect(187, 280, 241, 16));
|
||||||
mCurrentSensorStateLbl = new QLabel(CChaletGui);
|
mCurrentSensorStateLbl = new QLabel(CChaletGui);
|
||||||
mCurrentSensorStateLbl->setObjectName(QString::fromUtf8("mCurrentSensorStateLbl"));
|
mCurrentSensorStateLbl->setObjectName(QString::fromUtf8("mCurrentSensorStateLbl"));
|
||||||
mCurrentSensorStateLbl->setGeometry(QRect(147, 230, 241, 16));
|
mCurrentSensorStateLbl->setGeometry(QRect(187, 300, 241, 16));
|
||||||
mLostReqPercentLbl = new QLabel(CChaletGui);
|
mLostReqPercentLbl = new QLabel(CChaletGui);
|
||||||
mLostReqPercentLbl->setObjectName(QString::fromUtf8("mLostReqPercentLbl"));
|
mLostReqPercentLbl->setObjectName(QString::fromUtf8("mLostReqPercentLbl"));
|
||||||
mLostReqPercentLbl->setGeometry(QRect(770, 200, 241, 16));
|
mLostReqPercentLbl->setGeometry(QRect(600, 190, 241, 16));
|
||||||
mPlotWidget = new QWidget(CChaletGui);
|
mPlotWidget = new QWidget(CChaletGui);
|
||||||
mPlotWidget->setObjectName(QString::fromUtf8("mPlotWidget"));
|
mPlotWidget->setObjectName(QString::fromUtf8("mPlotWidget"));
|
||||||
mPlotWidget->setGeometry(QRect(590, 250, 571, 321));
|
mPlotWidget->setGeometry(QRect(420, 240, 571, 321));
|
||||||
mVoltageLCD = new QLCDNumber(CChaletGui);
|
mVoltageLCD = new QLCDNumber(CChaletGui);
|
||||||
mVoltageLCD->setObjectName(QString::fromUtf8("mVoltageLCD"));
|
mVoltageLCD->setObjectName(QString::fromUtf8("mVoltageLCD"));
|
||||||
mVoltageLCD->setGeometry(QRect(30, 170, 111, 23));
|
mVoltageLCD->setGeometry(QRect(70, 240, 111, 23));
|
||||||
mChaletCommActivityLbl = new QLabel(CChaletGui);
|
mChaletCommActivityLbl = new QLabel(CChaletGui);
|
||||||
mChaletCommActivityLbl->setObjectName(QString::fromUtf8("mChaletCommActivityLbl"));
|
mChaletCommActivityLbl->setObjectName(QString::fromUtf8("mChaletCommActivityLbl"));
|
||||||
mChaletCommActivityLbl->setGeometry(QRect(770, 180, 47, 16));
|
mChaletCommActivityLbl->setGeometry(QRect(600, 170, 47, 16));
|
||||||
mLasCommRequestReceivedLbl = new QLabel(CChaletGui);
|
mLasCommRequestReceivedLbl = new QLabel(CChaletGui);
|
||||||
mLasCommRequestReceivedLbl->setObjectName(QString::fromUtf8("mLasCommRequestReceivedLbl"));
|
mLasCommRequestReceivedLbl->setObjectName(QString::fromUtf8("mLasCommRequestReceivedLbl"));
|
||||||
mLasCommRequestReceivedLbl->setGeometry(QRect(770, 160, 301, 16));
|
mLasCommRequestReceivedLbl->setGeometry(QRect(600, 150, 301, 16));
|
||||||
mLogStartDateEdit = new QDateEdit(CChaletGui);
|
mLogStartDateEdit = new QDateEdit(CChaletGui);
|
||||||
mLogStartDateEdit->setObjectName(QString::fromUtf8("mLogStartDateEdit"));
|
mLogStartDateEdit->setObjectName(QString::fromUtf8("mLogStartDateEdit"));
|
||||||
mLogStartDateEdit->setGeometry(QRect(950, 220, 110, 22));
|
mLogStartDateEdit->setGeometry(QRect(780, 210, 110, 22));
|
||||||
mGetChaletLogButton = new QPushButton(CChaletGui);
|
mGetChaletLogButton = new QPushButton(CChaletGui);
|
||||||
mGetChaletLogButton->setObjectName(QString::fromUtf8("mGetChaletLogButton"));
|
mGetChaletLogButton->setObjectName(QString::fromUtf8("mGetChaletLogButton"));
|
||||||
mGetChaletLogButton->setGeometry(QRect(1070, 220, 75, 23));
|
mGetChaletLogButton->setGeometry(QRect(900, 210, 75, 23));
|
||||||
groupBox->raise();
|
groupBox->raise();
|
||||||
MainPageLabel->raise();
|
MainPageLabel->raise();
|
||||||
mInverterRlyStatusLabel->raise();
|
mInverterRlyStatusLabel->raise();
|
||||||
|
|||||||
78
ui_PICUploaderGui.h
Normal file
78
ui_PICUploaderGui.h
Normal file
@ -0,0 +1,78 @@
|
|||||||
|
/********************************************************************************
|
||||||
|
** Form generated from reading UI file 'PICUploaderGui.ui'
|
||||||
|
**
|
||||||
|
** Created by: Qt User Interface Compiler version 5.14.2
|
||||||
|
**
|
||||||
|
** WARNING! All changes made in this file will be lost when recompiling UI file!
|
||||||
|
********************************************************************************/
|
||||||
|
|
||||||
|
#ifndef UI_PICUPLOADERGUI_H
|
||||||
|
#define UI_PICUPLOADERGUI_H
|
||||||
|
|
||||||
|
#include <QtCore/QVariant>
|
||||||
|
#include <QtWidgets/QApplication>
|
||||||
|
#include <QtWidgets/QDialog>
|
||||||
|
#include <QtWidgets/QLabel>
|
||||||
|
#include <QtWidgets/QLineEdit>
|
||||||
|
#include <QtWidgets/QPushButton>
|
||||||
|
|
||||||
|
QT_BEGIN_NAMESPACE
|
||||||
|
|
||||||
|
class Ui_CPICUploaderGui
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
QLabel *label;
|
||||||
|
QPushButton *mHexFileSelectBtn;
|
||||||
|
QLineEdit *lineEdit;
|
||||||
|
QLabel *mOpenedHexFilePathLbl;
|
||||||
|
QLabel *mHexFileStatsLbl;
|
||||||
|
|
||||||
|
void setupUi(QDialog *CPICUploaderGui)
|
||||||
|
{
|
||||||
|
if (CPICUploaderGui->objectName().isEmpty())
|
||||||
|
CPICUploaderGui->setObjectName(QString::fromUtf8("CPICUploaderGui"));
|
||||||
|
CPICUploaderGui->resize(1024, 768);
|
||||||
|
label = new QLabel(CPICUploaderGui);
|
||||||
|
label->setObjectName(QString::fromUtf8("label"));
|
||||||
|
label->setGeometry(QRect(260, 20, 191, 31));
|
||||||
|
QFont font;
|
||||||
|
font.setPointSize(14);
|
||||||
|
font.setBold(true);
|
||||||
|
font.setWeight(75);
|
||||||
|
label->setFont(font);
|
||||||
|
mHexFileSelectBtn = new QPushButton(CPICUploaderGui);
|
||||||
|
mHexFileSelectBtn->setObjectName(QString::fromUtf8("mHexFileSelectBtn"));
|
||||||
|
mHexFileSelectBtn->setGeometry(QRect(70, 110, 81, 23));
|
||||||
|
lineEdit = new QLineEdit(CPICUploaderGui);
|
||||||
|
lineEdit->setObjectName(QString::fromUtf8("lineEdit"));
|
||||||
|
lineEdit->setGeometry(QRect(690, 120, 181, 20));
|
||||||
|
mOpenedHexFilePathLbl = new QLabel(CPICUploaderGui);
|
||||||
|
mOpenedHexFilePathLbl->setObjectName(QString::fromUtf8("mOpenedHexFilePathLbl"));
|
||||||
|
mOpenedHexFilePathLbl->setGeometry(QRect(70, 140, 521, 16));
|
||||||
|
mHexFileStatsLbl = new QLabel(CPICUploaderGui);
|
||||||
|
mHexFileStatsLbl->setObjectName(QString::fromUtf8("mHexFileStatsLbl"));
|
||||||
|
mHexFileStatsLbl->setGeometry(QRect(70, 170, 471, 131));
|
||||||
|
|
||||||
|
retranslateUi(CPICUploaderGui);
|
||||||
|
|
||||||
|
QMetaObject::connectSlotsByName(CPICUploaderGui);
|
||||||
|
} // setupUi
|
||||||
|
|
||||||
|
void retranslateUi(QDialog *CPICUploaderGui)
|
||||||
|
{
|
||||||
|
CPICUploaderGui->setWindowTitle(QCoreApplication::translate("CPICUploaderGui", "Dialog", nullptr));
|
||||||
|
label->setText(QCoreApplication::translate("CPICUploaderGui", "Firmware Uploader", nullptr));
|
||||||
|
mHexFileSelectBtn->setText(QCoreApplication::translate("CPICUploaderGui", "Open Hex File", nullptr));
|
||||||
|
mOpenedHexFilePathLbl->setText(QCoreApplication::translate("CPICUploaderGui", "No File Opened", nullptr));
|
||||||
|
mHexFileStatsLbl->setText(QString());
|
||||||
|
} // retranslateUi
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
namespace Ui {
|
||||||
|
class CPICUploaderGui: public Ui_CPICUploaderGui {};
|
||||||
|
} // namespace Ui
|
||||||
|
|
||||||
|
QT_END_NAMESPACE
|
||||||
|
|
||||||
|
#endif // UI_PICUPLOADERGUI_H
|
||||||
Loading…
x
Reference in New Issue
Block a user