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 "bistable_roller_shutter.h"
27
28namespace Supla {
29namespace Io {
30class Base;
31} // namespace Io
32
33namespace Control {
34class TrippleButtonRollerShutter : public BistableRollerShutter {
35 public:
36 TrippleButtonRollerShutter(Supla::Io::Base *io,
37 int pinUp,
38 int pinDown,
39 int pinStop,
40 bool highIsOn = true);
41 TrippleButtonRollerShutter(int pinUp,
42 int pinDown,
43 int pinStop,
44 bool highIsOn = true);
45 virtual ~TrippleButtonRollerShutter();
46
47 void onInit() override;
48
49 protected:
50 void stopMovement() override;
51 void switchOffRelays() override;
52 bool inMove() override;
53 virtual void relayStopOn();
54 virtual void relayStopOff();
55
56 int pinStop = 0;
57};
58
59}; // namespace Control
60}; // namespace Supla
61
62#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:43
Definition io.h:35