Void Sentry
An AI-driven, real-time Sentry Turret platform leveraging asynchronous I/O and computer vision to deliver high-precision autonomous motion tracking on resource-constrained embedded hardware.
Loading...
Searching...
No Matches
button_classifier.h File Reference

Turns a raw push-button level into Short / Long press events (pure C++20, natively tested). More...

#include <cstdint>

Go to the source code of this file.

Classes

struct  aiming::ButtonConfig
 
class  aiming::ButtonClassifier
 

Enumerations

enum class  ButtonEvent : uint8_t { None , Short , Long }
 

Detailed Description

Turns a raw push-button level into Short / Long press events (pure C++20, natively tested).

Debounces the raw level (it must be stable for debounce_ms). A press released before long_ms after it was confirmed is Short (reported on release). A press still held long_ms after confirmation is Long (reported once, at that moment; the release then reports nothing). Call update() every loop pass with millis().