diff --git a/Sources/AvReceiver/AvReceiver.cpp b/Sources/AvReceiver/AvReceiver.cpp
index 7821cfb..c67fcbb 100644
--- a/Sources/AvReceiver/AvReceiver.cpp
+++ b/Sources/AvReceiver/AvReceiver.cpp
@@ -27,40 +27,40 @@ int CAvReceiver::Start()
}
-int CAvReceiver::SpeakerBToggleSwitchPressed(bool state)
+int CAvReceiver::Zone2ToggleSwitchPressed(bool state)
{
- QByteArray SpkrState;
- SpkrState.clear();
+ QByteArray ZoneState;
+ ZoneState.clear();
if(state)
{
- SpkrState.append((char)0x01);
+ ZoneState.append((char)0x01);
}
else
{
- SpkrState.append((char)0x00);
+ ZoneState.append((char)0x00);
}
- return mNetworkInterface->SendMasterCtrlCommand(AV_RECEIVER_INTERFACE_SET_SPEAKERB_REQUEST,SpkrState);
+ return mNetworkInterface->SendMasterCtrlCommand(AV_RECEIVER_INTERFACE_SET_ZONE2_REQUEST,ZoneState);
}
-int CAvReceiver::SpeakerAToggleSwitchPressed(bool state)
+int CAvReceiver::MainUnitToggleSwitchPressed(bool state)
{
- QByteArray SpkrState;
- SpkrState.clear();
+ QByteArray ZoneState;
+ ZoneState.clear();
if(state)
{
- SpkrState.append((char)0x01);
+ ZoneState.append((char)0x01);
}
else
{
- SpkrState.append((char)0x00);
+ ZoneState.append((char)0x00);
}
- return mNetworkInterface->SendMasterCtrlCommand(AV_RECEIVER_INTERFACE_SET_SPEAKERA_REQUEST,SpkrState);
+ return mNetworkInterface->SendMasterCtrlCommand(AV_RECEIVER_INTERFACE_SET_MAIN_ZONE_REQUEST,ZoneState);
}
@@ -71,6 +71,11 @@ void CAvReceiver::PollTimerExpired()
int CAvReceiver::ReceiverGeneralStatusReceived(QByteArray StatusData)
{
- mReceiverStatus.FromByteArray(StatusData);
- mReceiverGui->UpdateReceiverStatus(mReceiverStatus);
+ QDataStream Strm(&StatusData,QIODevice::ReadOnly | QIODevice::Unbuffered);
+ Strm.device()->seek(0);
+
+ Strm >> mReceiverStatus;
+ Strm >> mZone2Status;
+ mReceiverGui->UpdateReceiverStatus(mReceiverStatus, mZone2Status);
+ return RET_OK;
}
diff --git a/Sources/AvReceiver/AvReceiver.h b/Sources/AvReceiver/AvReceiver.h
index 439d575..ebfb8d7 100644
--- a/Sources/AvReceiver/AvReceiver.h
+++ b/Sources/AvReceiver/AvReceiver.h
@@ -17,8 +17,8 @@ public:
int Start();
- int SpeakerBToggleSwitchPressed(bool state);
- int SpeakerAToggleSwitchPressed(bool state);
+ int Zone2ToggleSwitchPressed(bool state);
+ int MainUnitToggleSwitchPressed(bool state);
int ReceiverGeneralStatusReceived(QByteArray StatusData);
CAvReceiverNetworkCtrlInterface *mNetworkInterface;
@@ -27,6 +27,7 @@ public:
private:
CAvReceiverMainStatus mReceiverStatus;
+ CAvReceiverMainStatus mZone2Status;
public slots:
void PollTimerExpired();
diff --git a/Sources/AvReceiver/AvReceiverData.cpp b/Sources/AvReceiver/AvReceiverData.cpp
index f8ace7a..3196332 100644
--- a/Sources/AvReceiver/AvReceiverData.cpp
+++ b/Sources/AvReceiver/AvReceiverData.cpp
@@ -20,8 +20,6 @@ QByteArray CAvReceiverMainStatus::ToByteArray()
Strm << mIsMute;
Strm << mInput;
Strm << mProgram;
- Strm << mSpeakerAState;
- Strm << mSpeakerBState;
Strm << mDataValid;
Strm << mReceiverOnline;
@@ -41,8 +39,6 @@ int CAvReceiverMainStatus::FromByteArray(QByteArray Data)
Strm >> mIsMute;
Strm >> mInput;
Strm >> mProgram;
- Strm >> mSpeakerAState;
- Strm >> mSpeakerBState;
Strm >> mDataValid;
Strm >> mReceiverOnline;
@@ -50,3 +46,29 @@ int CAvReceiverMainStatus::FromByteArray(QByteArray Data)
return RET_OK;
}
+QDataStream &operator<<(QDataStream &out, const CAvReceiverMainStatus &source)
+{
+ out << source.mMainPwrStatus
+ << source.mMainSleepStatus
+ << source.mMainVolume
+ << source.mIsMute
+ << source.mInput
+ << source.mProgram
+ << source.mDataValid
+ << source.mReceiverOnline;
+
+ return out;
+}
+
+QDataStream &operator>>(QDataStream &in, CAvReceiverMainStatus &dest)
+{
+ in >> dest.mMainPwrStatus
+ >> dest.mMainSleepStatus
+ >> dest.mMainVolume
+ >> dest.mIsMute
+ >> dest.mInput
+ >> dest.mProgram
+ >> dest.mDataValid
+ >> dest.mReceiverOnline;
+ return in;
+}
diff --git a/Sources/AvReceiver/AvReceiverData.h b/Sources/AvReceiver/AvReceiverData.h
index 28c4c02..ff6924e 100644
--- a/Sources/AvReceiver/AvReceiverData.h
+++ b/Sources/AvReceiver/AvReceiverData.h
@@ -19,12 +19,12 @@ public:
bool mIsMute;
QString mInput;
QString mProgram;
- bool mSpeakerAState;
- bool mSpeakerBState;
bool mDataValid;
bool mReceiverOnline;
};
+QDataStream &operator<<(QDataStream &out, const CAvReceiverMainStatus &source);
+QDataStream &operator>>(QDataStream &in, CAvReceiverMainStatus &dest);
#endif // AVRECEIVERDATA_H
diff --git a/Sources/AvReceiver/AvReceiverGui.cpp b/Sources/AvReceiver/AvReceiverGui.cpp
index e2d2e25..ea423b6 100644
--- a/Sources/AvReceiver/AvReceiverGui.cpp
+++ b/Sources/AvReceiver/AvReceiverGui.cpp
@@ -9,8 +9,8 @@ CAvReceiverGui::CAvReceiverGui(QWidget *parent) :
{
ui->setupUi(this);
- connect(ui->mSpkBCheckBox,SIGNAL(toggled(bool)),this,SLOT(SpeakerBRadioClicked(bool)));
- connect(ui->mSpkACheckBox,SIGNAL(toggled(bool)),this,SLOT(SpeakerARadioClicked(bool)));
+ connect(ui->mSpkBCheckBox,SIGNAL(clicked(bool)),this,SLOT(SpeakerBRadioClicked(bool)));
+ connect(ui->mSpkACheckBox,SIGNAL(clicked(bool)),this,SLOT(SpeakerARadioClicked(bool)));
}
CAvReceiverGui::~CAvReceiverGui()
@@ -20,29 +20,31 @@ CAvReceiverGui::~CAvReceiverGui()
void CAvReceiverGui::SpeakerBRadioClicked(bool checked)
{
- mProgramHandle->SpeakerBToggleSwitchPressed(checked);
+ mProgramHandle->Zone2ToggleSwitchPressed(checked);
}
void CAvReceiverGui::SpeakerARadioClicked(bool checked)
{
- mProgramHandle->SpeakerAToggleSwitchPressed(checked);
+ mProgramHandle->MainUnitToggleSwitchPressed(checked);
}
-int CAvReceiverGui::UpdateReceiverStatus(CAvReceiverMainStatus Status)
+int CAvReceiverGui::UpdateReceiverStatus(CAvReceiverMainStatus Status, CAvReceiverMainStatus Zone2Status)
{
QString StatusText;
StatusText.clear();
- StatusText += "Receiver Status:\n\n";
+ StatusText += "Main Receiver Status:\n\n";
StatusText += "Power: ";
if(Status.mMainPwrStatus == true)
{
StatusText += "ON\n";
+ ui->mSpkACheckBox->setChecked(true);
}
else
{
StatusText += "OFF\n";
+ ui->mSpkACheckBox->setChecked(false);
}
StatusText += "Mute: ";
@@ -75,20 +77,17 @@ int CAvReceiverGui::UpdateReceiverStatus(CAvReceiverMainStatus Status)
StatusText +=Status.mProgram;
StatusText += "\n";
- StatusText += "Zone A: ";
- if(Status.mSpeakerAState == true)
- {
- StatusText += "ON\n";
- ui->mSpkACheckBox->setChecked(true);
- }
- else
- {
- StatusText += "OFF\n";
- ui->mSpkACheckBox->setChecked(false);
- }
+ ui->mRcvrStatusLabel->setText(StatusText);
- StatusText += "Zone B: ";
- if(Status.mSpeakerBState == true)
+
+
+
+
+
+ StatusText = "Zone2 Status\n\n";
+
+ StatusText += "Power: ";
+ if(Zone2Status.mMainPwrStatus == true)
{
StatusText += "ON\n";
ui->mSpkBCheckBox->setChecked(true);
@@ -99,6 +98,38 @@ int CAvReceiverGui::UpdateReceiverStatus(CAvReceiverMainStatus Status)
ui->mSpkBCheckBox->setChecked(false);
}
+ StatusText += "Mute: ";
+ if(Zone2Status.mIsMute == true)
+ {
+ StatusText += "ON\n";
+ }
+ else
+ {
+ StatusText += "OFF\n";
+ }
- ui->mRcvrStatusLabel->setText(StatusText);
+ StatusText += "Main sleep: ";
+ if(Zone2Status.mMainSleepStatus == true)
+ {
+ StatusText += "ON\n";
+
+ }
+ else
+ {
+ StatusText += "OFF\n";
+ }
+
+ StatusText += "Volume: ";
+ StatusText += QString("%1").arg(Zone2Status.mMainVolume);
+ StatusText +="\n";
+ StatusText += "Input: ";
+ StatusText +=Zone2Status.mInput;
+ StatusText += "\n";
+ StatusText += "Program: ";
+ StatusText +=Zone2Status.mProgram;
+ StatusText += "\n";
+
+ ui->mZone2StatusLabel->setText(StatusText);
+
+ return RET_OK;
}
diff --git a/Sources/AvReceiver/AvReceiverGui.h b/Sources/AvReceiver/AvReceiverGui.h
index ad9e66f..30ac5bf 100644
--- a/Sources/AvReceiver/AvReceiverGui.h
+++ b/Sources/AvReceiver/AvReceiverGui.h
@@ -19,7 +19,7 @@ public:
CAvReceiver *mProgramHandle;
- int UpdateReceiverStatus(CAvReceiverMainStatus Status);
+ int UpdateReceiverStatus(CAvReceiverMainStatus Status, CAvReceiverMainStatus Zone2Status);
private:
Ui::CAvReceiverGui *ui;
diff --git a/Sources/AvReceiver/AvReceiverGui.ui b/Sources/AvReceiver/AvReceiverGui.ui
index 0170e59..624d0f5 100644
--- a/Sources/AvReceiver/AvReceiverGui.ui
+++ b/Sources/AvReceiver/AvReceiverGui.ui
@@ -29,8 +29,8 @@
- 100
- 110
+ 50
+ 130
181
231
@@ -42,27 +42,40 @@
- 570
- 130
+ 280
+ 110
70
17
- Speaker B
+ Zone 2
- 570
- 160
+ 50
+ 110
70
17
- Speaker A
+ Main Zone
+
+
+
+
+
+ 300
+ 140
+ 171
+ 191
+
+
+
+ TextLabel
diff --git a/Sources/AvReceiver/AvReceiverNetworkCtrlInterface.cpp b/Sources/AvReceiver/AvReceiverNetworkCtrlInterface.cpp
index cf0848d..a9e3d70 100644
--- a/Sources/AvReceiver/AvReceiverNetworkCtrlInterface.cpp
+++ b/Sources/AvReceiver/AvReceiverNetworkCtrlInterface.cpp
@@ -39,7 +39,7 @@ int CAvReceiverNetworkCtrlInterface::DeviceFrameReceived(int TargetDeviceID, int
break;
}
- case AV_RECEIVER_INTERFACE_SET_SPEAKERB_RESPONSE:
+ case AV_RECEIVER_INTERFACE_SET_ZONE2_RESPONSE:
{
break;
}
@@ -50,7 +50,7 @@ int CAvReceiverNetworkCtrlInterface::DeviceFrameReceived(int TargetDeviceID, int
}
case AV_RECEIVER_INTERFACE_GENERAL_STATUS_REQUEST:
case AV_RECEIVER_INTERFACE_SET_MAIN_POWER_REQUEST:
- case AV_RECEIVER_INTERFACE_SET_SPEAKERB_REQUEST:
+ case AV_RECEIVER_INTERFACE_SET_ZONE2_REQUEST:
case AV_RECEIVER_INTERFACE_SEND_DIRECT_CMD_REQUEST:
default:
{
diff --git a/Sources/Chalet/CChalet.cpp b/Sources/Chalet/CChalet.cpp
index e9e062b..c38093c 100644
--- a/Sources/Chalet/CChalet.cpp
+++ b/Sources/Chalet/CChalet.cpp
@@ -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;
diff --git a/Sources/Chalet/CChalet.h b/Sources/Chalet/CChalet.h
index 475a598..694675f 100644
--- a/Sources/Chalet/CChalet.h
+++ b/Sources/Chalet/CChalet.h
@@ -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:
diff --git a/Sources/Chalet/ChaletData.cpp b/Sources/Chalet/ChaletData.cpp
index ede2247..d719c6b 100644
--- a/Sources/Chalet/ChaletData.cpp
+++ b/Sources/Chalet/ChaletData.cpp
@@ -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;
}
diff --git a/Sources/Chalet/ChaletData.h b/Sources/Chalet/ChaletData.h
index 01b3287..e997ad3 100644
--- a/Sources/Chalet/ChaletData.h
+++ b/Sources/Chalet/ChaletData.h
@@ -58,6 +58,10 @@ public:
float mLostRequestPercentage;
+ int mTotalNbChaletRxCmds;
+ int mTotalMasterTxCmds;
+ int mMasterLostRequestCount;
+
};
QDataStream &operator>>(QDataStream &in, CChaletMainStatus &dest);
diff --git a/Sources/Chalet/ChaletGui.cpp b/Sources/Chalet/ChaletGui.cpp
index fc34a06..3a61f13 100644
--- a/Sources/Chalet/ChaletGui.cpp
+++ b/Sources/Chalet/ChaletGui.cpp
@@ -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();
+ }
diff --git a/Sources/Chalet/ChaletGui.h b/Sources/Chalet/ChaletGui.h
index c864f09..4a7cd87 100644
--- a/Sources/Chalet/ChaletGui.h
+++ b/Sources/Chalet/ChaletGui.h
@@ -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();
};
diff --git a/Sources/Chalet/ChaletGui.ui b/Sources/Chalet/ChaletGui.ui
index 1a8ace1..c511ef1 100644
--- a/Sources/Chalet/ChaletGui.ui
+++ b/Sources/Chalet/ChaletGui.ui
@@ -268,8 +268,8 @@
- 600
- 190
+ 430
+ 160
241
16
@@ -291,8 +291,8 @@
- 600
- 170
+ 430
+ 140
47
16
@@ -304,8 +304,8 @@
- 600
- 150
+ 430
+ 120
301
16
@@ -317,7 +317,7 @@
- 780
+ 520
210
110
22
@@ -327,7 +327,7 @@
- 900
+ 640
210
75
23
@@ -350,112 +350,193 @@
Temperature:
-
-
-
- 160
- 430
- 221
- 20
-
-
-
- ?
-
-
- Qt::AlignCenter
-
-
-
-
-
- 160
- 400
- 75
- 23
-
-
-
- GET
-
-
-
-
-
- 250
- 400
- 75
- 23
-
-
-
- SET
-
-
-
-
-
- 90
- 430
- 71
- 20
-
-
-
-
- 10
-
-
-
- IP Address:
-
-
-
-
-
- 160
- 460
- 221
- 20
-
-
-
- ?
-
-
- Qt::AlignCenter
-
-
-
-
-
- 90
- 460
- 71
- 20
-
-
-
-
- 10
-
-
-
- Gatweway:
-
-
- 80
- 370
+ 70
+ 380
321
- 131
+ 231
WiFi parameters (stored in flash)
+
+
+
+ 80
+ 110
+ 221
+ 20
+
+
+
+ ?
+
+
+ Qt::AlignCenter
+
+
+
+
+
+ 10
+ 110
+ 71
+ 20
+
+
+
+
+ 10
+
+
+
+ Access Pt:
+
+
+
+
+
+ 10
+ 140
+ 71
+ 20
+
+
+
+
+ 10
+
+
+
+ Password:
+
+
+
+
+
+ 80
+ 140
+ 221
+ 20
+
+
+
+ ?
+
+
+ Qt::AlignCenter
+
+
+
+
+
+ 10
+ 50
+ 71
+ 20
+
+
+
+
+ 10
+
+
+
+ IP Address:
+
+
+
+
+
+ 80
+ 50
+ 221
+ 20
+
+
+
+ ?
+
+
+ Qt::AlignCenter
+
+
+
+
+
+ 10
+ 80
+ 71
+ 20
+
+
+
+
+ 10
+
+
+
+ Gatweway:
+
+
+
+
+
+ 80
+ 80
+ 221
+ 20
+
+
+
+ ?
+
+
+ Qt::AlignCenter
+
+
+
+
+
+ 20
+ 20
+ 70
+ 17
+
+
+
+ DHCP
+
+
+
+
+
+ 70
+ 180
+ 75
+ 23
+
+
+
+ GET
+
+
+
+
+
+ 170
+ 180
+ 75
+ 23
+
+
+
+ SET
+
+
@@ -473,8 +554,8 @@
- 180
- 520
+ 510
+ 590
231
20
@@ -491,8 +572,8 @@
- 90
- 520
+ 420
+ 590
75
23
@@ -504,8 +585,8 @@
- 60
- 590
+ 420
+ 620
75
23
@@ -517,8 +598,8 @@
- 150
- 590
+ 510
+ 620
75
23
@@ -527,6 +608,156 @@
Syslog
+
+
+
+ 430
+ 180
+ 521
+ 16
+
+
+
+ Chalet Rx Req :
+
+
+
+
+
+ 420
+ 100
+ 101
+ 23
+
+
+
+ Reset Comm Stats
+
+
+
+
+
+ 700
+ 140
+ 241
+ 41
+
+
+
+ Master --> Chalet: ??
+Chalet --> Master: ??
+
+
+
+
+
+ 820
+ 590
+ 61
+ 23
+
+
+
+ GET
+
+
+
+
+
+ 890
+ 590
+ 341
+ 16
+
+
+
+
+ 10
+
+
+
+ Module IP Address:
+
+
+
+
+
+ 890
+ 20
+ 541
+ 201
+
+
+
+ Lora module Interface
+
+
+
+
+ 10
+ 20
+ 131
+ 61
+
+
+
+ Module Type: ???
+Module state: ??
+
+
+
+
+
+ 470
+ 30
+ 51
+ 22
+
+
+
+
+
+
+ 470
+ 50
+ 51
+ 22
+
+
+
+
+
+
+ 378
+ 30
+ 81
+ 20
+
+
+
+ Module Channel
+
+
+ Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
+
+
+
+
+
+ 380
+ 51
+ 81
+ 20
+
+
+
+ Module Address
+
+
+ Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
+
+
+
groupBox_2
groupBox
MainPageLabel
@@ -552,17 +783,17 @@
mLogStartDateEdit
mGetChaletLogButton
mChaletTemperatureLbl
- mWiFiIPAddressEditBx
- mWiFiGetRemoteSettingsBtn
- mWiFiSetRemoteSettingsBtn
- label
- mWiFiGatewayAddressEditBx
- label_2
mSolarPanelCurrentCnvLbl
mFirmwareVersionLabel
mGetFirmwareVersionBtn
mStartTerminalShellBtn
mStartSyslogShellBtn
+ mTotalRxTxRequestsLbl
+ mResetCommStatsBtn
+ mLostReqsStatsLbl
+ mGetWifiStatusBtn
+ mModuleIPAddressLbl
+ mLoraIFGroupBox
diff --git a/Sources/Chalet/ChaletMasterCtrlInterface.cpp b/Sources/Chalet/ChaletMasterCtrlInterface.cpp
index 243e7b5..c9c72fa 100644
--- a/Sources/Chalet/ChaletMasterCtrlInterface.cpp
+++ b/Sources/Chalet/ChaletMasterCtrlInterface.cpp
@@ -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:
diff --git a/Sources/Ispindel/Ispindel.cpp b/Sources/Ispindel/Ispindel.cpp
index eb7e9e8..a23e5a3 100644
--- a/Sources/Ispindel/Ispindel.cpp
+++ b/Sources/Ispindel/Ispindel.cpp
@@ -7,6 +7,7 @@ CIspindel::CIspindel(CIspindelGUI *IspindelGui)
mIspindelGui = IspindelGui;
IspindelGui->mProgramHandle = this;
mNetworkInterface = new CIspindelInterface(this);
+ mOG = 0.0;
}
@@ -42,10 +43,12 @@ void CIspindel::IspindelFullBufferReceived(QByteArray *Data)
mIspindelDataList.append(NewFrame);
}
-
+ mOG = mIspindelDataList.first()->mGravity;
SetLasFrameTextInGUI(*mIspindelDataList.last());
mIspindelGui->UpdateIspindelPlot(&mIspindelDataList);
+
+
}
void CIspindel::IspindelLastFrameReceived(QByteArray Data)
@@ -66,6 +69,19 @@ void CIspindel::IspindelLastFrameReceived(QByteArray Data)
// qDebug("Latest Ispindel data received");
}
+int CIspindel::DeleteSampleResponseReceived(QByteArray Data)
+{
+ bool Success;
+ QDataStream Strm(&Data,QIODevice::ReadOnly | QIODevice::Unbuffered);
+ Strm >> Success;
+
+ if(Success)
+ {
+ mNetworkInterface->SendMasterCtrlCommand(ISPINDEL_GET_FULL_DATA_BUFFER_REQUEST,QByteArray());
+ return RET_OK;
+ }
+ return RET_ERROR;
+}
void CIspindel::ClearIspindleDataList()
{
@@ -88,8 +104,9 @@ void CIspindel::ConnectedToMaster(bool connected)
void CIspindel::SetLasFrameTextInGUI(CIspindelData Frame)
{
QString FrameText;
+ QString ABVText;
- FrameText = QString("\nLast Frame:\n------------------------------\nAngle: %1\nBattery Voltage: %2\nGravity: %3\nSample Interval: %4\nIspindel ID: %5\nIspindel Name: %6\nRSSI: %7\nTemperature: %8%9\nSample date time: %10\n------------------------------")\
+ FrameText = QString("\nLast Frame:\n------------------------------\nAngle: %1\nBattery Voltage: %2\nGravity: %3\nSample Interval: %4\nIspindel ID: %5\nIspindel Name: %6\nRSSI: %7\nTemperature: %8%9 (%11F)\nSample date time: %10\n------------------------------")\
.arg(Frame.mAngle)\
.arg(Frame.mBattery)\
.arg(Frame.mGravity)\
@@ -98,26 +115,40 @@ void CIspindel::SetLasFrameTextInGUI(CIspindelData Frame)
.arg(Frame.mIspindelName)\
.arg(Frame.mRSSI)\
.arg(Frame.mTemperature).arg(Frame.mTemperatureUnits)\
- .arg(Frame.mSampleDateTime.toString("yyyy-MM-dd - hh:mm:ss"));
-// FrameText = QString("\nLast Frame\n\
-// Angle: %1\n\
-// Battery Voltage: %2\n\
-// Gravity: %3\n\
-// Sample Interval: %4\n\
-// Ispindel ID: %5\n\
-// Ispindel Name: %6\n\
-// RSSI: %7\n\
-// Temperature: %8%9\n\
-// Sample date time: %10")\
-// .arg(Frame.mAngle)\
-// .arg(Frame.mBattery)\
-// .arg(Frame.mGravity)\
-// .arg(Frame.mInterval)\
-// .arg(Frame.mIspindelID)\
-// .arg(Frame.mIspindelName)\
-// .arg(Frame.mRSSI)\
-// .arg(Frame.mTemperature).arg(Frame.mTemperatureUnits)\
-// .arg(Frame.mSampleDateTime.toString("yyyy-MM-dd - hh:mm:ss"));
+ .arg(Frame.mSampleDateTime.toString("yyyy-MM-dd - hh:mm:ss"))\
+ .arg(((Frame.mTemperature*9/5)+32));
- mIspindelGui->SetLastIspindelFrameData(FrameText);
+ if(mIspindelDataList.size() > 1)
+ {
+ float ABV = ((mOG - Frame.mGravity) * 131.25);
+ ABVText = QString("ABV : %1\%").arg(ABV);
+ }
+ else
+ {
+ ABVText = QString("ABV : ?\%");
+ }
+
+ mIspindelGui->SetLastIspindelFrameData(FrameText,ABVText);
+}
+
+int CIspindel::SetOGFromItem(int ItemIndex)
+{
+ if(ItemIndex >= mIspindelDataList.size())
+ return RET_ERROR;
+
+ mOG = mIspindelDataList.at(ItemIndex)->mGravity;
+ SetLasFrameTextInGUI(*mIspindelDataList.last());
+
+ return RET_OK;
+}
+
+int CIspindel::DeleteSample(int ItemIndex)
+{
+ if(ItemIndex >= mIspindelDataList.size())
+ return RET_ERROR;
+ QByteArray Data;
+ QDataStream Strm(&Data,QIODevice::WriteOnly | QIODevice::Unbuffered);
+ Strm << ItemIndex;
+
+ mNetworkInterface->SendMasterCtrlCommand(ISPINDEL_DELETE_SAMPLE_REQUEST,Data);
}
diff --git a/Sources/Ispindel/Ispindel.h b/Sources/Ispindel/Ispindel.h
index a5f6956..f723816 100644
--- a/Sources/Ispindel/Ispindel.h
+++ b/Sources/Ispindel/Ispindel.h
@@ -25,9 +25,13 @@ public:
void ClearIspindleDataList();
void ConnectedToMaster(bool connected);
void SetLasFrameTextInGUI(CIspindelData Frame);
+ int SetOGFromItem(int ItemIndex);
+ int DeleteSample(int ItemIndex);
+ int DeleteSampleResponseReceived(QByteArray Data);
QList mIspindelDataList;
CIspindelInterface *mNetworkInterface;
+ double mOG;
diff --git a/Sources/Ispindel/IspindelGUI.cpp b/Sources/Ispindel/IspindelGUI.cpp
index 3b78368..9123fa8 100644
--- a/Sources/Ispindel/IspindelGUI.cpp
+++ b/Sources/Ispindel/IspindelGUI.cpp
@@ -57,6 +57,13 @@ CIspindelGUI::CIspindelGUI(QWidget *parent) :
// mIspindelPlot->graph(1)->addData(now,20);
mIspindelPlot->replot();
+
+ ui->mSamplesTable->setColumnCount(4);
+ ui->mSamplesTable->setHorizontalHeaderLabels(QStringList() << "Sample" << "Date" << "Gravity" << "Temperature");
+
+ connect(ui->mSetOGBtn,SIGNAL(clicked(bool)),this,SLOT(SetOGButtonClicked(bool)));
+ connect(ui->mDelSelectedSampleBtn,SIGNAL(clicked(bool)),this,SLOT(DeleteSampleBtnClicked(bool)));
+
}
CIspindelGUI::~CIspindelGUI()
@@ -64,9 +71,10 @@ CIspindelGUI::~CIspindelGUI()
delete ui;
}
-void CIspindelGUI::SetLastIspindelFrameData(QString Data)
+void CIspindelGUI::SetLastIspindelFrameData(QString Data, QString ABVText)
{
ui->mLastFrameDataLbl->setText(Data);
+ ui->mABVLabel->setText(ABVText);
}
int CIspindelGUI::UpdateIspindelPlot(QList *Data)
@@ -98,6 +106,21 @@ int CIspindelGUI::UpdateIspindelPlot(QList *Data)
mIspindelPlot->replot();
+ ui->mSamplesTable->setRowCount(Data->size());
+ QTableWidgetItem *TableItem;
+ for(int i= 0; i < Data->size(); i++)
+ {
+ TableItem = new QTableWidgetItem(QString("%1").arg(i));
+ ui->mSamplesTable->setItem(i,0,TableItem);
+ TableItem = new QTableWidgetItem(Data->at(i)->mSampleDateTime.toString("yyyy-MM-dd - hh:mm:ss"));
+ ui->mSamplesTable->setItem(i,1,TableItem);
+ TableItem = new QTableWidgetItem(QString("%1").arg(Data->at(i)->mGravity));
+ ui->mSamplesTable->setItem(i,2,TableItem);
+ TableItem = new QTableWidgetItem(QString("%1").arg(Data->at(i)->mTemperature));
+ ui->mSamplesTable->setItem(i,3,TableItem);
+ }
+ ui->mSamplesTable->resizeColumnsToContents();
+
return RET_OK;
}
@@ -106,5 +129,48 @@ int CIspindelGUI::NewIspindelFrameReceived(CIspindelData *Data)
mIspindelPlot->graph(0)->addData(Data->mSampleDateTime.toSecsSinceEpoch(),Data->mGravity);
mIspindelPlot->graph(1)->addData(Data->mSampleDateTime.toSecsSinceEpoch(),Data->mTemperature);
+ QTableWidgetItem *TableItem;
+ int RowIndex = ui->mSamplesTable->rowCount();
+ ui->mSamplesTable->insertRow(RowIndex);
+ TableItem = new QTableWidgetItem(QString("%1").arg(RowIndex));
+ ui->mSamplesTable->setItem(RowIndex,0,TableItem);
+ TableItem = new QTableWidgetItem(Data->mSampleDateTime.toString("yyyy-MM-dd - hh:mm:ss"));
+ ui->mSamplesTable->setItem(RowIndex,1,TableItem);
+ TableItem = new QTableWidgetItem(QString("%1").arg(Data->mGravity));
+ ui->mSamplesTable->setItem(RowIndex,2,TableItem);
+ TableItem = new QTableWidgetItem(QString("%1").arg(Data->mTemperature));
+ ui->mSamplesTable->setItem(RowIndex,3,TableItem);
+
+
+
mIspindelPlot->replot();
+
+ return RET_OK;
}
+
+void CIspindelGUI::SetOGButtonClicked(bool)
+{
+ QList SelectedItemsList;
+ SelectedItemsList = ui->mSamplesTable->selectedItems();
+ if(SelectedItemsList.size() == 0)
+ return;
+ int SampleIndex = SelectedItemsList.at(0)->row();
+
+ mProgramHandle->SetOGFromItem(SampleIndex);
+
+
+}
+
+void CIspindelGUI::DeleteSampleBtnClicked(bool)
+{
+ QList SelectedItemsList;
+ SelectedItemsList = ui->mSamplesTable->selectedItems();
+ if(SelectedItemsList.size() == 0)
+ return;
+ int SampleIndex = SelectedItemsList.at(0)->row();
+
+ mProgramHandle->DeleteSample(SampleIndex);
+
+
+}
+
diff --git a/Sources/Ispindel/IspindelGUI.h b/Sources/Ispindel/IspindelGUI.h
index 33c78a5..77db6d8 100644
--- a/Sources/Ispindel/IspindelGUI.h
+++ b/Sources/Ispindel/IspindelGUI.h
@@ -21,12 +21,18 @@ public:
~CIspindelGUI();
CIspindel *mProgramHandle;
- void SetLastIspindelFrameData(QString Data);
+ void SetLastIspindelFrameData(QString Data, QString ABVText);
int UpdateIspindelPlot(QList *Data);
int NewIspindelFrameReceived(CIspindelData *Data);
+
+
QCustomPlot *mIspindelPlot;
+public slots:
+ void SetOGButtonClicked(bool );
+ void DeleteSampleBtnClicked(bool);
+
private:
Ui::CIspindelGUI *ui;
};
diff --git a/Sources/Ispindel/IspindelGUI.ui b/Sources/Ispindel/IspindelGUI.ui
index 1ffd27e..7eedcb9 100644
--- a/Sources/Ispindel/IspindelGUI.ui
+++ b/Sources/Ispindel/IspindelGUI.ui
@@ -16,8 +16,8 @@
- 510
- 20
+ 520
+ 0
91
41
@@ -45,9 +45,9 @@
60
- 50
+ 10
381
- 211
+ 241
@@ -65,7 +65,7 @@
Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter
-
+
10
@@ -75,6 +75,52 @@
+
+
+
+ 660
+ 50
+ 231
+ 16
+
+
+
+
+ 12
+ 75
+ true
+
+
+
+ ABV : ?
+
+
+
+
+
+ 650
+ 10
+ 75
+ 23
+
+
+
+ Set OG
+
+
+
+
+
+ 520
+ 590
+ 81
+ 23
+
+
+
+ Delete Sample
+
+
diff --git a/Sources/Ispindel/IspindelInterface.cpp b/Sources/Ispindel/IspindelInterface.cpp
index d0129f0..90bd42f 100644
--- a/Sources/Ispindel/IspindelInterface.cpp
+++ b/Sources/Ispindel/IspindelInterface.cpp
@@ -48,8 +48,14 @@ int CIspindelInterface::DeviceFrameReceived(int TargetDeviceID, int TargetDevice
mProgramHandle->IspindelLastFrameReceived(Data);
break;
}
+ case ISPINDEL_DELETE_SAMPLE_RESPONSE:
+ {
+ mProgramHandle->DeleteSampleResponseReceived(Data);
+ break;
+ }
case ISPINDEL_GET_FULL_DATA_BUFFER_REQUEST:
case ISPINDLE_LATEST_DATA_REQUEST:
+ case ISPINDEL_DELETE_SAMPLE_REQUEST:
default:
{
qDebug("Ispindel: Invalid Ethernet Msg received from MasterCtrl: %d",MessageID);
diff --git a/Sources/ProtocolDefs.h b/Sources/ProtocolDefs.h
index a687378..61c9ada 100644
--- a/Sources/ProtocolDefs.h
+++ b/Sources/ProtocolDefs.h
@@ -235,10 +235,10 @@ enum AV_RECEIVER_INTERFACE_CMDS
AV_RECEIVER_INTERFACE_GENERAL_STATUS_RESPONSE,
AV_RECEIVER_INTERFACE_SET_MAIN_POWER_REQUEST,
AV_RECEIVER_INTERFACE_SET_MAIN_POWER_RESPONSE,
- AV_RECEIVER_INTERFACE_SET_SPEAKERB_REQUEST,
- AV_RECEIVER_INTERFACE_SET_SPEAKERB_RESPONSE,
- AV_RECEIVER_INTERFACE_SET_SPEAKERA_REQUEST,
- AV_RECEIVER_INTERFACE_SET_SPEAKERA_RESPONSE,
+ AV_RECEIVER_INTERFACE_SET_ZONE2_REQUEST,
+ AV_RECEIVER_INTERFACE_SET_ZONE2_RESPONSE,
+ AV_RECEIVER_INTERFACE_SET_MAIN_ZONE_REQUEST,
+ AV_RECEIVER_INTERFACE_SET_MAIN_ZONE_RESPONSE,
AV_RECEIVER_INTERFACE_SET_SPEAKERS_REQUEST,
AV_RECEIVER_INTERFACE_SET_SPEAKERS_RESPONSE,
AV_RECEIVER_INTERFACE_SEND_DIRECT_CMD_REQUEST,
@@ -276,6 +276,10 @@ enum CHALET_INTERFACE_CMDS
CHALET_INTERFACE_WIFI_SET_DEVICE_PARAMS_RESPONSE,
CHALET_INTERFACE_GET_FIRMWARE_VERSION_REQUEST,
CHALET_INTERFACE_GET_FIRMWARE_VERSION_RESPONSE,
+ CHALET_INTERFACE_CLEAR_COMMS_STATS_REQUEST,
+ CHALET_INTERFACE_CLEAR_COMMS_STATS_RESPONSE,
+ CHALET_INTERFACE_GET_WIFI_STATUS_REQUEST,
+ CHALET_INTERFACE_GET_WIFI_STATUS_RESPONSE,
MAX_CHALET_INTERFACE_CMD
@@ -306,6 +310,8 @@ enum CHALET_CMDS
CHALET_GET_STORED_WIFI_SETTINGS_RESPONSE,
CHALET_SET_STORED_WIFI_SETTINGS_REQUEST,
CHALET_SET_STORED_WIFI_SETTINGS_RESPONSE,
+ CHALET_CLEAR_COMMS_STATISTICS_REQUEST,
+ CHALET_CLEAR_COMMS_STATISTICS_RESPONSE,
MAX_CHALET_CMD
@@ -352,8 +358,28 @@ enum ISPINDLE_CMDS
ISPINDLE_LATEST_DATA_RESPONSE,
ISPINDEL_GET_FULL_DATA_BUFFER_REQUEST,
ISPINDEL_GET_FULL_DATA_BUFFER_RESPONSE,
+ ISPINDEL_DELETE_SAMPLE_REQUEST,
+ ISPINDEL_DELETE_SAMPLE_RESPONSE,
MAX_ISPINDLE_CMDS
};
+enum LORA_INTERFACE_CMDS
+{
+ LORA_IF_ACK = 1,
+ LORA_IF_GET_STATUS_REQUEST,
+ LORA_IF_GET_STATUS_RESPONSE,
+ LORA_IF_SEND_FRAME_REQUEST,
+ LORA_IF_SEND_FRAME_RESPONSE,
+ LORA_IF_NEW_FRAME_RESPONSE,
+ LORA_IF_GET_MODULE_CONFIG_REQUEST,
+ LORA_IF_GET_MODULE_CONFIG_RESPONSE,
+ LORA_IF_GET_RSSI_REQUEST,
+ LORA_IF_GET_RSSI_RESPONSE,
+ LORA_IF_SET_MODULE_CONFIG_REQUEST,
+ LORA_IF_SET_MODULE_CONFIG_RESPONSE,
+
+ MAX_LORA_IF_CMD
+};
+
#endif
diff --git a/Sources/Tower/LightShowWidget.cpp b/Sources/Tower/LightShowWidget.cpp
index 89c4359..82111e0 100644
--- a/Sources/Tower/LightShowWidget.cpp
+++ b/Sources/Tower/LightShowWidget.cpp
@@ -50,6 +50,9 @@ CLightShowWidget::CLightShowWidget(QWidget *parent)
setSceneRect(-100,-100,parentWidget()->geometry().width(),parentWidget()->geometry().height());
setMinimumSize(parentWidget()->geometry().width(),parentWidget()->geometry().height());
+ mScene->views().at(0)->setBackgroundBrush(QBrush(QColor(Qt::black)));
+
+
}
diff --git a/ui_AvReceiverGui.h b/ui_AvReceiverGui.h
index b67aa58..5de9bed 100644
--- a/ui_AvReceiverGui.h
+++ b/ui_AvReceiverGui.h
@@ -24,6 +24,7 @@ public:
QLabel *mRcvrStatusLabel;
QCheckBox *mSpkBCheckBox;
QCheckBox *mSpkACheckBox;
+ QLabel *mZone2StatusLabel;
void setupUi(QWidget *CAvReceiverGui)
{
@@ -35,13 +36,16 @@ public:
label->setGeometry(QRect(230, 30, 201, 16));
mRcvrStatusLabel = new QLabel(CAvReceiverGui);
mRcvrStatusLabel->setObjectName(QString::fromUtf8("mRcvrStatusLabel"));
- mRcvrStatusLabel->setGeometry(QRect(100, 110, 181, 231));
+ mRcvrStatusLabel->setGeometry(QRect(50, 130, 181, 231));
mSpkBCheckBox = new QCheckBox(CAvReceiverGui);
mSpkBCheckBox->setObjectName(QString::fromUtf8("mSpkBCheckBox"));
- mSpkBCheckBox->setGeometry(QRect(570, 130, 70, 17));
+ mSpkBCheckBox->setGeometry(QRect(280, 110, 70, 17));
mSpkACheckBox = new QCheckBox(CAvReceiverGui);
mSpkACheckBox->setObjectName(QString::fromUtf8("mSpkACheckBox"));
- mSpkACheckBox->setGeometry(QRect(570, 160, 70, 17));
+ mSpkACheckBox->setGeometry(QRect(50, 110, 70, 17));
+ mZone2StatusLabel = new QLabel(CAvReceiverGui);
+ mZone2StatusLabel->setObjectName(QString::fromUtf8("mZone2StatusLabel"));
+ mZone2StatusLabel->setGeometry(QRect(300, 140, 171, 191));
retranslateUi(CAvReceiverGui);
@@ -53,8 +57,9 @@ public:
CAvReceiverGui->setWindowTitle(QCoreApplication::translate("CAvReceiverGui", "Form", nullptr));
label->setText(QCoreApplication::translate("CAvReceiverGui", "AvReceiver", nullptr));
mRcvrStatusLabel->setText(QCoreApplication::translate("CAvReceiverGui", "TextLabel", nullptr));
- mSpkBCheckBox->setText(QCoreApplication::translate("CAvReceiverGui", "Speaker B", nullptr));
- mSpkACheckBox->setText(QCoreApplication::translate("CAvReceiverGui", "Speaker A", nullptr));
+ mSpkBCheckBox->setText(QCoreApplication::translate("CAvReceiverGui", "Zone 2", nullptr));
+ mSpkACheckBox->setText(QCoreApplication::translate("CAvReceiverGui", "Main Zone", nullptr));
+ mZone2StatusLabel->setText(QCoreApplication::translate("CAvReceiverGui", "TextLabel", nullptr));
} // retranslateUi
};
diff --git a/ui_ChaletGui.h b/ui_ChaletGui.h
index 9e3c70d..c061f0d 100644
--- a/ui_ChaletGui.h
+++ b/ui_ChaletGui.h
@@ -17,6 +17,7 @@
#include
#include
#include
+#include
#include
QT_BEGIN_NAMESPACE
@@ -49,18 +50,34 @@ public:
QDateEdit *mLogStartDateEdit;
QPushButton *mGetChaletLogButton;
QLabel *mChaletTemperatureLbl;
+ QGroupBox *groupBox_2;
+ QLineEdit *mWifiAccessPtNameEditBx;
+ QLabel *mAccessPtNameLabel;
+ QLabel *mAccessPtPassLbl;
+ QLineEdit *mWifiPasswordEditBx;
+ QLabel *label;
QLineEdit *mWiFiIPAddressEditBx;
+ QLabel *label_2;
+ QLineEdit *mWiFiGatewayAddressEditBx;
+ QCheckBox *mDHCPEnableChkBx;
QPushButton *mWiFiGetRemoteSettingsBtn;
QPushButton *mWiFiSetRemoteSettingsBtn;
- QLabel *label;
- QLineEdit *mWiFiGatewayAddressEditBx;
- QLabel *label_2;
- QGroupBox *groupBox_2;
QLabel *mSolarPanelCurrentCnvLbl;
QLabel *mFirmwareVersionLabel;
QPushButton *mGetFirmwareVersionBtn;
QPushButton *mStartTerminalShellBtn;
QPushButton *mStartSyslogShellBtn;
+ QLabel *mTotalRxTxRequestsLbl;
+ QPushButton *mResetCommStatsBtn;
+ QLabel *mLostReqsStatsLbl;
+ QPushButton *mGetWifiStatusBtn;
+ QLabel *mModuleIPAddressLbl;
+ QGroupBox *mLoraIFGroupBox;
+ QLabel *mLoraIFModuleType;
+ QSpinBox *mLoraChannelSpinBox;
+ QSpinBox *mLoraAddressSpinBox;
+ QLabel *label_3;
+ QLabel *label_4;
void setupUi(QWidget *CChaletGui)
{
@@ -135,68 +152,123 @@ public:
mCurrentSensorStateLbl->setGeometry(QRect(190, 320, 241, 16));
mLostReqPercentLbl = new QLabel(CChaletGui);
mLostReqPercentLbl->setObjectName(QString::fromUtf8("mLostReqPercentLbl"));
- mLostReqPercentLbl->setGeometry(QRect(600, 190, 241, 16));
+ mLostReqPercentLbl->setGeometry(QRect(430, 160, 241, 16));
mPlotWidget = new QWidget(CChaletGui);
mPlotWidget->setObjectName(QString::fromUtf8("mPlotWidget"));
mPlotWidget->setGeometry(QRect(420, 240, 1021, 321));
mChaletCommActivityLbl = new QLabel(CChaletGui);
mChaletCommActivityLbl->setObjectName(QString::fromUtf8("mChaletCommActivityLbl"));
- mChaletCommActivityLbl->setGeometry(QRect(600, 170, 47, 16));
+ mChaletCommActivityLbl->setGeometry(QRect(430, 140, 47, 16));
mLasCommRequestReceivedLbl = new QLabel(CChaletGui);
mLasCommRequestReceivedLbl->setObjectName(QString::fromUtf8("mLasCommRequestReceivedLbl"));
- mLasCommRequestReceivedLbl->setGeometry(QRect(600, 150, 301, 16));
+ mLasCommRequestReceivedLbl->setGeometry(QRect(430, 120, 301, 16));
mLogStartDateEdit = new QDateEdit(CChaletGui);
mLogStartDateEdit->setObjectName(QString::fromUtf8("mLogStartDateEdit"));
- mLogStartDateEdit->setGeometry(QRect(780, 210, 110, 22));
+ mLogStartDateEdit->setGeometry(QRect(520, 210, 110, 22));
mGetChaletLogButton = new QPushButton(CChaletGui);
mGetChaletLogButton->setObjectName(QString::fromUtf8("mGetChaletLogButton"));
- mGetChaletLogButton->setGeometry(QRect(900, 210, 75, 23));
+ mGetChaletLogButton->setGeometry(QRect(640, 210, 75, 23));
mChaletTemperatureLbl = new QLabel(CChaletGui);
mChaletTemperatureLbl->setObjectName(QString::fromUtf8("mChaletTemperatureLbl"));
mChaletTemperatureLbl->setGeometry(QRect(190, 340, 241, 16));
- mWiFiIPAddressEditBx = new QLineEdit(CChaletGui);
- mWiFiIPAddressEditBx->setObjectName(QString::fromUtf8("mWiFiIPAddressEditBx"));
- mWiFiIPAddressEditBx->setGeometry(QRect(160, 430, 221, 20));
- mWiFiIPAddressEditBx->setAlignment(Qt::AlignCenter);
- mWiFiGetRemoteSettingsBtn = new QPushButton(CChaletGui);
- mWiFiGetRemoteSettingsBtn->setObjectName(QString::fromUtf8("mWiFiGetRemoteSettingsBtn"));
- mWiFiGetRemoteSettingsBtn->setGeometry(QRect(160, 400, 75, 23));
- mWiFiSetRemoteSettingsBtn = new QPushButton(CChaletGui);
- mWiFiSetRemoteSettingsBtn->setObjectName(QString::fromUtf8("mWiFiSetRemoteSettingsBtn"));
- mWiFiSetRemoteSettingsBtn->setGeometry(QRect(250, 400, 75, 23));
- label = new QLabel(CChaletGui);
- label->setObjectName(QString::fromUtf8("label"));
- label->setGeometry(QRect(90, 430, 71, 20));
- QFont font2;
- font2.setPointSize(10);
- label->setFont(font2);
- mWiFiGatewayAddressEditBx = new QLineEdit(CChaletGui);
- mWiFiGatewayAddressEditBx->setObjectName(QString::fromUtf8("mWiFiGatewayAddressEditBx"));
- mWiFiGatewayAddressEditBx->setGeometry(QRect(160, 460, 221, 20));
- mWiFiGatewayAddressEditBx->setAlignment(Qt::AlignCenter);
- label_2 = new QLabel(CChaletGui);
- label_2->setObjectName(QString::fromUtf8("label_2"));
- label_2->setGeometry(QRect(90, 460, 71, 20));
- label_2->setFont(font2);
groupBox_2 = new QGroupBox(CChaletGui);
groupBox_2->setObjectName(QString::fromUtf8("groupBox_2"));
- groupBox_2->setGeometry(QRect(80, 370, 321, 131));
+ groupBox_2->setGeometry(QRect(70, 380, 321, 231));
+ mWifiAccessPtNameEditBx = new QLineEdit(groupBox_2);
+ mWifiAccessPtNameEditBx->setObjectName(QString::fromUtf8("mWifiAccessPtNameEditBx"));
+ mWifiAccessPtNameEditBx->setGeometry(QRect(80, 110, 221, 20));
+ mWifiAccessPtNameEditBx->setAlignment(Qt::AlignCenter);
+ mAccessPtNameLabel = new QLabel(groupBox_2);
+ mAccessPtNameLabel->setObjectName(QString::fromUtf8("mAccessPtNameLabel"));
+ mAccessPtNameLabel->setGeometry(QRect(10, 110, 71, 20));
+ QFont font2;
+ font2.setPointSize(10);
+ mAccessPtNameLabel->setFont(font2);
+ mAccessPtPassLbl = new QLabel(groupBox_2);
+ mAccessPtPassLbl->setObjectName(QString::fromUtf8("mAccessPtPassLbl"));
+ mAccessPtPassLbl->setGeometry(QRect(10, 140, 71, 20));
+ mAccessPtPassLbl->setFont(font2);
+ mWifiPasswordEditBx = new QLineEdit(groupBox_2);
+ mWifiPasswordEditBx->setObjectName(QString::fromUtf8("mWifiPasswordEditBx"));
+ mWifiPasswordEditBx->setGeometry(QRect(80, 140, 221, 20));
+ mWifiPasswordEditBx->setAlignment(Qt::AlignCenter);
+ label = new QLabel(groupBox_2);
+ label->setObjectName(QString::fromUtf8("label"));
+ label->setGeometry(QRect(10, 50, 71, 20));
+ label->setFont(font2);
+ mWiFiIPAddressEditBx = new QLineEdit(groupBox_2);
+ mWiFiIPAddressEditBx->setObjectName(QString::fromUtf8("mWiFiIPAddressEditBx"));
+ mWiFiIPAddressEditBx->setGeometry(QRect(80, 50, 221, 20));
+ mWiFiIPAddressEditBx->setAlignment(Qt::AlignCenter);
+ label_2 = new QLabel(groupBox_2);
+ label_2->setObjectName(QString::fromUtf8("label_2"));
+ label_2->setGeometry(QRect(10, 80, 71, 20));
+ label_2->setFont(font2);
+ mWiFiGatewayAddressEditBx = new QLineEdit(groupBox_2);
+ mWiFiGatewayAddressEditBx->setObjectName(QString::fromUtf8("mWiFiGatewayAddressEditBx"));
+ mWiFiGatewayAddressEditBx->setGeometry(QRect(80, 80, 221, 20));
+ mWiFiGatewayAddressEditBx->setAlignment(Qt::AlignCenter);
+ mDHCPEnableChkBx = new QCheckBox(groupBox_2);
+ mDHCPEnableChkBx->setObjectName(QString::fromUtf8("mDHCPEnableChkBx"));
+ mDHCPEnableChkBx->setGeometry(QRect(20, 20, 70, 17));
+ mWiFiGetRemoteSettingsBtn = new QPushButton(groupBox_2);
+ mWiFiGetRemoteSettingsBtn->setObjectName(QString::fromUtf8("mWiFiGetRemoteSettingsBtn"));
+ mWiFiGetRemoteSettingsBtn->setGeometry(QRect(70, 180, 75, 23));
+ mWiFiSetRemoteSettingsBtn = new QPushButton(groupBox_2);
+ mWiFiSetRemoteSettingsBtn->setObjectName(QString::fromUtf8("mWiFiSetRemoteSettingsBtn"));
+ mWiFiSetRemoteSettingsBtn->setGeometry(QRect(170, 180, 75, 23));
mSolarPanelCurrentCnvLbl = new QLabel(CChaletGui);
mSolarPanelCurrentCnvLbl->setObjectName(QString::fromUtf8("mSolarPanelCurrentCnvLbl"));
mSolarPanelCurrentCnvLbl->setGeometry(QRect(190, 280, 201, 16));
mFirmwareVersionLabel = new QLabel(CChaletGui);
mFirmwareVersionLabel->setObjectName(QString::fromUtf8("mFirmwareVersionLabel"));
- mFirmwareVersionLabel->setGeometry(QRect(180, 520, 231, 20));
+ mFirmwareVersionLabel->setGeometry(QRect(510, 590, 231, 20));
mFirmwareVersionLabel->setFont(font2);
mGetFirmwareVersionBtn = new QPushButton(CChaletGui);
mGetFirmwareVersionBtn->setObjectName(QString::fromUtf8("mGetFirmwareVersionBtn"));
- mGetFirmwareVersionBtn->setGeometry(QRect(90, 520, 75, 23));
+ mGetFirmwareVersionBtn->setGeometry(QRect(420, 590, 75, 23));
mStartTerminalShellBtn = new QPushButton(CChaletGui);
mStartTerminalShellBtn->setObjectName(QString::fromUtf8("mStartTerminalShellBtn"));
- mStartTerminalShellBtn->setGeometry(QRect(60, 590, 75, 23));
+ mStartTerminalShellBtn->setGeometry(QRect(420, 620, 75, 23));
mStartSyslogShellBtn = new QPushButton(CChaletGui);
mStartSyslogShellBtn->setObjectName(QString::fromUtf8("mStartSyslogShellBtn"));
- mStartSyslogShellBtn->setGeometry(QRect(150, 590, 75, 23));
+ mStartSyslogShellBtn->setGeometry(QRect(510, 620, 75, 23));
+ mTotalRxTxRequestsLbl = new QLabel(CChaletGui);
+ mTotalRxTxRequestsLbl->setObjectName(QString::fromUtf8("mTotalRxTxRequestsLbl"));
+ mTotalRxTxRequestsLbl->setGeometry(QRect(430, 180, 521, 16));
+ mResetCommStatsBtn = new QPushButton(CChaletGui);
+ mResetCommStatsBtn->setObjectName(QString::fromUtf8("mResetCommStatsBtn"));
+ mResetCommStatsBtn->setGeometry(QRect(420, 100, 101, 23));
+ mLostReqsStatsLbl = new QLabel(CChaletGui);
+ mLostReqsStatsLbl->setObjectName(QString::fromUtf8("mLostReqsStatsLbl"));
+ mLostReqsStatsLbl->setGeometry(QRect(700, 140, 241, 41));
+ mGetWifiStatusBtn = new QPushButton(CChaletGui);
+ mGetWifiStatusBtn->setObjectName(QString::fromUtf8("mGetWifiStatusBtn"));
+ mGetWifiStatusBtn->setGeometry(QRect(820, 590, 61, 23));
+ mModuleIPAddressLbl = new QLabel(CChaletGui);
+ mModuleIPAddressLbl->setObjectName(QString::fromUtf8("mModuleIPAddressLbl"));
+ mModuleIPAddressLbl->setGeometry(QRect(890, 590, 341, 16));
+ mModuleIPAddressLbl->setFont(font2);
+ mLoraIFGroupBox = new QGroupBox(CChaletGui);
+ mLoraIFGroupBox->setObjectName(QString::fromUtf8("mLoraIFGroupBox"));
+ mLoraIFGroupBox->setGeometry(QRect(890, 20, 541, 201));
+ mLoraIFModuleType = new QLabel(mLoraIFGroupBox);
+ mLoraIFModuleType->setObjectName(QString::fromUtf8("mLoraIFModuleType"));
+ mLoraIFModuleType->setGeometry(QRect(10, 20, 131, 61));
+ mLoraChannelSpinBox = new QSpinBox(mLoraIFGroupBox);
+ mLoraChannelSpinBox->setObjectName(QString::fromUtf8("mLoraChannelSpinBox"));
+ mLoraChannelSpinBox->setGeometry(QRect(470, 30, 51, 22));
+ mLoraAddressSpinBox = new QSpinBox(mLoraIFGroupBox);
+ mLoraAddressSpinBox->setObjectName(QString::fromUtf8("mLoraAddressSpinBox"));
+ mLoraAddressSpinBox->setGeometry(QRect(470, 50, 51, 22));
+ label_3 = new QLabel(mLoraIFGroupBox);
+ label_3->setObjectName(QString::fromUtf8("label_3"));
+ label_3->setGeometry(QRect(378, 30, 81, 20));
+ label_3->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter);
+ label_4 = new QLabel(mLoraIFGroupBox);
+ label_4->setObjectName(QString::fromUtf8("label_4"));
+ label_4->setGeometry(QRect(380, 51, 81, 20));
+ label_4->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter);
groupBox_2->raise();
groupBox->raise();
MainPageLabel->raise();
@@ -222,17 +294,17 @@ public:
mLogStartDateEdit->raise();
mGetChaletLogButton->raise();
mChaletTemperatureLbl->raise();
- mWiFiIPAddressEditBx->raise();
- mWiFiGetRemoteSettingsBtn->raise();
- mWiFiSetRemoteSettingsBtn->raise();
- label->raise();
- mWiFiGatewayAddressEditBx->raise();
- label_2->raise();
mSolarPanelCurrentCnvLbl->raise();
mFirmwareVersionLabel->raise();
mGetFirmwareVersionBtn->raise();
mStartTerminalShellBtn->raise();
mStartSyslogShellBtn->raise();
+ mTotalRxTxRequestsLbl->raise();
+ mResetCommStatsBtn->raise();
+ mLostReqsStatsLbl->raise();
+ mGetWifiStatusBtn->raise();
+ mModuleIPAddressLbl->raise();
+ mLoraIFGroupBox->raise();
retranslateUi(CChaletGui);
@@ -265,18 +337,34 @@ public:
mLasCommRequestReceivedLbl->setText(QCoreApplication::translate("CChaletGui", "Last Request: ", nullptr));
mGetChaletLogButton->setText(QCoreApplication::translate("CChaletGui", "PushButton", nullptr));
mChaletTemperatureLbl->setText(QCoreApplication::translate("CChaletGui", "Temperature:", nullptr));
+ groupBox_2->setTitle(QCoreApplication::translate("CChaletGui", "WiFi parameters (stored in flash)", nullptr));
+ mWifiAccessPtNameEditBx->setText(QCoreApplication::translate("CChaletGui", "?", nullptr));
+ mAccessPtNameLabel->setText(QCoreApplication::translate("CChaletGui", "Access Pt:", nullptr));
+ mAccessPtPassLbl->setText(QCoreApplication::translate("CChaletGui", "Password:", nullptr));
+ mWifiPasswordEditBx->setText(QCoreApplication::translate("CChaletGui", "?", nullptr));
+ label->setText(QCoreApplication::translate("CChaletGui", "IP Address:", nullptr));
mWiFiIPAddressEditBx->setText(QCoreApplication::translate("CChaletGui", "?", nullptr));
+ label_2->setText(QCoreApplication::translate("CChaletGui", "Gatweway:", nullptr));
+ mWiFiGatewayAddressEditBx->setText(QCoreApplication::translate("CChaletGui", "?", nullptr));
+ mDHCPEnableChkBx->setText(QCoreApplication::translate("CChaletGui", "DHCP", nullptr));
mWiFiGetRemoteSettingsBtn->setText(QCoreApplication::translate("CChaletGui", "GET", nullptr));
mWiFiSetRemoteSettingsBtn->setText(QCoreApplication::translate("CChaletGui", "SET", nullptr));
- label->setText(QCoreApplication::translate("CChaletGui", "IP Address:", nullptr));
- mWiFiGatewayAddressEditBx->setText(QCoreApplication::translate("CChaletGui", "?", nullptr));
- label_2->setText(QCoreApplication::translate("CChaletGui", "Gatweway:", nullptr));
- groupBox_2->setTitle(QCoreApplication::translate("CChaletGui", "WiFi parameters (stored in flash)", nullptr));
mSolarPanelCurrentCnvLbl->setText(QCoreApplication::translate("CChaletGui", "Solar Panel Current (A):", nullptr));
mFirmwareVersionLabel->setText(QCoreApplication::translate("CChaletGui", "Firmware Version: ?", nullptr));
mGetFirmwareVersionBtn->setText(QCoreApplication::translate("CChaletGui", "GET", nullptr));
mStartTerminalShellBtn->setText(QCoreApplication::translate("CChaletGui", "Terminal", nullptr));
mStartSyslogShellBtn->setText(QCoreApplication::translate("CChaletGui", "Syslog", nullptr));
+ mTotalRxTxRequestsLbl->setText(QCoreApplication::translate("CChaletGui", "Chalet Rx Req :", nullptr));
+ mResetCommStatsBtn->setText(QCoreApplication::translate("CChaletGui", "Reset Comm Stats", nullptr));
+ mLostReqsStatsLbl->setText(QCoreApplication::translate("CChaletGui", "Master --> Chalet: ??\n"
+"Chalet --> Master: ??", nullptr));
+ mGetWifiStatusBtn->setText(QCoreApplication::translate("CChaletGui", "GET", nullptr));
+ mModuleIPAddressLbl->setText(QCoreApplication::translate("CChaletGui", "Module IP Address:", nullptr));
+ mLoraIFGroupBox->setTitle(QCoreApplication::translate("CChaletGui", "Lora module Interface", nullptr));
+ mLoraIFModuleType->setText(QCoreApplication::translate("CChaletGui", "Module Type: ???\n"
+"Module state: ??", nullptr));
+ label_3->setText(QCoreApplication::translate("CChaletGui", "Module Channel", nullptr));
+ label_4->setText(QCoreApplication::translate("CChaletGui", "Module Address", nullptr));
} // retranslateUi
};
diff --git a/ui_IspindelGUI.h b/ui_IspindelGUI.h
index 86fa5ca..8b65204 100644
--- a/ui_IspindelGUI.h
+++ b/ui_IspindelGUI.h
@@ -14,6 +14,7 @@
#include
#include
#include
+#include
#include
#include
@@ -25,7 +26,10 @@ public:
QLabel *label;
QWidget *mIspindelPlot;
QLabel *mLastFrameDataLbl;
- QTableWidget *tableWidget;
+ QTableWidget *mSamplesTable;
+ QLabel *mABVLabel;
+ QPushButton *mSetOGBtn;
+ QPushButton *mDelSelectedSampleBtn;
void setupUi(QDialog *CIspindelGUI)
{
@@ -34,7 +38,7 @@ public:
CIspindelGUI->resize(1123, 629);
label = new QLabel(CIspindelGUI);
label->setObjectName(QString::fromUtf8("label"));
- label->setGeometry(QRect(510, 20, 91, 41));
+ label->setGeometry(QRect(520, 0, 91, 41));
QFont font;
font.setPointSize(12);
label->setFont(font);
@@ -43,7 +47,7 @@ public:
mIspindelPlot->setGeometry(QRect(520, 100, 661, 461));
mLastFrameDataLbl = new QLabel(CIspindelGUI);
mLastFrameDataLbl->setObjectName(QString::fromUtf8("mLastFrameDataLbl"));
- mLastFrameDataLbl->setGeometry(QRect(60, 50, 381, 211));
+ mLastFrameDataLbl->setGeometry(QRect(60, 10, 381, 241));
QFont font1;
font1.setFamily(QString::fromUtf8("Tahoma"));
font1.setPointSize(11);
@@ -51,9 +55,23 @@ public:
font1.setWeight(75);
mLastFrameDataLbl->setFont(font1);
mLastFrameDataLbl->setAlignment(Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter);
- tableWidget = new QTableWidget(CIspindelGUI);
- tableWidget->setObjectName(QString::fromUtf8("tableWidget"));
- tableWidget->setGeometry(QRect(10, 290, 461, 331));
+ mSamplesTable = new QTableWidget(CIspindelGUI);
+ mSamplesTable->setObjectName(QString::fromUtf8("mSamplesTable"));
+ mSamplesTable->setGeometry(QRect(10, 290, 461, 331));
+ mABVLabel = new QLabel(CIspindelGUI);
+ mABVLabel->setObjectName(QString::fromUtf8("mABVLabel"));
+ mABVLabel->setGeometry(QRect(660, 50, 231, 16));
+ QFont font2;
+ font2.setPointSize(12);
+ font2.setBold(true);
+ font2.setWeight(75);
+ mABVLabel->setFont(font2);
+ mSetOGBtn = new QPushButton(CIspindelGUI);
+ mSetOGBtn->setObjectName(QString::fromUtf8("mSetOGBtn"));
+ mSetOGBtn->setGeometry(QRect(650, 10, 75, 23));
+ mDelSelectedSampleBtn = new QPushButton(CIspindelGUI);
+ mDelSelectedSampleBtn->setObjectName(QString::fromUtf8("mDelSelectedSampleBtn"));
+ mDelSelectedSampleBtn->setGeometry(QRect(520, 590, 81, 23));
retranslateUi(CIspindelGUI);
@@ -65,6 +83,9 @@ public:
CIspindelGUI->setWindowTitle(QCoreApplication::translate("CIspindelGUI", "Dialog", nullptr));
label->setText(QCoreApplication::translate("CIspindelGUI", "ISpindel", nullptr));
mLastFrameDataLbl->setText(QCoreApplication::translate("CIspindelGUI", "No data...", nullptr));
+ mABVLabel->setText(QCoreApplication::translate("CIspindelGUI", "ABV : ?", nullptr));
+ mSetOGBtn->setText(QCoreApplication::translate("CIspindelGUI", "Set OG", nullptr));
+ mDelSelectedSampleBtn->setText(QCoreApplication::translate("CIspindelGUI", "Delete Sample", nullptr));
} // retranslateUi
};