Skip to content

Commit

Permalink
Remove duplicate files
Browse files Browse the repository at this point in the history
  • Loading branch information
BatchDrake committed Aug 13, 2019
1 parent 7016ee8 commit d9ccba2
Show file tree
Hide file tree
Showing 138 changed files with 4,390 additions and 1,988 deletions.
14 changes: 0 additions & 14 deletions AfcControl.cpp

This file was deleted.

22 changes: 0 additions & 22 deletions AfcControl.h

This file was deleted.

21 changes: 0 additions & 21 deletions AfcControl.ui

This file was deleted.

5 changes: 3 additions & 2 deletions App/AppUI.cpp
@@ -1,6 +1,6 @@
//
// filename: description
// Copyright (C) 2018 Gonzalo José Carracedo Carballal
// AppUI.cpp: Initialize UI controls
// Copyright (C) 2019 Gonzalo José Carracedo Carballal
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as
Expand Down Expand Up @@ -32,6 +32,7 @@ AppUI::AppUI(QMainWindow *owner)
this->inspectorPanel = new InspectorPanel(owner);
this->fftPanel = new FftPanel(owner);
this->audioPanel = new AudioPanel(owner);
this->aboutDialog = new AboutDialog(owner);
}

void
Expand Down
67 changes: 39 additions & 28 deletions App/Application.cpp
Expand Up @@ -141,6 +141,7 @@ Application::setAudioInspectorParams(
cfg.set("audio.sample-rate", static_cast<uint64_t>(rate));
cfg.set("audio.demodulator", static_cast<uint64_t>(demod));
this->analyzer->setInspectorConfig(this->audioInspHandle, cfg, 0);
this->assertAudioInspectorLo();
} else {
this->delayedRate = rate;
this->delayedCutOff = cutOff;
Expand All @@ -165,13 +166,14 @@ Application::openAudio(unsigned int rate)

this->playBack = std::make_unique<AudioPlayback>("default", rate);
this->audioSampleRate = this->playBack->getSampleRate();
this->lastAudioLo = this->getAudioInspectorLo();

if (bw > this->analyzer->getSampleRate() / 2)
bw = this->analyzer->getSampleRate() / 2;

ch.bw = bw;
ch.ft = 0;
ch.fc = this->ui.spectrum->getLoFreq();
ch.fc = this->getAudioInspectorLo();
ch.fLow = -.5 * bw;
ch.fHigh = .5 * bw;

Expand Down Expand Up @@ -236,6 +238,21 @@ Application::getAudioInspectorBandwidth(void) const
return bw;
}

SUFREQ
Application::getAudioInspectorLo(void) const
{
SUFREQ lo = this->ui.spectrum->getLoFreq();
SUFREQ bw = this->getAudioInspectorBandwidth();

if (this->ui.audioPanel->getDemod() == AudioDemod::USB)
lo += .5 * bw;
else if (this->ui.audioPanel->getDemod() == AudioDemod::LSB)
lo -= .5 * bw;

return lo;
}


void
Application::connectUI(void)
{
Expand Down Expand Up @@ -437,23 +454,6 @@ Application::startCapture(void)
}
}

//maxIfFreq = this->mediator->getProfile()->getSampleRate() / 2;

/*
this->ui->sbIFFreq->setMaximum(+maxIfFreq);
this->ui->sbIFFreq->setMinimum(-maxIfFreq);
this->setIfFrequency(oldIfFreq);
if (SU_ABS(oldIfFreq) > maxIfFreq) {
this->setIfFrequency(0);
QMessageBox::information(
this,
"IF out of bounds",
"Detector IF was set to 0 Hz to fit sample rate constraints.",
QMessageBox::Ok);
}*/

// Flush log messages from here
Suscan::Logger::getInstance()->flush();

Expand Down Expand Up @@ -686,6 +686,9 @@ Application::onAnalyzerReadError(void)

Application::~Application()
{
if (this->audioCfgTemplate != nullptr)
suscan_config_destroy(this->audioCfgTemplate);

this->playBack = nullptr;
this->analyzer = nullptr;
this->uninstallDataSaver();
Expand Down Expand Up @@ -869,24 +872,32 @@ Application::onCommit(void)
}

void
Application::onLoChanged(qint64 lo)
Application::onLoChanged(qint64)
{
if (this->audioConfigured) {
this->analyzer->setInspectorFreq(
this->audioInspHandle,
static_cast<double>(lo),
0);
if (this->audioConfigured)
this->assertAudioInspectorLo();
}

void
Application::assertAudioInspectorLo(void)
{
SUFREQ lo = this->getAudioInspectorLo();

if (fabs(lo - this->lastAudioLo) > 1e-8) {
this->analyzer->setInspectorFreq(this->audioInspHandle, lo, 0);
this->lastAudioLo = lo;
}
}

void
Application::onBandwidthChanged(qreal)
{
if (this->audioConfigured) {
this->analyzer->setInspectorBandwidth(
this->audioInspHandle,
this->getAudioInspectorBandwidth(),
0);
SUFREQ bw;
bw = this->getAudioInspectorBandwidth();

this->analyzer->setInspectorBandwidth(this->audioInspHandle, bw, 0);
this->assertAudioInspectorLo();
}
}

Expand Down
Empty file removed AppConfig.cpp
Empty file.
18 changes: 0 additions & 18 deletions AppUI.cpp

This file was deleted.

18 changes: 0 additions & 18 deletions Application.cpp

This file was deleted.

22 changes: 0 additions & 22 deletions ApplicationUI.h

This file was deleted.

14 changes: 0 additions & 14 deletions AskControl.cpp

This file was deleted.

22 changes: 0 additions & 22 deletions AskControl.h

This file was deleted.

21 changes: 0 additions & 21 deletions AskControl.ui

This file was deleted.

6 changes: 0 additions & 6 deletions AsyncDataSaver.cpp

This file was deleted.

17 changes: 0 additions & 17 deletions AsyncDataSaver.h

This file was deleted.

32 changes: 0 additions & 32 deletions AudioPanel.cpp

This file was deleted.

0 comments on commit d9ccba2

Please sign in to comment.