supla-device
Loading...
Searching...
No Matches
bistable_roller_shutter.h
1// SPDX-FileCopyrightText: AC SOFTWARE SP. Z O.O.
2// SPDX-License-Identifier: GPL-2.0-or-later
3
4#ifndef SRC_SUPLA_CONTROL_BISTABLE_ROLLER_SHUTTER_H_
5#define SRC_SUPLA_CONTROL_BISTABLE_ROLLER_SHUTTER_H_
6
7#include <supla/io.h>
8
9#include "roller_shutter.h"
10
11namespace Supla {
12namespace Io {
13class Base;
14}
15
16namespace Control {
18 public:
20 int pinUp,
21 int pinDown,
22 bool highIsOn = true);
23 BistableRollerShutter(int pinUp, int pinDown, bool highIsOn = true);
25
26 void onTimer() override;
27
28 protected:
29 void stopMovement() override;
30 void relayDownOn() override;
31 void relayUpOn() override;
32 void relayUpOff() override;
33 void relayDownOff() override;
34
35 bool activeBiRelay = false;
36 uint32_t toggleTime = 0;
37};
38
39} // namespace Control
40} // namespace Supla
41
42#endif // SRC_SUPLA_CONTROL_BISTABLE_ROLLER_SHUTTER_H_
Definition bistable_roller_shutter.h:17
void onTimer() override
Method called on timer interupt.
Definition bistable_roller_shutter.cpp:66
Definition roller_shutter.h:23
Definition io.h:23
Definition io_pin.h:14