From 747224ce57a16f185aca1821f68bc9b4a9376051 Mon Sep 17 00:00:00 2001 From: wb2osz Date: Wed, 27 Nov 2019 21:26:59 -0500 Subject: [PATCH] Remove obsolete 'F' demodulator. --- src/CMakeLists.txt | 28 --------- src/demod.c | 1 - src/demod_afsk.c | 137 +------------------------------------------- test/CMakeLists.txt | 4 -- 4 files changed, 1 insertion(+), 169 deletions(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 5643bda..af5338a 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -16,28 +16,6 @@ if(WIN32 OR CYGWIN) ) endif() -# build gen_fff to create fsk_fast_filter.h -# optimization for slow processors -list(APPEND gen_fff_SOURCES - demod_afsk.c - dsp.c - textcolor.c - ) - -add_executable(gen_fff - ${gen_fff_SOURCES} - ) - -set_target_properties(gen_fff - PROPERTIES COMPILE_FLAGS "-DGEN_FFF" - ) - -add_custom_command(TARGET gen_fff - POST_BUILD - COMMAND gen_fff > fsk_fast_filter.h - WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} - ) - # direwolf list(APPEND direwolf_SOURCES @@ -131,8 +109,6 @@ add_executable(direwolf ${direwolf_SOURCES} ) -add_dependencies(direwolf gen_fff) - target_link_libraries(direwolf ${GEOTRANZ_LIBRARIES} ${MISC_LIBRARIES} @@ -180,8 +156,6 @@ add_executable(decode_aprs ${decode_aprs_SOURCES} ) -add_dependencies(decode_aprs gen_fff) - set_target_properties(decode_aprs PROPERTIES COMPILE_FLAGS "-DDECAMAIN -DUSE_REGEX_STATIC" ) @@ -339,8 +313,6 @@ add_executable(atest ${atest_SOURCES} ) -add_dependencies(atest gen_fff) - target_link_libraries(atest ${MISC_LIBRARIES} ${GPSD_LIBRARIES} diff --git a/src/demod.c b/src/demod.c index 312123b..6cc594e 100644 --- a/src/demod.c +++ b/src/demod.c @@ -47,7 +47,6 @@ #include "tune.h" #include "fsk_demod_state.h" #include "fsk_gen_filter.h" -#include "fsk_fast_filter.h" #include "hdlc_rec.h" #include "textcolor.h" #include "demod_9600.h" diff --git a/src/demod_afsk.c b/src/demod_afsk.c index 59afbfa..1633464 100644 --- a/src/demod_afsk.c +++ b/src/demod_afsk.c @@ -63,8 +63,6 @@ #define MAX(a,b) ((a)>(b)?(a):(b)) -#ifndef GEN_FFF - /* Quick approximation to sqrt(x*x+y*y) */ /* No benefit for regular PC. */ /* Should help with microcomputer platform. */ @@ -137,8 +135,6 @@ static inline float agc (float in, float fast_attack, float slow_decay, float *p return (0.0f); } -#endif // ifndef GEN_FFF - /* * for multi-slicer experiment. @@ -197,27 +193,11 @@ void demod_afsk_init (int samples_per_sec, int baud, int mark_freq, #endif - if (profile == 'F') { - - if (baud != DEFAULT_BAUD || - mark_freq != DEFAULT_MARK_FREQ || - space_freq!= DEFAULT_SPACE_FREQ || - samples_per_sec != DEFAULT_SAMPLES_PER_SEC) { - - text_color_set(DW_COLOR_INFO); - dw_printf ("Note: Decoder 'F' works only for %d baud, %d/%d tones, %d samples/sec.\n", - DEFAULT_BAUD, DEFAULT_MARK_FREQ, DEFAULT_SPACE_FREQ, DEFAULT_SAMPLES_PER_SEC); - dw_printf ("Using Decoder 'A' instead.\n"); - profile = 'A'; - } - } - D->profile = profile; // so we know whether to take fast path later. switch (profile) { case 'A': - case 'F': /* Original. 52 taps, truncated bandpass, IIR lowpass */ /* 'F' is the fast version for low end processors. */ @@ -317,6 +297,7 @@ void demod_afsk_init (int samples_per_sec, int baud, int mark_freq, D->pll_searching_inertia = 0.350; break; + case 'F': // removed obsolete. treat as E for now. case 'E': /* 1200 baud - Started out similar to C but add prefilter. */ @@ -686,7 +667,6 @@ failed experiment space_gain[j] = space_gain[j-1] * step; } -#ifndef GEN_FFF #if 0 text_color_set(DW_COLOR_DEBUG); for (j=0; jprofile == toupper(FFF_PROFILE)) { - - /* ========== Faster for default values on slower processors. ========== */ - - m_sum1 = CALC_M_SUM1(D->ms_in_cb); - m_sum2 = CALC_M_SUM2(D->ms_in_cb); - m_amp = z(m_sum1,m_sum2); - - s_sum1 = CALC_S_SUM1(D->ms_in_cb); - s_sum2 = CALC_S_SUM2(D->ms_in_cb); - s_amp = z(s_sum1,s_sum2); - } - else { - - /* ========== General case to handle all situations. ========== */ - /* * find amplitude of "Mark" tone. */ @@ -928,9 +799,6 @@ void demod_afsk_process_sample (int chan, int subchan, int sam, struct demodulat s_amp = sqrtf(s_sum1 * s_sum1 + s_sum2 * s_sum2); - /* ========== End of general case. ========== */ - } - /* * Apply some low pass filtering BEFORE the AGC to remove @@ -1240,7 +1108,4 @@ inline static void nudge_pll (int chan, int subchan, int slice, int demod_data, } /* end nudge_pll */ -#endif /* GEN_FFF */ - - /* end demod_afsk.c */ diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index d3db28b..e33c0a1 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -127,8 +127,6 @@ add_executable(atest9 ${atest9_SOURCES} ) -add_dependencies(atest9 gen_fff) - target_link_libraries(atest9 ${MISC_LIBRARIES} ${REGEX_LIBRARIES} @@ -529,8 +527,6 @@ if(OPTIONAL_TEST) ${testagc_SOURCES} ) - add_dependencies(testagc gen_fff) - target_link_libraries(testagc ${MISC_LIBRARIES} ${GPSD_LIBRARIES}