1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2024-11-23 16:38:37 -05:00

Compare commits

...

12 Commits

Author SHA1 Message Date
srcejon
ddfb6f8dd2
Merge 763438c7e5 into 067324edd9 2024-11-01 23:15:40 +00:00
Edouard Griffiths
067324edd9
Merge pull request #2302 from srcejon/snap
Add github action to build and publish Snap
2024-11-01 23:16:02 +01:00
Jon Beniston
763438c7e5 Use short sha 2024-11-01 21:33:38 +00:00
Edouard Griffiths
e8041308b1
Merge pull request #2301 from srcejon/freq_scanner
RemoteTCPSink: Disable IQ compression for RTL0 protocol.
2024-11-01 17:24:55 +01:00
srcejon
b04d7eb10a RemoteTCPSink: Does use IQ only setting for RTL0. 2024-11-01 13:42:23 +00:00
Jon Beniston
fa4f9c2d82 Update snap to github releases and snap store. 2024-11-01 12:21:59 +00:00
srcejon
7f275f2a3e
Merge branch 'f4exb:master' into snap 2024-11-01 12:05:46 +00:00
Jon Beniston
4d6d97538c Fix syntax 2024-10-31 16:07:48 +00:00
Jon Beniston
ede06e2ca8 Fix version name. 2024-10-31 16:05:50 +00:00
Jon Beniston
729d663832 Add id to try to fix "Input required and not supplied: path" in upload-artifact 2024-10-31 14:38:52 +00:00
Jon Beniston
5ac77fca98 Try snapcore/action-build instead 2024-10-31 13:31:05 +00:00
Jon Beniston
ab13f94cf0 Add github action to build snap. 2024-10-31 13:21:34 +00:00
6 changed files with 74 additions and 10 deletions

View File

@ -49,7 +49,7 @@ jobs:
id: get_version
run: |
if [[ "${{github.ref_name}}" == "mac_ci" ]]; then
echo "version=${{github.sha}}" >> $GITHUB_OUTPUT
echo "version=$(echo ${{github.sha}} | cut -c1-7)" >> $GITHUB_OUTPUT
else
echo "version=$(echo ${{github.ref_name}} | cut -c2-)" >> $GITHUB_OUTPUT
fi
@ -108,7 +108,7 @@ jobs:
id: get_version
run: |
if [[ "${{github.ref_name}}" == "mac_ci" ]]; then
echo "version=${{github.sha}}" >> $GITHUB_OUTPUT
echo "version=$(echo ${{github.sha}} | cut -c1-7)" >> $GITHUB_OUTPUT
else
echo "version=$(echo ${{github.ref_name}} | cut -c2-)" >> $GITHUB_OUTPUT
fi

45
.github/workflows/snap.yml vendored Normal file
View File

@ -0,0 +1,45 @@
# See: https://github.com/snapcore/action-build
name: SDRangel snap release build
on:
push:
branches:
- snap
tags:
- 'v*'
pull_request:
jobs:
build_snap:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: true
fetch-depth: 0
- name: Get version
id: get_version
run: |
if [[ "${{github.ref_name}}" == "snap" ]]; then
echo "version=${{github.sha}}" >> $GITHUB_OUTPUT
else
echo "version=$(echo ${{github.ref_name}} | cut -c2-)" >> $GITHUB_OUTPUT
fi
- uses: snapcore/action-build@v1
id: build
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: sdrangel-${{ steps.get_version.outputs.version }}-amd64.snap
path: ${{ steps.build.outputs.snap }}
- name: Upload release
if: startsWith(github.ref, 'refs/tags/')
uses: softprops/action-gh-release@v2
with:
files: ${{ steps.build.outputs.snap }}
- uses: snapcore/action-publish@v1
env:
SNAPCRAFT_STORE_CREDENTIALS: ${{ secrets.SNAP_STORE_LOGIN }}
with:
snap: ${{ steps.build.outputs.snap }}
release: stable

View File

@ -149,6 +149,9 @@ void RemoteTCPSink::start()
m_basebandSink->setBasebandSampleRate(m_basebandSampleRate);
}
MsgConfigureRemoteTCPSink* msg = MsgConfigureRemoteTCPSink::create(m_settings, QStringList(), true, true);
m_basebandSink->getInputMessageQueue()->push(msg);
updatePublicListing();
}

View File

@ -43,6 +43,7 @@ RemoteTCPSinkBaseband::~RemoteTCPSinkBaseband()
void RemoteTCPSinkBaseband::reset()
{
QMutexLocker mutexLocker(&m_mutex);
m_inputMessageQueue.clear();
m_sampleFifo.reset();
m_sink.init();
}

View File

@ -32,7 +32,16 @@ RemoteTCPSinkSettingsDialog::RemoteTCPSinkSettingsDialog(RemoteTCPSinkSettings *
ui->maxClients->setValue(m_settings->m_maxClients);
ui->timeLimit->setValue(m_settings->m_timeLimit);
ui->maxSampleRate->setValue(m_settings->m_maxSampleRate);
ui->iqOnly->setChecked(m_settings->m_iqOnly);
if (m_settings->m_protocol == RemoteTCPSinkSettings::RTL0)
{
ui->iqOnly->setChecked(true);
ui->iqOnlyLabel->setEnabled(false);
ui->iqOnly->setEnabled(false);
}
else
{
ui->iqOnly->setChecked(m_settings->m_iqOnly);
}
ui->compressor->setCurrentIndex((int) m_settings->m_compression);
ui->compressionLevel->setValue(m_settings->m_compressionLevel);
@ -40,6 +49,9 @@ RemoteTCPSinkSettingsDialog::RemoteTCPSinkSettingsDialog(RemoteTCPSinkSettings *
ui->certificate->setText(m_settings->m_certificate);
ui->key->setText(m_settings->m_key);
if (m_settings->m_protocol != RemoteTCPSinkSettings::SDRA_WSS) {
ui->sslSettingsGroup->setEnabled(false);
}
ui->publicListing->setChecked(m_settings->m_public);
ui->publicAddress->setText(m_settings->m_publicAddress);
@ -94,10 +106,13 @@ void RemoteTCPSinkSettingsDialog::accept()
m_settings->m_maxSampleRate = ui->maxSampleRate->value();
m_settingsKeys.append("maxSampleRate");
}
if (ui->iqOnly->isChecked() != m_settings->m_iqOnly)
if (m_settings->m_protocol != RemoteTCPSinkSettings::RTL0)
{
m_settings->m_iqOnly = ui->iqOnly->isChecked();
m_settingsKeys.append("iqOnly");
if (ui->iqOnly->isChecked() != m_settings->m_iqOnly)
{
m_settings->m_iqOnly = ui->iqOnly->isChecked();
m_settingsKeys.append("iqOnly");
}
}
RemoteTCPSinkSettings::Compressor compressor = (RemoteTCPSinkSettings::Compressor) ui->compressor->currentIndex();
if (compressor != m_settings->m_compression)

View File

@ -269,7 +269,7 @@ void RemoteTCPSinkSink::processOneSample(Complex &ci)
}
}
if (!m_settings.m_iqOnly && (m_settings.m_compression == RemoteTCPSinkSettings::FLAC))
if (!m_settings.m_iqOnly && (m_settings.m_compression == RemoteTCPSinkSettings::FLAC) && (m_settings.m_protocol != RemoteTCPSinkSettings::RTL0))
{
// Compress using FLAC
FLAC__int32 iqBuf[2];
@ -360,7 +360,7 @@ void RemoteTCPSinkSink::processOneSample(Complex &ci)
int bytes = 2 * m_settings.m_sampleBits / 8;
m_bytesUncompressed += bytes;
if (!m_settings.m_iqOnly && (m_settings.m_compression == RemoteTCPSinkSettings::ZLIB))
if (!m_settings.m_iqOnly && (m_settings.m_compression == RemoteTCPSinkSettings::ZLIB) && (m_settings.m_protocol != RemoteTCPSinkSettings::RTL0))
{
if (m_zStreamInitialised)
{
@ -1027,12 +1027,12 @@ void RemoteTCPSinkSink::acceptConnection(Socket *client)
client->flush();
// Inform client if they are in a queue
if (!m_settings.m_iqOnly && (m_clients.size() > m_settings.m_maxClients)) {
if (!m_settings.m_iqOnly && (m_clients.size() > m_settings.m_maxClients) && (m_settings.m_protocol != RemoteTCPSinkSettings::RTL0)) {
sendQueuePosition(client, m_clients.size() - m_settings.m_maxClients);
}
// Send existing FLAC header to new client
if (!m_settings.m_iqOnly && (m_settings.m_compression == RemoteTCPSinkSettings::FLAC) && (m_flacHeader.size() == m_flacHeaderSize))
if (!m_settings.m_iqOnly && (m_settings.m_compression == RemoteTCPSinkSettings::FLAC) && (m_flacHeader.size() == m_flacHeaderSize) && (m_settings.m_protocol != RemoteTCPSinkSettings::RTL0))
{
char header[1+4];