diff options
| author | hibby <d@vehibberd.com> | 2026-10-06 21:24:40 +0100 |
|---|---|---|
| committer | hibby <d@vehibberd.com> | 2026-10-06 21:24:40 +0100 |
| commit | c25cbdf6fb6d946175f4335fab77bfea601b56db (patch) | |
| tree | 6f7a94b7b81f999e434f61b73d47e337dfd26bf2 /widgets/fastgraph.cpp | |
| parent | 71f5689252c9f13e70e1c24856904475b2307809 (diff) | |
| parent | 0685fcada9f95fe90f70b387cd7d757da8209624 (diff) | |
Merge tag 'debian/3.2.0_rc1+dfsg-2' into debian/trixie-backportsdebian/trixie-backports
tagging wsjtx 3.2.0~rc1+dfsg-2
Diffstat (limited to 'widgets/fastgraph.cpp')
| -rw-r--r-- | widgets/fastgraph.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/widgets/fastgraph.cpp b/widgets/fastgraph.cpp index 9efe5fc6..c9eddd01 100644 --- a/widgets/fastgraph.cpp +++ b/widgets/fastgraph.cpp @@ -6,6 +6,7 @@ #include <QKeyEvent> #include "fastplot.h" #include "SettingsGroup.hpp" +#include "PerformanceTrace.hpp" #include "ui_fastgraph.h" #include "moc_fastgraph.cpp" @@ -20,6 +21,7 @@ FastGraph::FastGraph(QSettings * settings, QWidget *parent) : m_ave {40}, ui {new Ui::FastGraph} { + PerformanceTrace::Phase construction {"fastgraph.construct"}; ui->setupUi(this); setWindowTitle (QApplication::applicationName () + " - " + tr ("Fast Graph")); installEventFilter(parent); //Installing the filter @@ -98,7 +100,11 @@ void FastGraph::on_pbAutoLevel_clicked() for(int i=0; i<=fast_jh; i++) { sum += fast_green[i]; } - m_ave=sum/fast_jh; + if (fast_jh == 0) { + m_ave=0.0; + } else { + m_ave=sum/fast_jh; + } ui->gainSlider->setValue(127-int(2.2*m_ave)); ui->zeroSlider->setValue(int(m_ave)+20); ui->greenZeroSlider->setValue(160-int(3.3*m_ave)); |
