45 virtual float mapTo(
float toLow,
float toHigh) {
return mapFrom01(
get(), toLow, toHigh); }
48 virtual bool updated() {
return _valueUpdated; }
51 virtual void onUpdate(EventCallback callback) {
onEvent(callback, EVENT_UPDATE); }
61 case EVENT_UPDATE:
return updated();
69 bool _nextIsValid : 1;
70 bool _nextIsNegative : 1;
71 bool _nextIsFraction : 1;
72 bool _valueUpdated : 1;
An analog analog source that contains a value constrained to a finite range (typically in [0,...
Definition PqCore.h:444
virtual float get()
Returns value in [0, 1].
Definition PqCore.h:452
The main Plaquette static class containing all the units.
Definition PqCore.h:60
static Engine & primary()
Returns the main instance of Plaquette.
Definition PqCore.cpp:31
Stream/serial input. Reads float values using Arduino built-in parseFloat().
Definition StreamIn.h:29
virtual bool eventTriggered(EventType eventType)
Returns true iff an event of a certain type has been triggered.
Definition StreamIn.h:59
virtual bool updated()
Returns true iff value was changed.
Definition StreamIn.h:48
virtual void onUpdate(EventCallback callback)
Registers event callback on finish event.
Definition StreamIn.h:51
virtual float mapTo(float toLow, float toHigh)
Maps value to new range.
Definition StreamIn.h:45
virtual void onEvent(EventCallback callback, EventType eventType)
Registers event callback.
Definition PqCore.cpp:246
virtual bool eventTriggered(EventType eventType)
Returns true iff an event of a certain type has been triggered.
Definition PqCore.h:371
Engine * engine() const
Returns the engine that owns this unit.
Definition PqCore.h:382