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