move globals to class members
This commit is contained in:
@ -13,7 +13,8 @@
|
|||||||
|
|
||||||
const int MAX_INPUT = (1 << 10) - 1; // Max 10 bit analog read resolution.
|
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_LOW = -566;
|
||||||
const int CALIBRATED_HIGH = 512;
|
const int CALIBRATED_HIGH = 512;
|
||||||
|
|
||||||
|
|||||||
@ -13,14 +13,14 @@
|
|||||||
|
|
||||||
#include <Arduino.h>
|
#include <Arduino.h>
|
||||||
|
|
||||||
const uint8_t DEBOUNCE_MS = 10;
|
|
||||||
const uint16_t LONG_PRESS_DURATION_MS = 750;
|
|
||||||
|
|
||||||
class Button {
|
class Button {
|
||||||
protected:
|
protected:
|
||||||
typedef void (*CallbackFunction)(void);
|
typedef void (*CallbackFunction)(void);
|
||||||
|
|
||||||
public:
|
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 constants for active change in button state.
|
||||||
enum ButtonChange {
|
enum ButtonChange {
|
||||||
CHANGE_UNCHANGED,
|
CHANGE_UNCHANGED,
|
||||||
|
|||||||
@ -13,10 +13,10 @@
|
|||||||
|
|
||||||
#include <Arduino.h>
|
#include <Arduino.h>
|
||||||
|
|
||||||
const byte DEFAULT_TRIGGER_DURATION_MS = 5;
|
|
||||||
|
|
||||||
class DigitalOutput {
|
class DigitalOutput {
|
||||||
public:
|
public:
|
||||||
|
static const byte DEFAULT_TRIGGER_DURATION_MS = 5;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Initializes an CV Output paired object.
|
* Initializes an CV Output paired object.
|
||||||
*
|
*
|
||||||
|
|||||||
Reference in New Issue
Block a user