mirror of
https://github.com/f4exb/sdrangel.git
synced 2025-02-03 09:44:01 -05:00
ChirpChat modulator enhancements
This commit is contained in:
parent
a72856363c
commit
c833432675
@ -362,7 +362,7 @@ void ChirpChatMod::applySettings(const ChirpChatModSettings& settings, bool forc
|
|||||||
|
|
||||||
if (getMessageQueueToGUI())
|
if (getMessageQueueToGUI())
|
||||||
{
|
{
|
||||||
MsgReportPayloadTime *rpt = MsgReportPayloadTime::create(m_currentPayloadTime);
|
MsgReportPayloadTime *rpt = MsgReportPayloadTime::create(m_currentPayloadTime, symbols.size());
|
||||||
getMessageQueueToGUI()->push(rpt);
|
getMessageQueueToGUI()->push(rpt);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1095,7 +1095,7 @@ void ChirpChatMod::udpRx()
|
|||||||
|
|
||||||
if (getMessageQueueToGUI())
|
if (getMessageQueueToGUI())
|
||||||
{
|
{
|
||||||
MsgReportPayloadTime *rpt = MsgReportPayloadTime::create(m_currentPayloadTime);
|
MsgReportPayloadTime *rpt = MsgReportPayloadTime::create(m_currentPayloadTime, symbols.size());
|
||||||
getMessageQueueToGUI()->push(rpt);
|
getMessageQueueToGUI()->push(rpt);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -74,16 +74,19 @@ public:
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
float getPayloadTimeMs() const { return m_timeMs; }
|
float getPayloadTimeMs() const { return m_timeMs; }
|
||||||
static MsgReportPayloadTime* create(float timeMs) {
|
std::size_t getNbSymbols() const { return m_nbSymbols; }
|
||||||
return new MsgReportPayloadTime(timeMs);
|
static MsgReportPayloadTime* create(float timeMs, std::size_t nbSymbols) {
|
||||||
|
return new MsgReportPayloadTime(timeMs, nbSymbols);
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
float m_timeMs; //!< time in milliseconds
|
float m_timeMs; //!< time in milliseconds
|
||||||
|
std::size_t m_nbSymbols; //!< number of symbols
|
||||||
|
|
||||||
MsgReportPayloadTime(float timeMs) :
|
MsgReportPayloadTime(float timeMs, std::size_t nbSymbols) :
|
||||||
Message(),
|
Message(),
|
||||||
m_timeMs(timeMs)
|
m_timeMs(timeMs),
|
||||||
|
m_nbSymbols(nbSymbols)
|
||||||
{}
|
{}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -97,6 +97,7 @@ bool ChirpChatModGUI::handleMessage(const Message& message)
|
|||||||
fourthsChirps += m_settings.hasSyncWord() ? 8 : 0;
|
fourthsChirps += m_settings.hasSyncWord() ? 8 : 0;
|
||||||
fourthsChirps += m_settings.getNbSFDFourths();
|
fourthsChirps += m_settings.getNbSFDFourths();
|
||||||
float controlMs = fourthsChirps * fourthsMs; // preamble + sync word + SFD
|
float controlMs = fourthsChirps * fourthsMs; // preamble + sync word + SFD
|
||||||
|
ui->timeMessageLengthText->setText(tr("%1").arg(rpt.getNbSymbols()));
|
||||||
ui->timePayloadText->setText(tr("%1 ms").arg(QString::number(rpt.getPayloadTimeMs(), 'f', 0)));
|
ui->timePayloadText->setText(tr("%1 ms").arg(QString::number(rpt.getPayloadTimeMs(), 'f', 0)));
|
||||||
ui->timeTotalText->setText(tr("%1 ms").arg(QString::number(rpt.getPayloadTimeMs() + controlMs, 'f', 0)));
|
ui->timeTotalText->setText(tr("%1 ms").arg(QString::number(rpt.getPayloadTimeMs() + controlMs, 'f', 0)));
|
||||||
ui->timeSymbolText->setText(tr("%1 ms").arg(QString::number(4.0*fourthsMs, 'f', 1)));
|
ui->timeSymbolText->setText(tr("%1 ms").arg(QString::number(4.0*fourthsMs, 'f', 1)));
|
||||||
|
@ -722,12 +722,12 @@
|
|||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLineEdit" name="report">
|
<widget class="QLineEdit" name="myLocator">
|
||||||
<property name="focusPolicy">
|
<property name="focusPolicy">
|
||||||
<enum>Qt::ClickFocus</enum>
|
<enum>Qt::ClickFocus</enum>
|
||||||
</property>
|
</property>
|
||||||
<property name="toolTip">
|
<property name="toolTip">
|
||||||
<string>Report to callee</string>
|
<string>Caller QRA locator</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string/>
|
<string/>
|
||||||
@ -751,12 +751,12 @@
|
|||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLineEdit" name="myLocator">
|
<widget class="QLineEdit" name="report">
|
||||||
<property name="focusPolicy">
|
<property name="focusPolicy">
|
||||||
<enum>Qt::ClickFocus</enum>
|
<enum>Qt::ClickFocus</enum>
|
||||||
</property>
|
</property>
|
||||||
<property name="toolTip">
|
<property name="toolTip">
|
||||||
<string>Caller QRA locator</string>
|
<string>Report to callee</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string/>
|
<string/>
|
||||||
@ -1028,6 +1028,23 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="timeMessageLengthLabel">
|
||||||
|
<property name="text">
|
||||||
|
<string>ML</string>
|
||||||
|
</property>
|
||||||
|
<property name="alignment">
|
||||||
|
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="timeMessageLengthText">
|
||||||
|
<property name="text">
|
||||||
|
<string>000</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<spacer name="horizontalSpacer_6">
|
<spacer name="horizontalSpacer_6">
|
||||||
<property name="orientation">
|
<property name="orientation">
|
||||||
|
Loading…
Reference in New Issue
Block a user