move globals to class members

This commit is contained in:
2025-07-24 20:12:14 -07:00
parent 1acc9ac126
commit 6e7a648c24
3 changed files with 9 additions and 8 deletions

View File

@ -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;

View File

@ -13,14 +13,14 @@
#include <Arduino.h>
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,

View File

@ -13,10 +13,10 @@
#include <Arduino.h>
const byte DEFAULT_TRIGGER_DURATION_MS = 5;
class DigitalOutput {
public:
static const byte DEFAULT_TRIGGER_DURATION_MS = 5;
/**
* Initializes an CV Output paired object.
*