kopia lustrzana https://gitlab.com/eliggett/wfview
Fixed busted keystroke assignments (mode and transmit).
rodzic
88d31063f9
commit
d03d781713
22
freqmemory.h
22
freqmemory.h
|
@ -9,16 +9,18 @@
|
|||
// modes << "FM" << "CW-R" << "RTTY-R" << "LSB-D" << "USB-D";
|
||||
|
||||
enum mode_kind {
|
||||
modeLSB=0,
|
||||
modeUSB,
|
||||
modeAM,
|
||||
modeCW,
|
||||
modeRTTY,
|
||||
modeFM,
|
||||
modeCW_R,
|
||||
modeRTTY_R,
|
||||
modeLSB_D,
|
||||
modeUSB_D
|
||||
modeLSB=0x00,
|
||||
modeUSB=0x01,
|
||||
modeAM=0x02,
|
||||
modeCW=0x03,
|
||||
modeRTTY=0x04,
|
||||
modeFM=0x05,
|
||||
modeCW_R=0x07,
|
||||
modeRTTY_R=0x08,
|
||||
modeLSB_D=0x80,
|
||||
modeUSB_D=0x81,
|
||||
modeDV=0x17,
|
||||
modeDD=0x27
|
||||
};
|
||||
|
||||
struct preset_kind {
|
||||
|
|
53
wfmain.cpp
53
wfmain.cpp
|
@ -1005,43 +1005,37 @@ void wfmain::shortcutF4()
|
|||
void wfmain::shortcutF5()
|
||||
{
|
||||
// LSB
|
||||
ui->modeSelectCombo->setCurrentIndex(0);
|
||||
on_modeSelectCombo_activated(0);
|
||||
changeMode(modeLSB, false);
|
||||
}
|
||||
|
||||
void wfmain::shortcutF6()
|
||||
{
|
||||
// USB
|
||||
ui->modeSelectCombo->setCurrentIndex(1);
|
||||
on_modeSelectCombo_activated(1);
|
||||
changeMode(modeUSB, false);
|
||||
}
|
||||
|
||||
void wfmain::shortcutF7()
|
||||
{
|
||||
// AM
|
||||
ui->modeSelectCombo->setCurrentIndex(2);
|
||||
on_modeSelectCombo_activated(2);
|
||||
changeMode(modeAM, false);
|
||||
}
|
||||
|
||||
void wfmain::shortcutF8()
|
||||
{
|
||||
// CW
|
||||
ui->modeSelectCombo->setCurrentIndex(3);
|
||||
on_modeSelectCombo_activated(3);
|
||||
changeMode(modeCW, false);
|
||||
}
|
||||
|
||||
void wfmain::shortcutF9()
|
||||
{
|
||||
// USB-D
|
||||
ui->modeSelectCombo->setCurrentIndex(9);
|
||||
on_modeSelectCombo_activated(9);
|
||||
changeMode(modeUSB, true);
|
||||
}
|
||||
|
||||
void wfmain::shortcutF10()
|
||||
{
|
||||
// Build information, debug, whatever you wish
|
||||
QString buildInfo = QString("Build " + QString(GITSHORT) + " on " + QString(__DATE__) + " at " + __TIME__ + " by " + UNAME + "@" + HOST);
|
||||
showStatusBarText(buildInfo);
|
||||
// FM
|
||||
changeMode(modeFM, false);
|
||||
}
|
||||
|
||||
void wfmain::shortcutF12()
|
||||
|
@ -1938,6 +1932,37 @@ void wfmain::on_scopeEdgeCombo_currentIndexChanged(int index)
|
|||
emit setScopeEdge((char)index+1);
|
||||
}
|
||||
|
||||
void wfmain::changeMode(mode_kind mode)
|
||||
{
|
||||
bool dataOn = false;
|
||||
if(((unsigned char) mode >> 4) == 0x08)
|
||||
{
|
||||
dataOn = true;
|
||||
mode = (mode_kind)((int)mode & 0x0f);
|
||||
}
|
||||
|
||||
changeMode(mode, dataOn);
|
||||
}
|
||||
|
||||
void wfmain::changeMode(mode_kind mode, bool dataOn)
|
||||
{
|
||||
int filter = ui->modeFilterCombo->currentData().toInt();
|
||||
emit setMode((unsigned char)mode, filter);
|
||||
if(dataOn)
|
||||
{
|
||||
issueDelayedCommand(cmdSetDataModeOn);
|
||||
ui->dataModeBtn->blockSignals(true);
|
||||
ui->dataModeBtn->setChecked(true);
|
||||
ui->dataModeBtn->blockSignals(false);
|
||||
} else {
|
||||
issueDelayedCommand(cmdSetDataModeOff);
|
||||
ui->dataModeBtn->blockSignals(true);
|
||||
ui->dataModeBtn->setChecked(false);
|
||||
ui->dataModeBtn->blockSignals(false);
|
||||
}
|
||||
issueDelayedCommand(cmdGetMode);
|
||||
}
|
||||
|
||||
void wfmain::on_modeSelectCombo_activated(int index)
|
||||
{
|
||||
// The "acticvated" signal means the user initiated a mode change.
|
||||
|
@ -2342,6 +2367,7 @@ void wfmain::handlePttLimit()
|
|||
// transmission time exceeded!
|
||||
showStatusBarText("Transmit timeout at 3 minutes. Sending PTT OFF command now.");
|
||||
emit setPTT(false);
|
||||
issueDelayedCommand(cmdGetPTT);
|
||||
}
|
||||
|
||||
void wfmain::on_saveSettingsBtn_clicked()
|
||||
|
@ -2549,6 +2575,7 @@ void wfmain::on_transmitBtn_clicked()
|
|||
} else {
|
||||
// Currently transmitting
|
||||
emit setPTT(false);
|
||||
pttTimer->stop();
|
||||
issueDelayedCommand(cmdGetPTT);
|
||||
}
|
||||
}
|
||||
|
|
3
wfmain.h
3
wfmain.h
|
@ -489,6 +489,9 @@ private:
|
|||
void issueDelayedCommandPriority(cmds cmd);
|
||||
void changeSliderQuietly(QSlider *slider, int value);
|
||||
|
||||
void changeMode(mode_kind mode);
|
||||
void changeMode(mode_kind mode, bool dataOn);
|
||||
|
||||
int oldFreqDialVal;
|
||||
|
||||
rigCapabilities rigCaps;
|
||||
|
|
Ładowanie…
Reference in New Issue