supla-device
Toggle main menu visibility
Loading...
Searching...
No Matches
src
supla
control
bistable_roller_shutter.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
This program is distributed in the hope that it will be useful,
9
but WITHOUT ANY WARRANTY; without even the implied warranty of
10
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11
GNU General Public License for more details.
12
You should have received a copy of the GNU General Public License
13
along with this program; if not, write to the Free Software
14
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
15
*/
16
17
#ifndef SRC_SUPLA_CONTROL_BISTABLE_ROLLER_SHUTTER_H_
18
#define SRC_SUPLA_CONTROL_BISTABLE_ROLLER_SHUTTER_H_
19
20
#include <supla/io.h>
21
22
#include "roller_shutter.h"
23
24
namespace
Supla {
25
namespace
Io {
26
class
Base
;
27
}
28
29
namespace
Control {
30
class
BistableRollerShutter :
public
RollerShutter
{
31
public
:
32
BistableRollerShutter(
Supla::Io::Base
*io,
33
int
pinUp,
34
int
pinDown,
35
bool
highIsOn =
true
);
36
BistableRollerShutter(
int
pinUp,
int
pinDown,
bool
highIsOn =
true
);
37
BistableRollerShutter(
Supla::Io::IoPin
pinUp,
Supla::Io::IoPin
pinDown);
38
39
void
onTimer
()
override
;
40
41
protected
:
42
void
stopMovement()
override
;
43
void
relayDownOn()
override
;
44
void
relayUpOn()
override
;
45
void
relayUpOff()
override
;
46
void
relayDownOff()
override
;
47
48
bool
activeBiRelay =
false
;
49
uint32_t toggleTime = 0;
50
};
51
52
}
// namespace Control
53
}
// namespace Supla
54
55
#endif
// SRC_SUPLA_CONTROL_BISTABLE_ROLLER_SHUTTER_H_
Supla::Control::BistableRollerShutter::onTimer
void onTimer() override
Method called on timer interupt.
Definition
bistable_roller_shutter.cpp:80
Supla::Control::RollerShutter::RollerShutter
RollerShutter(Supla::Io::Base *io, int pinUp, int pinDown, bool highIsOn=true, bool tiltFunctionsEnabled=false)
Constructor.
Definition
roller_shutter.cpp:43
Supla::Io::Base
Definition
io.h:36
Supla::Io::IoPin
Definition
io_pin.h:28
Generated by
1.17.0