diff --git a/gr-util/src/grfftfloatproxy.cpp b/gr-util/src/grfftfloatproxy.cpp index 166f46ba55..cc8a3626f1 100644 --- a/gr-util/src/grfftfloatproxy.cpp +++ b/gr-util/src/grfftfloatproxy.cpp @@ -46,7 +46,7 @@ void GRFFTFloatProc::build_blks(GRTopBlock *top) auto window = gr::fft::window::build(m_fftwindow, fft_size); float window_sum = 0; for(auto v : window) { - window_sum+=v; + window_sum += v; } auto corr = (m_windowCorr) ? window.size() / window_sum : 1; @@ -137,12 +137,11 @@ void GRFFTComplexProc::build_blks(GRTopBlock *top) float window_sum = 0; for(auto v : window) { - window_sum+=v; + window_sum += v; } auto corr = (m_windowCorr) ? window.size() / window_sum : 1; - mult_nrbits = - gr::blocks::multiply_const_cc::make(gr_complex(1.0 / (1 << nrBits), 0), fft_size); + mult_nrbits = gr::blocks::multiply_const_cc::make(gr_complex(1.0 / (1 << nrBits), 0), fft_size); fft_complex = gr::fft::fft_v::make(fft_size, window, true); mult_wind_corr = gr::blocks::multiply_const_cc::make(gr_complex(corr, 0), fft_size); diff --git a/gui/src/widgets/plotinfo.cpp b/gui/src/widgets/plotinfo.cpp index 3ea3746a0b..f793da39b7 100644 --- a/gui/src/widgets/plotinfo.cpp +++ b/gui/src/widgets/plotinfo.cpp @@ -25,7 +25,7 @@ void PlotInfo::addCustomInfo(QWidget *info, InfoPosition hpos, InfoPosition vpos if(vpos == IP_BOTTOM) { m_leftLayout->addWidget(info); } else { - m_leftLayout->insertWidget(0,info); + m_leftLayout->insertWidget(0, info); } info->setParent(m_leftInfo); break; @@ -35,7 +35,7 @@ void PlotInfo::addCustomInfo(QWidget *info, InfoPosition hpos, InfoPosition vpos if(vpos == IP_BOTTOM) { m_rightLayout->addWidget(info); } else { - m_rightLayout->insertWidget(0,info); + m_rightLayout->insertWidget(0, info); } info->setParent(m_rightInfo); @@ -49,7 +49,7 @@ void PlotInfo::addCustomInfo(QWidget *info, InfoPosition hpos, InfoPosition vpos info->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Preferred); } -QLabel *PlotInfo::addLabelInfo(InfoPosition hpos, InfoPosition vpos) +QLabel *PlotInfo::addLabelInfo(InfoPosition hpos, InfoPosition vpos) { QLabel *label = new QLabel(); StyleHelper::PlotInfoLabel(label); diff --git a/main.cpp b/main.cpp index b3e5c802ab..4f3b04f6b4 100644 --- a/main.cpp +++ b/main.cpp @@ -56,8 +56,7 @@ void initLogging() "AD74413R.debug=true\n" "ScopyTranslations.debug=true\n" "GRTimeSinkComponent.debug=true\n" - "GRManager.debug=true\n" - ); + "GRManager.debug=true\n"); } if(!getenv("QT_MESSAGE_PATTERN")) { SetScopyQDebugMessagePattern(); diff --git a/plugins/adc/include/adc/adcplugin.h b/plugins/adc/include/adc/adcplugin.h index 977bb0e780..1f853991ad 100644 --- a/plugins/adc/include/adc/adcplugin.h +++ b/plugins/adc/include/adc/adcplugin.h @@ -56,7 +56,7 @@ class SCOPY_ADC_EXPORT ADCPlugin : public QObject, public PluginBase void newInstrument(ADCInstrumentType t, AcqTreeNode *root); void deleteInstrument(ToolMenuEntry *w); -public Q_SLOT: +public Q_SLOTS: void preferenceChanged(QString, QVariant t1); private: diff --git a/plugins/adc/src/adcfftinstrumentcontroller.cpp b/plugins/adc/src/adcfftinstrumentcontroller.cpp index 0fdec78453..834ca6f77c 100644 --- a/plugins/adc/src/adcfftinstrumentcontroller.cpp +++ b/plugins/adc/src/adcfftinstrumentcontroller.cpp @@ -318,10 +318,10 @@ bool ADCFFTInstrumentController::getComplexChannelPair(AcqTreeNode *node, AcqTre m_complexChannels.append(node); auto cnt = m_complexChannels.count(); if(cnt % 2 == 0) { - if(node->name().endsWith("q",Qt::CaseInsensitive)) { + if(node->name().endsWith("q", Qt::CaseInsensitive)) { *node_i = m_complexChannels[cnt - 2]; *node_q = m_complexChannels[cnt - 1]; - } else if(node->name().endsWith("i",Qt::CaseInsensitive)){ + } else if(node->name().endsWith("i", Qt::CaseInsensitive)) { *node_i = m_complexChannels[cnt - 1]; *node_q = m_complexChannels[cnt - 2]; } else { diff --git a/plugins/adc/src/adcinstrument.cpp b/plugins/adc/src/adcinstrument.cpp index 890a391619..5dd57e21b9 100644 --- a/plugins/adc/src/adcinstrument.cpp +++ b/plugins/adc/src/adcinstrument.cpp @@ -167,7 +167,6 @@ void ADCInstrument::switchToChannelMenu(QString id, bool force) rightStack->show(id); } - void ADCInstrument::addChannel(MenuControlButton *btn, ChannelComponent *ch, CompositeWidget *c) { c->add(btn); diff --git a/plugins/adc/src/adcinstrumentcontroller.cpp b/plugins/adc/src/adcinstrumentcontroller.cpp index 6c1d5902ec..bd0ed224fd 100644 --- a/plugins/adc/src/adcinstrumentcontroller.cpp +++ b/plugins/adc/src/adcinstrumentcontroller.cpp @@ -43,9 +43,7 @@ ADCInstrumentController::~ADCInstrumentController() {} ChannelIdProvider *ADCInstrumentController::getChannelIdProvider() { return chIdP; } -void ADCInstrumentController::setEnableAddRemovePlot(bool) -{ -} +void ADCInstrumentController::setEnableAddRemovePlot(bool) {} void ADCInstrumentController::setEnableAddRemoveInstrument(bool b) { diff --git a/plugins/adc/src/adcplugin.cpp b/plugins/adc/src/adcplugin.cpp index cb9d7f0e1f..6f65a31b7a 100644 --- a/plugins/adc/src/adcplugin.cpp +++ b/plugins/adc/src/adcplugin.cpp @@ -104,7 +104,6 @@ bool ADCPlugin::loadPreferencesPage() auto adc_add_remove_instrument = PreferencesHelper::addPreferenceCheckBox( p, "adc_add_remove_instrument", "Add/Remove instrument feature (EXPERIMENTAL)", m_preferencesPage); - generalSection->contentLayout()->addWidget(adc_plot_xaxis_label_position); generalSection->contentLayout()->addWidget(adc_plot_yaxis_label_position); generalSection->contentLayout()->addWidget(adc_plot_yaxis_handle_position); @@ -135,8 +134,8 @@ void ADCPlugin::loadToolList() { m_toolList.append( SCOPY_NEW_TOOLMENUENTRY("time", "Time", ":/gui/icons/scopy-default/icons/tool_oscilloscope.svg")); - m_toolList.append( - SCOPY_NEW_TOOLMENUENTRY("freq", "Frequency", ":/gui/icons/scopy-default/icons/tool_spectrum_analyzer.svg")); + m_toolList.append(SCOPY_NEW_TOOLMENUENTRY("freq", "Frequency", + ":/gui/icons/scopy-default/icons/tool_spectrum_analyzer.svg")); } bool iio_is_buffer_capable(struct iio_device *dev) @@ -255,13 +254,12 @@ void ADCPlugin::newInstrument(ADCInstrumentType t, AcqTreeNode *root) } } deleteInstrument(t); - }); m_ctrls.append(adc); } else if(t == FREQUENCY) { - m_toolList.append(SCOPY_NEW_TOOLMENUENTRY("freq", "Frequency", - ":/gui/icons/scopy-default/icons/tool_spectrum_analyzer.svg")); + m_toolList.append(SCOPY_NEW_TOOLMENUENTRY( + "freq", "Frequency", ":/gui/icons/scopy-default/icons/tool_spectrum_analyzer.svg")); auto tme = m_toolList.last(); tme->setEnabled(true); tme->setRunBtnVisible(true); @@ -324,7 +322,8 @@ void ADCPlugin::deleteInstrument(ToolMenuEntry *tool) Q_EMIT toolListChanged(); } -void ADCPlugin::preferenceChanged(QString s, QVariant t1) { +void ADCPlugin::preferenceChanged(QString s, QVariant t1) +{ if(s == "adc_add_remove_plot") { for(ADCInstrumentController *ctrl : m_ctrls) { ctrl->setEnableAddRemovePlot(t1.toBool()); diff --git a/plugins/adc/src/freq/fftplotcomponentsettings.cpp b/plugins/adc/src/freq/fftplotcomponentsettings.cpp index 5b452616a2..033373d983 100644 --- a/plugins/adc/src/freq/fftplotcomponentsettings.cpp +++ b/plugins/adc/src/freq/fftplotcomponentsettings.cpp @@ -54,7 +54,7 @@ FFTPlotComponentSettings::FFTPlotComponentSettings(FFTPlotComponent *plt, QWidge MenuOnOffSwitch *m_autoscaleBtn = new MenuOnOffSwitch(tr("AUTOSCALE"), plotMenu, false); m_autoscaler = new PlotAutoscaler(this); - connect(m_autoscaler, &PlotAutoscaler::newMin, this, [=](double v) {m_yCtrl->setMin(v - 10);}); + connect(m_autoscaler, &PlotAutoscaler::newMin, this, [=](double v) { m_yCtrl->setMin(v - 10); }); // connect(m_autoscaler, &PlotAutoscaler::newMax, m_yCtrl, &MenuPlotAxisRangeControl::setMax); connect(m_autoscaleBtn->onOffswitch(), &QAbstractButton::toggled, this, [=](bool b) { @@ -203,7 +203,6 @@ void FFTPlotComponentSettings::removeChannel(ChannelComponent *c) connections.remove(c); } - void FFTPlotComponentSettings::onStart() { m_running = true; @@ -215,4 +214,3 @@ void FFTPlotComponentSettings::onStop() m_running = false; toggleAutoScale(); } - diff --git a/plugins/adc/src/freq/fftplotmanager.cpp b/plugins/adc/src/freq/fftplotmanager.cpp index 778ef11b79..efbb126b1b 100644 --- a/plugins/adc/src/freq/fftplotmanager.cpp +++ b/plugins/adc/src/freq/fftplotmanager.cpp @@ -19,7 +19,7 @@ uint32_t FFTPlotManager::addPlot(QString name) m_plotIdx++; m_plots.append(plt); - connect(this, &PlotManager::newData,plt->plot(0), &PlotWidget::newData); + connect(this, &PlotManager::newData, plt->plot(0), &PlotWidget::newData); plt->setXInterval(m_xInterval); @@ -31,7 +31,6 @@ uint32_t FFTPlotManager::addPlot(QString name) delete plt; }); - addComponent(plt); int idx = m_lay->indexOf(m_statsPanel); diff --git a/plugins/adc/src/freq/fftplotmanagersettings.cpp b/plugins/adc/src/freq/fftplotmanagersettings.cpp index d123bc9084..a0d417a66d 100644 --- a/plugins/adc/src/freq/fftplotmanagersettings.cpp +++ b/plugins/adc/src/freq/fftplotmanagersettings.cpp @@ -41,7 +41,8 @@ QWidget *FFTPlotManagerSettings::createMenu(QWidget *parent) StyleHelper::BlueButton(m_addPlotBtn, "AddPlotButton"); connect(m_addPlotBtn, &QPushButton::clicked, this, [=]() { - uint32_t idx = m_plotManager->addPlot("Frequency Plot " + QString::number(m_plotManager->plots().count())); + uint32_t idx = + m_plotManager->addPlot("Frequency Plot " + QString::number(m_plotManager->plots().count())); FFTPlotComponent *plt = m_plotManager->plot(idx); addPlot(plt); }); @@ -85,7 +86,7 @@ QWidget *FFTPlotManagerSettings::createXAxisMenu(QWidget *parent) new MenuSectionCollapseWidget("X-AXIS", MenuCollapseSection::MHCW_NONE, parent); m_bufferSizeSpin = new MenuSpinbox("Buffer Size", 16, "samples", 0, 4000000, true, false, section); - m_bufferSizeSpin->setScaleRange(1,1e6); + m_bufferSizeSpin->setScaleRange(1, 1e6); connect(m_bufferSizeSpin, &MenuSpinbox::valueChanged, this, [=](double val) { setBufferSize((uint32_t)val); }); QWidget *xMinMax = new QWidget(section); @@ -202,7 +203,7 @@ QWidget *FFTPlotManagerSettings::createXAxisMenu(QWidget *parent) void FFTPlotManagerSettings::onInit() { - m_bufferSizeSpin->setValue(400); + m_bufferSizeSpin->setValue(4096); m_sampleRateSpin->setValue(1); m_xmin->setValue(0); m_xmax->setValue(400); @@ -388,9 +389,7 @@ void FFTPlotManagerSettings::setComplexMode(bool newComplexMode) updateXAxis(); } -void FFTPlotManagerSettings::setEnableAddRemovePlot(bool b) { - m_addPlotBtn->setVisible(b); -} +void FFTPlotManagerSettings::setEnableAddRemovePlot(bool b) { m_addPlotBtn->setVisible(b); } } // namespace adc } // namespace scopy diff --git a/plugins/adc/src/time/timeplotmanager.cpp b/plugins/adc/src/time/timeplotmanager.cpp index acfb9aeecf..49fd9350ea 100644 --- a/plugins/adc/src/time/timeplotmanager.cpp +++ b/plugins/adc/src/time/timeplotmanager.cpp @@ -34,7 +34,7 @@ uint32_t TimePlotManager::addPlot(QString name) m_lay->insertWidget(idx, m_plotpreviewer); } - connect(this, &PlotManager::newData,plt->plot(0), &PlotWidget::newData); + connect(this, &PlotManager::newData, plt->plot(0), &PlotWidget::newData); plt->setXInterval(m_xInterval); diff --git a/plugins/adc/src/time/timeplotmanagersettings.cpp b/plugins/adc/src/time/timeplotmanagersettings.cpp index e40c1d6b7a..83cee2bc33 100644 --- a/plugins/adc/src/time/timeplotmanagersettings.cpp +++ b/plugins/adc/src/time/timeplotmanagersettings.cpp @@ -424,9 +424,7 @@ void TimePlotManagerSettings::updateXModeCombo() } } -void TimePlotManagerSettings::setEnableAddRemovePlot(bool b) { - m_addPlotBtn->setVisible(b); -} +void TimePlotManagerSettings::setEnableAddRemovePlot(bool b) { m_addPlotBtn->setVisible(b); } } // namespace adc } // namespace scopy