boothifier/include/Ramp_Lights.h
2025-09-28 23:18:18 -07:00

30 lines
559 B
C++

#pragma once
#include "PWM_Output.h"
#include "OneButton.h"
enum RAMP_STATE { RampingUp = 0, RampingDown };
class RAMP_LIGHT {
public:
RAMP_LIGHT(OneButton* button, PWM_Output* pwmOutput, float min, float max, float step);
private:
PWM_Output* pwmOutput;
OneButton* button;
float min;
float max;
float step;
float currentValue;
bool IsOn = false;
RAMP_STATE rampState;
int tickCount = 0;
void tick();
void singleClick();
void longPressStart();
void longPressStop();
void duringLongPress();
};