diff --git a/Configuration/Settings.mcs b/Configuration/Settings.mcs index d2a2087..752ca24 100644 Binary files a/Configuration/Settings.mcs and b/Configuration/Settings.mcs differ diff --git a/Sources/AvReceiver/AVReceiverDevice.cpp b/Sources/AvReceiver/AVReceiverDevice.cpp index abd00ed..4834677 100644 --- a/Sources/AvReceiver/AVReceiverDevice.cpp +++ b/Sources/AvReceiver/AVReceiverDevice.cpp @@ -58,7 +58,7 @@ CAVReceiverDevice::~CAVReceiverDevice() delete mReceiverSocket; delete mDisconnectTimer; delete mStateRequestTimer; - delete mSyncDelayTimer; + // delete mSyncDelayTimer; } int CAVReceiverDevice::Start() diff --git a/Sources/Gui/LoraSettingsGui.cpp b/Sources/Gui/LoraSettingsGui.cpp index 950253d..09565d0 100644 --- a/Sources/Gui/LoraSettingsGui.cpp +++ b/Sources/Gui/LoraSettingsGui.cpp @@ -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() diff --git a/Sources/Gui/LoraSettingsGui.ui b/Sources/Gui/LoraSettingsGui.ui index f2ed8b5..950ba43 100644 --- a/Sources/Gui/LoraSettingsGui.ui +++ b/Sources/Gui/LoraSettingsGui.ui @@ -28,20 +28,20 @@ - Lora Settings + Chalet Settings - 50 - 120 + 110 + 170 221 191 - Chalet + LoRa @@ -69,19 +69,6 @@ Lora Channel: - - - - 90 - 20 - 71 - 16 - - - - 4 - - @@ -201,6 +188,51 @@ Chaloupe = 8 Use LoraInterface (restart needed) + + + + 90 + 20 + 71 + 22 + + + + 1 + + + 65535 + + + 6 + + + + + + 200 + 30 + 71 + 16 + + + + 4 + + + + + + + 70 + 60 + 281 + 20 + + + + Use LTE interface (restart needed) + diff --git a/Sources/Gui/SettingsWindow.cpp b/Sources/Gui/SettingsWindow.cpp index 51938f5..60bc321 100644 --- a/Sources/Gui/SettingsWindow.cpp +++ b/Sources/Gui/SettingsWindow.cpp @@ -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); diff --git a/Sources/MasterCtrl.cpp b/Sources/MasterCtrl.cpp index 7c6ac91..58f413c 100644 --- a/Sources/MasterCtrl.cpp +++ b/Sources/MasterCtrl.cpp @@ -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 } diff --git a/ui_LoraSettingsGui.h b/ui_LoraSettingsGui.h index 1ec4f4c..13df6eb 100644 --- a/ui_LoraSettingsGui.h +++ b/ui_LoraSettingsGui.h @@ -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 };