mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2024-10-31 23:26:22 +00:00
Make Clang-format happy
This commit is contained in:
parent
1cf508ad20
commit
1517bb1ab8
@ -18,7 +18,6 @@ if(ENABLE_PLUTOSDR)
|
||||
##############################################
|
||||
set(OPT_DRIVER_SOURCES ${OPT_DRIVER_SOURCES} plutosdr_signal_source.cc)
|
||||
set(OPT_DRIVER_HEADERS ${OPT_DRIVER_HEADERS} plutosdr_signal_source.h)
|
||||
|
||||
##############################################
|
||||
# CUSTOM AD936X IIO SOURCE
|
||||
##############################################
|
||||
|
@ -301,6 +301,7 @@ int ad936x_iio_source::general_work(int noutput_items,
|
||||
ad936x_custom->pop_sample_buffer(current_buffer);
|
||||
current_samples = current_buffer.get();
|
||||
|
||||
|
||||
// I and Q samples are interleaved in buffer: IQIQIQ...
|
||||
int32_t n_interleaved_iq_samples_per_channel = current_samples->n_bytes / (ad936x_custom->n_channels * 2);
|
||||
if (noutput_items < n_interleaved_iq_samples_per_channel)
|
||||
@ -311,14 +312,14 @@ int ad936x_iio_source::general_work(int noutput_items,
|
||||
else
|
||||
{
|
||||
// ad9361_channel_demux_and_record(current_samples, ad936x_custom->n_channels, &samplesfile);
|
||||
|
||||
auto **out = reinterpret_cast<int8_t **>(&output_items[0]);
|
||||
uint32_t current_byte = 0;
|
||||
uint32_t current_byte_in_gr = 0;
|
||||
int16_t ch = 0;
|
||||
// std::cout << "nbytes: " << samples_in->n_bytes << " nsamples: " << samples_in->n_samples << " nch: " << nchannels << "\n";
|
||||
if (ad936x_custom->n_channels == 1)
|
||||
{
|
||||
memcpy(&((char *)output_items[0])[0], ¤t_samples->buffer[current_byte], current_samples->n_bytes);
|
||||
memcpy(out[0], ¤t_samples->buffer[current_byte], current_samples->n_bytes);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -327,7 +328,7 @@ int ad936x_iio_source::general_work(int noutput_items,
|
||||
{
|
||||
for (ch = 0; ch < ad936x_custom->n_channels; ch++)
|
||||
{
|
||||
memcpy(&((char *)output_items[ch])[current_byte_in_gr], ¤t_samples->buffer[current_byte], 4); // two bytes I + two bytes Q per channel: 4 bytes
|
||||
memcpy(&out[ch][current_byte_in_gr], ¤t_samples->buffer[current_byte], 4); // two bytes I + two bytes Q per channel: 4 bytes
|
||||
current_byte += 4;
|
||||
}
|
||||
current_byte_in_gr += 4;
|
||||
|
@ -21,6 +21,7 @@
|
||||
#include <fstream>
|
||||
#include <iostream>
|
||||
#include <string>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
ad936x_iio_custom::ad936x_iio_custom(int debug_level_, int log_level_)
|
||||
@ -909,7 +910,7 @@ void ad936x_iio_custom::PlutoTxEnable(bool txon)
|
||||
void ad936x_iio_custom::setPlutoGpo(int p)
|
||||
{
|
||||
char pins[11];
|
||||
sprintf(pins, "0x27 0x%x0", p); // direct access to AD9361 registers... WARNING!
|
||||
snprintf(pins, sizeof(pins), "0x27 0x%x0", p); // direct access to AD9361 registers... WARNING!
|
||||
pins[9] = 0;
|
||||
int ret;
|
||||
// std::cout << "send: " << pins << " \n";
|
||||
|
@ -71,8 +71,8 @@ private:
|
||||
double d_clock_offset_ms;
|
||||
double d_fraction_ms_offset;
|
||||
double d_integer_ms_offset;
|
||||
uint64_t d_next_timetag_samplecount;
|
||||
int d_items_to_samples;
|
||||
uint64_t d_next_timetag_samplecount;
|
||||
bool d_get_next_timetag;
|
||||
};
|
||||
|
||||
|
@ -1,8 +1,16 @@
|
||||
/* -------------------------------------------------------------------------
|
||||
/*!
|
||||
* \file pps_samplestamp.h
|
||||
* \brief A simple container for the sample count associated to PPS rising edge
|
||||
* \author Javier Arribas, jarribas(at)cttc.es
|
||||
* -----------------------------------------------------------------------------
|
||||
*
|
||||
* Copyright (C) 2022 (see AUTHORS file for a list of contributors)
|
||||
* GNSS-SDR is a Global Navigation Satellite System software-defined receiver.
|
||||
* This file is part of GNSS-SDR.
|
||||
*
|
||||
* Copyright (C) 2010-2023 (see AUTHORS file for a list of contributors)
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*
|
||||
* -----------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
#ifndef IIOPPS_PPS_SAMPLESTAMP_H
|
||||
|
@ -1,8 +1,16 @@
|
||||
/*
|
||||
* ppstcprx.cc
|
||||
/*!
|
||||
* \file ppstcprx.cc
|
||||
* \brief TCP client class for front-end PPS samplestamp information reception
|
||||
* \author Javier Arribas, jarribas(at)cttc.es
|
||||
* -----------------------------------------------------------------------------
|
||||
*
|
||||
* Created on: 28 feb 2022
|
||||
* Author: javier
|
||||
* GNSS-SDR is a Global Navigation Satellite System software-defined receiver.
|
||||
* This file is part of GNSS-SDR.
|
||||
*
|
||||
* Copyright (C) 2010-2023 (see AUTHORS file for a list of contributors)
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*
|
||||
* -----------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
#include "ppstcprx.h"
|
||||
|
@ -1,8 +1,16 @@
|
||||
/*
|
||||
* ppstcprx.h
|
||||
/*!
|
||||
* \file ppstcprx.h
|
||||
* \brief TCP client class for front-end PPS samplestamp information reception
|
||||
* \author Javier Arribas, jarribas(at)cttc.es
|
||||
* -----------------------------------------------------------------------------
|
||||
*
|
||||
* Created on: 28 feb 2022
|
||||
* Author: javier
|
||||
* GNSS-SDR is a Global Navigation Satellite System software-defined receiver.
|
||||
* This file is part of GNSS-SDR.
|
||||
*
|
||||
* Copyright (C) 2010-2023 (see AUTHORS file for a list of contributors)
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*
|
||||
* -----------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
#ifndef SRC_LIBS_PPSTCPRX_H_
|
||||
|
Loading…
Reference in New Issue
Block a user