1
0
mirror of https://github.com/gnss-sdr/gnss-sdr synced 2025-02-23 22:40:07 +00:00

Merge branch 'next' of https://github.com/gnss-sdr/gnss-sdr into next

This commit is contained in:
Carles Fernandez 2019-06-02 12:58:28 +02:00
commit 57fb6dff7a
No known key found for this signature in database
GPG Key ID: 4C583C52B0C3877D
4 changed files with 47 additions and 14 deletions

View File

@ -417,7 +417,7 @@ set(GNSSSDR_GNSS_SIM_LOCAL_VERSION "master")
set(GNSSSDR_GPSTK_LOCAL_VERSION "2.10.6")
set(GNSSSDR_MATIO_LOCAL_VERSION "1.5.14")
set(GNSSSDR_PUGIXML_LOCAL_VERSION "1.9")
set(GNSSSDR_PROTOCOLBUFFERS_LOCAL_VERSION "3.7.1")
set(GNSSSDR_PROTOCOLBUFFERS_LOCAL_VERSION "3.8.0")
if(CMAKE_VERSION VERSION_LESS "3.0.2") # Fix for CentOS 7
set(GNSSSDR_GFLAGS_LOCAL_VERSION "2.2.1")

View File

@ -305,9 +305,9 @@ $ sudo apt-get install autoconf automake libtool curl make g++ unzip
and then:
~~~~~~
$ wget https://github.com/protocolbuffers/protobuf/releases/download/v3.7.1/protobuf-cpp-3.7.1.tar.gz
$ tar xvfz protobuf-cpp-3.7.1.tar.gz
$ cd protobuf-3.7.1
$ wget https://github.com/protocolbuffers/protobuf/releases/download/v3.8.0/protobuf-cpp-3.8.0.tar.gz
$ tar xvfz protobuf-cpp-3.8.0.tar.gz
$ cd protobuf-3.8.0
$ ./autogen.sh
$ ./configure
$ make

View File

@ -121,7 +121,7 @@ FreqXlatingFirFilter::FreqXlatingFirFilter(ConfigurationInterface* configuration
}
size_t item_size;
LOG(INFO) << "Created freq_xlating_fir_filter with " << taps_.size()<<" taps";
if ((taps_item_type_ == "float") && (input_item_type_ == "gr_complex") && (output_item_type_ == "gr_complex"))
{
item_size = sizeof(gr_complex); //output

View File

@ -19,6 +19,13 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#if defined(_MSC_VER)
#include <io.h>
#define access _access
#define F_OK 0
#else
#include <unistd.h>
#endif
#include <volk_gnsssdr/volk_gnsssdr_prefs.h>
@ -29,7 +36,7 @@ void volk_gnsssdr_get_config_path(char *path)
const char *suffix2 = "/volk_gnsssdr/volk_gnsssdr_config"; // non-hidden
char *home = NULL;
//allows config redirection via env variable
// allows config redirection via env variable
home = getenv("VOLK_CONFIGPATH");
if (home != NULL)
{
@ -38,17 +45,43 @@ void volk_gnsssdr_get_config_path(char *path)
return;
}
if (home == NULL) home = getenv("HOME");
if (home == NULL) home = getenv("APPDATA");
if (home == NULL)
// check for user-local config file
home = getenv("HOME");
if (home != NULL)
{
path[0] = 0;
strncpy(path, home, 512);
strcat(path, suffix);
if (access(path, F_OK) != -1)
{
return;
}
}
// check for config file in APPDATA (Windows)
home = getenv("APPDATA");
if (home != NULL)
{
strncpy(path, home, 512);
strcat(path, suffix);
if (access(path, F_OK) != -1)
{
return;
}
}
// check for system-wide config file
if (access("/etc/volk_gnsssdr/volk_gnsssdr_config", F_OK) != -1)
{
strncpy(path, "/etc", 512);
strcat(path, suffix2);
return;
}
strncpy(path, home, 512);
strcat(path, suffix);
path[0] = 0;
return;
}
size_t volk_gnsssdr_load_preferences(volk_gnsssdr_arch_pref_t **prefs_res)
{
FILE *config_file;
@ -56,13 +89,13 @@ size_t volk_gnsssdr_load_preferences(volk_gnsssdr_arch_pref_t **prefs_res)
size_t n_arch_prefs = 0;
volk_gnsssdr_arch_pref_t *prefs = NULL;
//get the config path
// get the config path
volk_gnsssdr_get_config_path(path);
if (!path[0]) return n_arch_prefs; //no prefs found
config_file = fopen(path, "r");
if (!config_file) return n_arch_prefs; //no prefs found
//reset the file pointer and write the prefs into volk_gnsssdr_arch_prefs
// reset the file pointer and write the prefs into volk_gnsssdr_arch_prefs
while (fgets(line, sizeof(line), config_file) != NULL)
{
prefs = (volk_gnsssdr_arch_pref_t *)realloc(prefs, (n_arch_prefs + 1) * sizeof(*prefs));