Digigurdy-baz
Loading...
Searching...
No Matches
togglebutton.h
Go to the documentation of this file.
1#ifndef TOGGLEBUTTON_H
2#define TOGGLEBUTTON_H
3
4#include "gurdybutton.h"
5
6class ToggleButton: public GurdyButton {
7 private:
8 bool toggled;
9
10 public:
11 ToggleButton(int my_pin, int interval);
12
13 void update();
14
15 bool toggleOn();
16
17 void setToggle(bool new_toggle);
18};
19
20#endif
Definition: gurdybutton.h:7
Definition: togglebutton.h:6
void setToggle(bool new_toggle)
Forcibly sets the toggle status of the button.
Definition: togglebutton.cpp:28
void update()
Samples the button and determines toggle status.
Definition: togglebutton.cpp:11
bool toggleOn()
Returns the toggle status of the button.
Definition: togglebutton.cpp:22