Add PSK modes to IC-7610 and to passband.

knobtest
Phil Taylor 2022-09-26 21:22:02 +01:00
rodzic ac0771f034
commit 08b6224471
3 zmienionych plików z 20 dodań i 41 usunięć

Wyświetl plik

@ -17,6 +17,8 @@ enum mode_kind {
modeFM=0x05,
modeCW_R=0x07,
modeRTTY_R=0x08,
modePSK = 0x12,
modePSK_R = 0x13,
modeLSB_D=0x80,
modeUSB_D=0x81,
modeDV=0x17,
@ -29,9 +31,7 @@ enum mode_kind {
modedPMR,
modeNXDN_VN,
modeNXDN_N,
modeDCR,
modePSK,
modePSK_R
modeDCR
};
struct mode_info {

Wyświetl plik

@ -876,28 +876,6 @@ void rigCommander::getPassband()
{
QByteArray payload;
payload.setRawData("\x1A\x03", 2);
/*
int cmd;
if (mode == modeLSB || mode == modeUSB || mode == modeLSB_D || mode == modeUSB_D)
cmd = 1;
else if (mode == modeAM)
cmd = 4;
else if (mode == modeFM)
cmd = 7;
else if (mode == modeCW || mode == modeCW_R)
cmd = 10;
else if (mode == modeRTTY || mode == modeRTTY_R)
cmd = 11;
else if (mode == modePSK || mode == modePSK_R)
cmd = 12;
else
cmd = 1;
payload.append(bcdEncodeInt(cmd));
*/
qDebug() << "Requesting Passband" << payload;
prepDataAndSend(payload);
}
@ -3271,8 +3249,8 @@ void rigCommander::determineRigCaps()
rigCaps.bands.push_back(bandGen);
rigCaps.bsr[bandGen] = 0x11;
rigCaps.modes = commonModes;
rigCaps.modes.insert(rigCaps.modes.end(), {createMode(modePSK, 0x12, "PSK"),
createMode(modePSK_R, 0x13, "PSK-R")});
rigCaps.modes.insert(rigCaps.modes.end(), { createMode(modePSK, 0x12, "PSK"),
createMode(modePSK_R, 0x13, "PSK-R") });
rigCaps.transceiveCommand = QByteArrayLiteral("\x1a\x05\x00\x97");
break;
case model7610:
@ -3305,6 +3283,8 @@ void rigCommander::determineRigCaps()
rigCaps.bands.push_back(band630m);
rigCaps.bands.push_back(band2200m);
rigCaps.modes = commonModes;
rigCaps.modes.insert(rigCaps.modes.end(), { createMode(modePSK, 0x12, "PSK"),
createMode(modePSK_R, 0x13, "PSK-R") });
rigCaps.hasRXAntenna = true;
rigCaps.transceiveCommand = QByteArrayLiteral("\x1a\x05\x01\x12");
break;

Wyświetl plik

@ -3776,30 +3776,29 @@ void wfmain::receiveSpectrumData(QByteArray spectrum, double startFreq, double e
freqIndicatorLine->start->setCoords(freq.MHzDouble,0);
freqIndicatorLine->end->setCoords(freq.MHzDouble,rigCaps.spectAmpMax);
if (currentModeInfo.mk == modeCW || currentModeIndex == modeRTTY || currentModeIndex == modeAM) {
passbandIndicator->topLeft->setCoords(freq.MHzDouble - (passBand / 2), 0);
passbandIndicator->bottomRight->setCoords(freq.MHzDouble + (passBand / 2), rigCaps.spectAmpMax);
}
else if (currentModeInfo.mk == modeLSB) {
if (currentModeInfo.mk == modeLSB || currentModeInfo.mk == modePSK_R) {
passbandIndicator->topLeft->setCoords(freq.MHzDouble - passBand - 0.0001, 0);
passbandIndicator->bottomRight->setCoords(freq.MHzDouble - 0.0001, rigCaps.spectAmpMax);
}
else if (currentModeInfo.mk == modeUSB) {
else if (currentModeInfo.mk == modeUSB || currentModeInfo.mk == modePSK) {
passbandIndicator->topLeft->setCoords(freq.MHzDouble + 0.0001, 0);
passbandIndicator->bottomRight->setCoords(freq.MHzDouble + 0.0001 + passBand, rigCaps.spectAmpMax);
}
else if (currentModeInfo.mk == modeFM) {
else
{
if (currentModeInfo.mk == modeFM) {
if (currentModeInfo.filter == 1)
passBand = 0.015;
else if (currentModeInfo.filter == 2)
passBand = 0.010;
else
passBand = 0.007;
}
passbandIndicator->topLeft->setCoords(freq.MHzDouble - (passBand / 2), 0);
passbandIndicator->bottomRight->setCoords(freq.MHzDouble + (passBand / 2), rigCaps.spectAmpMax);
}
}
if(underlayMode == underlayPeakHold)