[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Commit-gnuradio] [gnuradio] 06/21: qtgui: whitespace and line formattin
From: |
git |
Subject: |
[Commit-gnuradio] [gnuradio] 06/21: qtgui: whitespace and line formatting |
Date: |
Fri, 30 Oct 2015 21:11:26 +0000 (UTC) |
This is an automated email from the git hooks/post-receive script.
jcorgan pushed a commit to branch master
in repository gnuradio.
commit 416eea170f6549ffa85d9159200cb167ad483aef
Author: Tom Rondeau <address@hidden>
Date: Wed Oct 21 15:52:36 2015 -0400
qtgui: whitespace and line formatting
---
gr-qtgui/lib/WaterfallDisplayPlot.cc | 100 +++++++++++++++++-----------------
gr-qtgui/lib/freqdisplayform.cc | 12 ++--
gr-qtgui/lib/waterfall_sink_c_impl.cc | 3 +-
3 files changed, 57 insertions(+), 58 deletions(-)
diff --git a/gr-qtgui/lib/WaterfallDisplayPlot.cc
b/gr-qtgui/lib/WaterfallDisplayPlot.cc
index e1da844..19da4d1 100644
--- a/gr-qtgui/lib/WaterfallDisplayPlot.cc
+++ b/gr-qtgui/lib/WaterfallDisplayPlot.cc
@@ -283,67 +283,65 @@ WaterfallDisplayPlot::plotNewData(const
std::vector<double*> dataPoints,
const gr::high_res_timer_type timestamp,
const int droppedFrames)
{
- int64_t _npoints_in = d_half_freq ? numDataPoints/2 : numDataPoints;
- int64_t _in_index = d_half_freq ? _npoints_in : 0;
-
- if(!d_stop) {
- if(numDataPoints > 0 && timestamp == 0){
- d_numPoints = numDataPoints/d_nrows;
- resetAxis();
-
- //you got an entire waterfall plot, just plot it
- for(int i = 0; i < d_nplots; i++) {
- d_data[i]->setSpectrumDataBuffer(dataPoints[i]);
- d_data[i]->setNumLinesToUpdate(0);
- d_spectrogram[i]->invalidateCache();
- d_spectrogram[i]->itemChanged();
- }
-
- QwtTimeScaleDraw* timeScale =
(QwtTimeScaleDraw*)axisScaleDraw(QwtPlot::yLeft);
- timeScale->setSecondsPerLine(timePerFFT);
- timeScale->setZeroTime(timestamp);
- timeScale->initiateUpdate();
-
- ((WaterfallZoomer*)d_zoomer)->setSecondsPerLine(timePerFFT);
- ((WaterfallZoomer*)d_zoomer)->setZeroTime(timestamp);
- replot();
- }
+ int64_t _npoints_in = d_half_freq ? numDataPoints/2 : numDataPoints;
+ int64_t _in_index = d_half_freq ? _npoints_in : 0;
+
+ if(!d_stop) {
+ if(numDataPoints > 0 && timestamp == 0){
+ d_numPoints = numDataPoints/d_nrows;
+ resetAxis();
+
+ //you got an entire waterfall plot, just plot it
+ for(int i = 0; i < d_nplots; i++) {
+ d_data[i]->setSpectrumDataBuffer(dataPoints[i]);
+ d_data[i]->setNumLinesToUpdate(0);
+ d_spectrogram[i]->invalidateCache();
+ d_spectrogram[i]->itemChanged();
+ }
+ QwtTimeScaleDraw* timeScale =
(QwtTimeScaleDraw*)axisScaleDraw(QwtPlot::yLeft);
+ timeScale->setSecondsPerLine(timePerFFT);
+ timeScale->setZeroTime(timestamp);
+ timeScale->initiateUpdate();
+ ((WaterfallZoomer*)d_zoomer)->setSecondsPerLine(timePerFFT);
+ ((WaterfallZoomer*)d_zoomer)->setZeroTime(timestamp);
+ replot();
+ }
- else if(numDataPoints > 0) {
- if(_npoints_in != d_numPoints) {
- d_numPoints = _npoints_in;
- resetAxis();
+ else if(numDataPoints > 0) {
+ if(_npoints_in != d_numPoints) {
+ d_numPoints = _npoints_in;
+ resetAxis();
- for(int i = 0; i < d_nplots; i++) {
- d_spectrogram[i]->invalidateCache();
- d_spectrogram[i]->itemChanged();
- }
+ for(int i = 0; i < d_nplots; i++) {
+ d_spectrogram[i]->invalidateCache();
+ d_spectrogram[i]->itemChanged();
+ }
- if(isVisible()) {
- replot();
- }
- }
+ if(isVisible()) {
+ replot();
+ }
+ }
- QwtTimeScaleDraw* timeScale =
(QwtTimeScaleDraw*)axisScaleDraw(QwtPlot::yLeft);
- timeScale->setSecondsPerLine(timePerFFT);
- timeScale->setZeroTime(timestamp);
+ QwtTimeScaleDraw* timeScale =
(QwtTimeScaleDraw*)axisScaleDraw(QwtPlot::yLeft);
+ timeScale->setSecondsPerLine(timePerFFT);
+ timeScale->setZeroTime(timestamp);
- ((WaterfallZoomer*)d_zoomer)->setSecondsPerLine(timePerFFT);
- ((WaterfallZoomer*)d_zoomer)->setZeroTime(timestamp);
+ ((WaterfallZoomer*)d_zoomer)->setSecondsPerLine(timePerFFT);
+ ((WaterfallZoomer*)d_zoomer)->setZeroTime(timestamp);
- for(int i = 0; i < d_nplots; i++) {
- d_data[i]->addFFTData(&(dataPoints[i][_in_index]),
- _npoints_in, droppedFrames);
- d_data[i]->incrementNumLinesToUpdate();
- d_spectrogram[i]->invalidateCache();
- d_spectrogram[i]->itemChanged();
- }
+ for(int i = 0; i < d_nplots; i++) {
+ d_data[i]->addFFTData(&(dataPoints[i][_in_index]),
+ _npoints_in, droppedFrames);
+ d_data[i]->incrementNumLinesToUpdate();
+ d_spectrogram[i]->invalidateCache();
+ d_spectrogram[i]->itemChanged();
+ }
- replot();
- }
+ replot();
}
+ }
}
void
diff --git a/gr-qtgui/lib/freqdisplayform.cc b/gr-qtgui/lib/freqdisplayform.cc
index 301d5a6..a51da3f 100644
--- a/gr-qtgui/lib/freqdisplayform.cc
+++ b/gr-qtgui/lib/freqdisplayform.cc
@@ -107,24 +107,24 @@ FreqDisplayForm::FreqDisplayForm(int nplots, QWidget*
parent)
setTriggerMode(gr::qtgui::TRIG_MODE_FREE);
connect(d_tr_mode_menu, SIGNAL(whichTrigger(gr::qtgui::trigger_mode)),
- this, SLOT(setTriggerMode(gr::qtgui::trigger_mode)));
+ this, SLOT(setTriggerMode(gr::qtgui::trigger_mode)));
// updates trigger state by calling set level or set tag key.
connect(d_tr_mode_menu, SIGNAL(whichTrigger(gr::qtgui::trigger_mode)),
- this, SLOT(updateTrigger(gr::qtgui::trigger_mode)));
+ this, SLOT(updateTrigger(gr::qtgui::trigger_mode)));
setTriggerLevel(0);
connect(d_tr_level_act, SIGNAL(whichTrigger(QString)),
- this, SLOT(setTriggerLevel(QString)));
+ this, SLOT(setTriggerLevel(QString)));
connect(this, SIGNAL(signalTriggerLevel(float)),
- this, SLOT(setTriggerLevel(float)));
+ this, SLOT(setTriggerLevel(float)));
setTriggerChannel(0);
connect(d_tr_channel_menu, SIGNAL(whichTrigger(int)),
- this, SLOT(setTriggerChannel(int)));
+ this, SLOT(setTriggerChannel(int)));
setTriggerTagKey(std::string(""));
connect(d_tr_tag_key_act, SIGNAL(whichTrigger(QString)),
- this, SLOT(setTriggerTagKey(QString)));
+ this, SLOT(setTriggerTagKey(QString)));
connect(this, SIGNAL(signalClearMaxData()),
getPlot(), SLOT(clearMaxData()));
diff --git a/gr-qtgui/lib/waterfall_sink_c_impl.cc
b/gr-qtgui/lib/waterfall_sink_c_impl.cc
index da732c2..f5c6d34 100644
--- a/gr-qtgui/lib/waterfall_sink_c_impl.cc
+++ b/gr-qtgui/lib/waterfall_sink_c_impl.cc
@@ -585,7 +585,8 @@ namespace gr {
in = (const gr_complex*)pmt::c32vector_elements(samples, len);
}
else {
- throw std::runtime_error("waterfall sink: unknown data type of
samples; must be complex.");
+ throw std::runtime_error("waterfall_sink_c: unknown data type "
+ "of samples; must be complex.");
}
int stride = (len - d_fftsize)/d_nrows;
- [Commit-gnuradio] [gnuradio] branch master updated (1aface8 -> f8a84eb), git, 2015/10/30
- [Commit-gnuradio] [gnuradio] 03/21: grc: disconnect hidden blocks, git, 2015/10/30
- [Commit-gnuradio] [gnuradio] 01/21: blocks: Add Complex to IChar block, git, 2015/10/30
- [Commit-gnuradio] [gnuradio] 13/21: qtgui: time display: fixes a threading issue., git, 2015/10/30
- [Commit-gnuradio] [gnuradio] 02/21: grc: fix port placement for hidden ports, git, 2015/10/30
- [Commit-gnuradio] [gnuradio] 06/21: qtgui: whitespace and line formatting,
git <=
- [Commit-gnuradio] [gnuradio] 12/21: qtgui: histogram plotter supports PDU message plotting., git, 2015/10/30
- [Commit-gnuradio] [gnuradio] 08/21: qtgui: Better support for waterfall PDU message port., git, 2015/10/30
- [Commit-gnuradio] [gnuradio] 05/21: qtgui: added documentation describing pdus message input port., git, 2015/10/30
- [Commit-gnuradio] [gnuradio] 04/21: qtgui: Throw an error if the PDU is not a multiple of the fft size., git, 2015/10/30
- [Commit-gnuradio] [gnuradio] 17/21: Merge branch 'maint', git, 2015/10/30
- [Commit-gnuradio] [gnuradio] 18/21: Merge remote-tracking branch 'miek/complex-to-ichar', git, 2015/10/30
- [Commit-gnuradio] [gnuradio] 20/21: Merge branch 'maint', git, 2015/10/30
- [Commit-gnuradio] [gnuradio] 11/21: qtgui: time raster plotters support PDU message plotting., git, 2015/10/30
- [Commit-gnuradio] [gnuradio] 09/21: qtgui: constellation plotter supports PDU message plotting., git, 2015/10/30
- [Commit-gnuradio] [gnuradio] 21/21: Merge remote-tracking branch 'tom/qtgui/pdu_handling', git, 2015/10/30