Added turbo button to the UI
This commit is contained in:
parent
a1864fa3f0
commit
526b72022e
@ -3887,6 +3887,7 @@ void MainWindow::readFromStdout() //readFromStdout
|
|||||||
|
|
||||||
if(!m_bandActivity.contains(offset)){
|
if(!m_bandActivity.contains(offset)){
|
||||||
QList<int> offsets = {
|
QList<int> offsets = {
|
||||||
|
offset - 60, offset + 60,
|
||||||
offset - 1, offset - 2, offset - 3, offset - 4, offset - 5, offset - 6, offset - 7, offset - 8, offset - 9, offset - 10,
|
offset - 1, offset - 2, offset - 3, offset - 4, offset - 5, offset - 6, offset - 7, offset - 8, offset - 9, offset - 10,
|
||||||
offset + 1, offset + 2, offset + 3, offset + 4, offset + 5, offset + 6, offset + 7, offset + 8, offset + 9, offset + 10
|
offset + 1, offset + 2, offset + 3, offset + 4, offset + 5, offset + 6, offset + 7, offset + 8, offset + 9, offset + 10
|
||||||
};
|
};
|
||||||
@ -4198,6 +4199,8 @@ bool MainWindow::hasExistingMessageBuffer(int offset, bool drift, int *pPrevOffs
|
|||||||
}
|
}
|
||||||
|
|
||||||
QList<int> offsets = {
|
QList<int> offsets = {
|
||||||
|
offset - 60,
|
||||||
|
offset + 60,
|
||||||
offset - 1, offset - 2, offset - 3, offset - 4, offset - 5, offset - 6, offset - 7, offset - 8, offset - 9, offset - 10,
|
offset - 1, offset - 2, offset - 3, offset - 4, offset - 5, offset - 6, offset - 7, offset - 8, offset - 9, offset - 10,
|
||||||
offset + 1, offset + 2, offset + 3, offset + 4, offset + 5, offset + 6, offset + 7, offset + 8, offset + 9, offset + 10
|
offset + 1, offset + 2, offset + 3, offset + 4, offset + 5, offset + 6, offset + 7, offset + 8, offset + 9, offset + 10
|
||||||
};
|
};
|
||||||
@ -4511,6 +4514,8 @@ void MainWindow::guiUpdate()
|
|||||||
if(m_config.split_mode()) foxcom_.nfreq = foxcom_.nfreq - m_XIT; //Fox Tx freq
|
if(m_config.split_mode()) foxcom_.nfreq = foxcom_.nfreq - m_XIT; //Fox Tx freq
|
||||||
strncpy(&foxcom_.cmsg[0][0], QString::fromStdString(message).toLatin1(), 12);
|
strncpy(&foxcom_.cmsg[0][0], QString::fromStdString(message).toLatin1(), 12);
|
||||||
foxcom_.i3bit[0] = m_i3bit;
|
foxcom_.i3bit[0] = m_i3bit;
|
||||||
|
int i = 1;
|
||||||
|
while(!m_txFrameQueue.isEmpty() && foxcom_.nslots < TEST_FOX_WAVE_GEN_SLOTS){
|
||||||
auto pair = m_txFrameQueue.dequeue();
|
auto pair = m_txFrameQueue.dequeue();
|
||||||
strncpy(&foxcom_.cmsg[i][0], pair.first.toLatin1(), 12);
|
strncpy(&foxcom_.cmsg[i][0], pair.first.toLatin1(), 12);
|
||||||
foxcom_.i3bit[i] = pair.second;
|
foxcom_.i3bit[i] = pair.second;
|
||||||
@ -7788,6 +7793,10 @@ void MainWindow::on_pbT2R_clicked()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void MainWindow::on_turboButton_clicked(){
|
||||||
|
m_wideGraph->setTurbo(ui->turboButton->isChecked());
|
||||||
|
}
|
||||||
|
|
||||||
void MainWindow::on_readFreq_clicked()
|
void MainWindow::on_readFreq_clicked()
|
||||||
{
|
{
|
||||||
if (m_transmitting) return;
|
if (m_transmitting) return;
|
||||||
@ -8074,7 +8083,7 @@ void MainWindow::transmit (double snr)
|
|||||||
if(m_config.x2ToneSpacing()) toneSpacing=2*12000.0/1920.0;
|
if(m_config.x2ToneSpacing()) toneSpacing=2*12000.0/1920.0;
|
||||||
if(m_config.x4ToneSpacing()) toneSpacing=4*12000.0/1920.0;
|
if(m_config.x4ToneSpacing()) toneSpacing=4*12000.0/1920.0;
|
||||||
if(m_config.bFox() and !m_tune) toneSpacing=-1;
|
if(m_config.bFox() and !m_tune) toneSpacing=-1;
|
||||||
if(TEST_FOX_WAVE_GEN && !m_tune) toneSpacing=-1;
|
if(TEST_FOX_WAVE_GEN && ui->turboButton->isChecked() && !m_tune) toneSpacing=-1;
|
||||||
|
|
||||||
Q_EMIT sendMessage (NUM_FT8_SYMBOLS,
|
Q_EMIT sendMessage (NUM_FT8_SYMBOLS,
|
||||||
1920.0, ui->TxFreqSpinBox->value () - m_XIT,
|
1920.0, ui->TxFreqSpinBox->value () - m_XIT,
|
||||||
@ -8652,7 +8661,7 @@ void MainWindow::refreshTextDisplay(){
|
|||||||
m_txTextDirtyLastSelectedCall = callsignSelected(true);
|
m_txTextDirtyLastSelectedCall = callsignSelected(true);
|
||||||
m_txTextDirtyLastText = text;
|
m_txTextDirtyLastText = text;
|
||||||
#if TEST_FOX_WAVE_GEN
|
#if TEST_FOX_WAVE_GEN
|
||||||
m_txFrameCountEstimate = (int)ceil(float(frames)/TEST_FOX_WAVE_GEN_SLOTS);
|
m_txFrameCountEstimate = ui->turboButton->isChecked() ? (int)ceil(float(frames)/TEST_FOX_WAVE_GEN_SLOTS) : frames;
|
||||||
#else
|
#else
|
||||||
m_txFrameCountEstimate = frames;
|
m_txFrameCountEstimate = frames;
|
||||||
#endif
|
#endif
|
||||||
@ -8684,19 +8693,20 @@ void MainWindow::updateTxButtonDisplay(){
|
|||||||
if(m_tune || m_transmitting || m_txFrameCount > 0){
|
if(m_tune || m_transmitting || m_txFrameCount > 0){
|
||||||
int count = m_txFrameCount;
|
int count = m_txFrameCount;
|
||||||
#if TEST_FOX_WAVE_GEN
|
#if TEST_FOX_WAVE_GEN
|
||||||
count = qMax(1, (int)ceil(float(count)/TEST_FOX_WAVE_GEN_SLOTS));
|
if(ui->turboButton->isChecked()){
|
||||||
|
count = qMax(1, (int)ceil(float(count)/TEST_FOX_WAVE_GEN_SLOTS));
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if TEST_FOX_WAVE_GEN
|
#if TEST_FOX_WAVE_GEN
|
||||||
int sent = count - (int)ceil(float(m_txFrameQueue.count())/TEST_FOX_WAVE_GEN_SLOTS);
|
int sent = count - ui->turboButton->isChecked() ? (int)ceil(float(m_txFrameQueue.count())/TEST_FOX_WAVE_GEN_SLOTS) : m_txFrameQueue.count();
|
||||||
#else
|
#else
|
||||||
int sent = count - m_txFrameQueue.count();
|
int sent = count - m_txFrameQueue.count();
|
||||||
#endif
|
#endif
|
||||||
|
ui->startTxButton->setText(m_tune ? "Tuning" : QString("%1 (%2/%3)").arg(ui->turboButton->isChecked() ? "Turboing" : "Send").arg(sent).arg(count));
|
||||||
ui->startTxButton->setText(m_tune ? "Tuning" : QString("Turboing (%1/%2)").arg(sent).arg(count));
|
|
||||||
ui->startTxButton->setEnabled(false);
|
ui->startTxButton->setEnabled(false);
|
||||||
} else {
|
} else {
|
||||||
ui->startTxButton->setText(m_txFrameCountEstimate <= 0 ? QString("Send") : QString("Turbo Send (%1)").arg(m_txFrameCountEstimate));
|
ui->startTxButton->setText(m_txFrameCountEstimate <= 0 ? QString("Send") : QString("Send (%1)").arg(m_txFrameCountEstimate));
|
||||||
ui->startTxButton->setEnabled(m_txFrameCountEstimate > 0 && ensureSelcalCallsignSelected(false));
|
ui->startTxButton->setEnabled(m_txFrameCountEstimate > 0 && ensureSelcalCallsignSelected(false));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -332,6 +332,7 @@ private slots:
|
|||||||
void on_tuneButton_clicked (bool);
|
void on_tuneButton_clicked (bool);
|
||||||
void on_pbR2T_clicked();
|
void on_pbR2T_clicked();
|
||||||
void on_pbT2R_clicked();
|
void on_pbT2R_clicked();
|
||||||
|
void on_turboButton_clicked();
|
||||||
void acceptQSO (QDateTime const&, QString const& call, QString const& grid
|
void acceptQSO (QDateTime const&, QString const& call, QString const& grid
|
||||||
, Frequency dial_freq, QString const& mode, QString const& submode
|
, Frequency dial_freq, QString const& mode, QString const& submode
|
||||||
, QString const& rpt_sent, QString const& rpt_received
|
, QString const& rpt_sent, QString const& rpt_received
|
||||||
|
@ -828,6 +828,29 @@ QPushButton:checked {
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<item row="2" column="5">
|
||||||
|
<widget class="QPushButton" name="turboButton">
|
||||||
|
<property name="styleSheet">
|
||||||
|
<string notr="true">QPushButton {
|
||||||
|
background-color:lightgray;
|
||||||
|
padding:0.25em 0.25em; font-weight:normal;
|
||||||
|
border-style:solid;
|
||||||
|
border-width:0px;
|
||||||
|
border-radius:2px;
|
||||||
|
}
|
||||||
|
|
||||||
|
QPushButton:checked {
|
||||||
|
background-color:#6699ff;
|
||||||
|
}</string>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>TURBO</string>
|
||||||
|
</property>
|
||||||
|
<property name="checkable">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
</widget
|
||||||
|
</item>
|
||||||
<item row="2" column="2">
|
<item row="2" column="2">
|
||||||
<widget class="QPushButton" name="autoReplyButton">
|
<widget class="QPushButton" name="autoReplyButton">
|
||||||
<property name="enabled">
|
<property name="enabled">
|
||||||
|
28
plotter.cpp
28
plotter.cpp
@ -28,6 +28,7 @@ CPlotter::CPlotter(QWidget *parent) : //CPlotter Constructor
|
|||||||
m_plot2dGain {0},
|
m_plot2dGain {0},
|
||||||
m_plot2dZero {0},
|
m_plot2dZero {0},
|
||||||
m_nSubMode {0},
|
m_nSubMode {0},
|
||||||
|
m_turbo {false},
|
||||||
m_Running {false},
|
m_Running {false},
|
||||||
m_paintEventBusy {false},
|
m_paintEventBusy {false},
|
||||||
m_fftBinWidth {1500.0/2048.0},
|
m_fftBinWidth {1500.0/2048.0},
|
||||||
@ -600,16 +601,20 @@ void CPlotter::DrawOverlay() //DrawOverlay()
|
|||||||
overPainter.drawLine(0, 30, 0, m_h);
|
overPainter.drawLine(0, 30, 0, m_h);
|
||||||
overPainter.drawLine(fwidth+1, 30, fwidth+1, m_h);
|
overPainter.drawLine(fwidth+1, 30, fwidth+1, m_h);
|
||||||
#if TEST_FOX_WAVE_GEN
|
#if TEST_FOX_WAVE_GEN
|
||||||
overPainter.drawLine(offset+fwidth+1, 30, offset+fwidth+1, m_h);
|
if(m_turbo){
|
||||||
overPainter.drawLine(offset+2*fwidth+1, 30, offset+2*fwidth+1, m_h);
|
overPainter.drawLine(offset+fwidth+1, 30, offset+fwidth+1, m_h);
|
||||||
|
overPainter.drawLine(offset+2*fwidth+1, 30, offset+2*fwidth+1, m_h);
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
overPainter.setPen(penRed);
|
overPainter.setPen(penRed);
|
||||||
overPainter.drawLine(0, 26, fwidth, 26);
|
overPainter.drawLine(0, 26, fwidth, 26);
|
||||||
overPainter.drawLine(0, 28, fwidth, 28);
|
overPainter.drawLine(0, 28, fwidth, 28);
|
||||||
#if TEST_FOX_WAVE_GEN
|
#if TEST_FOX_WAVE_GEN
|
||||||
overPainter.drawLine(offset+fwidth, 26, offset+2*fwidth, 26);
|
if(m_turbo){
|
||||||
overPainter.drawLine(offset+fwidth, 28, offset+2*fwidth, 28);
|
overPainter.drawLine(offset+fwidth, 26, offset+2*fwidth, 26);
|
||||||
|
overPainter.drawLine(offset+fwidth, 28, offset+2*fwidth, 28);
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
QPainter hoverPainter(&m_HoverOverlayPixmap);
|
QPainter hoverPainter(&m_HoverOverlayPixmap);
|
||||||
@ -620,8 +625,10 @@ void CPlotter::DrawOverlay() //DrawOverlay()
|
|||||||
hoverPainter.drawLine(0, 30, 0, m_h);
|
hoverPainter.drawLine(0, 30, 0, m_h);
|
||||||
hoverPainter.drawLine(fwidth+1, 30, fwidth+1, m_h);
|
hoverPainter.drawLine(fwidth+1, 30, fwidth+1, m_h);
|
||||||
#if TEST_FOX_WAVE_GEN
|
#if TEST_FOX_WAVE_GEN
|
||||||
hoverPainter.drawLine(offset+fwidth+1, 30, offset+fwidth+1, m_h);
|
if(m_turbo){
|
||||||
hoverPainter.drawLine(offset+2*fwidth+1, 30, offset+2*fwidth+1, m_h);
|
hoverPainter.drawLine(offset+fwidth+1, 30, offset+fwidth+1, m_h);
|
||||||
|
hoverPainter.drawLine(offset+2*fwidth+1, 30, offset+2*fwidth+1, m_h);
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if DRAW_FREQ_OVERLAY
|
#if DRAW_FREQ_OVERLAY
|
||||||
@ -881,6 +888,15 @@ void CPlotter::setDialFreq(double d)
|
|||||||
void CPlotter::setRxBand(QString band)
|
void CPlotter::setRxBand(QString band)
|
||||||
{
|
{
|
||||||
m_rxBand=band;
|
m_rxBand=band;
|
||||||
|
DrawOverlay();
|
||||||
|
update();
|
||||||
|
}
|
||||||
|
|
||||||
|
void CPlotter::setTurbo(bool turbo)
|
||||||
|
{
|
||||||
|
m_turbo=turbo;
|
||||||
|
DrawOverlay();
|
||||||
|
update();
|
||||||
}
|
}
|
||||||
|
|
||||||
void CPlotter::setFlatten(bool b1, bool b2)
|
void CPlotter::setFlatten(bool b1, bool b2)
|
||||||
|
@ -81,6 +81,7 @@ public:
|
|||||||
void setFlatten(bool b1, bool b2);
|
void setFlatten(bool b1, bool b2);
|
||||||
void setTol(int n);
|
void setTol(int n);
|
||||||
void setRxBand(QString band);
|
void setRxBand(QString band);
|
||||||
|
void setTurbo(bool turbo);
|
||||||
void setReference(bool b) {m_bReference = b;}
|
void setReference(bool b) {m_bReference = b;}
|
||||||
bool Reference() const {return m_bReference;}
|
bool Reference() const {return m_bReference;}
|
||||||
void drawRed(int ia, int ib, float swide[]);
|
void drawRed(int ia, int ib, float swide[]);
|
||||||
@ -147,6 +148,7 @@ private:
|
|||||||
QString m_rxBand;
|
QString m_rxBand;
|
||||||
QString m_redFile;
|
QString m_redFile;
|
||||||
|
|
||||||
|
bool m_turbo;
|
||||||
bool m_Running;
|
bool m_Running;
|
||||||
bool m_paintEventBusy;
|
bool m_paintEventBusy;
|
||||||
bool m_dataFromDisk;
|
bool m_dataFromDisk;
|
||||||
|
@ -566,3 +566,7 @@ void WideGraph::setRedFile(QString fRed)
|
|||||||
{
|
{
|
||||||
ui->widePlot->setRedFile(fRed);
|
ui->widePlot->setRedFile(fRed);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void WideGraph::setTurbo(bool turbo){
|
||||||
|
ui->widePlot->setTurbo(turbo);
|
||||||
|
}
|
||||||
|
@ -50,6 +50,7 @@ public:
|
|||||||
void drawRed(int ia, int ib);
|
void drawRed(int ia, int ib);
|
||||||
void setVHF(bool bVHF);
|
void setVHF(bool bVHF);
|
||||||
void setRedFile(QString fRed);
|
void setRedFile(QString fRed);
|
||||||
|
void setTurbo(bool turbo);
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
void freezeDecode2(int n);
|
void freezeDecode2(int n);
|
||||||
|
Loading…
Reference in New Issue
Block a user