supla-device
Loading...
Searching...
No Matches
tripple_button_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
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/*
20 * This class allows to control roller shutters with 3 buttons: up, down, stop
21 */
22
23#ifndef SRC_SUPLA_CONTROL_TRIPPLE_BUTTON_ROLLER_SHUTTER_H_
24#define SRC_SUPLA_CONTROL_TRIPPLE_BUTTON_ROLLER_SHUTTER_H_
25
26#include <supla/io.h>
27
28#include "bistable_roller_shutter.h"
29
30namespace Supla {
31namespace Io {
32class Base;
33} // namespace Io
34
35namespace Control {
36class TrippleButtonRollerShutter : public BistableRollerShutter {
37 public:
38 TrippleButtonRollerShutter(Supla::Io::Base *io,
39 int pinUp,
40 int pinDown,
41 int pinStop,
42 bool highIsOn = true);
43 TrippleButtonRollerShutter(int pinUp,
44 int pinDown,
45 int pinStop,
46 bool highIsOn = true);
47 TrippleButtonRollerShutter(Supla::Io::IoPin pinUp,
48 Supla::Io::IoPin pinDown,
49 Supla::Io::IoPin pinStop);
50 virtual ~TrippleButtonRollerShutter();
51
52 void onInit() override;
53
54 protected:
55 void stopMovement() override;
56 void switchOffRelays() override;
57 bool inMove() override;
58 virtual void relayStopOn();
59 virtual void relayStopOff();
60
61 Supla::Io::IoPin pinStop;
62};
63
64}; // namespace Control
65}; // namespace Supla
66
67#endif // SRC_SUPLA_CONTROL_TRIPPLE_BUTTON_ROLLER_SHUTTER_H_
void onInit() override
Third method called on element in SuplaDevice.begin().
Definition tripple_button_roller_shutter.cpp:65
Definition io.h:36
Definition io_pin.h:28