diff --git a/modemm17/M17FrameDecoder.h b/modemm17/M17FrameDecoder.h index ed9c033b7..2656350b4 100644 --- a/modemm17/M17FrameDecoder.h +++ b/modemm17/M17FrameDecoder.h @@ -407,4 +407,4 @@ struct M17FrameDecoder State state() const { return state_; } }; -} // modemm17 +} // modemm17 \ No newline at end of file diff --git a/modemm17/Util.h b/modemm17/Util.h index 20032f8d4..c446b6605 100644 --- a/modemm17/Util.h +++ b/modemm17/Util.h @@ -131,17 +131,17 @@ auto llr(float sample) return std::get<1>(*it); } -template -size_t depuncture( // FIXME: MSVC - const std::array& in, - std::array& out, +template +size_t depuncture( // FIXED: MSVC (MULTIPLE DEFINITIONS SAME TEMPLATE) + const std::array& in, + std::array& out, const std::array& p ) { size_t index = 0; size_t pindex = 0; size_t bit_count = 0; - for (size_t i = 0; i != OUT && index < IN; ++i) + for (size_t i = 0; i != OUT1 && index < IN1; ++i) { if (!p[pindex++]) { @@ -160,17 +160,17 @@ size_t depuncture( // FIXME: MSVC } -template -size_t puncture( // FIXME: MSVC - const std::array& in, - std::array& out, +template +size_t puncture( // FIXED::MSVC (MULTIPLE DEFINITIONS OF THE SAME TEMPLATE) + const std::array& in, + std::array& out, const std::array& p ) { size_t index = 0; size_t pindex = 0; size_t bit_count = 0; - for (size_t i = 0; i != IN && index != OUT; ++i) + for (size_t i = 0; i != IN0 && index != OUT0; ++i) { if (p[pindex++]) { diff --git a/modemm17/Viterbi.h b/modemm17/Viterbi.h index 4058486f2..58bbaf98a 100644 --- a/modemm17/Viterbi.h +++ b/modemm17/Viterbi.h @@ -159,10 +159,10 @@ struct Viterbi * * @return path metric for estimating BER. */ - template - size_t decode(const std::array& in, std::array& out) + template + size_t decode(const std::array& in, std::array& out) { - static_assert(sizeof(history_) >= IN / 2, "Invalid size"); + static_assert(sizeof(history_) >= IN2 / 2, "Invalid size"); constexpr auto MAX_METRIC = std::numeric_limits::max() / 2; @@ -170,7 +170,7 @@ struct Viterbi prevMetrics[0] = 0; // Starting point. auto hbegin = history_.begin(); - auto hend = history_.begin() + IN / 2; + auto hend = history_.begin() + IN2 / 2; constexpr size_t BUTTERFLY_SIZE = NumStates / 2; @@ -178,7 +178,7 @@ struct Viterbi std::array cost0; std::array cost1; - for (size_t i = 0; i != IN; i += 2, hindex += 1) + for (size_t i = 0; i != IN2; i += 2, hindex += 1) { int16_t s0 = in[i]; int16_t s1 = in[i + 1]; @@ -227,11 +227,11 @@ struct Viterbi auto hit = std::make_reverse_iterator(hend); // rbegin auto hrend = std::make_reverse_iterator(hbegin); // rend size_t next_element = min_element; - size_t index = IN / 2; + size_t index = IN2 / 2; while (oit != std::rend(out) && hit != hrend) { auto v = (*hit++)[next_element]; - if (index-- <= OUT) *oit++ = next_element & 1; + if (index-- <= OUT2) *oit++ = next_element & 1; next_element = prevState_[next_element][v]; } diff --git a/plugins/channelrx/CMakeLists.txt b/plugins/channelrx/CMakeLists.txt index 1f8457772..81aec8548 100644 --- a/plugins/channelrx/CMakeLists.txt +++ b/plugins/channelrx/CMakeLists.txt @@ -97,7 +97,7 @@ if (ENABLE_CHANNELRX_DEMODFREEDV AND CODEC2_FOUND) add_subdirectory(demodfreedv) endif() -if (LINUX AND ENABLE_CHANNELRX_DEMODM17 AND CODEC2_FOUND) +if (ENABLE_CHANNELRX_DEMODM17 AND CODEC2_FOUND) add_subdirectory(demodm17) endif() diff --git a/plugins/channelrx/demodm17/m17demodplugin.cpp b/plugins/channelrx/demodm17/m17demodplugin.cpp index 380ccadeb..5e7827b13 100644 --- a/plugins/channelrx/demodm17/m17demodplugin.cpp +++ b/plugins/channelrx/demodm17/m17demodplugin.cpp @@ -16,8 +16,7 @@ // along with this program. If not, see . // /////////////////////////////////////////////////////////////////////////////////// -#include "m17demodplugin.h" - +//REMOVED REPEATED INCLUDE... #include #include "plugin/pluginapi.h" #ifndef SERVER_MODE diff --git a/plugins/channeltx/CMakeLists.txt b/plugins/channeltx/CMakeLists.txt index 4b5a8f90e..c8b81e3b6 100644 --- a/plugins/channeltx/CMakeLists.txt +++ b/plugins/channeltx/CMakeLists.txt @@ -63,6 +63,6 @@ if (ENABLE_CHANNELTX_MODFREEDV AND CODEC2_FOUND) add_subdirectory(modfreedv) endif() -if (LINUX AND ENABLE_CHANNELTX_MODM17 AND CODEC2_FOUND) +if (ENABLE_CHANNELTX_MODM17 AND CODEC2_FOUND) add_subdirectory(modm17) endif()