ButtonAdapter

class ButtonAdapter : public InputInterface
#include <ButtonAdapter.h>

Adapter class to handle button input for an LCD menu.

This class implements the InputInterface to provide button input handling for an LCD menu. It observes button presses and processes commands accordingly.

The ButtonAdapter class encapsulates a Button object and a command byte. It initializes the button and observes its state to trigger menu commands when the button is pressed.

Param menu:

Pointer to the LcdMenu object that this adapter will interact with.

Param button:

The Button object that will be used for input.

Param command:

The command byte that will be sent to the menu when the button is pressed.

Public Functions

inline ButtonAdapter(LcdMenu *menu, Button *button, byte command)
inline virtual void observe() override

Private Members

Button *button
byte command