Ajout interface LoraModuleInterface
This commit is contained in:
@@ -1,8 +1,10 @@
|
||||
#include "ChaletGui.h"
|
||||
#include "ui_ChaletGui.h"
|
||||
#include "CChalet.h"
|
||||
#include "LoraModuleInterface.h"
|
||||
#include <QWidget>
|
||||
#include <QDate>
|
||||
#include "LoraModuleInterfaceData.h"
|
||||
|
||||
CChaletGui::CChaletGui(QWidget *parent) :
|
||||
QWidget(parent),
|
||||
@@ -277,6 +279,23 @@ int CChaletGui::UpdateChaletStatus(CChaletMainStatus Status)
|
||||
return RET_OK;
|
||||
}
|
||||
|
||||
int CChaletGui::UpdateLoraModuleStatus(CLoraModuleInterfaceStatus Status)
|
||||
{
|
||||
if(ui->mLoraModuleCommActivityLbl->isEnabled())
|
||||
{
|
||||
ui->mLoraModuleCommActivityLbl->setEnabled(false);
|
||||
}
|
||||
else
|
||||
{
|
||||
ui->mLoraModuleCommActivityLbl->setEnabled(true);
|
||||
}
|
||||
|
||||
QString ModuleStatusTxt = QString("Ambient RSSI: %1 [%3dBm]\nLast Rx RSSI: %2 [%4dBm]").arg(Status.mModuleAmbientRSSI).arg(Status.mModuleLastRxRSSI).arg(-1*(255-Status.mModuleAmbientRSSI)).arg(-1*(255-Status.mModuleLastRxRSSI));
|
||||
ui->mLoraIFModuleStatus->setText(ModuleStatusTxt);
|
||||
|
||||
return RET_OK;
|
||||
}
|
||||
|
||||
int CChaletGui::UpdateChaletLogPlot(QByteArray *Log)
|
||||
{
|
||||
int NbRecords;
|
||||
|
||||
@@ -7,6 +7,9 @@
|
||||
#include <QHostAddress>
|
||||
|
||||
class CChalet;
|
||||
class CLoraModuleInterface;
|
||||
class CLoraModuleInterfaceStatus;
|
||||
|
||||
|
||||
namespace Ui {
|
||||
class CChaletGui;
|
||||
@@ -21,9 +24,11 @@ public:
|
||||
~CChaletGui();
|
||||
|
||||
CChalet *mProgramHandle;
|
||||
CLoraModuleInterface *mLoraModuleIFProgramHandle;
|
||||
QCustomPlot *mBatteryPlotWidget;
|
||||
|
||||
int UpdateChaletStatus(CChaletMainStatus Status);
|
||||
int UpdateLoraModuleStatus(CLoraModuleInterfaceStatus Status);
|
||||
int UpdateChaletLogPlot(QByteArray* Log);
|
||||
int ChaletCommActivity();
|
||||
QTimer *mGetWifiParamsButtonColorTimer, *mGetFimwVersionButtonColorTimer;
|
||||
|
||||
@@ -691,13 +691,13 @@ Chalet --> Master: ??</string>
|
||||
<property name="title">
|
||||
<string>Lora module Interface</string>
|
||||
</property>
|
||||
<widget class="QLabel" name="mLoraIFModuleType">
|
||||
<widget class="QLabel" name="mLoraIFModuleStatus">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>10</x>
|
||||
<y>20</y>
|
||||
<width>131</width>
|
||||
<height>61</height>
|
||||
<width>231</width>
|
||||
<height>141</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
@@ -757,6 +757,19 @@ Module state: ??</string>
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="mLoraModuleCommActivityLbl">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>390</x>
|
||||
<y>80</y>
|
||||
<width>47</width>
|
||||
<height>16</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Activity!!!</string>
|
||||
</property>
|
||||
</widget>
|
||||
</widget>
|
||||
<zorder>groupBox_2</zorder>
|
||||
<zorder>groupBox</zorder>
|
||||
|
||||
Reference in New Issue
Block a user