diff --git a/src/LibBasicFunctions.h b/src/LibBasicFunctions.h index 7a7469e..ee4ac5b 100644 --- a/src/LibBasicFunctions.h +++ b/src/LibBasicFunctions.h @@ -477,8 +477,9 @@ private: const T TWO_PI_F = 2.0 * 3.14159265358979323846264338327950288419716939937510582097494459230781640628620899; ///< 2*PI const T PI_DIV2_F = 0.5 * 3.14159265358979323846264338327950288419716939937510582097494459230781640628620899; ///< PI/2 const T THREE_PI_DIV2_F = 1.5 * 3.14159265358979323846264338327950288419716939937510582097494459230781640628620899; ///< 3*PI/2 - const float TRIANGE_POS_SLOPE = 2.0f/PI_F; - const float TRIANGE_NEG_SLOPE = -2.0f/PI_F; + const T TRIANGE_POS_SLOPE = 2.0f/PI_F; + const T TRIANGE_NEG_SLOPE = -2.0f/PI_F; + const T SAWTOOTH_SLOPE = -1.0f/PI_F; }; } // BALibrary diff --git a/src/common/LowFrequencyOscillator.cpp b/src/common/LowFrequencyOscillator.cpp index d293816..fb06a2a 100644 --- a/src/common/LowFrequencyOscillator.cpp +++ b/src/common/LowFrequencyOscillator.cpp @@ -116,13 +116,20 @@ T *LowFrequencyOscillatorVector::getNextVector() for (auto i=0; i