From 952dcec9b8179a54b24b6f9067f9bc3e554481ce Mon Sep 17 00:00:00 2001
From: Marek Blok <Marek.Blok@pg.edu.pl>
Date: Tue, 28 Nov 2023 23:06:54 +0100
Subject: [PATCH] DefineStandardOutputs & DefineStandardInputs fixed

---
 src/cpp/DSP_modules.cpp | 6 ++++--
 src/include/DSP_lib.h   | 2 +-
 2 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/src/cpp/DSP_modules.cpp b/src/cpp/DSP_modules.cpp
index 9b05af1..2617dc6 100644
--- a/src/cpp/DSP_modules.cpp
+++ b/src/cpp/DSP_modules.cpp
@@ -593,14 +593,15 @@ void DSP::Component::DefineStandardOutputs(const bool &AreOutputsComplex) {
   else {
     for (ind=0; ind < NoOfOutputs; ind++)
     {
-      temp = "out" + std::to_string(ind+1);
       if (ind % 2 == 0) {
+        temp = "out" + std::to_string(ind/2+1);
         DefineOutput(temp, ind, ind+1);
 
         temp = temp + ".re";
         DefineOutput(temp, ind);
       }
       else {
+        temp = "out" + std::to_string((ind-1)/2+1);
         temp = temp + ".im";
         DefineOutput(temp, ind);
       }
@@ -838,14 +839,15 @@ void DSP::Block::DefineStandardInputs(const bool &AreInputsComplex) {
   else {
     for (ind=0; ind < NoOfInputs; ind++)
     {
-      temp = "in" + std::to_string(ind+1);
       if (ind % 2 == 0) {
+        temp = "in" + std::to_string(ind/2+1);
         DefineInput(temp, ind, ind+1);
 
         temp = temp + ".re";
         DefineInput(temp, ind);
       }
       else {
+        temp = "in" + std::to_string((ind-1)/2+1);
         temp = temp + ".im";
         DefineInput(temp, ind);
       }
diff --git a/src/include/DSP_lib.h b/src/include/DSP_lib.h
index 6570d93..f97725f 100644
--- a/src/include/DSP_lib.h
+++ b/src/include/DSP_lib.h
@@ -11,7 +11,7 @@
 
 #define DSP_VER_MAJOR 0
 #define DSP_VER_MINOR 20
-#define DSP_VER_BUILD 34 // !!! without zeroes before, else this will be treated as octal number
+#define DSP_VER_BUILD 35 // !!! without zeroes before, else this will be treated as octal number
 #define DSP_VER_YEAR  2023
 #define DSP_VER       DSP_VER_MAJOR.DSP_VER_MINOR.DSP_VER_BUILD
 
-- 
GitLab