kopia lustrzana https://gitlab.com/eliggett/wfview
Adding code to support a separate repeater setup window.
rodzic
09b88c548f
commit
864b2f491a
|
@ -0,0 +1,15 @@
|
||||||
|
#ifndef REPEATERATTRIBUTES_H
|
||||||
|
#define REPEATERATTRIBUTES_H
|
||||||
|
|
||||||
|
enum duplexMode {
|
||||||
|
dmSplitOff=0x00,
|
||||||
|
dmSplitOn=0x01,
|
||||||
|
dmSimplex=0x10,
|
||||||
|
dmDupMinus=0x11,
|
||||||
|
dmDupPlus=0x12,
|
||||||
|
dmDupRPS=0x13,
|
||||||
|
dmDupAutoOn=0x26,
|
||||||
|
dmDupAutoOff=0x36
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // REPEATERATTRIBUTES_H
|
|
@ -0,0 +1,14 @@
|
||||||
|
#include "repeatersetup.h"
|
||||||
|
#include "ui_repeatersetup.h"
|
||||||
|
|
||||||
|
repeaterSetup::repeaterSetup(QWidget *parent) :
|
||||||
|
QMainWindow(parent),
|
||||||
|
ui(new Ui::repeaterSetup)
|
||||||
|
{
|
||||||
|
ui->setupUi(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
repeaterSetup::~repeaterSetup()
|
||||||
|
{
|
||||||
|
delete ui;
|
||||||
|
}
|
|
@ -0,0 +1,24 @@
|
||||||
|
#ifndef REPEATERSETUP_H
|
||||||
|
#define REPEATERSETUP_H
|
||||||
|
|
||||||
|
#include <QMainWindow>
|
||||||
|
|
||||||
|
#include "repeaterattributes.h"
|
||||||
|
|
||||||
|
namespace Ui {
|
||||||
|
class repeaterSetup;
|
||||||
|
}
|
||||||
|
|
||||||
|
class repeaterSetup : public QMainWindow
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
|
||||||
|
public:
|
||||||
|
explicit repeaterSetup(QWidget *parent = 0);
|
||||||
|
~repeaterSetup();
|
||||||
|
|
||||||
|
private:
|
||||||
|
Ui::repeaterSetup *ui;
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // REPEATERSETUP_H
|
|
@ -0,0 +1,230 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<ui version="4.0">
|
||||||
|
<class>repeaterSetup</class>
|
||||||
|
<widget class="QMainWindow" name="repeaterSetup">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>0</x>
|
||||||
|
<y>0</y>
|
||||||
|
<width>800</width>
|
||||||
|
<height>217</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="windowTitle">
|
||||||
|
<string>Repeater Setup</string>
|
||||||
|
</property>
|
||||||
|
<widget class="QWidget" name="centralwidget">
|
||||||
|
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||||
|
<item>
|
||||||
|
<spacer name="verticalSpacer">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Vertical</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
|
<size>
|
||||||
|
<width>20</width>
|
||||||
|
<height>40</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<layout class="QHBoxLayout" name="horizontalLayout_5">
|
||||||
|
<property name="topMargin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<item>
|
||||||
|
<widget class="QPushButton" name="rptReadRigBtn">
|
||||||
|
<property name="text">
|
||||||
|
<string>Read Current Settings</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<spacer name="horizontalSpacer">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Horizontal</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
|
<size>
|
||||||
|
<width>40</width>
|
||||||
|
<height>20</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||||
|
<property name="leftMargin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<property name="topMargin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<item>
|
||||||
|
<widget class="QGroupBox" name="groupBox">
|
||||||
|
<property name="title">
|
||||||
|
<string>Repeater Duplex</string>
|
||||||
|
</property>
|
||||||
|
<layout class="QVBoxLayout" name="verticalLayout">
|
||||||
|
<item>
|
||||||
|
<widget class="QRadioButton" name="rptSimplexBtn">
|
||||||
|
<property name="text">
|
||||||
|
<string>Simplex</string>
|
||||||
|
</property>
|
||||||
|
<attribute name="buttonGroup">
|
||||||
|
<string notr="true">rptDuplexBtns</string>
|
||||||
|
</attribute>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QRadioButton" name="rptDupPlusBtn">
|
||||||
|
<property name="text">
|
||||||
|
<string>Dup+</string>
|
||||||
|
</property>
|
||||||
|
<attribute name="buttonGroup">
|
||||||
|
<string notr="true">rptDuplexBtns</string>
|
||||||
|
</attribute>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QRadioButton" name="rptDupMinusBtn">
|
||||||
|
<property name="text">
|
||||||
|
<string>Dup-</string>
|
||||||
|
</property>
|
||||||
|
<attribute name="buttonGroup">
|
||||||
|
<string notr="true">rptDuplexBtns</string>
|
||||||
|
</attribute>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QRadioButton" name="rptAutoBtn">
|
||||||
|
<property name="text">
|
||||||
|
<string>Auto</string>
|
||||||
|
</property>
|
||||||
|
<attribute name="buttonGroup">
|
||||||
|
<string notr="true">rptDuplexBtns</string>
|
||||||
|
</attribute>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QGroupBox" name="groupBox_2">
|
||||||
|
<property name="title">
|
||||||
|
<string>Repeater Tone Type</string>
|
||||||
|
</property>
|
||||||
|
<layout class="QVBoxLayout" name="verticalLayout_3">
|
||||||
|
<item>
|
||||||
|
<widget class="QRadioButton" name="radioButton">
|
||||||
|
<property name="text">
|
||||||
|
<string>None</string>
|
||||||
|
</property>
|
||||||
|
<attribute name="buttonGroup">
|
||||||
|
<string notr="true">rptToneBtns</string>
|
||||||
|
</attribute>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QRadioButton" name="radioButton_2">
|
||||||
|
<property name="text">
|
||||||
|
<string>Transmit Tone only</string>
|
||||||
|
</property>
|
||||||
|
<attribute name="buttonGroup">
|
||||||
|
<string notr="true">rptToneBtns</string>
|
||||||
|
</attribute>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QRadioButton" name="radioButton_3">
|
||||||
|
<property name="text">
|
||||||
|
<string>Tone Squelch</string>
|
||||||
|
</property>
|
||||||
|
<attribute name="buttonGroup">
|
||||||
|
<string notr="true">rptToneBtns</string>
|
||||||
|
</attribute>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QRadioButton" name="radioButton_4">
|
||||||
|
<property name="text">
|
||||||
|
<string>DTCS</string>
|
||||||
|
</property>
|
||||||
|
<attribute name="buttonGroup">
|
||||||
|
<string notr="true">rptToneBtns</string>
|
||||||
|
</attribute>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QGroupBox" name="groupBox_3">
|
||||||
|
<property name="title">
|
||||||
|
<string>Tone Selection</string>
|
||||||
|
</property>
|
||||||
|
<layout class="QVBoxLayout" name="verticalLayout_4">
|
||||||
|
<item>
|
||||||
|
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="label">
|
||||||
|
<property name="text">
|
||||||
|
<string>Tone</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QComboBox" name="rptToneCombo"/>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<layout class="QHBoxLayout" name="horizontalLayout_3">
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="label_2">
|
||||||
|
<property name="text">
|
||||||
|
<string>DTCS</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QComboBox" name="rptDTCSCombo"/>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<layout class="QHBoxLayout" name="horizontalLayout_4">
|
||||||
|
<item>
|
||||||
|
<widget class="QCheckBox" name="rptDTCSInvertTx">
|
||||||
|
<property name="text">
|
||||||
|
<string>Invert Tx</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QCheckBox" name="rptDTCSInvertRx">
|
||||||
|
<property name="text">
|
||||||
|
<string>Invert Rx</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
</widget>
|
||||||
|
<resources/>
|
||||||
|
<connections/>
|
||||||
|
<buttongroups>
|
||||||
|
<buttongroup name="rptDuplexBtns"/>
|
||||||
|
<buttongroup name="rptToneBtns"/>
|
||||||
|
</buttongroups>
|
||||||
|
</ui>
|
|
@ -8,6 +8,7 @@
|
||||||
#include "pttyhandler.h"
|
#include "pttyhandler.h"
|
||||||
#include "udphandler.h"
|
#include "udphandler.h"
|
||||||
#include "rigidentities.h"
|
#include "rigidentities.h"
|
||||||
|
#include "repeaterattributes.h"
|
||||||
|
|
||||||
// This file figures out what to send to the comm and also
|
// This file figures out what to send to the comm and also
|
||||||
// parses returns into useful things.
|
// parses returns into useful things.
|
||||||
|
@ -16,17 +17,6 @@
|
||||||
// note: using a define because switch case doesn't even work with const unsigned char. Surprised me.
|
// note: using a define because switch case doesn't even work with const unsigned char. Surprised me.
|
||||||
#define compCivAddr 0xE1
|
#define compCivAddr 0xE1
|
||||||
|
|
||||||
enum duplexMode {
|
|
||||||
dmSplitOff=0x00,
|
|
||||||
dmSplitOn=0x01,
|
|
||||||
dmSimplex=0x10,
|
|
||||||
dmDupMinus=0x11,
|
|
||||||
dmDupPlus=0x12,
|
|
||||||
dmDupRPS=0x13,
|
|
||||||
dmDupAutoOn=0x26,
|
|
||||||
dmDupAutoOff=0x36
|
|
||||||
};
|
|
||||||
|
|
||||||
enum meterKind {
|
enum meterKind {
|
||||||
meterS,
|
meterS,
|
||||||
meterSWR,
|
meterSWR,
|
||||||
|
|
|
@ -25,6 +25,7 @@ wfmain::wfmain(const QString serialPortCL, const QString hostCL, QWidget *parent
|
||||||
this->hostCL = hostCL;
|
this->hostCL = hostCL;
|
||||||
|
|
||||||
cal = new calibrationWindow();
|
cal = new calibrationWindow();
|
||||||
|
rpt = new repeaterSetup();
|
||||||
sat = new satelliteSetup();
|
sat = new satelliteSetup();
|
||||||
srv = new udpServerSetup();
|
srv = new udpServerSetup();
|
||||||
|
|
||||||
|
@ -3623,6 +3624,11 @@ void wfmain::on_serialDeviceListCombo_activated(const QString &arg1)
|
||||||
ui->serialEnableBtn->setChecked(true);
|
ui->serialEnableBtn->setChecked(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void wfmain::on_rptSetupBtn_clicked()
|
||||||
|
{
|
||||||
|
rpt->show();
|
||||||
|
}
|
||||||
|
|
||||||
// --- DEBUG FUNCTION ---
|
// --- DEBUG FUNCTION ---
|
||||||
void wfmain::on_debugBtn_clicked()
|
void wfmain::on_debugBtn_clicked()
|
||||||
{
|
{
|
||||||
|
|
5
wfmain.h
5
wfmain.h
|
@ -15,8 +15,10 @@
|
||||||
#include "rigcommander.h"
|
#include "rigcommander.h"
|
||||||
#include "freqmemory.h"
|
#include "freqmemory.h"
|
||||||
#include "rigidentities.h"
|
#include "rigidentities.h"
|
||||||
|
#include "repeaterattributes.h"
|
||||||
|
|
||||||
#include "calibrationwindow.h"
|
#include "calibrationwindow.h"
|
||||||
|
#include "repeatersetup.h"
|
||||||
#include "satellitesetup.h"
|
#include "satellitesetup.h"
|
||||||
#include "udpserversetup.h"
|
#include "udpserversetup.h"
|
||||||
#include "udpserver.h"
|
#include "udpserver.h"
|
||||||
|
@ -379,6 +381,8 @@ private slots:
|
||||||
|
|
||||||
void on_serialDeviceListCombo_activated(const QString &arg1);
|
void on_serialDeviceListCombo_activated(const QString &arg1);
|
||||||
|
|
||||||
|
void on_rptSetupBtn_clicked();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Ui::wfmain *ui;
|
Ui::wfmain *ui;
|
||||||
QSettings settings;
|
QSettings settings;
|
||||||
|
@ -590,6 +594,7 @@ private:
|
||||||
unsigned char lanGain=0;
|
unsigned char lanGain=0;
|
||||||
|
|
||||||
calibrationWindow *cal;
|
calibrationWindow *cal;
|
||||||
|
repeaterSetup *rpt;
|
||||||
satelliteSetup *sat;
|
satelliteSetup *sat;
|
||||||
udpServerSetup *srv;
|
udpServerSetup *srv;
|
||||||
|
|
||||||
|
|
|
@ -663,6 +663,13 @@
|
||||||
</attribute>
|
</attribute>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QPushButton" name="rptSetupBtn">
|
||||||
|
<property name="text">
|
||||||
|
<string>Repeater</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
|
@ -2004,7 +2011,7 @@
|
||||||
<resources/>
|
<resources/>
|
||||||
<connections/>
|
<connections/>
|
||||||
<buttongroups>
|
<buttongroups>
|
||||||
<buttongroup name="duplexBtnGrp"/>
|
|
||||||
<buttongroup name="radioConnectionSerialNetworkGrp"/>
|
<buttongroup name="radioConnectionSerialNetworkGrp"/>
|
||||||
|
<buttongroup name="duplexBtnGrp"/>
|
||||||
</buttongroups>
|
</buttongroups>
|
||||||
</ui>
|
</ui>
|
||||||
|
|
10
wfview.pro
10
wfview.pro
|
@ -99,7 +99,8 @@ SOURCES += main.cpp\
|
||||||
meter.cpp \
|
meter.cpp \
|
||||||
qledlabel.cpp \
|
qledlabel.cpp \
|
||||||
pttyhandler.cpp \
|
pttyhandler.cpp \
|
||||||
resampler/resample.c
|
resampler/resample.c \
|
||||||
|
repeatersetup.cpp
|
||||||
|
|
||||||
HEADERS += wfmain.h \
|
HEADERS += wfmain.h \
|
||||||
commhandler.h \
|
commhandler.h \
|
||||||
|
@ -119,13 +120,16 @@ HEADERS += wfmain.h \
|
||||||
pttyhandler.h \
|
pttyhandler.h \
|
||||||
resampler/speex_resampler.h \
|
resampler/speex_resampler.h \
|
||||||
resampler/arch.h \
|
resampler/arch.h \
|
||||||
resampler/resample_sse.h
|
resampler/resample_sse.h \
|
||||||
|
repeatersetup.h \
|
||||||
|
repeaterattributes.h
|
||||||
|
|
||||||
|
|
||||||
FORMS += wfmain.ui \
|
FORMS += wfmain.ui \
|
||||||
calibrationwindow.ui \
|
calibrationwindow.ui \
|
||||||
satellitesetup.ui \
|
satellitesetup.ui \
|
||||||
udpserversetup.ui
|
udpserversetup.ui \
|
||||||
|
repeatersetup.ui
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
Ładowanie…
Reference in New Issue