RSeries astromech firmware
|
#include <core/ResistorLadderButtons.h>
Push buttons connected using a resistor ladder.
Reads a group of buttons through a single pin attached via a resistor ladder.
Public Member Functions | |
virtual void | setup () override |
Subclasses must implement this function to perform any necessary setup that cannot happen in the constructor. More... | |
virtual void | buttonPressed (unsigned buttonNum, unsigned buttonTime) |
virtual void | animate () override |
Subclasses must implement this function to run through a single frame of animation/activity. More... | |
Public Member Functions inherited from AnimatedEvent | |
AnimatedEvent () | |
Default Constructor. More... | |
void | setLoopDoneCallback (AnimatedLoopDone loopProc) |
Public Member Functions inherited from SetupEvent | |
SetupEvent () | |
Default Constructor. More... | |
Protected Member Functions | |
unsigned | getButtonValue (unsigned i) |
Static Protected Member Functions | |
static bool | inRange (int val, int minimum, int maximum) |
Protected Attributes | |
unsigned | fPrevButtonValue |
bool | fButtonState [kNumberOfButtons] |
bool | fPrevButtonState [kNumberOfButtons] |
uint32_t | fButtonTime [kNumberOfButtons+1] |
Static Protected Attributes | |
static constexpr unsigned | kButtonVariance = 200 |
static constexpr unsigned | kNumberOfButtons = sizeof...(buttonVal) |
Additional Inherited Members | |
Static Public Member Functions inherited from AnimatedEvent | |
static void | process () |
Calls animate() for each created AnimatedEvent subclass. More... | |
Static Public Member Functions inherited from SetupEvent | |
static void | ready () |
Calls setup() for each created AnimatedEvent subclass. More... | |
|
inlineoverridevirtual |
Subclasses must implement this function to run through a single frame of animation/activity.
Subclasses should not call delay() or otherwise block.
Implements AnimatedEvent.
|
inlinevirtual |
|
inlineprotected |
|
inlinestaticprotected |
|
inlineoverridevirtual |
Subclasses must implement this function to perform any necessary setup that cannot happen in the constructor.
Implements SetupEvent.
|
protected |
|
protected |
|
protected |
|
protected |
|
staticconstexprprotected |
|
staticconstexprprotected |