From 46456dfd1377fb0f83d45965bd77fcd5fb8db480 Mon Sep 17 00:00:00 2001 From: Mark Meserve Date: Fri, 29 Sep 2017 10:27:20 -0500 Subject: ad937x: remove magic constant in ad937x_config_t --- mpm/lib/mykonos/config/ad937x_config_t.cpp | 8 ++++---- mpm/lib/mykonos/config/ad937x_config_t.hpp | 3 +++ 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/mpm/lib/mykonos/config/ad937x_config_t.cpp b/mpm/lib/mykonos/config/ad937x_config_t.cpp index 13775ab63..8a7ca76c3 100644 --- a/mpm/lib/mykonos/config/ad937x_config_t.cpp +++ b/mpm/lib/mykonos/config/ad937x_config_t.cpp @@ -72,10 +72,10 @@ ad937x_config_t::ad937x_config_t(spiSettings_t* sps) : _auxIo(DEFAULT_AUX_IO), _clocks(DEFAULT_CLOCKS), - tx_fir_config(6, std::vector(DEFAULT_TX_FIR, DEFAULT_TX_FIR + DEFAULT_TX_FIR_SIZE)), - rx_fir_config(-6, std::vector(DEFAULT_RX_FIR, DEFAULT_RX_FIR + DEFAULT_RX_FIR_SIZE)), - _orx_fir_config(-6, std::vector(DEFAULT_OBSRX_FIR, DEFAULT_OBSRX_FIR + DEFAULT_RX_FIR_SIZE)), - _sniffer_rx_fir_config(-6, std::vector(DEFAULT_SNIFFER_FIR, DEFAULT_SNIFFER_FIR + DEFAULT_RX_FIR_SIZE)) + tx_fir_config(DEFAULT_TX_FIR_GAIN, std::vector(DEFAULT_TX_FIR, DEFAULT_TX_FIR + DEFAULT_TX_FIR_SIZE)), + rx_fir_config(DEFAULT_RX_FIR_GAIN, std::vector(DEFAULT_RX_FIR, DEFAULT_RX_FIR + DEFAULT_RX_FIR_SIZE)), + _orx_fir_config(DEFAULT_RX_FIR_GAIN, std::vector(DEFAULT_OBSRX_FIR, DEFAULT_OBSRX_FIR + DEFAULT_RX_FIR_SIZE)), + _sniffer_rx_fir_config(DEFAULT_RX_FIR_GAIN, std::vector(DEFAULT_SNIFFER_FIR, DEFAULT_SNIFFER_FIR + DEFAULT_RX_FIR_SIZE)) { _device.spiSettings = sps; diff --git a/mpm/lib/mykonos/config/ad937x_config_t.hpp b/mpm/lib/mykonos/config/ad937x_config_t.hpp index 8cd079ba9..9eba4992f 100644 --- a/mpm/lib/mykonos/config/ad937x_config_t.hpp +++ b/mpm/lib/mykonos/config/ad937x_config_t.hpp @@ -34,6 +34,9 @@ public: static const size_t DEFAULT_TX_FIR_SIZE = 32; static const size_t DEFAULT_RX_FIR_SIZE = 48; + static const int32_t DEFAULT_TX_FIR_GAIN = 6; + static const int32_t DEFAULT_RX_FIR_GAIN = -6; + static const int16_t DEFAULT_TX_FIR[DEFAULT_TX_FIR_SIZE]; static const int16_t DEFAULT_RX_FIR[DEFAULT_RX_FIR_SIZE]; static const int16_t DEFAULT_OBSRX_FIR[DEFAULT_RX_FIR_SIZE]; -- cgit v1.2.3