Checkin pré développement SIM module

This commit is contained in:
jfmartel 2024-10-17 11:15:11 -04:00
parent 5418af7ddc
commit 918d2d8fdb
7 changed files with 71 additions and 28 deletions

Binary file not shown.

View File

@ -58,7 +58,7 @@ CAVReceiverDevice::~CAVReceiverDevice()
delete mReceiverSocket;
delete mDisconnectTimer;
delete mStateRequestTimer;
delete mSyncDelayTimer;
// delete mSyncDelayTimer;
}
int CAVReceiverDevice::Start()

View File

@ -17,6 +17,7 @@ CLoraSettingsGui::~CLoraSettingsGui()
CLoraSettingsGui::SetSettings(CSettings *settings)
{
ui->mLoraAddressSpinBx->setValue(settings->mChaletLoraAddress);
ui->mLoraChannelSpinBx->setValue(settings->mChaletLoraChannel);
ui->mComportComboBox->setCurrentText(settings->mChaletComPort);
ui->mUseLoraIFCheckBx->setChecked(settings->mChaletUseLoraIF);
return RET_OK;
@ -30,7 +31,8 @@ quint16 CLoraSettingsGui::GetChaletLoraAddress()
quint8 CLoraSettingsGui::GetChaletLoraChannel()
{
return 4;
quint16 Chan = ui->mLoraChannelSpinBx->value();
return Chan;
}
QString CLoraSettingsGui::GetChaletLoraComPort()

View File

@ -28,20 +28,20 @@
</font>
</property>
<property name="text">
<string>Lora Settings</string>
<string>Chalet Settings</string>
</property>
</widget>
<widget class="QGroupBox" name="groupBox">
<property name="geometry">
<rect>
<x>50</x>
<y>120</y>
<x>110</x>
<y>170</y>
<width>221</width>
<height>191</height>
</rect>
</property>
<property name="title">
<string>Chalet</string>
<string>LoRa</string>
</property>
<widget class="QLabel" name="label_2">
<property name="geometry">
@ -69,19 +69,6 @@
<string>Lora Channel:</string>
</property>
</widget>
<widget class="QLabel" name="label_4">
<property name="geometry">
<rect>
<x>90</x>
<y>20</y>
<width>71</width>
<height>16</height>
</rect>
</property>
<property name="text">
<string>4</string>
</property>
</widget>
<widget class="QSpinBox" name="mLoraAddressSpinBx">
<property name="geometry">
<rect>
@ -201,6 +188,51 @@ Chaloupe = 8</string>
<string>Use LoraInterface (restart needed)</string>
</property>
</widget>
<widget class="QSpinBox" name="mLoraChannelSpinBx">
<property name="geometry">
<rect>
<x>90</x>
<y>20</y>
<width>71</width>
<height>22</height>
</rect>
</property>
<property name="minimum">
<number>1</number>
</property>
<property name="maximum">
<number>65535</number>
</property>
<property name="value">
<number>6</number>
</property>
</widget>
<widget class="QLabel" name="label_4">
<property name="geometry">
<rect>
<x>200</x>
<y>30</y>
<width>71</width>
<height>16</height>
</rect>
</property>
<property name="text">
<string>4</string>
</property>
</widget>
</widget>
<widget class="QCheckBox" name="checkBox">
<property name="geometry">
<rect>
<x>70</x>
<y>60</y>
<width>281</width>
<height>20</height>
</rect>
</property>
<property name="text">
<string>Use LTE interface (restart needed)</string>
</property>
</widget>
</widget>
<resources/>

View File

@ -20,7 +20,7 @@ CSettingsWindow::CSettingsWindow()
mOptionsTabBar->addTab("SMS");
mOptionsTabBar->addTab("Network");
mOptionsTabBar->addTab("Contacts");
mOptionsTabBar->addTab("Lora");
mOptionsTabBar->addTab("Chalet");
mOptionsTabBar->resize(this->geometry().width(),mOptionsTabBar->height());
MainLayout->addWidget(mOptionsTabBar);

View File

@ -127,7 +127,8 @@ void CMasterCtrl::Start()
else
{
mChaletLoraNetworkCommInterface->mMyLoraAddress = 5;
mChaletLoraNetworkCommInterface->mMyLoraChannel = 4;
// mChaletLoraNetworkCommInterface->mMyLoraChannel = 4;
mChaletLoraNetworkCommInterface->mMyLoraChannel = mMasterCtrlSettings.mChaletLoraChannel;
mChaletLoraNetworkCommInterface->SetLoraDestinationAddress(mMasterCtrlSettings.mChaletLoraAddress,mMasterCtrlSettings.mChaletLoraChannel);
mChaletLoraNetworkCommInterface->SetLoraSerialPortSettings(mMasterCtrlSettings.mChaletComPort,QSerialPort::Baud9600);
}
@ -189,6 +190,7 @@ unsigned int CMasterCtrl::SettingsWindowClosed()
}
if(mChaletLoraNetworkCommInterface != 0)
{
mChaletLoraNetworkCommInterface->mMyLoraChannel = mMasterCtrlSettings.mChaletLoraChannel;
mChaletLoraNetworkCommInterface->SetLoraDestinationAddress(mMasterCtrlSettings.mChaletLoraAddress,mMasterCtrlSettings.mChaletLoraChannel); //JFM LoraInterface Dev
mChaletLoraNetworkCommInterface->SetLoraSerialPortSettings(mMasterCtrlSettings.mChaletComPort,QSerialPort::Baud9600); //JFM LoraInterface Dev
}

View File

@ -27,12 +27,13 @@ public:
QGroupBox *groupBox;
QLabel *label_2;
QLabel *label_3;
QLabel *label_4;
QSpinBox *mLoraAddressSpinBx;
QComboBox *mComportComboBox;
QLabel *label_5;
QLabel *label_6;
QCheckBox *mUseLoraIFCheckBx;
QSpinBox *mLoraChannelSpinBx;
QLabel *label_4;
void setupUi(QWidget *CLoraSettingsGui)
{
@ -54,9 +55,6 @@ public:
label_3 = new QLabel(groupBox);
label_3->setObjectName(QString::fromUtf8("label_3"));
label_3->setGeometry(QRect(10, 20, 71, 16));
label_4 = new QLabel(groupBox);
label_4->setObjectName(QString::fromUtf8("label_4"));
label_4->setGeometry(QRect(90, 20, 71, 16));
mLoraAddressSpinBx = new QSpinBox(groupBox);
mLoraAddressSpinBx->setObjectName(QString::fromUtf8("mLoraAddressSpinBx"));
mLoraAddressSpinBx->setGeometry(QRect(90, 40, 71, 22));
@ -85,6 +83,15 @@ public:
mUseLoraIFCheckBx = new QCheckBox(groupBox);
mUseLoraIFCheckBx->setObjectName(QString::fromUtf8("mUseLoraIFCheckBx"));
mUseLoraIFCheckBx->setGeometry(QRect(20, 160, 191, 20));
mLoraChannelSpinBx = new QSpinBox(groupBox);
mLoraChannelSpinBx->setObjectName(QString::fromUtf8("mLoraChannelSpinBx"));
mLoraChannelSpinBx->setGeometry(QRect(90, 20, 71, 22));
mLoraChannelSpinBx->setMinimum(1);
mLoraChannelSpinBx->setMaximum(65535);
mLoraChannelSpinBx->setValue(6);
label_4 = new QLabel(CLoraSettingsGui);
label_4->setObjectName(QString::fromUtf8("label_4"));
label_4->setGeometry(QRect(270, 110, 71, 16));
retranslateUi(CLoraSettingsGui);
@ -94,11 +101,10 @@ public:
void retranslateUi(QWidget *CLoraSettingsGui)
{
CLoraSettingsGui->setWindowTitle(QCoreApplication::translate("CLoraSettingsGui", "Form", nullptr));
label->setText(QCoreApplication::translate("CLoraSettingsGui", "Lora Settings", nullptr));
groupBox->setTitle(QCoreApplication::translate("CLoraSettingsGui", "Chalet", nullptr));
label->setText(QCoreApplication::translate("CLoraSettingsGui", "Chalet Settings", nullptr));
groupBox->setTitle(QCoreApplication::translate("CLoraSettingsGui", "LoRa", nullptr));
label_2->setText(QCoreApplication::translate("CLoraSettingsGui", "Lora Address:", nullptr));
label_3->setText(QCoreApplication::translate("CLoraSettingsGui", "Lora Channel:", nullptr));
label_4->setText(QCoreApplication::translate("CLoraSettingsGui", "4", nullptr));
mComportComboBox->setItemText(0, QCoreApplication::translate("CLoraSettingsGui", "COM1", nullptr));
mComportComboBox->setItemText(1, QCoreApplication::translate("CLoraSettingsGui", "COM2", nullptr));
mComportComboBox->setItemText(2, QCoreApplication::translate("CLoraSettingsGui", "COM3", nullptr));
@ -114,6 +120,7 @@ public:
label_6->setText(QCoreApplication::translate("CLoraSettingsGui", "Chalet = 7\n"
"Chaloupe = 8", nullptr));
mUseLoraIFCheckBx->setText(QCoreApplication::translate("CLoraSettingsGui", "Use LoraInterface (restart needed)", nullptr));
label_4->setText(QCoreApplication::translate("CLoraSettingsGui", "4", nullptr));
} // retranslateUi
};