4#include <AiEsp32RotaryEncoder.h>
9int remap(
double x,
double oMin,
double oMax,
double nMin,
double nMax );
11void IRAM_ATTR button_down();
12void IRAM_ATTR button_up();
15void bound_byte(uint8_t * val,
int lower,
int upper);
void IRAM_ATTR buttonISR()
A debounced interrupt to set the button state.
Definition nanolux_util.cpp:163
int remap(double x, double oMin, double oMax, double nMin, double nMax)
Remaps a value in one range to another range.
Definition nanolux_util.cpp:87
long timer_overrun()
Returns the amount of time since expected loop termination.
Definition nanolux_util.cpp:269
int largest(float arr[], int n)
Returns the index of the largest array element.
Definition nanolux_util.cpp:131
void begin_loop_timer(long ms)
Logs the current program loop start time and the expected loop end time.
Definition nanolux_util.cpp:254
void bound_byte(uint8_t *val, int lower, int upper)
Bounds a byte between an upper and a lower value.
Definition nanolux_util.cpp:70
void nanolux_serial_print(char *msg)
Prints a character array message if allowed to.
Definition nanolux_util.cpp:60
bool isEncoderButtonPressed()
Returns the current state of the rotary encoder button.
Definition nanolux_util.cpp:296
int encoder_delta()
Returns the difference between the encoder's previous and new position.
Definition nanolux_util.cpp:302
void IRAM_ATTR readEncoderISR()
Processes the interrupt for the rotary encoder on 2.0 hardware.
Definition nanolux_util.cpp:282
void setup_rotary_encoder()
Performs initial setup for the rotary encoder.
Definition nanolux_util.cpp:287
void reset_button_state()
Resets the button state to false.
Definition nanolux_util.cpp:154
void process_reset_button(int button_value)
If the hardware button is held for RESET_TIME, clear the list of saves and call led_on_forever().
Definition nanolux_util.cpp:213