Commit de05c3f1 authored by Manolis Surligas's avatar Manolis Surligas

Several minor improvements

* Improve CI testing
* Fix compilation warnings
* Bump up version
parent f8df9c28
Pipeline #16446178 passed with stage
in 9 minutes and 24 seconds
......@@ -7,6 +7,14 @@ test:
script:
- mkdir -p build
- cd build
- cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo ..
- cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_INSTALL_PREFIX=/usr ..
- make
- make install
- ldconfig
- python -c "import satnogs"
- rm -rf *
- cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo -DINCLUDE_DEBUG_BLOCKS=OFF -DCMAKE_INSTALL_PREFIX=/usr ..
- make
- make install
- ldconfig
- python -c "import satnogs"
......@@ -48,7 +48,7 @@ list(INSERT CMAKE_MODULE_PATH 0 ${CMAKE_SOURCE_DIR}/cmake/Modules)
# Set the version information here
set(VERSION_INFO_MAJOR_VERSION 1)
set(VERSION_INFO_API_COMPAT 2)
set(VERSION_INFO_MINOR_VERSION 2)
set(VERSION_INFO_MINOR_VERSION 3)
set(VERSION_INFO_MAINT_VERSION git)
########################################################################
......
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
......@@ -44,14 +44,14 @@ namespace gr
/*!
*
* @param filename the OGG audio file path
* @param number of channels of the OGG stream. If the actual OGG stream
* contains a different number of channels than specified an exception
* is raised
* @param channels number of channels of the OGG stream.
* If the actual OGG stream contains a different number of channels
* than specified an exception is raised
* @param repeat if set to true, when EOF is reached the block
* will continue to output samples from the beginning of the OGG file.
*/
static sptr
make (const std::string& filename, size_t channels = 1,
make (const std::string& filename, int channels = 1,
bool repeat = false);
};
......
......@@ -47,12 +47,12 @@ namespace gr
*
* @param addr the address of the interface to listen at
* @param port the TCP port to listen or connect
* @param serve_mode If set to yes this block, act as a rigctl server.
* @param server_mode If set to yes this block, act as a rigctl server.
* Otherwise as a rigctl client
* @param interval_ms The interval in milliseconds at which the client
* request the frequency from the rigctl
* @param mtu the maximum MTU
* @return
* @return shared pointer of the block
*/
static sptr
make (const std::string& addr, uint16_t port, bool server_mode,
......
......@@ -77,20 +77,19 @@ namespace gr
* delivered at the sink block out-of-sync causing the frame transmission
* to terminate sooner.
*
* @param ax25_dest_addr the destination AX.25 address
* @param ax25_dest_ssid the destination AX.25 SSID
* @param ax25_src_addr the source AX.25 address
* @param ax25_src_ssid the source AX.25 SSID
*
*/
static sptr
make (const std::vector<uint8_t>& preamble,
const std::vector<uint8_t>& sync_word,
bool append_crc,
bool whitening,
bool manchester,
bool msb_first,
bool ax25_format,
const std::string& ax25_dest_addr,
uint8_t ax25_dest_ssid,
const std::string& ax25_src_addr,
uint8_t ax25_src_ssid,
size_t settling_samples);
const std::vector<uint8_t>& sync_word, bool append_crc,
bool whitening, bool manchester, bool msb_first, bool ax25_format,
const std::string& ax25_dest_addr, uint8_t ax25_dest_ssid,
const std::string& ax25_src_addr, uint8_t ax25_src_ssid,
size_t settling_samples);
};
} // namespace satnogs
......
......@@ -126,7 +126,7 @@ namespace gr
void
noaa_apt_sink_impl::write_image (png::image<png::gray_pixel> image,
std::string filename)
std::string filename)
{
// In case the flip option is set
if(d_flip) {
......
......@@ -36,7 +36,7 @@ namespace gr {
namespace satnogs {
ogg_source::sptr
ogg_source::make (const std::string& filename, size_t channels, bool repeat)
ogg_source::make (const std::string& filename, int channels, bool repeat)
{
return gnuradio::get_initial_sptr (
new ogg_source_impl (filename, channels, repeat));
......@@ -46,7 +46,7 @@ namespace gr {
* The private constructor
*/
ogg_source_impl::ogg_source_impl (const std::string& filename,
size_t channels, bool repeat) :
int channels, bool repeat) :
gr::sync_block (
"ogg_source", gr::io_signature::make (0, 0, 0),
gr::io_signature::make (channels, channels, sizeof(float))),
......@@ -102,12 +102,13 @@ namespace gr {
long int ret;
int section = 0;
int available = (noutput_items / d_channels);
int available_samples = 0;
int produced = 0;
ret = ov_read (&d_ogvorb_f, (char *)d_in_buffer,
available * sizeof(int16_t),
0, sizeof(int16_t), 1, &section);
if(ret < sizeof(int16_t)) {
if(ret <= 0) {
/*
* If return value is EOF and the repeat mode is set seek back to the
* start of the ogg stream
......@@ -122,12 +123,13 @@ namespace gr {
return WORK_DONE;
}
available_samples = ret / sizeof(int16_t);
/* Convert to float the signed-short audio samples */
volk_16i_s32f_convert_32f (d_out_buffer, d_in_buffer, 2 << 15,
ret / sizeof(int16_t));
available_samples);
/* De-interleave the available channels */
for(int i = 0; i < ret / sizeof(int16_t); i += d_channels, produced++) {
for(int i = 0; i < available_samples; i += d_channels, produced++) {
for(int chan = 0; chan < d_channels; chan++){
((float *)output_items[chan])[produced] = d_out_buffer[i * d_channels + chan];
}
......
......@@ -33,7 +33,7 @@ namespace gr
class ogg_source_impl : public ogg_source
{
private:
const size_t d_channels;
const int d_channels;
const bool d_repeat;
OggVorbis_File d_ogvorb_f;
......@@ -41,7 +41,7 @@ namespace gr
float *d_out_buffer;
public:
ogg_source_impl (const std::string& filename, size_t channels,
ogg_source_impl (const std::string& filename, int channels,
bool repeat);
~ogg_source_impl ();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment