2017-01-02 21:07:43 -05:00
|
|
|
// Copyright (c) Charles J. Cliffe
|
|
|
|
// SPDX-License-Identifier: GPL-2.0+
|
|
|
|
|
2014-10-30 22:51:33 -04:00
|
|
|
#pragma once
|
|
|
|
|
2016-10-20 21:44:33 -04:00
|
|
|
#define CUBICSDR_TITLE "" CUBICSDR_BUILD_TITLE
|
2015-01-10 20:33:30 -05:00
|
|
|
|
2015-02-05 19:30:06 -05:00
|
|
|
#ifndef __BYTE_ORDER
|
|
|
|
#ifdef _WIN32
|
|
|
|
#define ATTRIBUTE
|
|
|
|
#define __LITTLE_ENDIAN 1234
|
|
|
|
#define __BIG_ENDIAN 4321
|
|
|
|
#define __PDP_ENDIAN 3412
|
|
|
|
#define __BYTE_ORDER __LITTLE_ENDIAN
|
|
|
|
#else
|
|
|
|
#ifdef __APPLE__
|
|
|
|
#include <machine/endian.h>
|
|
|
|
#else
|
|
|
|
#include <endian.h>
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|
2015-01-10 20:33:30 -05:00
|
|
|
const char filePathSeparator =
|
|
|
|
#ifdef _WIN32
|
|
|
|
'\\';
|
|
|
|
#else
|
|
|
|
'/';
|
|
|
|
#endif
|
2015-01-09 17:17:56 -05:00
|
|
|
|
2015-01-31 22:27:11 -05:00
|
|
|
#define BUF_SIZE (16384*6)
|
2015-01-18 01:36:28 -05:00
|
|
|
|
2015-10-18 14:18:26 -04:00
|
|
|
#define DEFAULT_SAMPLE_RATE 2500000
|
2017-02-04 04:32:35 -05:00
|
|
|
|
|
|
|
//
|
2014-12-28 05:13:46 -05:00
|
|
|
#define DEFAULT_FFT_SIZE 2048
|
2017-02-04 04:32:35 -05:00
|
|
|
#define DEFAULT_DMOD_FFT_SIZE (DEFAULT_FFT_SIZE / 2)
|
|
|
|
#define DEFAULT_SCOPE_FFT_SIZE (DEFAULT_FFT_SIZE / 2)
|
|
|
|
|
|
|
|
//Both must be a power of 2 to prevent terrible OpenGL performance.
|
2017-02-05 20:47:47 -05:00
|
|
|
//TODO: Make the waterfall resolutions an option.
|
|
|
|
#define DEFAULT_MAIN_WATERFALL_LINES_NB 512 // 1024
|
2017-02-05 05:43:45 -05:00
|
|
|
#define DEFAULT_DEMOD_WATERFALL_LINES_NB 256
|
2014-10-30 22:51:33 -04:00
|
|
|
|
2015-11-17 18:57:42 -05:00
|
|
|
#define DEFAULT_DEMOD_TYPE "FM"
|
2015-02-02 20:10:55 -05:00
|
|
|
#define DEFAULT_DEMOD_BW 200000
|
2014-12-24 00:11:41 -05:00
|
|
|
|
2015-08-13 20:39:31 -04:00
|
|
|
#define DEFAULT_WATERFALL_LPS 30
|
2015-10-14 00:54:48 -04:00
|
|
|
|
2017-02-05 05:43:45 -05:00
|
|
|
//Dmod waterfall lines per second is adjusted
|
|
|
|
//so that the whole demod waterfall show DEMOD_WATERFALL_DURATION_IN_SECONDS
|
|
|
|
//seconds.
|
|
|
|
#define DEMOD_WATERFALL_DURATION_IN_SECONDS 4.0
|
|
|
|
|
2015-12-05 19:07:26 -05:00
|
|
|
#define CHANNELIZER_RATE_MAX 500000
|
2015-10-19 23:02:50 -04:00
|
|
|
|
2017-01-21 05:26:51 -05:00
|
|
|
#define MANUAL_SAMPLE_RATE_MIN 2000000 // 2MHz
|
|
|
|
#define MANUAL_SAMPLE_RATE_MAX 200000000 // 200MHz (We are 2017+ after all)
|
2015-10-19 23:02:50 -04:00
|
|
|
|
2017-02-04 04:32:35 -05:00
|
|
|
//Represents the amount of time to process in the FFT distributor.
|
|
|
|
#define FFT_DISTRIBUTOR_BUFFER_IN_SECONDS 0.250
|
2017-10-28 07:12:27 -04:00
|
|
|
|
|
|
|
//The maximum number of listed sample rates for a device, to be able to handle
|
|
|
|
//devices returning an insane amount because they have quasi-continuous ranges (UHD...)
|
|
|
|
#define DEVICE_SAMPLE_RATES_MAX_NB 25
|