supla-device
Toggle main menu visibility
Loading...
Searching...
No Matches
src
supla
control
rgbw_base.h
1
/*
2
Copyright (C) AC SOFTWARE SP. Z O.O.
3
4
This program is free software; you can redistribute it and/or
5
modify it under the terms of the GNU General Public License
6
as published by the Free Software Foundation; either version 2
7
of the License, or (at your option) any later version.
8
9
This program is distributed in the hope that it will be useful,
10
but WITHOUT ANY WARRANTY; without even the implied warranty of
11
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
GNU General Public License for more details.
13
14
You should have received a copy of the GNU General Public License
15
along with this program; if not, write to the Free Software
16
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
17
*/
18
19
#ifndef SRC_SUPLA_CONTROL_RGBW_BASE_H_
20
#define SRC_SUPLA_CONTROL_RGBW_BASE_H_
21
22
#include <stdint.h>
23
24
#include "lighting_pwm_base.h"
25
#include "../action_handler.h"
26
#include "../channel_element.h"
27
28
#define RGBW_STATE_ON_INIT_RESTORE -1
29
#define RGBW_STATE_ON_INIT_OFF 0
30
#define RGBW_STATE_ON_INIT_ON 1
31
32
namespace
Supla {
33
namespace
Control {
34
35
class
Button
;
36
37
class
RGBWBase :
public
LightingPwmBase
{
38
public
:
39
RGBWBase();
40
41
virtual
void
setRGBWValueOnDevice(uint32_t red,
42
uint32_t green,
43
uint32_t blue,
44
uint32_t whiteBrightness) = 0;
45
46
void
setRGBCCTValueOnDevice(uint32_t output[5],
int
usedOutputs)
override
;
47
48
void
onLoadState
()
override
;
49
void
onSaveState
()
override
;
50
};
51
52
};
// namespace Control
53
};
// namespace Supla
54
55
#endif
// SRC_SUPLA_CONTROL_RGBW_BASE_H_
Supla::Control::Button
Definition
button.h:34
Supla::Control::LightingPwmBase::LightingPwmBase
LightingPwmBase(LightingPwmBase *parent=nullptr)
Constructor.
Definition
lighting_pwm_base.cpp:103
Supla::Control::RGBWBase::onSaveState
void onSaveState() override
Method called periodically during SuplaDevice iteration.
Definition
rgbw_base.cpp:48
Supla::Control::RGBWBase::onLoadState
void onLoadState() override
Second method called on element in SuplaDevice.begin().
Definition
rgbw_base.cpp:74
Generated by
1.17.0