3#include "../util/FIFO.h"
4#include "../util/scopedirqblocker.h"
122 e.type = Event::EventType::buttonPressed;
134 m.type = Event::EventType::buttonReleased;
146 e.type = Event::EventType::encoderTurned;
158 e.type = Event::EventType::encoderActivityChanged;
160 e.asEncoderActivityChanged.newActivityType
161 =
isActive ? Event::ActivityType::active
162 : Event::ActivityType::inactive;
171 e.type = Event::EventType::potMoved;
182 e.type = Event::EventType::potActivityChanged;
183 e.asPotActivityChanged.id =
potId;
184 e.asPotActivityChanged.newActivityType
185 =
isActive ? Event::ActivityType::active
186 : Event::ActivityType::inactive;
198 m.type = Event::EventType::invalid;
bool PushBack(const T &elementToAdd)
Definition FIFO.h:49
T PopFront()
Definition FIFO.h:101
bool IsEmpty() const
Definition FIFO.h:165
Definition leddriver.h:33
struct __attribute__((packed)) PCA9685TransmitBuffer
Definition leddriver.h:36
Definition scopedirqblocker.h:15
A queue that holds user input events in the UI system.
Definition UiEventQueue.h:18
static constexpr uint16_t invalidPotId
Definition UiEventQueue.h:27
struct __attribute__((packed)) Event
Definition UiEventQueue.h:30
void AddEncoderActivityChanged(uint16_t encoderId, bool isActive)
Definition UiEventQueue.h:155
~UiEventQueue()
Definition UiEventQueue.h:114
void AddEncoderTurned(uint16_t encoderID, int16_t increments, uint16_t stepsPerRev)
Definition UiEventQueue.h:141
bool IsQueueEmpty()
Definition UiEventQueue.h:208
void AddButtonReleased(uint16_t buttonID)
Definition UiEventQueue.h:131
void AddPotMoved(uint16_t potId, float newPosition)
Definition UiEventQueue.h:168
Event GetAndRemoveNextEvent()
Definition UiEventQueue.h:192
static constexpr uint16_t invalidEncoderId
Definition UiEventQueue.h:24
UiEventQueue()
Definition UiEventQueue.h:113
static constexpr uint16_t invalidButtonId
Definition UiEventQueue.h:21
void AddPotActivityChanged(uint16_t potId, bool isActive)
Definition UiEventQueue.h:179
void AddButtonPressed(uint16_t buttonID, uint16_t numSuccessivePresses, bool isRetriggering=false)
Definition UiEventQueue.h:117
Hardware defines and helpers for daisy field platform.
Definition index.h:2