Moved constant specifying sample rate for M17 baseband decoding from hwconfig.h files to M17Demodulator class

pull/68/head
Silvano Seva 2022-04-03 18:12:18 +02:00
rodzic e5b5daba85
commit fda0fed5e7
5 zmienionych plików z 11 dodań i 19 usunięć

Wyświetl plik

@ -111,6 +111,7 @@ private:
static constexpr size_t M17_FRAME_SYMBOLS = 192;
static constexpr size_t M17_SYNCWORD_SYMBOLS = 8;
static constexpr size_t M17_CONV_THRESHOLD = 50000;
static constexpr size_t M17_RX_SAMPLE_RATE = 48000;
static constexpr size_t M17_SAMPLES_PER_SYMBOL = M17_RX_SAMPLE_RATE / M17_SYMBOL_RATE;
static constexpr size_t M17_INPUT_BUF_SIZE = 2 * M17_FRAME_SAMPLES_24K;
static constexpr size_t M17_FRAME_BYTES = M17_FRAME_SYMBOLS / 4;

Wyświetl plik

@ -301,7 +301,7 @@ void radio_updateConfiguration()
C6000.setModAmplitude(0, Q);
// Set bandwidth, force 12.5kHz for DMR mode
if((config->bandwidth == BW_12_5) || (config->opMode == DMR))
if((config->bandwidth == BW_12_5) || (config->opMode == OPMODE_DMR))
{
at1846s.setBandwidth(AT1846S_BW::_12P5);
}

Wyświetl plik

@ -1,7 +1,7 @@
/***************************************************************************
* Copyright (C) 2020 by Federico Amedeo Izzo IU2NUO, *
* Niccolò Izzo IU2KIN *
* Silvano Seva IU2KWO *
* Copyright (C) 2020 - 2022 by Federico Amedeo Izzo IU2NUO, *
* Niccolò Izzo IU2KIN *
* Silvano Seva IU2KWO *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
@ -143,9 +143,6 @@ extern "C" {
#define GPS_EN GPIOD,8
#define GPS_DATA GPIOD,9
/* M17 demodulation */
#define M17_RX_SAMPLE_RATE 48000
#ifdef __cplusplus
}
#endif

Wyświetl plik

@ -1,9 +1,9 @@
/***************************************************************************
* Copyright (C) 2021 by Federico Amedeo Izzo IU2NUO, *
* Niccolò Izzo IU2KIN, *
* Frederik Saraci IU2NRO, *
* Silvano Seva IU2KWO *
* Mathis Schmieder DB9MAT *
* Copyright (C) 2021 - 2022 by Federico Amedeo Izzo IU2NUO, *
* Niccolò Izzo IU2KIN, *
* Frederik Saraci IU2NRO, *
* Silvano Seva IU2KWO *
* Mathis Schmieder DB9MAT *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
@ -83,7 +83,4 @@
#define SOFTPOT_RX 0x2E
#define SOFTPOT_TX 0x2F
/* M17 demodulation */
#define M17_RX_SAMPLE_RATE 48000
#endif

Wyświetl plik

@ -1,5 +1,5 @@
/***************************************************************************
* Copyright (C) 2020 by Frederik Saraci IU2NRO *
* Copyright (C) 2020 - 2022 by Frederik Saraci IU2NRO *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
@ -62,9 +62,6 @@ extern "C" {
/* Push-to-talk switch */
#define PTT_SW "PTT_SW",11
/* M17 demodulation */
#define M17_RX_SAMPLE_RATE 48000
#ifdef __cplusplus
}
#endif