Digigurdy-baz
Loading...
Searching...
No Matches
Public Member Functions | List of all members
ExButton Class Reference

#include <exbutton.h>

Inheritance diagram for ExButton:
ToggleButton GurdyButton

Public Member Functions

 ExButton (int my_pin, int interval, int my_addr, int my_step_addr)
 Constructor for ExButton. More...
 
int getFunc ()
 Return the current function number of the button. More...
 
void setFunc (int func)
 Set the function to be called when this button is pressed. More...
 
void doFunc (bool playing)
 Execute the button's configured fucntion. More...
 
String printFunc ()
 Returns a short text label of the button's function. More...
 
bool fn_choice_screen ()
 Prompt user to choose the button function. More...
 
bool fn_choice_screen_2 ()
 Prompt user to choose the button function, second page. More...
 
bool fn_choice_tpose ()
 Prompt user to choose the button function, second page. More...
 
- Public Member Functions inherited from ToggleButton
 ToggleButton (int my_pin, int interval)
 Constructor. This extends GurdyButton with a toggle on/off feature. More...
 
void update ()
 Samples the button and determines toggle status. More...
 
bool toggleOn ()
 Returns the toggle status of the button. More...
 
void setToggle (bool new_toggle)
 Forcibly sets the toggle status of the button. More...
 
- Public Member Functions inherited from GurdyButton
 GurdyButton (int my_pin, int interval)
 Constructor. This class handles simple push-on, release-off buttons. More...
 
void update ()
 Polls the button and updates its state. More...
 
bool beingPressed ()
 Reports if the button is being pressed this update() cycle. More...
 
bool wasPressed ()
 Reports if the button was pressed down this update() cycle. More...
 
bool wasReleased ()
 Reports if the button was released this update() cycle. More...
 

Additional Inherited Members

- Protected Attributes inherited from GurdyButton
Bounce * bounce_obj
 
bool being_pressed
 

Constructor & Destructor Documentation

◆ ExButton()

ExButton::ExButton ( int  my_pin,
int  interval,
int  my_addr,
int  my_step_addr 
)

Constructor for ExButton.

Parameters
my_pinThe digital pin this button is connected to
funcThe beginning function for this button (See ExButton::doFunc for the numbering)
intervalThe debounce interval for this button in milliseconds

Member Function Documentation

◆ doFunc()

void ExButton::doFunc ( bool  playing)

Execute the button's configured fucntion.

◆ fn_choice_screen()

bool ExButton::fn_choice_screen ( )

Prompt user to choose the button function.

Returns
If choice was made

◆ fn_choice_screen_2()

bool ExButton::fn_choice_screen_2 ( )

Prompt user to choose the button function, second page.

Returns
True if user chose an option, false if user chose "go back" option
Version
New in 2.3.3

◆ fn_choice_tpose()

bool ExButton::fn_choice_tpose ( )

Prompt user to choose the button function, second page.

Returns
True if user chose an option, false if user chose "go back" option
Version
New in 2.5.7

◆ getFunc()

int ExButton::getFunc ( )

Return the current function number of the button.

Returns
the current function number

◆ printFunc()

String ExButton::printFunc ( )

Returns a short text label of the button's function.

Returns
A short description of the current button fucntion.

◆ setFunc()

void ExButton::setFunc ( int  func)

Set the function to be called when this button is pressed.

Parameters
funcThe function to be called. See ExButton::doFunc() to determine the internal numbering of the functions.

The documentation for this class was generated from the following files: