kopia lustrzana https://gitlab.com/eliggett/wfview
fix for qt5 build errors/warnings and new rigctl PTT
rodzic
29bb2cc497
commit
a5fa0eeb17
24
rigctld.cpp
24
rigctld.cpp
|
@ -211,8 +211,8 @@ static const commandStruct commands_list[] =
|
||||||
{ 0x93, "get_dcs_sql", funcCSQLCode, typeUChar, ARG_OUT, "DCS Sql" },
|
{ 0x93, "get_dcs_sql", funcCSQLCode, typeUChar, ARG_OUT, "DCS Sql" },
|
||||||
{ 'V', "set_vfo", funcSelectVFO, typeVFO, ARG_IN | ARG_NOVFO, "VFO" },
|
{ 'V', "set_vfo", funcSelectVFO, typeVFO, ARG_IN | ARG_NOVFO, "VFO" },
|
||||||
{ 'v', "get_vfo", funcSelectVFO, typeVFO, ARG_NOVFO | ARG_OUT, "VFO" },
|
{ 'v', "get_vfo", funcSelectVFO, typeVFO, ARG_NOVFO | ARG_OUT, "VFO" },
|
||||||
{ 'T', "set_ptt", funcTransceiverStatus, typeBinary, ARG_IN, "PTT" },
|
{ 'T', "set_ptt", funcTransceiverStatus, typePTT, ARG_IN, "VFO", "PTT" },
|
||||||
{ 't', "get_ptt", funcTransceiverStatus, typeBinary, ARG_OUT, "PTT" },
|
{ 't', "get_ptt", funcTransceiverStatus, typePTT, ARG_OUT, "VFO", "PTT" },
|
||||||
{ 'E', "set_mem", funcMemoryContents, typeMode, ARG_IN, "Memory#" },
|
{ 'E', "set_mem", funcMemoryContents, typeMode, ARG_IN, "Memory#" },
|
||||||
{ 'e', "get_mem", funcMemoryContents, typeMode, ARG_OUT, "Memory#" },
|
{ 'e', "get_mem", funcMemoryContents, typeMode, ARG_OUT, "Memory#" },
|
||||||
{ 'H', "set_channel", funcMemoryMode, typeUChar, ARG_IN | ARG_NOVFO, "Channel"},
|
{ 'H', "set_channel", funcMemoryMode, typeUChar, ARG_IN | ARG_NOVFO, "Channel"},
|
||||||
|
@ -933,6 +933,14 @@ int rigCtlClient::getCommand(QStringList& response, bool extended, const command
|
||||||
case typeFloatDiv5:
|
case typeFloatDiv5:
|
||||||
val.setValue(static_cast<ushort>(float(params[0].toFloat() * 5.1)));
|
val.setValue(static_cast<ushort>(float(params[0].toFloat() * 5.1)));
|
||||||
break;
|
break;
|
||||||
|
case typePTT:
|
||||||
|
if (params.length()>1){
|
||||||
|
queue->add(priorityImmediate, queueItem(funcSelectVFO, QVariant::fromValue<vfo_t>(vfoFromName(params[0])),false,currentRx));
|
||||||
|
val.setValue(static_cast<bool>(params[1].toInt()));
|
||||||
|
} else {
|
||||||
|
val.setValue(static_cast<bool>(params[0].toInt()));
|
||||||
|
}
|
||||||
|
|
||||||
case typeBinary:
|
case typeBinary:
|
||||||
val.setValue(static_cast<bool>(params[0].toInt()));
|
val.setValue(static_cast<bool>(params[0].toInt()));
|
||||||
break;
|
break;
|
||||||
|
@ -1073,6 +1081,18 @@ int rigCtlClient::getCommand(QStringList& response, bool extended, const command
|
||||||
|
|
||||||
ret = RIG_OK;
|
ret = RIG_OK;
|
||||||
switch (cmd.type){
|
switch (cmd.type){
|
||||||
|
case typePTT: {
|
||||||
|
bool b = item.value.toBool();
|
||||||
|
if (prefixes.length() && params.length())
|
||||||
|
{
|
||||||
|
response.append(QString("%0%1").arg(prefixes[0], params[0]));
|
||||||
|
}
|
||||||
|
if (prefixes.length()> 1)
|
||||||
|
{
|
||||||
|
response.append(QString("%0%1").arg(prefixes[0], QString::number(b)));
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
case typeBinary:
|
case typeBinary:
|
||||||
{
|
{
|
||||||
bool b = item.value.toBool();
|
bool b = item.value.toBool();
|
||||||
|
|
|
@ -482,14 +482,15 @@ spectrumScope::spectrumScope(bool scope, uchar receiver, uchar vfo, QWidget *par
|
||||||
// Connections
|
// Connections
|
||||||
connect(detachButton,SIGNAL(toggled(bool)), this, SLOT(detachScope(bool)));
|
connect(detachButton,SIGNAL(toggled(bool)), this, SLOT(detachScope(bool)));
|
||||||
|
|
||||||
connect(scopeModeCombo, &QComboBox::currentIndexChanged, this, [=](const int &val) {
|
connect(scopeModeCombo, QOverload<int>::of(&QComboBox::currentIndexChanged), this, [=](int val){
|
||||||
spectrumMode_t s = scopeModeCombo->itemData(val).value<spectrumMode_t>();
|
spectrumMode_t s = scopeModeCombo->itemData(val).value<spectrumMode_t>();
|
||||||
queue->addUnique(priorityImmediate,queueItem(funcScopeMode,QVariant::fromValue(s),false,receiver));
|
queue->addUnique(priorityImmediate,queueItem(funcScopeMode,QVariant::fromValue(s),false,receiver));
|
||||||
currentScopeMode = s;
|
currentScopeMode = s;
|
||||||
showHideControls(s);
|
showHideControls(s);
|
||||||
});
|
});
|
||||||
|
|
||||||
connect(spanCombo, &QComboBox::currentIndexChanged, this, [=](const int &val) {
|
|
||||||
|
connect(spanCombo, QOverload<int>::of(&QComboBox::currentIndexChanged), this, [=](int val){
|
||||||
queue->addUnique(priorityImmediate,queueItem(funcScopeSpan,QVariant::fromValue(spanCombo->itemData(val)),false,receiver));
|
queue->addUnique(priorityImmediate,queueItem(funcScopeSpan,QVariant::fromValue(spanCombo->itemData(val)),false,receiver));
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -497,7 +498,7 @@ spectrumScope::spectrumScope(bool scope, uchar receiver, uchar vfo, QWidget *par
|
||||||
|
|
||||||
connect(toFixedButton,SIGNAL(clicked()), this, SLOT(toFixedPressed()));
|
connect(toFixedButton,SIGNAL(clicked()), this, SLOT(toFixedPressed()));
|
||||||
|
|
||||||
connect(edgeCombo, &QComboBox::currentIndexChanged, this, [=](const int &val) {
|
connect(edgeCombo, QOverload<int>::of(&QComboBox::currentIndexChanged), this, [=](int val){
|
||||||
queue->addUnique(priorityImmediate,queueItem(funcScopeEdge,QVariant::fromValue<uchar>(val+1),false,receiver));
|
queue->addUnique(priorityImmediate,queueItem(funcScopeEdge,QVariant::fromValue<uchar>(val+1),false,receiver));
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -154,7 +154,7 @@ wfmain::wfmain(const QString settingsFile, const QString logFile, bool debugMode
|
||||||
|
|
||||||
connect(queue,SIGNAL(sendValue(cacheItem)),this,SLOT(receiveValue(cacheItem)));
|
connect(queue,SIGNAL(sendValue(cacheItem)),this,SLOT(receiveValue(cacheItem)));
|
||||||
connect(queue,SIGNAL(sendMessage(QString)),this,SLOT(showStatusBarText(QString)));
|
connect(queue,SIGNAL(sendMessage(QString)),this,SLOT(showStatusBarText(QString)));
|
||||||
connect(queue,SIGNAL(intervalUpdate(quint64)),this,SLOT(updatedQueueInterval(quint64)));
|
connect(queue,SIGNAL(intervalUpdate(qint64)),this,SLOT(updatedQueueInterval(qint64)));
|
||||||
|
|
||||||
connect(queue, SIGNAL(finished()), queue, SLOT(deleteLater()));
|
connect(queue, SIGNAL(finished()), queue, SLOT(deleteLater()));
|
||||||
|
|
||||||
|
@ -6489,7 +6489,7 @@ void wfmain::enableControls(bool en)
|
||||||
ui->antennaGroup->setEnabled(en);
|
ui->antennaGroup->setEnabled(en);
|
||||||
}
|
}
|
||||||
|
|
||||||
void wfmain::updatedQueueInterval(quint64 interval)
|
void wfmain::updatedQueueInterval(qint64 interval)
|
||||||
{
|
{
|
||||||
if (interval == -1)
|
if (interval == -1)
|
||||||
enableControls(false);
|
enableControls(false);
|
||||||
|
|
2
wfmain.h
2
wfmain.h
|
@ -495,7 +495,7 @@ private slots:
|
||||||
void connectionTimeout();
|
void connectionTimeout();
|
||||||
void receiveRigCaps(rigCapabilities* caps);
|
void receiveRigCaps(rigCapabilities* caps);
|
||||||
void radioInUse(quint8 radio, bool admin, quint8 busy, QString user, QString ip);
|
void radioInUse(quint8 radio, bool admin, quint8 busy, QString user, QString ip);
|
||||||
void updatedQueueInterval(quint64 interval);
|
void updatedQueueInterval(qint64 interval);
|
||||||
|
|
||||||
// Moved to slots to allow them to be delayed.
|
// Moved to slots to allow them to be delayed.
|
||||||
void getInitialRigState();
|
void getInitialRigState();
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
|
|
||||||
|
|
||||||
enum valueType { typeNone=0, typeFloat, typeFloatDiv, typeFloatDiv5, typeUChar, typeUShort, typeChar, typeShort, typeBinary ,
|
enum valueType { typeNone=0, typeFloat, typeFloatDiv, typeFloatDiv5, typeUChar, typeUShort, typeChar, typeShort, typeBinary ,
|
||||||
typeFreq, typeMode, typeLevel, typeVFO, typeString, typedB, typeSplitVFO,typeVFOInfo, typeSWR};
|
typeFreq, typeMode, typeLevel, typeVFO, typeString, typedB, typeSplitVFO,typeVFOInfo, typeSWR, typePTT};
|
||||||
|
|
||||||
enum connectionStatus_t { connDisconnected, connConnecting, connConnected };
|
enum connectionStatus_t { connDisconnected, connConnecting, connConnected };
|
||||||
|
|
||||||
|
|
Ładowanie…
Reference in New Issue