diff --git a/src/analog_input.h b/src/analog_input.h index 73f42c8..622f29c 100644 --- a/src/analog_input.h +++ b/src/analog_input.h @@ -13,7 +13,8 @@ const int MAX_INPUT = (1 << 10) - 1; // Max 10 bit analog read resolution. -// estimated default calibration value +// Estimated default calibration value +// TODO: This should be set by metadata via calibration. const int CALIBRATED_LOW = -566; const int CALIBRATED_HIGH = 512; diff --git a/src/button.h b/src/button.h index c66ba7c..ab93ebb 100644 --- a/src/button.h +++ b/src/button.h @@ -4,7 +4,7 @@ * @brief Wrapper class for interacting with trigger / gate inputs. * @version 0.1 * @date 2025-04-20 - * + * * @copyright MIT - (c) 2025 - Adam Wonak - adam.wonak@gmail.com * */ @@ -13,14 +13,14 @@ #include -const uint8_t DEBOUNCE_MS = 10; -const uint16_t LONG_PRESS_DURATION_MS = 750; - class Button { protected: typedef void (*CallbackFunction)(void); public: + static const uint8_t DEBOUNCE_MS = 10; + static const uint16_t LONG_PRESS_DURATION_MS = 750; + // Enum constants for active change in button state. enum ButtonChange { CHANGE_UNCHANGED, @@ -84,7 +84,7 @@ class Button { if (on_long_press_ != NULL) on_long_press_(); } } - + // Update variables for next loop last_press_ = (pressed || released) ? millis() : last_press_; old_read_ = read; diff --git a/src/digital_output.h b/src/digital_output.h index 9c4cfc8..59e8fed 100644 --- a/src/digital_output.h +++ b/src/digital_output.h @@ -13,10 +13,10 @@ #include -const byte DEFAULT_TRIGGER_DURATION_MS = 5; - class DigitalOutput { public: + static const byte DEFAULT_TRIGGER_DURATION_MS = 5; + /** * Initializes an CV Output paired object. *