diff --git a/src/osp_types.hh b/src/osp_types.hh deleted file mode 100644 index a50e086..0000000 --- a/src/osp_types.hh +++ /dev/null @@ -1,6 +0,0 @@ -#ifndef HECK_OSP_TYPES_HH -#define HECK_OSP_TYPES_HH - -#include "dizzy_types.hh" - -#endif \ No newline at end of file diff --git a/src/osp_utils.hh b/src/osp_utils.hh index fe8469d..2b32d92 100644 --- a/src/osp_utils.hh +++ b/src/osp_utils.hh @@ -2,38 +2,8 @@ #define HECK_OSP_UTILS_HH #include "daisy_seed.h" -#include "osp_types.hh" #include "utils.hh" -namespace Heck::OSP { - template class Observer { - - public: - bool on_change(T val_new, std::function fn) - { - if (val_new != val_current_) { - val_current_ = val_new; - fn(val_current_); - return true; - } - return false; - } - - bool on_change_fuzzy(T val_new, T min_deviation, std::function fn) - { - if (std::abs(val_new - val_current_) >= min_deviation) { - val_current_ = val_new; - fn(val_current_); - return true; - } - return false; - } - - private: - T val_current_{}; - }; -} // namespace Heck::OSP - namespace Heck::OSP { namespace Sig { struct Delta { @@ -50,7 +20,8 @@ namespace Heck::OSP { float history[1]; }; - template struct RingBuffer { + template + struct RingBuffer { void init(float* buffer) { buf_ = buffer; @@ -83,7 +54,8 @@ namespace Heck::OSP { u32 size = SIZE; }; - template struct Delay101 { + template + struct Delay101 { void init(Sig::RingBuffer* buff) { buff_ = buff;