Fixed DD and DV mode selection.

merge-requests/2/head
Elliott Liggett 2021-02-12 23:18:01 -08:00
rodzic a6e1d36fea
commit be52cb49bb
2 zmienionych plików z 4 dodań i 32 usunięć

Wyświetl plik

@ -448,15 +448,8 @@ QByteArray rigCommander::makeFreqPayload(double freq)
void rigCommander::setMode(char mode)
{
QByteArray payload;
if((mode >=0) && (mode < 10))
if((mode >0) && (mode < 0x22 + 1))
{
// annoying hack as mode 6 is undefined.
if(mode > 5)
{
mode++;
}
// valid
payload.setRawData("\x06", 1); // cmd 06 needs filter specified
//payload.setRawData("\x04", 1); // cmd 04 will apply the default filter, but it seems to always pick FIL 02

Wyświetl plik

@ -1834,35 +1834,14 @@ void wfmain::on_scopeEdgeCombo_currentIndexChanged(int index)
void wfmain::on_modeSelectCombo_activated(int index)
{
// Reference:
// 0 1 2 3 4
//modes << "LSB" << "USB" << "AM" << "CW" << "RTTY";
// 5 6 7 8 9
//modes << "FM" << "CW-R" << "RTTY-R" << "LSB-D" << "USB-D";
// The "acticvated" signal means the user initiated a mode change.
// This function is not called if code initated the change.
if(index < 10)
{
// qDebug() << "Mode selection changed. index: " << index;
if(index > 7)
{
// set data mode on
// emit setDataMode(true);
cmdOutQue.append(cmdSetDataModeOn);
delayedCommand->start();
index = index - 8;
} else {
// set data mode off
//emit setDataMode(false);
cmdOutQue.append(cmdSetDataModeOff);
delayedCommand->start();
}
unsigned char newMode = static_cast<unsigned char>(ui->modeSelectCombo->itemData(index).toUInt());
emit setMode(index);
}
qDebug() << __func__ << " at index " << index << " has newMode: " << newMode;
emit setMode(newMode);
}
//void wfmain::on_freqDial_actionTriggered(int action)