Skip to content

Commit

Permalink
typos in documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
sstaub committed Jan 8, 2022
1 parent 87ed1bf commit afa3dfb
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
4 changes: 2 additions & 2 deletions src/gma3.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -218,9 +218,9 @@ Button::Button(uint8_t pin, cbptr callback) {
void Button::update() {
if (digitalRead(pin) != pinLast) {
if (pinLast == false) {
pinLast = true; // up button release
pinLast = true; // button release
}
else { // up button press
else { // button press
pinLast = false;
if (callback != nullptr) callback(); // execute callback
}
Expand Down
8 changes: 3 additions & 5 deletions src/gma3.h
Original file line number Diff line number Diff line change
Expand Up @@ -204,12 +204,10 @@ void page(uint16_t page);
class Button {
public:
/**
* @brief construct a new Button object
* @brief Construct a new Button object
*
* @param pinUp button to trigger up callback
* @param pinDown button to trigger down callback
* @param callbackUp pointer to the calback for button up
* @param callbackDown pointer to the calback for button down
* @param pin button to trigger up callback
* @param callback pointer to the calback for the button
*/
Button(uint8_t pin, cbptr callback);

Expand Down

0 comments on commit afa3dfb

Please sign in to comment.