Skip to content

Commit

Permalink
lowercase
Browse files Browse the repository at this point in the history
  • Loading branch information
gcl8a committed Aug 29, 2022
1 parent 9c056cf commit 5cfe40a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/button.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@ Button::Button(uint8_t pin, uint32_t db)
debouncePeriod = db;
}

void Button::Init(bool usePullup)
void Button::init(bool usePullup)
{
if(usePullup) pinMode(buttonPin, INPUT_PULLUP);
else pinMode(buttonPin, INPUT);

stabButtonPos = tempButtonPos = digitalRead(buttonPin);
}

bool Button::CheckButtonPress(void)
bool Button::checkButtonPress(void)
{
bool retVal = false;
uint8_t currButtonPos = digitalRead(buttonPin);
Expand Down
8 changes: 6 additions & 2 deletions src/button.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,12 @@ class Button

public:
Button(uint8_t pin, uint32_t db = 10);
void Init(bool usePullup = true);
bool CheckButtonPress(void);

void init(bool usePullup = true);
void Init(bool usePullup = true) {init(usePullup);}

bool checkButtonPress(void);
bool CheckButtonPress(void) {return checkButtonPress();}
};

#endif /* button_h */

0 comments on commit 5cfe40a

Please sign in to comment.