SDRAngel  4.11.5
Developer docs for <a href="https://github.com/f4exb/sdrangel">SDRangel<\a>, an Open Source Qt5 / OpenGL 3.0+ SDR and signal analyzer frontend to various hardware.
atvdemodgui.cpp
Go to the documentation of this file.
1 // Copyright (C) 2017 F4HKW //
3 // for F4EXB / SDRAngel //
4 // //
5 // This program is free software; you can redistribute it and/or modify //
6 // it under the terms of the GNU General Public License as published by //
7 // the Free Software Foundation as version 3 of the License, or //
8 // (at your option) any later version. //
9 // //
10 // This program is distributed in the hope that it will be useful, //
11 // but WITHOUT ANY WARRANTY; without even the implied warranty of //
12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
13 // GNU General Public License V3 for more details. //
14 // //
15 // You should have received a copy of the GNU General Public License //
16 // along with this program. If not, see <http://www.gnu.org/licenses/>. //
18 
19 #include <QDockWidget>
20 #include <QMainWindow>
21 
22 #include "atvdemodgui.h"
23 
24 #include "device/deviceuiset.h"
25 #include "dsp/downchannelizer.h"
26 
28 #include "dsp/scopevis.h"
29 #include "ui_atvdemodgui.h"
30 #include "plugin/pluginapi.h"
31 #include "util/simpleserializer.h"
32 #include "util/db.h"
33 #include "dsp/dspengine.h"
34 #include "mainwindow.h"
35 
36 #include "atvdemod.h"
37 
39  DeviceUISet *deviceUISet,
40  BasebandSampleSink *rxChannel)
41 {
42  ATVDemodGUI* gui = new ATVDemodGUI(objPluginAPI, deviceUISet, rxChannel);
43  return gui;
44 }
45 
47 {
48  delete this;
49 }
50 
51 void ATVDemodGUI::setName(const QString& strName)
52 {
53  setObjectName(strName);
54 }
55 
56 QString ATVDemodGUI::getName() const
57 {
58  return objectName();
59 }
60 
62 {
64 }
65 
66 void ATVDemodGUI::setCenterFrequency(qint64 intCenterFrequency)
67 {
68  m_channelMarker.setCenterFrequency(intCenterFrequency);
69  applySettings();
70 }
71 
73 {
74  blockApplySettings(true);
75 
76  //********** ATV Default values **********
77  ui->synchLevel->setValue(100);
78  ui->blackLevel->setValue(310);
79  ui->lineTime->setValue(0);
80  ui->topTime->setValue(3);
81  ui->modulation->setCurrentIndex(0);
82  ui->fps->setCurrentIndex(0);
83  ui->hSync->setChecked(true);
84  ui->vSync->setChecked(true);
85  ui->halfImage->setChecked(false);
86  ui->invertVideo->setChecked(false);
87  ui->standard->setCurrentIndex(1);
88 
89  //********** RF Default values **********
90  ui->decimatorEnable->setChecked(false);
91  ui->rfFiltering->setChecked(false);
92  ui->rfBW->setValue(10);
93  ui->rfOppBW->setValue(10);
94  ui->bfo->setValue(0);
95  ui->fmDeviation->setValue(250);
96 
97  blockApplySettings(false);
99  topTimeUpdate();
100  applySettings();
101 }
102 
103 QByteArray ATVDemodGUI::serialize() const
104 {
105  SimpleSerializer s(1);
106 
108  s.writeU32(2, m_channelMarker.getColor().rgb());
109  s.writeS32(3, ui->synchLevel->value());
110  s.writeS32(4, ui->blackLevel->value());
111  s.writeS32(5, ui->lineTime->value());
112  s.writeS32(6, ui->topTime->value());
113  s.writeS32(7, ui->modulation->currentIndex());
114  s.writeS32(8, ui->fps->currentIndex());
115  s.writeBool(9, ui->hSync->isChecked());
116  s.writeBool(10, ui->vSync->isChecked());
117  s.writeBool(11, ui->halfImage->isChecked());
118  s.writeS32(12, ui->rfBW->value());
119  s.writeS32(13, ui->rfOppBW->value());
120  s.writeS32(14, ui->bfo->value());
121  s.writeBool(15, ui->invertVideo->isChecked());
122  s.writeS32(16, ui->nbLines->currentIndex());
123  s.writeS32(17, ui->fmDeviation->value());
124  s.writeS32(18, ui->standard->currentIndex());
125 
126  return s.final();
127 }
128 
129 bool ATVDemodGUI::deserialize(const QByteArray& arrData)
130 {
131  SimpleDeserializer d(arrData);
132 
133  if (!d.isValid())
134  {
135  resetToDefaults();
136  return false;
137  }
138 
139  if (d.getVersion() == 1)
140  {
141  QByteArray bytetmp;
142  int tmp;
143  bool booltmp;
144 
145  blockApplySettings(true);
146  m_channelMarker.blockSignals(true);
147 
148  d.readS32(1, &tmp, 0);
150 
151 // if (d.readU32(2, &u32tmp)) {
152 // m_objChannelMarker.setColor(u32tmp);
153 // } else {
154 // m_objChannelMarker.setColor(Qt::white);
155 // }
156 
157  d.readS32(3, &tmp, 100);
158  ui->synchLevel->setValue(tmp);
159  d.readS32(4, &tmp, 310);
160  ui->blackLevel->setValue(tmp);
161  d.readS32(5, &tmp, 0);
162  ui->lineTime->setValue(tmp);
163  d.readS32(6, &tmp, 3);
164  ui->topTime->setValue(tmp);
165  d.readS32(7, &tmp, 0);
166  ui->modulation->setCurrentIndex(tmp);
167  d.readS32(8, &tmp, 0);
168  ui->fps->setCurrentIndex(tmp);
169  d.readBool(9, &booltmp, true);
170  ui->hSync->setChecked(booltmp);
171  d.readBool(10, &booltmp, true);
172  ui->vSync->setChecked(booltmp);
173  d.readBool(11, &booltmp, false);
174  ui->halfImage->setChecked(booltmp);
175  d.readS32(12, &tmp, 10);
176  ui->rfBW->setValue(tmp);
177  d.readS32(13, &tmp, 10);
178  ui->rfOppBW->setValue(tmp);
179  d.readS32(14, &tmp, 10);
180  ui->bfo->setValue(tmp);
181  d.readBool(15, &booltmp, true);
182  ui->invertVideo->setChecked(booltmp);
183  d.readS32(16, &tmp, 0);
184  ui->nbLines->setCurrentIndex(tmp);
185  d.readS32(17, &tmp, 250);
186  ui->fmDeviation->setValue(tmp);
187  d.readS32(18, &tmp, 1);
188  ui->standard->setCurrentIndex(tmp);
189 
190  blockApplySettings(false);
191  m_channelMarker.blockSignals(false);
193 
194  lineTimeUpdate();
195  topTimeUpdate();
196  applySettings();
197  return true;
198  }
199  else
200  {
201  resetToDefaults();
202  return false;
203  }
204 }
205 
206 bool ATVDemodGUI::handleMessage(const Message& objMessage)
207 {
209  {
210  int sampleRate = ((ATVDemod::MsgReportEffectiveSampleRate&)objMessage).getSampleRate();
211  int nbPointsPerLine = ((ATVDemod::MsgReportEffectiveSampleRate&)objMessage).getNbPointsPerLine();
212  ui->channelSampleRateText->setText(tr("%1k").arg(sampleRate/1000.0f, 0, 'f', 2));
213  ui->nbPointsPerLineText->setText(tr("%1p").arg(nbPointsPerLine));
214  m_scopeVis->setLiveRate(sampleRate);
215  setRFFiltersSlidersRange(sampleRate);
216  lineTimeUpdate();
217  topTimeUpdate();
218 
219  return true;
220  }
222  {
224  m_inputSampleRate = report.getSampleRate();
225 
226  qDebug("ATVDemodGUI::handleMessage: MsgReportChannelSampleRateChanged: %d", m_inputSampleRate);
227 
228  applySettings();
229  applyRFSettings();
230 
231  return true;
232  }
233  else
234  {
235  return false;
236  }
237 }
238 
240 {
241  qDebug("ATVDemodGUI::channelMarkerChangedByCursor");
242  ui->deltaFrequency->setValue(m_channelMarker.getCenterFrequency());
243 
244  applySettings();
245  applyRFSettings();
246 }
247 
249 {
251 }
252 
254 {
255  Message* message;
256 
257  while ((message = getInputMessageQueue()->pop()) != 0)
258  {
259  if (handleMessage(*message))
260  {
261  delete message;
262  }
263  }
264 }
265 
266 void ATVDemodGUI::onWidgetRolled(QWidget* widget, bool rollDown)
267 {
268  (void) widget;
269  (void) rollDown;
270 }
271 
272 ATVDemodGUI::ATVDemodGUI(PluginAPI* objPluginAPI, DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel, QWidget* objParent) :
273  RollupWidget(objParent),
274  ui(new Ui::ATVDemodGUI),
275  m_pluginAPI(objPluginAPI),
276  m_deviceUISet(deviceUISet),
277  m_channelMarker(this),
278  m_blnDoApplySettings(true),
279  m_intTickCount(0),
280  m_inputSampleRate(48000)
281 {
282  ui->setupUi(this);
283  ui->screenTV->setColor(false);
284  setAttribute(Qt::WA_DeleteOnClose, true);
285  connect(this, SIGNAL(widgetRolled(QWidget*,bool)), this, SLOT(onWidgetRolled(QWidget*,bool)));
286 
287  m_scopeVis = new ScopeVis(ui->glScope);
288  m_atvDemod = (ATVDemod*) rxChannel; //new ATVDemod(m_deviceUISet->m_deviceSourceAPI);
291  m_atvDemod->setTVScreen(ui->screenTV);
292 
293  ui->glScope->connectTimer(MainWindow::getInstance()->getMasterTimer());
294  connect(&MainWindow::getInstance()->getMasterTimer(), SIGNAL(timeout()), this, SLOT(tick())); // 50 ms
295 
296  ui->deltaFrequencyLabel->setText(QString("%1f").arg(QChar(0x94, 0x03)));
297  ui->deltaFrequency->setColorMapper(ColorMapper(ColorMapper::GrayGold));
298  ui->deltaFrequency->setValueRange(false, 7, -9999999, 9999999);
299 
300  m_channelMarker.blockSignals(true);
301  m_channelMarker.setColor(Qt::white);
302  m_channelMarker.setBandwidth(6000000);
304  m_channelMarker.blockSignals(false);
305  m_channelMarker.setVisible(true); // activate signal on the last setting only
306 
308 
312 
313  ui->scopeGUI->setBuddies(m_scopeVis->getInputMessageQueue(), m_scopeVis, ui->glScope);
314 
315  resetToDefaults(); // does applySettings()
316 
317  ui->scopeGUI->setPreTrigger(1);
318  ScopeVis::TraceData traceData;
319  traceData.m_amp = 2.0; // amplification factor
320  traceData.m_ampIndex = 1; // this is second step
321  traceData.m_ofs = 0.5; // direct offset
322  traceData.m_ofsCoarse = 50; // this is 50 coarse steps
323  ui->scopeGUI->changeTrace(0, traceData);
324  ui->scopeGUI->focusOnTrace(0); // re-focus to take changes into account in the GUI
325  ScopeVis::TriggerData triggerData;
326  triggerData.m_triggerLevel = 0.1;
327  triggerData.m_triggerLevelCoarse = 10;
328  triggerData.m_triggerPositiveEdge = false;
329  ui->scopeGUI->changeTrigger(0, triggerData);
330  ui->scopeGUI->focusOnTrigger(0); // re-focus to take changes into account in the GUI
331 
332  connect(&m_channelMarker, SIGNAL(changedByCursor()), this, SLOT(channelMarkerChangedByCursor()));
333  connect(&m_channelMarker, SIGNAL(highlightedByCursor()), this, SLOT(channelMarkerHighlightedByCursor()));
334  connect(getInputMessageQueue(), SIGNAL(messageEnqueued()), this, SLOT(handleSourceMessages()));
335 
336  QChar delta = QChar(0x94, 0x03);
337  ui->fmDeviationLabel->setText(delta);
338 }
339 
341 {
343  delete m_atvDemod; // TODO: check this: when the GUI closes it has to delete the demodulator
344  delete m_scopeVis;
345  delete ui;
346 }
347 
349 {
350  m_blnDoApplySettings = !blnBlock;
351 }
352 
354 {
356  {
359  m_atvDemod->getInputMessageQueue()->push(msgChan);
360 
362  getNominalLineTime(ui->nbLines->currentIndex(), ui->fps->currentIndex()) + ui->lineTime->value() * m_fltLineTimeMultiplier,
363  getNominalLineTime(ui->nbLines->currentIndex(), ui->fps->currentIndex()) * (4.7f / 64.0f) + ui->topTime->value() * m_fltTopTimeMultiplier,
364  getFps(ui->fps->currentIndex()),
365  (ATVDemod::ATVStd) ui->standard->currentIndex(),
366  getNumberOfLines(ui->nbLines->currentIndex()),
367  (ui->halfImage->checkState() == Qt::Checked) ? 0.5f : 1.0f,
368  ui->synchLevel->value() / 1000.0f,
369  ui->blackLevel->value() / 1000.0f,
370  ui->hSync->isChecked(),
371  ui->vSync->isChecked(),
372  ui->invertVideo->isChecked(),
373  ui->screenTabWidget->currentIndex());
374 
375  qDebug() << "ATVDemodGUI::applySettings:"
376  << " m_objChannelizer.inputSampleRate: " << m_inputSampleRate
377  << " m_objATVDemod.sampleRate: " << m_atvDemod->getSampleRate();
378  }
379 }
380 
382 {
384  {
387  (ATVDemod::ATVModulation) ui->modulation->currentIndex(),
388  ui->rfBW->value() * m_rfSliderDivisor * 1.0f,
389  ui->rfOppBW->value() * m_rfSliderDivisor * 1.0f,
390  ui->rfFiltering->isChecked(),
391  ui->decimatorEnable->isChecked(),
392  ui->bfo->value(),
393  ui->fmDeviation->value() / 500.0f);
394  }
395 }
396 
398 {
399  m_blnDoApplySettings = false; // avoid infinite recursion
400  m_channelMarker.blockSignals(true);
401 
402  if (ui->rfFiltering->isChecked()) // FFT filter
403  {
406 
407  if (ui->modulation->currentIndex() == (int) ATVDemod::ATV_LSB) {
409  } else if (ui->modulation->currentIndex() == (int) ATVDemod::ATV_USB) {
411  } else {
413  }
414  }
415  else
416  {
417  if (ui->decimatorEnable->isChecked()) {
419  } else {
421  }
422 
424  }
425 
426  m_channelMarker.blockSignals(false);
428  m_blnDoApplySettings = true;
429 }
430 
432 {
433  // RF filters sliders range
434  int scaleFactor = (int) std::log10(sampleRate/2);
435  m_rfSliderDivisor = std::pow(10.0, scaleFactor-1);
436 
437  if (sampleRate/m_rfSliderDivisor < 50) {
438  m_rfSliderDivisor /= 10;
439  }
440 
441  if (ui->rfFiltering->isChecked())
442  {
443  ui->rfBW->setMaximum((sampleRate) / (2*m_rfSliderDivisor));
444  ui->rfOppBW->setMaximum((sampleRate) / (2*m_rfSliderDivisor));
445  }
446  else
447  {
448  ui->rfBW->setMaximum((sampleRate) / m_rfSliderDivisor);
449  ui->rfOppBW->setMaximum((sampleRate) / m_rfSliderDivisor);
450  }
451 
452  ui->rfBWText->setText(QString("%1k").arg((ui->rfBW->value() * m_rfSliderDivisor) / 1000.0, 0, 'f', 0));
453  ui->rfOppBWText->setText(QString("%1k").arg((ui->rfOppBW->value() * m_rfSliderDivisor) / 1000.0, 0, 'f', 0));
454 }
455 
457 {
459 }
460 
462 {
464 }
465 
467 {
468  if (m_intTickCount < 4) // ~200 ms
469  {
470  m_intTickCount++;
471  }
472  else
473  {
474  if (m_atvDemod)
475  {
478  ui->channePowerText->setText(tr("%1 dB").arg(magSqDB, 0, 'f', 1));
479 
480  if (m_atvDemod->getBFOLocked()) {
481  ui->bfoLockedLabel->setStyleSheet("QLabel { background-color : green; }");
482  } else {
483  ui->bfoLockedLabel->setStyleSheet("QLabel { background:rgb(79,79,79); }");
484  }
485  }
486 
487  m_intTickCount = 0;
488  }
489 
490  return;
491 }
492 
494 {
495  applySettings();
496  ui->synchLevelText->setText(QString("%1 mV").arg(value));
497 }
498 
500 {
501  applySettings();
502  ui->blackLevelText->setText(QString("%1 mV").arg(value));
503 }
504 
506 {
507  ui->lineTime->setToolTip(QString("Line length adjustment (%1)").arg(value));
508  lineTimeUpdate();
509  applySettings();
510 }
511 
513 {
514  ui->topTime->setToolTip(QString("Horizontal sync pulse length adjustment (%1)").arg(value));
515  topTimeUpdate();
516  applySettings();
517 }
518 
520 {
521  applySettings();
522 }
523 
525 {
526  applySettings();
527 }
528 
530 {
531  applySettings();
532 }
533 
535 {
536  applySettings();
537 }
538 
540 {
541  (void) index;
542  lineTimeUpdate();
543  topTimeUpdate();
544  applySettings();
545 }
546 
548 {
549  (void) index;
550  lineTimeUpdate();
551  topTimeUpdate();
552  applySettings();
553 }
554 
556 {
557  (void) index;
558  applySettings();
559 }
560 
562 {
563  (void) checked;
564  resetToDefaults();
565 }
566 
568 {
569  (void) index;
572  applyRFSettings();
573 }
574 
576 {
577  ui->rfBWText->setText(QString("%1k").arg((value * m_rfSliderDivisor) / 1000.0, 0, 'f', 0));
579  applyRFSettings();
580 }
581 
583 {
584  ui->rfOppBWText->setText(QString("%1k").arg((value * m_rfSliderDivisor) / 1000.0, 0, 'f', 0));
586  applyRFSettings();
587 }
588 
590 {
591  (void) checked;
594  applyRFSettings();
595 }
596 
598 {
599  (void) checked;
601  applyRFSettings();
602 }
603 
605 {
607  applyRFSettings();
608 }
609 
611 {
612  ui->bfoText->setText(QString("%1").arg(value * 1.0, 0, 'f', 0));
613  applyRFSettings();
614 }
615 
617 {
618  ui->fmDeviationText->setText(QString("%1").arg(value / 10.0, 0, 'f', 1));
619  applyRFSettings();
620 }
621 
623 {
624  (void) index;
625  applySettings();
626 }
627 
629 {
630  float nominalLineTime = getNominalLineTime(ui->nbLines->currentIndex(), ui->fps->currentIndex());
631  int lineTimeScaleFactor = (int) std::log10(nominalLineTime);
632 
633  if (m_atvDemod->getEffectiveSampleRate() == 0) {
634  m_fltLineTimeMultiplier = std::pow(10.0, lineTimeScaleFactor-3);
635  } else {
637  }
638 
639  float lineTime = nominalLineTime + m_fltLineTimeMultiplier * ui->lineTime->value();
640 
641  if (lineTime < 0.0)
642  ui->lineTimeText->setText("invalid");
643  else if(lineTime < 0.000001)
644  ui->lineTimeText->setText(tr("%1 ns").arg(lineTime * 1000000000.0, 0, 'f', 2));
645  else if(lineTime < 0.001)
646  ui->lineTimeText->setText(tr("%1 µs").arg(lineTime * 1000000.0, 0, 'f', 2));
647  else if(lineTime < 1.0)
648  ui->lineTimeText->setText(tr("%1 ms").arg(lineTime * 1000.0, 0, 'f', 2));
649  else
650  ui->lineTimeText->setText(tr("%1 s").arg(lineTime * 1.0, 0, 'f', 2));
651 }
652 
654 {
655  float nominalTopTime = getNominalLineTime(ui->nbLines->currentIndex(), ui->fps->currentIndex()) * (4.7f / 64.0f);
656  int topTimeScaleFactor = (int) std::log10(nominalTopTime);
657 
658  if (m_atvDemod->getEffectiveSampleRate() == 0) {
659  m_fltTopTimeMultiplier = std::pow(10.0, topTimeScaleFactor-3);
660  } else {
662  }
663 
664  float topTime = nominalTopTime + m_fltTopTimeMultiplier * ui->topTime->value();
665 
666  if (topTime < 0.0)
667  ui->topTimeText->setText("invalid");
668  else if (topTime < 0.000001)
669  ui->topTimeText->setText(tr("%1 ns").arg(topTime * 1000000000.0, 0, 'f', 2));
670  else if(topTime < 0.001)
671  ui->topTimeText->setText(tr("%1 µs").arg(topTime * 1000000.0, 0, 'f', 2));
672  else if(topTime < 1.0)
673  ui->topTimeText->setText(tr("%1 ms").arg(topTime * 1000.0, 0, 'f', 2));
674  else
675  ui->topTimeText->setText(tr("%1 s").arg(topTime * 1.0, 0, 'f', 2));
676 }
677 
678 float ATVDemodGUI::getFps(int fpsIndex)
679 {
680  switch(fpsIndex)
681  {
682  case 0:
683  return 30.0f;
684  break;
685  case 2:
686  return 20.0f;
687  break;
688  case 3:
689  return 16.0f;
690  break;
691  case 4:
692  return 12.0f;
693  break;
694  case 5:
695  return 10.0f;
696  break;
697  case 6:
698  return 8.0f;
699  break;
700  case 7:
701  return 5.0f;
702  break;
703  case 8:
704  return 2.0f;
705  break;
706  case 9:
707  return 1.0f;
708  break;
709  case 1:
710  default:
711  return 25.0f;
712  break;
713  }
714 }
715 
716 float ATVDemodGUI::getNominalLineTime(int nbLinesIndex, int fpsIndex)
717 {
718  float fps = getFps(fpsIndex);
719  int nbLines = getNumberOfLines(nbLinesIndex);
720 
721  return 1.0f / (nbLines * fps);
722 }
723 
724 int ATVDemodGUI::getNumberOfLines(int nbLinesIndex)
725 {
726  switch(nbLinesIndex)
727  {
728  case 0:
729  return 640;
730  break;
731  case 2:
732  return 525;
733  break;
734  case 3:
735  return 480;
736  break;
737  case 4:
738  return 405;
739  break;
740  case 5:
741  return 360;
742  break;
743  case 6:
744  return 343;
745  break;
746  case 7:
747  return 240;
748  break;
749  case 8:
750  return 180;
751  break;
752  case 9:
753  return 120;
754  break;
755  case 10:
756  return 90;
757  break;
758  case 11:
759  return 60;
760  break;
761  case 12:
762  return 32;
763  break;
764  case 1:
765  default:
766  return 625;
767  break;
768  }
769 }
void on_vSync_clicked()
void on_hSync_clicked()
static MainWindow * getInstance()
Definition: mainwindow.h:73
void on_halfImage_clicked()
bool m_triggerPositiveEdge
Trigger on the positive edge (else negative)
Definition: scopevis.h:107
void on_lineTime_valueChanged(int value)
DeviceUISet * m_deviceUISet
Definition: atvdemodgui.h:65
void on_standard_currentIndexChanged(int index)
AM with vestigial lower side band (main signal is in the upper side)
Definition: atvdemod.h:68
int getCenterFrequency() const
Definition: channelmarker.h:42
Ui::ATVDemodGUI * ui
Definition: atvdemodgui.h:63
void push(Message *message, bool emitSignal=true)
Push message onto queue.
virtual bool handleMessage(const Message &objMessage)
void channelMarkerChangedByCursor()
PluginAPI * m_pluginAPI
Definition: atvdemodgui.h:64
static double dbPower(double magsq, double floor=1e-12)
Definition: db.cpp:22
int m_inputSampleRate
Definition: atvdemodgui.h:79
void on_blackLevel_valueChanged(int value)
MessageQueue * getInputMessageQueue()
Get the queue for asynchronous inbound communication.
static const QString m_channelIdURI
Definition: atvdemod.h:252
void channelMarkerHighlightedByCursor()
void configure(MessageQueue *objMessageQueue, float fltLineDurationUs, float fltTopDurationUs, float fltFramePerS, ATVStd enmATVStandard, int intNumberOfLines, float fltRatioOfRowsToDisplay, float fltVoltLevelSynchroTop, float fltVoltLevelSynchroBlack, bool blnHSync, bool blnVSync, bool blnInvertVideo, int intVideoTabIndex)
Definition: atvdemod.cpp:114
void configureRF(MessageQueue *objMessageQueue, int64_t frequencyOffset, ATVModulation enmModulation, float fltRFBandwidth, float fltRFOppBandwidth, bool blnFFTFiltering, bool blndecimatorEnable, float fltBFOFrequency, float fmDeviation)
Definition: atvdemod.cpp:145
virtual ~ATVDemodGUI()
int getEffectiveSampleRate()
Definition: atvdemod.cpp:741
bool deserialize(const QByteArray &arrData)
void emitChangedByAPI()
static float getNominalLineTime(int nbLinesIndex, int fpsIndex)
int m_intTickCount
Definition: atvdemodgui.h:72
void setOppositeBandwidth(int bandwidth)
void on_screenTabWidget_currentChanged(int index)
ATVModulation
Definition: atvdemod.h:63
void addChannelMarker(ChannelMarker *channelMarker)
Add channel marker to spectrum.
Definition: deviceuiset.cpp:72
void onWidgetRolled(QWidget *widget, bool rollDown)
bool getBFOLocked()
Definition: atvdemod.cpp:746
void enterEvent(QEvent *)
void leaveEvent(QEvent *)
void on_nbLines_currentIndexChanged(int index)
void setLiveRate(int sampleRate)
Definition: scopevis.cpp:83
static ATVDemodGUI * create(PluginAPI *objPluginAPI, DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel)
Definition: atvdemodgui.cpp:38
bool readBool(quint32 id, bool *result, bool def=false) const
void on_synchLevel_valueChanged(int value)
bool isValid() const
void on_topTime_valueChanged(int value)
Fixed< IntType, IntBits > arg(const std::complex< Fixed< IntType, IntBits > > &val)
Definition: fixed.h:2401
void on_rfBW_valueChanged(int value)
void setChannelMarkerBandwidth()
void setName(const QString &strName)
Definition: atvdemodgui.cpp:51
int getSampleRate()
Definition: atvdemod.cpp:736
void on_rfFiltering_toggled(bool checked)
int m_rfSliderDivisor
Definition: atvdemodgui.h:78
bool readS32(quint32 id, qint32 *result, qint32 def=0) const
virtual void setMessageQueueToGUI(MessageQueue *queue)
virtual MessageQueue * getInputMessageQueue()
Definition: atvdemodgui.h:55
LSB with vestigial USB.
Definition: channelmarker.h:21
void setTitleColor(const QColor &c)
float m_fltLineTimeMultiplier
Definition: atvdemodgui.h:76
void setHighlighted(bool highlighted)
QByteArray serialize() const
ATVDemodGUI(PluginAPI *objPluginAPI, DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel, QWidget *objParent=0)
virtual void destroy()
Definition: atvdemodgui.cpp:46
static float getFps(int fpsIndex)
USB with vestigial LSB.
Definition: channelmarker.h:20
void registerRxChannelInstance(const QString &channelName, PluginInstanceGUI *pluginGUI)
Definition: deviceuiset.cpp:82
void addRollupWidget(QWidget *widget)
Add rollup widget to channel window.
Definition: deviceuiset.cpp:77
void removeRxChannelInstance(PluginInstanceGUI *pluginGUI)
Definition: deviceuiset.cpp:94
void on_invertVideo_clicked()
static bool match(const Message *message)
Definition: message.cpp:45
Real m_triggerLevel
Level in real units.
Definition: scopevis.h:104
bool getHighlighted() const
Definition: channelmarker.h:61
void on_fmDeviation_valueChanged(int value)
MovingAverageUtil< double, double, 4 > m_objMagSqAverage
Definition: atvdemodgui.h:71
void writeS32(quint32 id, qint32 value)
void blockApplySettings(bool blnBlock)
float m_fltTopTimeMultiplier
Definition: atvdemodgui.h:77
quint32 getVersion() const
ScopeVis * m_scopeVis
Definition: atvdemodgui.h:74
void on_rfOppBW_valueChanged(int value)
void topTimeUpdate()
QString getName() const
Definition: atvdemodgui.cpp:56
float m_amp
Amplification factor.
Definition: scopevis.h:52
static MsgConfigureChannelizer * create(int centerFrequency)
Definition: atvdemod.h:137
ChannelMarker m_channelMarker
Definition: atvdemodgui.h:66
void writeU32(quint32 id, quint32 value)
void on_reset_clicked(bool checked)
void setHighlighted(bool highlighted)
void on_modulation_currentIndexChanged(int index)
void applyRFSettings()
void setColor(const QColor &color)
void on_deltaFrequency_changed(qint64 value)
void on_decimatorEnable_toggled(bool checked)
void handleSourceMessages()
void on_bfo_valueChanged(int value)
void writeBool(quint32 id, bool value)
void applySettings()
void setVisible(bool visible)
void setScopeSink(BasebandSampleSink *scopeSink)
Definition: atvdemod.h:198
ATVDemod * m_atvDemod
Definition: atvdemodgui.h:67
void setBandwidth(int bandwidth)
void setTVScreen(TVScreen *objScreen)
set by the GUI
Definition: atvdemod.cpp:109
const QColor & getColor() const
Definition: channelmarker.h:64
virtual void setCenterFrequency(qint64 intCenterFrequency)
Definition: atvdemodgui.cpp:66
double getMagSq() const
Beware this is scaled to 2^30.
Definition: atvdemod.h:249
void lineTimeUpdate()
void setCenterFrequency(int centerFrequency)
void setSidebands(sidebands_t sidebands)
void resetToDefaults()
Definition: atvdemodgui.cpp:72
virtual qint64 getCenterFrequency() const
Definition: atvdemodgui.cpp:61
uint32_t m_ampIndex
Index in list of amplification factors.
Definition: scopevis.h:53
#define SDR_RX_SCALED
Definition: dsptypes.h:34
void on_fps_currentIndexChanged(int index)
void widgetRolled(QWidget *widget, bool rollDown)
const QByteArray & final()
bool m_blnDoApplySettings
Definition: atvdemodgui.h:69
static int getNumberOfLines(int nbLinesIndex)
void setRFFiltersSlidersRange(int sampleRate)
float m_ofs
Offset factor.
Definition: scopevis.h:54
AM with vestigial upper side band (main signal is in the lower side)
Definition: atvdemod.h:69
int m_ofsCoarse
Coarse offset slider value.
Definition: scopevis.h:55