diff --git a/rigcommander.cpp b/rigcommander.cpp
index 6c2637a..fa63f0c 100644
--- a/rigcommander.cpp
+++ b/rigcommander.cpp
@@ -1070,8 +1070,26 @@ void rigCommander::getRigID()
prepDataAndSend(payload);
}
+void rigCommander::sayAll()
+{
+ QByteArray payload;
+ payload.setRawData("\x13\x00", 2);
+ prepDataAndSend(payload);
+}
+void rigCommander::sayFrequency()
+{
+ QByteArray payload;
+ payload.setRawData("\x13\x01", 2);
+ prepDataAndSend(payload);
+}
+void rigCommander::sayMode()
+{
+ QByteArray payload;
+ payload.setRawData("\x13\x02", 2);
+ prepDataAndSend(payload);
+}
// Other:
diff --git a/rigcommander.h b/rigcommander.h
index 0e009b9..5d9304b 100644
--- a/rigcommander.h
+++ b/rigcommander.h
@@ -57,6 +57,9 @@ public slots:
void getRigID();
void setCIVAddr(unsigned char civAddr);
void handleNewData(const QByteArray &data);
+ void sayFrequency();
+ void sayMode();
+ void sayAll();
void getDebug();
signals:
diff --git a/wfmain.cpp b/wfmain.cpp
index dcf006b..3b09123 100644
--- a/wfmain.cpp
+++ b/wfmain.cpp
@@ -19,10 +19,6 @@ wfmain::wfmain(QWidget *parent) :
ui->bandStkDataBtn->setVisible(false);
ui->bandStkCWBtn->setVisible(false);
- keyF11 = new QShortcut(this);
- keyF11->setKey(Qt::Key_F11);
- connect(keyF11, SIGNAL(activated()), this, SLOT(shortcutF11()));
-
keyF1 = new QShortcut(this);
keyF1->setKey(Qt::Key_F1);
connect(keyF1, SIGNAL(activated()), this, SLOT(shortcutF1()));
@@ -43,7 +39,6 @@ wfmain::wfmain(QWidget *parent) :
keyF5->setKey(Qt::Key_F5);
connect(keyF5, SIGNAL(activated()), this, SLOT(shortcutF5()));
-
keyF6 = new QShortcut(this);
keyF6->setKey(Qt::Key_F6);
connect(keyF6, SIGNAL(activated()), this, SLOT(shortcutF6()));
@@ -64,6 +59,30 @@ wfmain::wfmain(QWidget *parent) :
keyF10->setKey(Qt::Key_F10);
connect(keyF10, SIGNAL(activated()), this, SLOT(shortcutF10()));
+ keyF11 = new QShortcut(this);
+ keyF11->setKey(Qt::Key_F11);
+ connect(keyF11, SIGNAL(activated()), this, SLOT(shortcutF11()));
+
+ keyF12 = new QShortcut(this);
+ keyF12->setKey(Qt::Key_F12);
+ connect(keyF12, SIGNAL(activated()), this, SLOT(shortcutF12()));
+
+ keyControlT = new QShortcut(this);
+ keyControlT->setKey(Qt::CTRL + Qt::Key_T);
+ connect(keyControlT, SIGNAL(activated()), this, SLOT(shortcutControlT()));
+
+ keyControlR = new QShortcut(this);
+ keyControlR->setKey(Qt::CTRL + Qt::Key_R);
+ connect(keyControlR, SIGNAL(activated()), this, SLOT(shortcutControlR()));
+
+ keyControlI = new QShortcut(this);
+ keyControlI->setKey(Qt::CTRL + Qt::Key_I);
+ connect(keyControlI, SIGNAL(activated()), this, SLOT(shortcutControlI()));
+
+ keyControlU = new QShortcut(this);
+ keyControlU->setKey(Qt::CTRL + Qt::Key_U);
+ connect(keyControlU, SIGNAL(activated()), this, SLOT(shortcutControlU()));
+
keyStar = new QShortcut(this);
keyStar->setKey(Qt::Key_Asterisk);
connect(keyStar, SIGNAL(activated()), this, SLOT(shortcutStar()));
@@ -191,6 +210,10 @@ wfmain::wfmain(QWidget *parent) :
connect(this, SIGNAL(getRigID()), rig, SLOT(getRigID()));
connect(rig, SIGNAL(haveATUStatus(unsigned char)), this, SLOT(receiveATUStatus(unsigned char)));
+ // Speech (emitted from IC-7300 speaker)
+ connect(this, SIGNAL(sayAll()), rig, SLOT(sayAll()));
+ connect(this, SIGNAL(sayFrequency()), rig, SLOT(sayFrequency()));
+ connect(this, SIGNAL(sayMode()), rig, SLOT(sayMode()));
// Plot user interaction
connect(plot, SIGNAL(mouseDoubleClick(QMouseEvent*)), this, SLOT(handlePlotDoubleClick(QMouseEvent*)));
@@ -512,8 +535,6 @@ void wfmain::shortcutF9()
ui->modeSelectCombo->setCurrentIndex(9);
}
-
-
void wfmain::shortcutF10()
{
// Build information, debug, whatever you wish
@@ -521,6 +542,38 @@ void wfmain::shortcutF10()
showStatusBarText(buildInfo);
}
+void wfmain::shortcutF12()
+{
+ // Speak current frequency and mode via IC-7300
+ showStatusBarText("Sending speech command to radio.");
+ emit sayAll();
+}
+
+void wfmain::shortcutControlT()
+{
+ // Transmit
+ qDebug() << "Activated Control-T shortcut";
+ ui->pttOnBtn->click();
+}
+
+void wfmain::shortcutControlR()
+{
+ // Receive
+ ui->pttOffBtn->click();
+}
+
+void wfmain::shortcutControlI()
+{
+ // Enable ATU
+ ui->tuneEnableChk->click();
+}
+
+void wfmain::shortcutControlU()
+{
+ // Run ATU tuning cycle
+ ui->tuneNowBtn->click();
+}
+
void wfmain::shortcutStar()
{
// Jump to frequency tab from Asterisk key on keypad
@@ -532,8 +585,7 @@ void wfmain::shortcutStar()
void wfmain::shortcutSlash()
{
// Cycle through available modes
- // mode+=1%maxmodes
- // TODO
+ ui->modeSelectCombo->setCurrentIndex( (ui->modeSelectCombo->currentIndex()+1) % ui->modeSelectCombo->count() );
}
void wfmain::getInitialRigState()
diff --git a/wfmain.h b/wfmain.h
index 69451dd..c21ca16 100644
--- a/wfmain.h
+++ b/wfmain.h
@@ -58,9 +58,12 @@ signals:
void getScopeMode();
void getScopeEdge();
void getScopeSpan();
+ void sayFrequency();
+ void sayMode();
+ void sayAll();
+
private slots:
- void shortcutF11();
void shortcutF1();
void shortcutF2();
void shortcutF3();
@@ -72,6 +75,13 @@ private slots:
void shortcutF8();
void shortcutF9();
void shortcutF10();
+ void shortcutF11();
+ void shortcutF12();
+
+ void shortcutControlT();
+ void shortcutControlR();
+ void shortcutControlI();
+ void shortcutControlU();
void shortcutStar();
void shortcutSlash();
@@ -219,7 +229,6 @@ private:
QStringList portList;
QString serialPortRig;
- QShortcut *keyF11;
QShortcut *keyF1;
QShortcut *keyF2;
QShortcut *keyF3;
@@ -231,6 +240,13 @@ private:
QShortcut *keyF8;
QShortcut *keyF9;
QShortcut *keyF10;
+ QShortcut *keyF11;
+ QShortcut *keyF12;
+
+ QShortcut *keyControlT;
+ QShortcut *keyControlR;
+ QShortcut *keyControlI;
+ QShortcut *keyControlU;
QShortcut *keyStar;
diff --git a/wfmain.ui b/wfmain.ui
index e8204a3..470bd6f 100644
--- a/wfmain.ui
+++ b/wfmain.ui
@@ -18,7 +18,7 @@
-
- 1
+ 3
@@ -1117,6 +1117,9 @@
PTT On
+
+ Ctrl+S
+
-