supla-device
Loading...
Searching...
No Matches
dimmer_base.h
1// SPDX-FileCopyrightText: AC SOFTWARE SP. Z O.O.
2// SPDX-License-Identifier: GPL-2.0-or-later
3
4#ifndef SRC_SUPLA_CONTROL_DIMMER_BASE_H_
5#define SRC_SUPLA_CONTROL_DIMMER_BASE_H_
6
7#include "rgbw_base.h"
8
9namespace Supla {
10namespace Control {
11class DimmerBase : public RGBWBase {
12 public:
13 DimmerBase();
14
15 void setRGBCCT(int red,
16 int green,
17 int blue,
18 int colorBrightness,
19 int brightness,
20 int whiteTemperature,
21 bool toggle = false,
22 bool instant = false) override;
23
24 void onLoadState() override;
25 void onSaveState() override;
26
27 void setRGBCCTValueOnDevice(uint32_t output[5], int usedOutputs) override;
28
29 protected:
30 void iterateDimmerRGBW(int rgbStep, int wStep) override;
31};
32
33}; // namespace Control
34}; // namespace Supla
35
36#endif // SRC_SUPLA_CONTROL_DIMMER_BASE_H_
Definition dimmer_base.h:11
void onLoadState() override
Second method called on element in SuplaDevice.begin().
Definition dimmer_base.cpp:30
void onSaveState() override
Method called periodically during SuplaDevice iteration.
Definition dimmer_base.cpp:37
Definition rgbw_base.h:22