Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions Helios/Helios.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -270,6 +270,12 @@ void Helios::handle_state_modes()
// whether they have released the button since turning on
bool hasReleased = (Button::releaseCount() > 0);

// ESD protection: Ignore button clicks that occur faster than a single tick
if (hasReleased && Time::getCurtime() < 2) {
enter_sleep();
return;
}

if (Button::releaseCount() > 1 && Button::onShortClick()) {
if (has_flag(FLAG_CONJURE)) {
enter_sleep();
Expand Down