Skip to content

Commit

Permalink
version 2.0.1, compiler warning, docu
Browse files Browse the repository at this point in the history
  • Loading branch information
mathertel committed Jan 31, 2021
1 parent 34b046c commit fbc64d1
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@

All notable changes to this project will be documented in this file starting 2021.

## [2.0.1] - 2021-01-31

* Compiler warning removed
* Documentation

## [2.0.0] - 2021-01-22

* CHANGELOG created.
Expand Down
2 changes: 1 addition & 1 deletion library.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name=OneButton
version=2.0.0
version=2.0.1
author=Matthias Hertel, [email protected]
maintainer=Matthias Hertel <http://www.mathertel.de>
sentence=Arduino library for improving the usage of a singe input button.
Expand Down
4 changes: 4 additions & 0 deletions src/OneButton.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -320,6 +320,10 @@ void OneButton::tick(bool activeLevel)
reset();
}
break;

default:
// nothing to do.

This comment has been minimized.

Copy link
@CONSULitAS

CONSULitAS Feb 10, 2021

Nice, but wouldn't it be better to make it failsafe?

// unknown state detected -> reset state machine
_newState(OneButton::OCS_INIT);

This would reset the state machine and prevent deadlock situations if further development has a bug.

break;
} // if

} // OneButton.tick()
Expand Down

1 comment on commit fbc64d1

@mathertel
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks.
I will add this on master for further version.

Please sign in to comment.