10 #include <leddevice/LedDevice.h> 11 #include <utils/Components.h> 14 #include <utils/settings.h> 43 virtual int write(
const std::vector<ColorRgb> &ledValues);
48 void setEnable(
bool enable);
49 void setPause(
bool pause);
50 bool pause() {
return _pause; } ;
51 bool enabled() {
return LedDevice::enabled() && !_pause; };
61 unsigned addConfig(
int settlingTime_ms,
double ledUpdateFrequency_hz=25.0,
unsigned updateDelay=0);
70 bool selectConfig(
unsigned cfg,
const bool& force =
false);
97 void queueColors(
const std::vector<ColorRgb> & ledColors);
106 int64_t _updateInterval;
109 int64_t _settlingTime;
118 std::vector<ColorRgb> _targetValues;
121 int64_t _previousTime;
124 std::vector<ColorRgb> _previousValues;
127 unsigned _outputDelay;
129 std::list<std::vector<ColorRgb> > _outputQueue;
132 bool _writeToLedsEnable;
135 bool _continuousOutput;
143 int64_t settlingTime;
144 int64_t updateInterval;
145 unsigned outputDelay;
149 QVector<SMOOTHING_CFG> _cfgList;
151 unsigned _currentConfigId;
Interface (pure virtual base class) for LedDevices.
Definition: LedDevice.h:32
LinearColorSmoothing(const QJsonDocument &config, Hyperion *hyperion)
Constructor.
Definition: LinearColorSmoothing.cpp:12
The main class of Hyperion.
Definition: Hyperion.h:57
unsigned addConfig(int settlingTime_ms, double ledUpdateFrequency_hz=25.0, unsigned updateDelay=0)
Add a new smoothing cfg which can be used with selectConfig()
Definition: LinearColorSmoothing.cpp:199
Provide utility methods for Hyperion class.
Definition: BlackBorderDetector.h:7
Components
Enumeration of components in Hyperion.
Definition: Components.h:10
Linear Smooting class.
Definition: LinearColorSmoothing.h:24
bool selectConfig(unsigned cfg, const bool &force=false)
select a smoothing cfg given by cfg index from addConfig()
Definition: LinearColorSmoothing.cpp:208
virtual ~LinearColorSmoothing()
Destructor.
Definition: LinearColorSmoothing.cpp:42
void handleSettingsUpdate(const settings::type &type, const QJsonDocument &config)
Handle settings update from Hyperion Settingsmanager emit or this constructor.
Definition: LinearColorSmoothing.cpp:47
virtual int write(const std::vector< ColorRgb > &ledValues)
write updated values as input for the smoothing filter
Definition: LinearColorSmoothing.cpp:64
virtual int switchOff()
Switch the leds off.
Definition: LinearColorSmoothing.cpp:86