Del (a lot!)

This commit is contained in:
2022-12-11 13:50:51 -05:00
parent a69e88c091
commit 17e753c365
27 changed files with 1060 additions and 292 deletions
+74 -2
View File
@@ -137,6 +137,40 @@ int CChalet::RequestDeviceWifiParams()
int CChalet::RequestFirmwareVersion()
{
mNetworkInterface->SendMasterCtrlCommand(CHALET_INTERFACE_GET_FIRMWARE_VERSION_REQUEST,QByteArray());
return RET_OK;
}
int CChalet::RequestClearCommStats()
{
mNetworkInterface->SendMasterCtrlCommand(CHALET_INTERFACE_CLEAR_COMMS_STATS_REQUEST,QByteArray());
return RET_OK;
}
int CChalet::RequestWifiStatus()
{
mNetworkInterface->SendMasterCtrlCommand(CHALET_INTERFACE_GET_WIFI_STATUS_REQUEST,QByteArray());
return RET_OK;
}
int CChalet::WifiStatusReceived(QByteArray Data)
{
quint32 Add = 0;
char byte;
byte = Data.at(1);
Add += (quint32)(byte & 0x000000FF);
Add <<= 8;
byte = Data.at(2);
Add += (quint32)(byte & 0x000000FF);
Add <<= 8;
byte = Data.at(3);
Add += (quint32)(byte & 0x000000FF);
Add <<= 8;
byte = Data.at(4);
Add += (quint32)(byte & 0x000000FF);
QHostAddress IP = QHostAddress(Add);
mChaletGui->UpdateDeviceWifiStatus(Data[0],IP);
return RET_OK;
}
int CChalet::DeviceWiFiParamsReceived(QByteArray *Data)
@@ -170,7 +204,22 @@ int CChalet::DeviceWiFiParamsReceived(QByteArray *Data)
Add += (quint32)(byte & 0x000000FF);
QHostAddress Gateway = QHostAddress(Add);
mChaletGui->UpdateDeviceWiFiParameters(IP, Gateway);
QString APName, APPassword;
quint8 APNameLenght, APPasswordLenght;
bool UseDHCP = false;
if(Data->size() > 9)
{
if(Data->at(8) == 1)
UseDHCP = true;
APNameLenght = Data->at(9);
APPasswordLenght = Data->at(10);
APName = QString(Data->mid(11,APNameLenght));
APPassword = QString(Data->mid(11+APNameLenght,APPasswordLenght));
}
mChaletGui->UpdateDeviceWiFiParameters(IP, Gateway,APName,APPassword,UseDHCP);
return RET_OK;
}
@@ -179,10 +228,17 @@ int CChalet::DeviceFirmwareVersionReceived(QByteArray Data)
mChaletGui->UpdateFirmwareVersion(Data);
}
int CChalet::SetDeviceWifiParams(QString IP, QString Gateway)
int CChalet::SetDeviceWifiParams(QString IP, QString Gateway, bool UseDHCP, QString APName, QString APPwd)
{
QHostAddress DeviceIP;
QHostAddress DeviceGateway;
quint8 APNameLength, APPwdLength;
if(APName.length() > 64)
return RET_ERROR;
if(APPwd.length() > 64)
return RET_ERROR;
if(DeviceIP.setAddress(IP) == false)
{
@@ -226,6 +282,22 @@ int CChalet::SetDeviceWifiParams(QString IP, QString Gateway)
Buffer[4] = byte;
Address >>= 8;
if(UseDHCP)
{
Buffer[8] = 1;
}
else
{
Buffer[8] = 0;
}
Buffer.append(APName.length());
Buffer.append(APPwd.length());
Buffer.append(APName);
Buffer.append(APPwd);
mNetworkInterface->SendMasterCtrlCommand(CHALET_INTERFACE_WIFI_SET_DEVICE_PARAMS_REQUEST,Buffer);
return RET_OK;
+4 -1
View File
@@ -34,9 +34,12 @@ public:
int RequestChaletLogs(QDate StartDate);
int RequestDeviceWifiParams();
int DeviceWiFiParamsReceived(QByteArray *Data);
int SetDeviceWifiParams(QString IP, QString Gateway);
int SetDeviceWifiParams(QString IP, QString Gateway, bool UseDHCP, QString APName, QString APPwd);
int RequestFirmwareVersion();
int DeviceFirmwareVersionReceived(QByteArray Data);
int RequestClearCommStats();
int RequestWifiStatus();
int WifiStatusReceived(QByteArray Data);
signals:
+4 -1
View File
@@ -48,7 +48,10 @@ QDataStream &operator>>(QDataStream &in, CChaletMainStatus &dest)
>> dest.mThisStatusDateTime
>> dest.mLastLoraStatus
>> dest.mStatusToggleBit
>> dest.mChaletTemperature;
>> dest.mChaletTemperature
>> dest.mTotalNbChaletRxCmds
>> dest.mTotalMasterTxCmds
>> dest.mMasterLostRequestCount;
return in;
}
+4
View File
@@ -58,6 +58,10 @@ public:
float mLostRequestPercentage;
int mTotalNbChaletRxCmds;
int mTotalMasterTxCmds;
int mMasterLostRequestCount;
};
QDataStream &operator>>(QDataStream &in, CChaletMainStatus &dest);
+93 -22
View File
@@ -39,6 +39,8 @@ CChaletGui::CChaletGui(QWidget *parent) :
connect(ui->mStartTerminalShellBtn,SIGNAL(clicked(bool)),this,SLOT(StartTerminalShellBtnClicked()));
connect(mGetFimwVersionButtonColorTimer,SIGNAL(timeout()),this,SLOT(GetFirmwVersionBtnColorTimerExpired()));
connect(mGetWifiParamsButtonColorTimer,SIGNAL(timeout()),this,SLOT(GetWifiParamsBtnColorTimerExpired()));
connect(ui->mResetCommStatsBtn,SIGNAL(clicked(bool)),this,SLOT(ResetCommStatsBtnClicked()));
connect(ui->mGetWifiStatusBtn,SIGNAL(clicked(bool)),this,SLOT(GetModuleWifiStatusBtnClicked()));
mBatteryPlotWidget = new QCustomPlot(ui->mPlotWidget);
mBatteryPlotWidget->resize(ui->mPlotWidget->size());
@@ -77,6 +79,21 @@ CChaletGui::CChaletGui(QWidget *parent) :
mFirmVersionDefaultBtnPal = ui->mGetFirmwareVersionBtn->palette();
mWifiDefaultBtnPal = ui->mGetFirmwareVersionBtn->palette();
mChaletLastLostReqCount = 0;
ui->mWiFiModuleStatusLabel->setText("Unknown");
ui->mInverterRlyStatusLabel->setText("Unknown");
ui->mCurrentSensorStateLbl->setText("Current Sensor: Unknown state");
ui->mBatteryVoltageLabel->setText("Battery Voltage: Unknown");
ui->mBatterySOCLabel->setText("Battery SOC: Unknown");
ui->mSolarPanelCurrentLabel->setText("Raw Solar Panel Current: Unknown");
ui->mSolarPanelCurrentCnvLbl->setText("Solar Panel Current (A): Unknown");
ui->mLostReqPercentLbl->setText("N/A");
ui->mTotalRxTxRequestsLbl->setText("Chalet Rx req: ??");
ui->mChaletTemperatureLbl->setText("Temperature: -100)");
}
CChaletGui::~CChaletGui()
@@ -102,15 +119,16 @@ int CChaletGui::UpdateChaletStatus(CChaletMainStatus Status)
pal.setColor(QPalette::WindowText,QColor(Qt::red));
ui->mChaletOnlineStatusLbl->setPalette(pal);
ui->mWiFiModuleStatusLabel->setText("Unknown");
ui->mInverterRlyStatusLabel->setText("Unknown");
ui->mCurrentSensorStateLbl->setText("Current Sensor: Unknown state");
ui->mBatteryVoltageLabel->setText("Battery Voltage: Unknown");
ui->mBatterySOCLabel->setText("Battery SOC: Unknown");
ui->mSolarPanelCurrentLabel->setText("Raw Solar Panel Current: Unknown");
ui->mSolarPanelCurrentCnvLbl->setText("Solar Panel Current (A): Unknown");
ui->mLostReqPercentLbl->setText("N/A");
ui->mChaletTemperatureLbl->setText("Temperature: -100)");
// ui->mWiFiModuleStatusLabel->setText("Unknown");
// ui->mInverterRlyStatusLabel->setText("Unknown");
// ui->mCurrentSensorStateLbl->setText("Current Sensor: Unknown state");
// ui->mBatteryVoltageLabel->setText("Battery Voltage: Unknown");
// ui->mBatterySOCLabel->setText("Battery SOC: Unknown");
// ui->mSolarPanelCurrentLabel->setText("Raw Solar Panel Current: Unknown");
// ui->mSolarPanelCurrentCnvLbl->setText("Solar Panel Current (A): Unknown");
// ui->mLostReqPercentLbl->setText("N/A");
// ui->mTotalRxTxRequestsLbl->setText("Chalet Rx req: ??");
// ui->mChaletTemperatureLbl->setText("Temperature: -100)");
return RET_OK;
@@ -207,12 +225,11 @@ int CChaletGui::UpdateChaletStatus(CChaletMainStatus Status)
QString Voltage = QString("Battery Voltage: %1").arg(Status.mBatteryVoltage);
ui->mBatteryVoltageLabel->setText(Voltage);
QString Current = QString("Raw Solar Panel Current: %1").arg(Status.mBatteryCurrent);
QString Current = QString("Raw Solar Panel Current: %1").arg(Status.mBatteryCurrent - 2);
ui->mSolarPanelCurrentLabel->setText(Current);
float ConvertedCurrent = (float)Status.mBatteryCurrent * (3.3/1023); //*0.080645; // 3.3/(1023*0.04) = 0.080645;
ConvertedCurrent -= (3.3/2);
ConvertedCurrent *= 25;
float ConvertedCurrent = (float)(Status.mBatteryCurrent - 2) * (3.3/1023); //*0.080645; // 3.3/(1023*0.04) = 0.080645;
ConvertedCurrent /= 0.08;
QString CnvCurrent = QString("Solar Panel Current (A): %1").arg(ConvertedCurrent);
ui->mSolarPanelCurrentCnvLbl->setText(CnvCurrent);
@@ -225,6 +242,16 @@ int CChaletGui::UpdateChaletStatus(CChaletMainStatus Status)
ui->mLostReqPercentLbl->setText(Percent);
QString ChaletRxCnt = QString("Chalet Rx req: %1, Master Tx cmds: %2, Master lost reqs: %3").arg(Status.mTotalNbChaletRxCmds).arg(Status.mTotalMasterTxCmds).arg(Status.mMasterLostRequestCount);
ui->mTotalRxTxRequestsLbl->setText(ChaletRxCnt);
if(mChaletLastLostReqCount != Status.mMasterLostRequestCount)
{
QString ChaletLostReqStats = QString("Master --> Chalet: %1\nChalet --> Master: %2").arg((Status.mTotalMasterTxCmds-Status.mTotalNbChaletRxCmds)).arg(Status.mMasterLostRequestCount-(Status.mTotalMasterTxCmds-Status.mTotalNbChaletRxCmds));
ui->mLostReqsStatsLbl->setText(ChaletLostReqStats);
}
mChaletLastLostReqCount = Status.mMasterLostRequestCount;
if(Status.mStatusToggleBit != LastToggle)
{
LastToggle = Status.mStatusToggleBit;
@@ -346,20 +373,24 @@ void CChaletGui::RebootCPUButtonClicked()
void CChaletGui::GetDeviceWiFiParamsButtonClicked(bool state)
{
mProgramHandle->RequestDeviceWifiParams();
}
void CChaletGui::SetDeviceWiFiParamsButtonClicked(bool state)
{
if(mProgramHandle->SetDeviceWifiParams(ui->mWiFiIPAddressEditBx->text(),ui->mWiFiGatewayAddressEditBx->text()) == RET_ERROR)
{
QMessageBox::critical(this,"IP error","Invalid IP address");
}
}
void CChaletGui::UpdateDeviceWiFiParameters(QHostAddress IP, QHostAddress Gateway)
bool UseDHCP = ui->mDHCPEnableChkBx->isChecked();
if(mProgramHandle->SetDeviceWifiParams(ui->mWiFiIPAddressEditBx->text(),ui->mWiFiGatewayAddressEditBx->text(),UseDHCP,ui->mWifiAccessPtNameEditBx->text(),ui->mWifiPasswordEditBx->text()) == RET_ERROR)
{
QMessageBox::critical(this,"IP error","Invalid IP address");
}
}
void CChaletGui::UpdateDeviceWiFiParameters(QHostAddress IP, QHostAddress Gateway, QString APName, QString APPassword, bool UseDHCP)
{
ui->mWiFiIPAddressEditBx->setText(IP.toString());
ui->mWiFiGatewayAddressEditBx->setText(Gateway.toString());
ui->mWifiAccessPtNameEditBx->setText(APName);
ui->mWifiPasswordEditBx->setText(APPassword);
ui->mDHCPEnableChkBx->setChecked(UseDHCP);
QPalette pal = ui->mWiFiGetRemoteSettingsBtn->palette();
pal.setColor(QPalette::Button, QColor(Qt::green));
@@ -375,6 +406,14 @@ void CChaletGui::RebootCPUButtonClicked()
mProgramHandle->RequestFirmwareVersion();
}
void CChaletGui::ResetCommStatsBtnClicked()
{
mChaletLastLostReqCount = 0;
QString ChaletLostReqStats = QString("Master --> Chalet: 0\nChalet --> Master: 0");
ui->mLostReqsStatsLbl->setText(ChaletLostReqStats);
mProgramHandle->RequestClearCommStats();
}
void CChaletGui::UpdateFirmwareVersion(QByteArray Version)
{
QString VersionString(Version);
@@ -391,17 +430,43 @@ void CChaletGui::RebootCPUButtonClicked()
}
void CChaletGui::UpdateDeviceWifiStatus(char WifiState, QHostAddress IP)
{
QString Txt = QString("Module IP Address: %1").arg(IP.toString());
ui->mModuleIPAddressLbl->setText(Txt);
mModuleIPAddress = IP;
}
void CChaletGui::StartSyslogShellBtnClicked()
{
//system("c:\\progra~1\\putty\\putty.exe -load \"0-ChaletDuino_Syslog\"");
// QProcess Putty;
QProcess::startDetached("c:\\progra~1\\putty\\putty.exe -load \"0-ChaletDuino_Syslog\"");
//QProcess::startDetached("c:\\progra~1\\putty\\putty.exe -load \"0-ChaletDuino_Syslog\"");
if(mModuleIPAddress.isNull() || mModuleIPAddress.isBroadcast())
{
QProcess::startDetached("c:\\progra~1\\putty\\putty.exe -load \"0-ChaletDuino_Syslog\"");
}
else
{
QString Proc = QString("c:\\progra~1\\putty\\putty.exe -raw -P 87 %1").arg(mModuleIPAddress.toString());
QProcess::startDetached(Proc);
}
}
void CChaletGui::StartTerminalShellBtnClicked()
{
// system("c:\\program files\\putty\\putty.exe -load \"0-ChaletDuino_Terminal\"");
QProcess::startDetached("c:\\progra~1\\putty\\putty.exe -load \"0-ChaletDuino_Terminal\"");
// QProcess::startDetached("c:\\progra~1\\putty\\putty.exe -load \"0-ChaletDuino_Terminal\"");
if(mModuleIPAddress.isNull() || mModuleIPAddress.isBroadcast())
{
QProcess::startDetached("c:\\progra~1\\putty\\putty.exe -load \"0-ChaletDuino_Terminal\"");
}
else
{
QString Proc = QString("c:\\progra~1\\putty\\putty.exe -raw -P 85 %1").arg(mModuleIPAddress.toString());
QProcess::startDetached(Proc);
}
}
void CChaletGui::GetFirmwVersionBtnColorTimerExpired()
@@ -417,3 +482,9 @@ void CChaletGui::RebootCPUButtonClicked()
ui->mWiFiGetRemoteSettingsBtn->setPalette(mFirmVersionDefaultBtnPal);
ui->mWiFiGetRemoteSettingsBtn->update();
}
void CChaletGui::GetModuleWifiStatusBtnClicked()
{
ui->mModuleIPAddressLbl->setText("Module IP Address: ");
mProgramHandle->RequestWifiStatus();
}
+6 -1
View File
@@ -28,6 +28,8 @@ public:
int ChaletCommActivity();
QTimer *mGetWifiParamsButtonColorTimer, *mGetFimwVersionButtonColorTimer;
QPalette mFirmVersionDefaultBtnPal, mWifiDefaultBtnPal;
int mChaletLastLostReqCount;
QHostAddress mModuleIPAddress;
private:
Ui::CChaletGui *ui;
@@ -43,13 +45,16 @@ public slots:
void GetChaletLogsBtnClicked();
void GetDeviceWiFiParamsButtonClicked(bool);
void SetDeviceWiFiParamsButtonClicked(bool);
void UpdateDeviceWiFiParameters(QHostAddress IP,QHostAddress Gateway);
void UpdateDeviceWiFiParameters(QHostAddress IP,QHostAddress Gateway,QString APName, QString APPassword, bool UseDHCP);
void GetFirmwareVersionBtnClicked();
void UpdateFirmwareVersion(QByteArray Version);
void StartSyslogShellBtnClicked();
void StartTerminalShellBtnClicked();
void GetWifiParamsBtnColorTimerExpired();
void GetFirmwVersionBtnColorTimerExpired();
void ResetCommStatsBtnClicked();
void UpdateDeviceWifiStatus(char WifiState, QHostAddress IP);
void GetModuleWifiStatusBtnClicked();
};
+350 -119
View File
@@ -268,8 +268,8 @@
<widget class="QLabel" name="mLostReqPercentLbl">
<property name="geometry">
<rect>
<x>600</x>
<y>190</y>
<x>430</x>
<y>160</y>
<width>241</width>
<height>16</height>
</rect>
@@ -291,8 +291,8 @@
<widget class="QLabel" name="mChaletCommActivityLbl">
<property name="geometry">
<rect>
<x>600</x>
<y>170</y>
<x>430</x>
<y>140</y>
<width>47</width>
<height>16</height>
</rect>
@@ -304,8 +304,8 @@
<widget class="QLabel" name="mLasCommRequestReceivedLbl">
<property name="geometry">
<rect>
<x>600</x>
<y>150</y>
<x>430</x>
<y>120</y>
<width>301</width>
<height>16</height>
</rect>
@@ -317,7 +317,7 @@
<widget class="QDateEdit" name="mLogStartDateEdit">
<property name="geometry">
<rect>
<x>780</x>
<x>520</x>
<y>210</y>
<width>110</width>
<height>22</height>
@@ -327,7 +327,7 @@
<widget class="QPushButton" name="mGetChaletLogButton">
<property name="geometry">
<rect>
<x>900</x>
<x>640</x>
<y>210</y>
<width>75</width>
<height>23</height>
@@ -350,112 +350,193 @@
<string>Temperature:</string>
</property>
</widget>
<widget class="QLineEdit" name="mWiFiIPAddressEditBx">
<property name="geometry">
<rect>
<x>160</x>
<y>430</y>
<width>221</width>
<height>20</height>
</rect>
</property>
<property name="text">
<string>?</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
<widget class="QPushButton" name="mWiFiGetRemoteSettingsBtn">
<property name="geometry">
<rect>
<x>160</x>
<y>400</y>
<width>75</width>
<height>23</height>
</rect>
</property>
<property name="text">
<string>GET</string>
</property>
</widget>
<widget class="QPushButton" name="mWiFiSetRemoteSettingsBtn">
<property name="geometry">
<rect>
<x>250</x>
<y>400</y>
<width>75</width>
<height>23</height>
</rect>
</property>
<property name="text">
<string>SET</string>
</property>
</widget>
<widget class="QLabel" name="label">
<property name="geometry">
<rect>
<x>90</x>
<y>430</y>
<width>71</width>
<height>20</height>
</rect>
</property>
<property name="font">
<font>
<pointsize>10</pointsize>
</font>
</property>
<property name="text">
<string>IP Address:</string>
</property>
</widget>
<widget class="QLineEdit" name="mWiFiGatewayAddressEditBx">
<property name="geometry">
<rect>
<x>160</x>
<y>460</y>
<width>221</width>
<height>20</height>
</rect>
</property>
<property name="text">
<string>?</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
<widget class="QLabel" name="label_2">
<property name="geometry">
<rect>
<x>90</x>
<y>460</y>
<width>71</width>
<height>20</height>
</rect>
</property>
<property name="font">
<font>
<pointsize>10</pointsize>
</font>
</property>
<property name="text">
<string>Gatweway:</string>
</property>
</widget>
<widget class="QGroupBox" name="groupBox_2">
<property name="geometry">
<rect>
<x>80</x>
<y>370</y>
<x>70</x>
<y>380</y>
<width>321</width>
<height>131</height>
<height>231</height>
</rect>
</property>
<property name="title">
<string>WiFi parameters (stored in flash)</string>
</property>
<widget class="QLineEdit" name="mWifiAccessPtNameEditBx">
<property name="geometry">
<rect>
<x>80</x>
<y>110</y>
<width>221</width>
<height>20</height>
</rect>
</property>
<property name="text">
<string>?</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
<widget class="QLabel" name="mAccessPtNameLabel">
<property name="geometry">
<rect>
<x>10</x>
<y>110</y>
<width>71</width>
<height>20</height>
</rect>
</property>
<property name="font">
<font>
<pointsize>10</pointsize>
</font>
</property>
<property name="text">
<string>Access Pt:</string>
</property>
</widget>
<widget class="QLabel" name="mAccessPtPassLbl">
<property name="geometry">
<rect>
<x>10</x>
<y>140</y>
<width>71</width>
<height>20</height>
</rect>
</property>
<property name="font">
<font>
<pointsize>10</pointsize>
</font>
</property>
<property name="text">
<string>Password:</string>
</property>
</widget>
<widget class="QLineEdit" name="mWifiPasswordEditBx">
<property name="geometry">
<rect>
<x>80</x>
<y>140</y>
<width>221</width>
<height>20</height>
</rect>
</property>
<property name="text">
<string>?</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
<widget class="QLabel" name="label">
<property name="geometry">
<rect>
<x>10</x>
<y>50</y>
<width>71</width>
<height>20</height>
</rect>
</property>
<property name="font">
<font>
<pointsize>10</pointsize>
</font>
</property>
<property name="text">
<string>IP Address:</string>
</property>
</widget>
<widget class="QLineEdit" name="mWiFiIPAddressEditBx">
<property name="geometry">
<rect>
<x>80</x>
<y>50</y>
<width>221</width>
<height>20</height>
</rect>
</property>
<property name="text">
<string>?</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
<widget class="QLabel" name="label_2">
<property name="geometry">
<rect>
<x>10</x>
<y>80</y>
<width>71</width>
<height>20</height>
</rect>
</property>
<property name="font">
<font>
<pointsize>10</pointsize>
</font>
</property>
<property name="text">
<string>Gatweway:</string>
</property>
</widget>
<widget class="QLineEdit" name="mWiFiGatewayAddressEditBx">
<property name="geometry">
<rect>
<x>80</x>
<y>80</y>
<width>221</width>
<height>20</height>
</rect>
</property>
<property name="text">
<string>?</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
<widget class="QCheckBox" name="mDHCPEnableChkBx">
<property name="geometry">
<rect>
<x>20</x>
<y>20</y>
<width>70</width>
<height>17</height>
</rect>
</property>
<property name="text">
<string>DHCP</string>
</property>
</widget>
<widget class="QPushButton" name="mWiFiGetRemoteSettingsBtn">
<property name="geometry">
<rect>
<x>70</x>
<y>180</y>
<width>75</width>
<height>23</height>
</rect>
</property>
<property name="text">
<string>GET</string>
</property>
</widget>
<widget class="QPushButton" name="mWiFiSetRemoteSettingsBtn">
<property name="geometry">
<rect>
<x>170</x>
<y>180</y>
<width>75</width>
<height>23</height>
</rect>
</property>
<property name="text">
<string>SET</string>
</property>
</widget>
</widget>
<widget class="QLabel" name="mSolarPanelCurrentCnvLbl">
<property name="geometry">
@@ -473,8 +554,8 @@
<widget class="QLabel" name="mFirmwareVersionLabel">
<property name="geometry">
<rect>
<x>180</x>
<y>520</y>
<x>510</x>
<y>590</y>
<width>231</width>
<height>20</height>
</rect>
@@ -491,8 +572,8 @@
<widget class="QPushButton" name="mGetFirmwareVersionBtn">
<property name="geometry">
<rect>
<x>90</x>
<y>520</y>
<x>420</x>
<y>590</y>
<width>75</width>
<height>23</height>
</rect>
@@ -504,8 +585,8 @@
<widget class="QPushButton" name="mStartTerminalShellBtn">
<property name="geometry">
<rect>
<x>60</x>
<y>590</y>
<x>420</x>
<y>620</y>
<width>75</width>
<height>23</height>
</rect>
@@ -517,8 +598,8 @@
<widget class="QPushButton" name="mStartSyslogShellBtn">
<property name="geometry">
<rect>
<x>150</x>
<y>590</y>
<x>510</x>
<y>620</y>
<width>75</width>
<height>23</height>
</rect>
@@ -527,6 +608,156 @@
<string>Syslog</string>
</property>
</widget>
<widget class="QLabel" name="mTotalRxTxRequestsLbl">
<property name="geometry">
<rect>
<x>430</x>
<y>180</y>
<width>521</width>
<height>16</height>
</rect>
</property>
<property name="text">
<string>Chalet Rx Req :</string>
</property>
</widget>
<widget class="QPushButton" name="mResetCommStatsBtn">
<property name="geometry">
<rect>
<x>420</x>
<y>100</y>
<width>101</width>
<height>23</height>
</rect>
</property>
<property name="text">
<string>Reset Comm Stats</string>
</property>
</widget>
<widget class="QLabel" name="mLostReqsStatsLbl">
<property name="geometry">
<rect>
<x>700</x>
<y>140</y>
<width>241</width>
<height>41</height>
</rect>
</property>
<property name="text">
<string>Master --&gt; Chalet: ??
Chalet --&gt; Master: ??</string>
</property>
</widget>
<widget class="QPushButton" name="mGetWifiStatusBtn">
<property name="geometry">
<rect>
<x>820</x>
<y>590</y>
<width>61</width>
<height>23</height>
</rect>
</property>
<property name="text">
<string>GET</string>
</property>
</widget>
<widget class="QLabel" name="mModuleIPAddressLbl">
<property name="geometry">
<rect>
<x>890</x>
<y>590</y>
<width>341</width>
<height>16</height>
</rect>
</property>
<property name="font">
<font>
<pointsize>10</pointsize>
</font>
</property>
<property name="text">
<string>Module IP Address:</string>
</property>
</widget>
<widget class="QGroupBox" name="mLoraIFGroupBox">
<property name="geometry">
<rect>
<x>890</x>
<y>20</y>
<width>541</width>
<height>201</height>
</rect>
</property>
<property name="title">
<string>Lora module Interface</string>
</property>
<widget class="QLabel" name="mLoraIFModuleType">
<property name="geometry">
<rect>
<x>10</x>
<y>20</y>
<width>131</width>
<height>61</height>
</rect>
</property>
<property name="text">
<string>Module Type: ???
Module state: ??</string>
</property>
</widget>
<widget class="QSpinBox" name="mLoraChannelSpinBox">
<property name="geometry">
<rect>
<x>470</x>
<y>30</y>
<width>51</width>
<height>22</height>
</rect>
</property>
</widget>
<widget class="QSpinBox" name="mLoraAddressSpinBox">
<property name="geometry">
<rect>
<x>470</x>
<y>50</y>
<width>51</width>
<height>22</height>
</rect>
</property>
</widget>
<widget class="QLabel" name="label_3">
<property name="geometry">
<rect>
<x>378</x>
<y>30</y>
<width>81</width>
<height>20</height>
</rect>
</property>
<property name="text">
<string>Module Channel</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
<widget class="QLabel" name="label_4">
<property name="geometry">
<rect>
<x>380</x>
<y>51</y>
<width>81</width>
<height>20</height>
</rect>
</property>
<property name="text">
<string>Module Address</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</widget>
<zorder>groupBox_2</zorder>
<zorder>groupBox</zorder>
<zorder>MainPageLabel</zorder>
@@ -552,17 +783,17 @@
<zorder>mLogStartDateEdit</zorder>
<zorder>mGetChaletLogButton</zorder>
<zorder>mChaletTemperatureLbl</zorder>
<zorder>mWiFiIPAddressEditBx</zorder>
<zorder>mWiFiGetRemoteSettingsBtn</zorder>
<zorder>mWiFiSetRemoteSettingsBtn</zorder>
<zorder>label</zorder>
<zorder>mWiFiGatewayAddressEditBx</zorder>
<zorder>label_2</zorder>
<zorder>mSolarPanelCurrentCnvLbl</zorder>
<zorder>mFirmwareVersionLabel</zorder>
<zorder>mGetFirmwareVersionBtn</zorder>
<zorder>mStartTerminalShellBtn</zorder>
<zorder>mStartSyslogShellBtn</zorder>
<zorder>mTotalRxTxRequestsLbl</zorder>
<zorder>mResetCommStatsBtn</zorder>
<zorder>mLostReqsStatsLbl</zorder>
<zorder>mGetWifiStatusBtn</zorder>
<zorder>mModuleIPAddressLbl</zorder>
<zorder>mLoraIFGroupBox</zorder>
</widget>
<resources/>
<connections/>
@@ -99,6 +99,11 @@ int CChaletMasterCtrlInterface::DeviceFrameReceived(int TargetDeviceID, int Targ
mProgramHandle->DeviceFirmwareVersionReceived(Data);
break;
}
case CHALET_INTERFACE_GET_WIFI_STATUS_RESPONSE:
{
mProgramHandle->WifiStatusReceived(Data);
break;
}
case CHALET_INTERFACE_GENERAL_STATUS_REQUEST:
case CHALET_INTERFACE_AC_POWER_STATE_STATUS_REQUEST:
case CHALET_INTERFACE_AC_POWER_SET_STATE_REQUEST: