17#include "Adafruit_NeoTrellis.h"
28template <u
int8_t menuCount>
47 static uint32_t
Wheel(
byte WheelPos);
55 static TrellisCallback
blink(keyEvent evt);
Manages multiple menus and settings using Adafruit NeoTrellis.
static uint32_t Wheel(byte WheelPos)
Generates a color value based on a position on a color wheel.
static bool isReady
Flag indicating whether the menu system is ready for interaction.
static void WriteEEPROM(uint16_t index, uint8_t value)
Writes a value to EEPROM at the specified index.
static void SetInitialized()
Marks the menu system as initialized.
static void SetMenuMax(uint8_t menu, uint8_t maxValue)
Sets the maximum value for a specific menu.
static TrellisCallback blink(keyEvent evt)
Callback function for handling key events on the NeoTrellis keypad.
static uint8_t currentMenu
Index of the currently active menu.
static void Update()
Updates the menu state and processes user interactions.
static uint8_t GetMenuValue(uint8_t menu)
Retrieves the current value of a specific menu.
static bool menuActive
Flag indicating whether the menu is active.
static uint8_t maxValue[menuCount]
Array of maximum values for each menu.
static void ResetI2CBus()
Resets the I2C bus to recover from communication issues.
static uint8_t faceChoices
Number of face choices available.
static Adafruit_NeoTrellis trellis
Instance of the Adafruit NeoTrellis keypad.
static uint8_t currentSetting
Index of the currently active setting within the menu.
static uint8_t GetCurrentMenu()
Retrieves the index of the currently active menu.
static bool Initialize()
Initializes the MenuHandler and sets up the NeoTrellis keypad.
static bool didBegin
Flag indicating whether the initialization process has been completed.
static void SetDefaultValue(uint16_t menu, uint8_t value)
Sets a default value for a specific menu.
static uint8_t currentValue[menuCount]
Array of current values for each menu.
static uint8_t ReadEEPROM(uint16_t index)
Reads a value from EEPROM at the specified index.