We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f585a72 commit d2045caCopy full SHA for d2045ca
1 file changed
src/PicoButtonAsync.h
@@ -164,7 +164,12 @@ class PicoButton {
164
return false;
165
}
166
167
- /** @brief Repeated triggers while held. */
+ /**
168
+ * @brief Checks if the button is currently held down.
169
+ * This is a non-blocking check of the last debounced state.
170
+ * Simulates repeated triggers every interval_ms.
171
+ * @return true if the button is pressed (logic low) for delay_ms amount of time.
172
+ */
173
bool repeat(uint32_t delay_ms = 500, uint32_t interval_ms = 100) {
174
bool current = isPressed();
175
if (current && _pressStartTime > 0 && (_now() - _pressStartTime >= delay_ms)) {
0 commit comments