1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2026-07-30 14:04:18 -04:00

Merge pull request #2616 from f4exb/fix-2606

Fix db/S meter minimum values when there is no input and more...
This commit is contained in:
Edouard Griffiths
2026-01-17 11:34:23 +01:00
committed by GitHub
7 changed files with 22 additions and 6 deletions
+1 -1
View File
@@ -9,7 +9,7 @@ on:
- mac_ci
- fix-*
- feature-*
tags:
tags-ignore:
- 'v*'
pull_request:
+1 -1
View File
@@ -3,7 +3,7 @@ name: SDRangel Windows release build and signing
on:
push:
branches:
- master
- windows_release
tags:
- 'v*'
+2
View File
@@ -1375,6 +1375,8 @@ void WDSPRxGUI::tick()
double powDbPeak;
int nbMagsqSamples;
m_wdspRx->getMagSqLevels(powDbAvg, powDbPeak, nbMagsqSamples); // powers directly in dB
powDbAvg = powDbAvg == 0.0 ? WDSPRxSettings::m_minPowerThresholdDB : powDbAvg;
powDbPeak = powDbPeak == 0.0 ? WDSPRxSettings::m_minPowerThresholdDB : powDbPeak;
ui->channelPowerMeter->levelChanged(
(WDSPRxSettings::m_mminPowerThresholdDBf + powDbAvg) / WDSPRxSettings::m_mminPowerThresholdDBf,
@@ -133,6 +133,7 @@ QByteArray WDSPRxSettings::serialize() const
s.writeBool( 8, m_audioBinaural);
s.writeBool( 9, m_audioFlipChannels);
s.writeBool( 10, m_dsb);
s.writeBool( 19, m_audioMute);
// AGC
s.writeBool( 11, m_agc);
s.writeS32( 12, (int) m_agcMode);
@@ -346,6 +347,7 @@ bool WDSPRxSettings::deserialize(const QByteArray& data)
d.readBool( 8, &m_audioBinaural, false);
d.readBool( 9, &m_audioFlipChannels, false);
d.readBool( 10, &m_dsb, false);
d.readBool( 19, &m_audioMute, false);
// AGC
d.readBool( 11, &m_agc, true);
d.readS32( 12, &tmp, 2);
@@ -114,7 +114,7 @@ bool MorseDecoderGUI::handleMessage(const Message& message)
else if (MorseDecoder::MsgReportText::match(message))
{
MorseDecoder::MsgReportText& report = (MorseDecoder::MsgReportText&) message;
textReceived(report.getText());
textReceived(report.getText(), report.m_costFunction);
updateMorseStats(report.m_estimatedPitchHz, report.m_estimatedSpeedWPM, report.m_costFunction);
}
@@ -133,8 +133,15 @@ void MorseDecoderGUI::handleInputMessages()
}
}
void MorseDecoderGUI::textReceived(const QString& text)
void MorseDecoderGUI::textReceived(const QString& text, float cost)
{
// Set text color based on cost
int light = static_cast<int>(255.0f / (1 + 2*cost));
if (light < 25) {
return; // too faint to display
}
// Is the scroll bar at the bottom?
int scrollPos = ui->text->verticalScrollBar()->value();
bool atBottom = scrollPos >= ui->text->verticalScrollBar()->maximum();
@@ -145,6 +152,7 @@ void MorseDecoderGUI::textReceived(const QString& text)
// Restore scroll position
ui->text->verticalScrollBar()->setValue(scrollPos);
ui->text->setTextColor(QColor(light, light, light));
// Format and insert text
ui->text->insertPlainText(MorseDecoderSettings::formatText(text));
@@ -80,7 +80,7 @@ private:
void displaySampleRate(int sampleRate);
void updateChannelList();
bool handleMessage(const Message& message);
void textReceived(const QString& text);
void textReceived(const QString& text, float cost = 0.0f);
void updateMorseStats(float estPitch, float estWPM, float cost);
void makeUIConnections();
+5 -1
View File
@@ -65,7 +65,7 @@ Lock the pitch and speed to the current values detected by GGMorse. Unlock to re
<h3>11: Decoder cost factor</h3>
This is the GGMorse decoder cost factor. Successful decodes yield from a few millis to a few tens of millis.
This is the GGMorse decoder cost factor. Most successful decodes yield from a few millis to a few tens of millis.
<h3>11a: Show decoder threshold</h3>
@@ -87,6 +87,10 @@ Push this button to clear the text in the text window (15)
This area shows the decoded text. New text appears every 3 seconds which is the GGMorse analysis window length.
The intensity of the text is proportional to the cost of the decoding function displayed in (11) (the lower the more confident and the brighter) with the following formula on the 25..255 scale (if lower than 25 which is the background intensity it is not displayed):
$f(cost) = \frac{255}{1+2cost}$
<h3>16. Waveforms view</h3>
This scope display shows waveforms related to the decoding with GGMorse.