kopia lustrzana https://gitlab.com/eliggett/wfview
Some tidying
rodzic
36fff27459
commit
49b8cc30c8
|
@ -129,7 +129,6 @@ void commHandler::sendDataOut(const QByteArray &writeData)
|
|||
if(writeData.endsWith(QByteArrayLiteral("\x1C\x00\xFD")))
|
||||
{
|
||||
// Query
|
||||
//qDebug(logSerial()) << "Looks like PTT Query";
|
||||
bool ptt = false;
|
||||
|
||||
if (pttType == pttRTS)
|
||||
|
@ -137,6 +136,8 @@ void commHandler::sendDataOut(const QByteArray &writeData)
|
|||
else if (pttType == pttDTR)
|
||||
ptt = port->isDataTerminalReady();
|
||||
|
||||
//qDebug(logSerial()) << "Looks like PTT Query, ptt is:"<<ptt;
|
||||
|
||||
QByteArray pttreturncmd = QByteArray("\xFE\xFE");
|
||||
pttreturncmd.append(writeData.at(3));
|
||||
pttreturncmd.append(writeData.at(2));
|
||||
|
@ -151,22 +152,23 @@ void commHandler::sendDataOut(const QByteArray &writeData)
|
|||
} else if(writeData.endsWith(QByteArrayLiteral("\x1C\x00\x01\xFD")))
|
||||
{
|
||||
// PTT ON
|
||||
qDebug(logRig) << "PTT On port" << pttType;
|
||||
if (pttType == pttRTS)
|
||||
if (pttType == pttRTS) {
|
||||
port->setRequestToSend(true);
|
||||
else if (pttType == pttDTR)
|
||||
}
|
||||
else if (pttType == pttDTR) {
|
||||
port->setDataTerminalReady(true);
|
||||
|
||||
}
|
||||
mutex.unlock();
|
||||
return;
|
||||
} else if(writeData.endsWith(QByteArrayLiteral("\x1C\x00\x00\xFD")))
|
||||
{
|
||||
// PTT OFF
|
||||
qDebug(logRig) << "PTT Off port" << pttType;
|
||||
if (pttType == pttRTS)
|
||||
if (pttType == pttRTS) {
|
||||
port->setRequestToSend(false);
|
||||
else if (pttType == pttDTR)
|
||||
}
|
||||
else if (pttType == pttDTR) {
|
||||
port->setDataTerminalReady(false);
|
||||
}
|
||||
|
||||
mutex.unlock();
|
||||
return;
|
||||
|
|
|
@ -50,6 +50,7 @@ struct RIGCONFIG {
|
|||
bool civIsRadioModel;
|
||||
bool hasWiFi = false;
|
||||
bool hasEthernet=false;
|
||||
pttType_t pttType=pttCIV;
|
||||
audioSetup rxAudioSetup;
|
||||
audioSetup txAudioSetup;
|
||||
QString modelName;
|
||||
|
|
10
wfmain.cpp
10
wfmain.cpp
|
@ -548,24 +548,15 @@ void wfmain::makeRig()
|
|||
if (serverConfig.enabled) {
|
||||
qInfo(logUdpServer()) << "**** Connecting rig instance to server";
|
||||
connect(rig, SIGNAL(haveAudioData(audioPacket)), udp, SLOT(receiveAudioData(audioPacket)));
|
||||
// Need to add a signal/slot for audio from the client to rig.
|
||||
//connect(udp, SIGNAL(haveAudioData(audioPacket)), rig, SLOT(receiveAudioData(audioPacket)));
|
||||
connect(rig, SIGNAL(haveDataForServer(QByteArray)), udp, SLOT(dataForServer(QByteArray)));
|
||||
connect(udp, SIGNAL(haveDataFromServer(QByteArray)), rig, SLOT(dataFromServer(QByteArray)));
|
||||
}
|
||||
|
||||
connect(this, SIGNAL(setCIVAddr(quint8)), rig, SLOT(setCIVAddr(quint8)));
|
||||
|
||||
connect(this, SIGNAL(sendPowerOn()), rig, SLOT(powerOn()));
|
||||
connect(this, SIGNAL(sendPowerOff()), rig, SLOT(powerOff()));
|
||||
|
||||
|
||||
connect(this, SIGNAL(getDebug()), rig, SLOT(getDebug()));
|
||||
|
||||
// Repeater, duplex, and split:
|
||||
//connect(rpt, SIGNAL(getDuplexMode()), rig, SLOT(getDuplexMode()));
|
||||
//connect(rpt, SIGNAL(setDuplexMode(duplexMode_t)), rig, SLOT(setDuplexMode(duplexMode_t)));
|
||||
//connect(this, SIGNAL(getRptDuplexOffset()), rig, SLOT(getRptDuplexOffset()));
|
||||
connect(rig, SIGNAL(haveRptOffsetFrequency(freqt)), rpt, SLOT(handleRptOffsetFrequency(freqt)));
|
||||
|
||||
connect(this->rpt, &repeaterSetup::getTone, this->rig,
|
||||
|
@ -1981,6 +1972,7 @@ void wfmain::loadSettings()
|
|||
rigTemp->txAudioSetup.resampleQuality = 4;
|
||||
rigTemp->rxAudioSetup.type = prefs.audioSystem;
|
||||
rigTemp->txAudioSetup.type = prefs.audioSystem;
|
||||
rigTemp->pttType = prefs.pttType; // Use the global PTT type.
|
||||
|
||||
rigTemp->baudRate = prefs.serialPortBaud;
|
||||
rigTemp->civAddr = prefs.radioCIVAddr;
|
||||
|
|
Ładowanie…
Reference in New Issue