5#ifndef MODES_HARDWARE_LAMP_TYPE_HPP
6#define MODES_HARDWARE_LAMP_TYPE_HPP
17#ifdef LMBD_LAMP_TYPE__INDEXABLE
31#include "src/system/ext/math8.h"
46static constexpr uint16_t
to_strip(uint16_t, uint16_t);
71static constexpr uint16_t
to_led_index(
const float angle_rad,
const float z);
94#ifdef LMBD_LAMP_TYPE__SIMPLE
98#ifdef LMBD_LAMP_TYPE__CCT
102#ifdef LMBD_LAMP_TYPE__INDEXABLE
133#ifdef LMBD_LAMP_TYPE__INDEXABLE
135 static constexpr float _fwidth = stripXCoordinates;
136 static constexpr float _fheight = stripYCoordinates;
137 static constexpr uint16_t _width = floor(_fwidth);
138 static constexpr uint16_t _height = floor(_fheight);
139 static constexpr uint16_t _ledCount = LED_COUNT;
140 static constexpr uint16_t _nbBuffers = stripNbBuffers;
141 static constexpr float _lampBodyRadius_mm = lampda::lampBodyRadius_mm;
142 static constexpr float _ledStripWidth_mm = lampda::ledStripWidth_mm;
143 static constexpr float _ledStripLength_mm = lampda::ledStripLength_mm;
144 static constexpr float _ledByMeter = lampda::ledByMeter;
148 static constexpr uint16_t _safeBufSize = (_width + 1) * (_height + 1);
151 using BufferTy = std::array<uint32_t, _ledCount>;
164 static constexpr float _fwidth = 23.5451;
165 static constexpr float _fheight = 22.51;
166 static constexpr uint16_t _width = 23;
167 static constexpr uint16_t _height = 22;
168 static constexpr uint16_t _ledCount = 530;
169 static constexpr uint16_t _nbBuffers = 3;
170 static constexpr float _lampBodyRadius_mm = 25.0f;
171 static constexpr float _ledStripWidth_mm = 5.2f;
172 static constexpr float _ledStripLength_mm = 25.0f;
173 static constexpr float _ledByMeter = 160.0f;
176 static constexpr uint16_t _safeBufSize = (_width + 1) * (_height + 1);
179 using BufferTy = std::array<uint32_t, _ledCount>;
187 BufferTy _buffers[_nbBuffers];
188 COLOR _colors[_ledCount];
193 void signal_display();
195 uint8_t getBrightness();
196 void setPixelColor(uint16_t, uint32_t);
197 uint32_t getPixelColor(uint16_t);
212 void LMBD_INLINE refresh_tick_value()
214 uint32_t* writeable_now =
const_cast<uint32_t*
>(&
now);
217 uint32_t* writable_tick =
const_cast<uint32_t*
>(&
tick);
220 uint32_t* writable_frame_count =
const_cast<uint32_t*
>(&
raw_frame_count);
221 *writable_frame_count += 1;
234 void LMBD_INLINE startup()
237 if (stripInputMinVoltage_mV == stripInputMaxVoltage_mV)
255 void LMBD_INLINE begin()
276 void LMBD_INLINE show()
297 void LMBD_INLINE show_now()
318 void LMBD_INLINE signal_display()
322 strip.signal_display();
341#ifndef LMBD_LAMP_TYPE__INDEXABLE_IS_HD
343 static_assert(
frameDurationMs == 12,
"Update the documentation of .tick :)");
396 static constexpr float shiftPerTurn = _fwidth - floor(_fwidth - 0.0001);
399 static constexpr uint16_t shiftPeriod = 2;
402 static constexpr float _invShiftResidue = shiftPeriod * (_fwidth - floor(_fwidth - 0.0001));
408 static constexpr auto allResiduesY = details::computeResidues<maxOverflowHeight>(_fwidth);
411 static constexpr auto allDeltaResiduesY = details::computeDeltaResidues<maxOverflowHeight>(_fwidth);
414 static constexpr auto extraShiftResiduesY = details::computeExtraShiftResidues<maxOverflowHeight>(_fwidth);
417 static constexpr int extraShiftTotal = extraShiftResiduesY[
maxOverflowHeight - 1];
455 template<
typename T>
static constexpr LMBD_INLINE uint16_t
toLedCount(T scale)
457 if constexpr (std::is_same_v<T, float>)
459 assert(scale <= 1.0 &&
"scale is 0-1");
462 else if constexpr (std::is_same_v<T, uint8_t>)
469 static_assert(std::is_same_v<T, std::false_type>,
"Invalid type, either float or uint8_t required!");
490 for (uint16_t i = 0; i <
ledCount; ++i)
509 void LMBD_INLINE
blip(
const uint32_t duration)
554 const bool skipCallbacks =
true,
555 const bool skipUpdateBrightness =
false,
556 const bool updateSavedBrightess =
false)
558 assert((skipCallbacks || !skipUpdateBrightness) &&
"implicit callback skip!");
561 if (newBrightness > ::lampda::brightness::absoluteMaximumBrightness)
578 if (updateSavedBrightess)
589#ifndef LMBD_LAMP_TYPE__INDEXABLE
590 static constexpr uint8_t minimumAllowedBrightness = 5;
592 static constexpr uint8_t minimumAllowedBrightness = ::lampda::minimumAllowedBrightness_8;
595 static curve_t brightnessCurve({curve_t::point_t {0, minimumAllowedBrightness},
596 curve_t::point_t {::lampda::brightness::absoluteMaximumBrightness, 255}});
599 strip.
setBrightness(brightnessCurve.sample(trueNewBrightness));
608 const bool isUserCall = skipCallbacks and skipUpdateBrightness and not updateSavedBrightess;
611 if (isUserCall and trueNewBrightness >= trueMaxBrightness)
617 static curve_t brightnessCurve(
618 curve_t::point_t {0, stripInputMinVoltage_mV},
619 curve_t::point_t {::lampda::brightness::absoluteMaximumBrightness, stripInputMaxVoltage_mV},
671 if (current != brightness)
696 if (readPreviousBrightness)
711 if (current != saved)
730 for (uint16_t i = 0; i <
ledCount; ++i)
739 brightness = (brightness < fadeBy) ? 0 : brightness - fadeBy;
753 void LMBD_INLINE
blur(uint8_t blurBy)
757 uint8_t keep = 255 - blurBy;
758 uint8_t seep = blurBy >> 1;
760 uint32_t carryover = 0;
761 for (
unsigned i = 0; i <
ledCount; i++)
765 uint32_t part = colors::fade<false>(c, seep);
766 cur = colors::add<true>(colors::fade<false>(c, keep), carryover);
786 void LMBD_INLINE
fill(uint32_t color, uint16_t start, uint16_t end)
790 assert(start <=
ledCount &&
"invalid start parameter");
791 assert(end <=
ledCount &&
"invalid end parameter");
793 for (uint16_t I = start; I < end; ++I)
800 assert(
false &&
"unsupported");
809 void LMBD_INLINE
fill(uint32_t color, uint16_t start, uint16_t end,
const BufferTy& shouldDisplay)
813 assert(start <=
ledCount &&
"invalid start parameter");
814 assert(end <=
ledCount &&
"invalid end parameter");
816 for (uint16_t I = start; I < end; ++I)
818 const uint8_t blendValue = min<uint32_t>(shouldDisplay[I], UINT8_MAX);
824 assert(
false &&
"unsupported");
838 void LMBD_INLINE
fill(uint32_t color,
const BufferTy& shouldDisplay) {
fill(color, 0,
ledCount, shouldDisplay); }
849 assert(start <
ledCount &&
"invalid start parameter");
850 assert(end <=
ledCount &&
"invalid end parameter");
852 for (uint16_t I = start; I < end; ++I)
855 const auto color = colors::from_palette<false, uint8_t>(I /
static_cast<float>(
ledCount) * 255, palette);
861 assert(
false &&
"unsupported");
883 assert(n <
ledCount &&
"invalid LED index");
884 strip.setPixelColor(n, color);
888 assert(
false &&
"unsupported");
903 assert(n <
ledCount &&
"invalid LED index");
904 return strip.getPixelColor(n);
908 assert(
false &&
"unsupported");
937 static_assert(bufIdx <
nbBuffers,
"bufIdx must be lower than nbBuffers");
938 BufferTy& buffer = strip.
_buffers[bufIdx];
948 template<u
int8_t dstBufIdx, u
int8_t srcBufIdx>
void LMBD_INLINE
copyBuffer()
950 static_assert(srcBufIdx <
nbBuffers,
"srcBufIdx must be lower than nbBuffers");
951 static_assert(dstBufIdx <
nbBuffers,
"dstBufIdx must be lower than nbBuffers");
960 template<u
int8_t bufIdx = 0,
typename T>
void LMBD_INLINE
fillTempBuffer(
const T& value)
962 getTempBuffer<bufIdx>().fill(value);
971 static_assert(
sizeof(BufferTy) ==
sizeof(strip.
_colors));
972 const BufferTy& buffer = getTempBuffer<bufIdx>();
976 uint16_t Sz =
sizeof(strip.
_colors) - Idx *
sizeof(uint32_t);
977 memcpy(&strip.
_colors[Idx], &buffer[Idx], Sz);
991 static_assert(
sizeof(BufferTy) ==
sizeof(strip.
_colors));
992 const BufferTy& dstBuf = getTempBuffer<dstBufIdx>();
993 const BufferTy& srcBuf = getTempBuffer<srcBufIdx>();
995 uint16_t start = 0, end = srcBuf.size();
1001 for (uint16_t I = start; I < end; ++I)
1004 src.color = srcBuf[I];
1005 dst.color = dstBuf[I];
1014 static_assert(
sizeof(BufferTy) ==
sizeof(strip.
_colors));
1015 const BufferTy& buffer = getTempBuffer<bufIdx>();
1017 uint16_t start = 0, end = buffer.size();
1028 for (uint16_t I = 0, J = start; I < end - start; ++I, ++J)
1030 strip.
_colors[J].color = buffer[end - start - I - 1];
1040 static_assert(
sizeof(BufferTy) ==
sizeof(strip.
_colors));
1042 BufferTy& buffer = getTempBuffer<bufIdx>();
1046 uint16_t Sz =
sizeof(strip.
_colors) - Idx *
sizeof(uint32_t);
1049 memcpy(&buffer[Idx], &strip.
_colors[Idx], Sz);
1100static constexpr uint16_t
to_strip(uint16_t x, uint16_t y)
1110 if (hardware::LampTy::allDeltaResiduesY[y])
1208static constexpr uint16_t
to_led_index(
const float angle_rad,
const float z_mm)
1210 constexpr uint16_t maxZCoordinate =
1217 if (zIndex > maxZCoordinate)
1218 zIndex = maxZCoordinate;
Define assertions helpers.
Handle the output LED strip brightness.
protected inheritence to avoid uncontroled hardware calls
Definition: strip.h:46
BufferTy _buffers[stripNbBuffers]
buffers for computations
Definition: strip.h:432
void setBrightness(uint8_t b)
Brightness is an internal counter.
Definition: strip.h:110
void show_now()
Show the current data, independant of changes.
Definition: strip.h:176
COLOR _colors[LED_COUNT]
store the display colors, with no brightness scaling
Definition: strip.h:426
void begin()
Definition: strip.h:134
Given two points and an exponent, fit an exponential function.
Definition: curves.h:121
Given a set of points, will fit multiple linear segments to it.
Definition: curves.h:36
Manipulate color representations.
Compile definitions and sanity checks.
Contains shorthand macro definitions.
Define the lamps coordinates systems.
Define curves types, that can be sampled.
brightness_t get_brightness()
Return the current brightness value (in range 0 - brightness::absoluteMaximumBrightness)....
Definition: brightness_handle.cpp:39
uint32_t when_last_update_brightness()
Get time in milliseconds when brightness was last updated.
Definition: brightness_handle.cpp:94
void update_brightness(const brightness_t newBrightness, const bool shouldCallUserBrightnessCallback)
update the internal brightness values
Definition: brightness_handle.cpp:66
brightness_t get_saved_brightness()
Return the saved brightness level. This shoudl be the prefered option in all computations.
Definition: brightness_handle.cpp:64
brightness_t get_max_user_brightness()
Return the maximum allowed brightness for the user modes.
Definition: brightness_handle.cpp:43
brightness_t get_max_brightness()
Return the maximum allowed brightness.
Definition: brightness_handle.cpp:41
static uint32_t fade(uint32_t inputColor, uint8_t fadeAmount)
fade the color toward black
Definition: utils.hpp:123
static uint32_t blend(uint32_t leftColor, uint32_t rightColor, uint16_t blend, bool b16=false)
blend to two colors
Definition: utils.hpp:95
std::array< uint32_t, 16 > PaletteTy
Palette types.
Definition: palettes.hpp:18
@ Black
Definition: palettes.hpp:96
Provide interface to the physical hardware and other facilities.
Definition: coordinates.hpp:10
LampTypes
Enumeration to write code working with all lamp types.
Definition: lamp_type.hpp:88
@ indexable
Equivalent to LMBD_LAMP_TYPE__INDEXABLE.
@ simple
Equivalent to LMBD_LAMP_TYPE__SIMPLE.
@ cct
Equivalent to LMBD_LAMP_TYPE__CCT.
static constexpr LampTypes lampType
Currently implemented lamp type, defined at compile-time by the user.
Definition: lamp_type.hpp:107
Contains basic interface types to implement custom user modes.
Definition: control_fixed_modes.hpp:12
static constexpr uint16_t to_led_index(const float angle_rad, const float z)
convert a lamp coordinate to a led index
Definition: lamp_type.hpp:1208
static constexpr float to_helix_z(const int16_t n)
Convert a led index to an helix height coordinate.
Definition: lamp_type.hpp:1168
static constexpr uint16_t to_strip(uint16_t, uint16_t)
convert grid coordinates to strip index
Definition: lamp_type.hpp:1100
static constexpr XYTy strip_to_XY(uint16_t n)
convert strip index to grid coordinates
Definition: lamp_type.hpp:1132
static constexpr int16_t to_led_index_no_bounds(const float angle_rad, const float z)
convert a lamp coordinate to a led index, the result can be an index out of the lamp body
Definition: lamp_type.hpp:1243
static constexpr bool is_lamp_coordinate_out_of_bounds(const float angle_rad, const float z)
True if the given led index is out of bounds.
Definition: lamp_type.hpp:1197
static constexpr bool is_led_index_valid(const int16_t ledIndex)
True if the given strip index is a valid one.
Definition: lamp_type.hpp:1189
static constexpr HelixXYZTy strip_to_helix_unconstraint(const int16_t n)
convert strip index to 3D coordinates, without checks on led index. This allows to use 3D coordinates...
Definition: lamp_type.hpp:1178
static constexpr HelixXYZTy strip_to_helix(int16_t n)
convert strip index to 3D coordinates
Definition: lamp_type.hpp:1155
SoundStruct & get_sound_characteristics()
Compute and process sound data.
Definition: sound.cpp:168
void blip(const uint32_t timing)
short interruption of output voltage
Definition: output_power.cpp:39
void write_voltage(const uint16_t voltage_mv)
Write a voltage to the output (will only write it in output mode)
Definition: output_power.cpp:19
void cancel_blip()
stop an ongoing blip
Definition: output_power.cpp:41
bool is_bliping()
indicates that the gate is in a blip
Definition: output_power.cpp:43
uint32_t get_gradient(const uint32_t colorStart, const uint32_t colorEnd, const float level)
Return the color gradient between colorStart to colorEnd.
Definition: utils.cpp:60
static constexpr float wrap_angle(const float angle_rad)
Wrap an angle in radians between 0 and 2*PI.
Definition: utils.h:115
static constexpr N abs(const N a)
absolute of a number
Definition: utils.h:46
static constexpr float c_TWO_PI
2*PI constant
Definition: constants.h:21
uint16_t brightness_t
Define the type of the brightness parameters.
Definition: constants.h:147
Interface for the physical components of the main power output (eg: LED strip output).
Interface for the physical components of the microphone.
Interface of the indexable strip object. Only used for RGB lamp type.
Definition: lamp_type.hpp:51
float x
x 3D mm coordinates
Definition: lamp_type.hpp:52
float y
y 3D mm coordinates
Definition: lamp_type.hpp:53
float z
z 3D mm coordinates
Definition: lamp_type.hpp:54
Definition: lamp_type.hpp:40
uint16_t y
y 2D led grid coordinates
Definition: lamp_type.hpp:42
uint16_t x
x 2D led grid coordinates
Definition: lamp_type.hpp:41
Store a display config.
Definition: lamp_type.hpp:121
uint16_t skipFirstLedsForAmount
Skip the first N leds.
Definition: lamp_type.hpp:123
uint16_t skipFirstLedsForEffect
Skip duration.
Definition: lamp_type.hpp:122
Main interface between the user and the hardware of the lamp.
Definition: lamp_type.hpp:114
void LMBD_INLINE fill(uint32_t color, uint16_t start, uint16_t end)
(indexable) Fill lamp with target color, from start to end
Definition: lamp_type.hpp:786
void align_internal_to_system_brightness()
Special call to update the internal brightness values to the system brightness.
Definition: lamp_type.hpp:627
void setColorsFromMixedBuffers(float phase)
Mix two colors from a buffer.
Definition: lamp_type.hpp:989
static XYTy LMBD_INLINE fromStripIndexToXY(uint16_t N)
(indexable) Given a LED index, return a corresponding X,Y value
Definition: lamp_type.hpp:928
brightness_t LMBD_INLINE getMaxBrightness() const
Return the actual allowed maximum brightness.
Definition: lamp_type.hpp:655
static constexpr float ledByMeter
number of led per meters of strip used
Definition: lamp_type.hpp:428
void LMBD_INLINE restoreBrightness()
Reset brightness to internal saved brightness, skip callbacks.
Definition: lamp_type.hpp:706
void LMBD_INLINE blur(uint8_t blurBy)
Blur currently displayed content by blurBy units /!\ Only applied along the strip,...
Definition: lamp_type.hpp:753
static constexpr uint16_t maxHeight
(indexable) Height of "pixel space" w/ lamp taken as a LED matrix
Definition: lamp_type.hpp:387
void LMBD_INLINE fill(uint32_t color, uint16_t start, uint16_t end, const BufferTy &shouldDisplay)
(indexable) Fill lamp with target color, from start to end. Apply a mask to display leds
Definition: lamp_type.hpp:809
static constexpr float lampHeight_mm
Computation of the lamp height.
Definition: lamp_type.hpp:437
void LMBD_INLINE fill(uint32_t color, const BufferTy &shouldDisplay)
(indexable) Fill lamp with target color, with a mask
Definition: lamp_type.hpp:838
void LMBD_INLINE setBrightness(const brightness_t newBrightness, const bool skipCallbacks=true, const bool skipUpdateBrightness=false, const bool updateSavedBrightess=false)
Set brightness of the lamp.
Definition: lamp_type.hpp:553
void LMBD_INLINE fill(const colors::PaletteTy &palette)
(indexable) Fill lamp with target palette
Definition: lamp_type.hpp:868
static constexpr float maxHeightFloat
Height as a precise floating point number, equal to stripYCoordinates.
Definition: lamp_type.hpp:390
volatile brightness_t temporary_brightness
Define a localy consistant temporary brightness.
Definition: lamp_type.hpp:1068
void LMBD_INLINE copyBuffer()
Copy a source buffer at srcBufIdx to another buffer at dstBufIdx.
Definition: lamp_type.hpp:948
static constexpr float lampBodyCircumpherence_mm
Computation of the lamp body circumpherence.
Definition: lamp_type.hpp:433
static constexpr float maxWidthFloat
Width as a precise floating point number, equal to stripXCoordinates.
Definition: lamp_type.hpp:369
BufferTy &LMBD_INLINE getTempBuffer()
Get a reference to the bufIdx temporary buffer.
Definition: lamp_type.hpp:935
static constexpr float ledStripWidth_mm
real size of the led strip in use
Definition: lamp_type.hpp:423
static uint16_t LMBD_INLINE fromXYtoStripIndex(uint16_t X, uint16_t Y)
(indexable) Given X,Y coordinate, return a corresponding LED index
Definition: lamp_type.hpp:922
static constexpr float ledPerTurns
Computation of the led count per turns.
Definition: lamp_type.hpp:435
void LMBD_INLINE tempBrightness(const brightness_t brightness)
Temporarily set brightness, without affecting brightness navigation.
Definition: lamp_type.hpp:668
void setColorsFromBufferReversed(bool skipLastLine)
(indexable) Display bufIdx temporary buffer, but reversed
Definition: lamp_type.hpp:1012
void enforce_internal_brightness_limits()
Enforce the brightness limits, if getMaxBrightness changed. Will call setBrightness.
Definition: lamp_type.hpp:634
void LMBD_INLINE jumpBrightness(const brightness_t brightness)
Jump to brightness, affecting the next brightness navigation.
Definition: lamp_type.hpp:686
LampConfig config
store a display configuration
Definition: lamp_type.hpp:127
physical::microphone::SoundStruct &LMBD_INLINE get_sound_struct()
Return the an object containing sound analysis data.
Definition: lamp_type.hpp:1060
volatile const uint32_t tick
(physical) Tick number, ever-increasing every frameDurationMs
Definition: lamp_type.hpp:1084
static constexpr float ledSize_mm
Number of leds per one turn of led strip.
Definition: lamp_type.hpp:431
volatile const uint32_t now
(physical) The "now" on milliseconds, updated just before loop.
Definition: lamp_type.hpp:1075
void LMBD_INLINE setPixelColorXY(uint16_t X, uint16_t Y, uint32_t color)
(indexable) Set the X,Y-th LED color
Definition: lamp_type.hpp:916
void LMBD_INLINE setPixelColor(uint16_t n, uint32_t color)
(indexable) Set the n-th LED color
Definition: lamp_type.hpp:874
void LMBD_INLINE fillTempBuffer(const T &value)
Fill temporary buffer bufIdx with given value.
Definition: lamp_type.hpp:960
void LMBD_INLINE clear()
Clear lamp to a clean state.
Definition: lamp_type.hpp:486
uint32_t LMBD_INLINE getPixelColor(uint16_t n)
(indexable) Get the n-th LED color
Definition: lamp_type.hpp:894
static constexpr uint16_t maxOverflowHeight
Larger height, taken as the absolute maximum Y coordinate, overflowing.
Definition: lamp_type.hpp:393
void LMBD_INLINE blip(const uint32_t duration)
blip the power gate for set time
Definition: lamp_type.hpp:509
void setColorsFromBuffer()
(indexable) Display bufIdx temporary buffer as LED colors
Definition: lamp_type.hpp:969
volatile brightness_t saved_brightness
Define a localy consistant saved brightness. Should be similar.
Definition: lamp_type.hpp:1066
bool LMBD_INLINE is_bliping() const
return true if the output is in a blip state
Definition: lamp_type.hpp:531
static constexpr float ledStripLength_mm
Copy the led strip lenght.
Definition: lamp_type.hpp:425
static constexpr float _invShiftResidue
(while shifting every shiftPeriod, we have a residue accumulating)
Definition: lamp_type.hpp:402
static constexpr LMBD_INLINE uint16_t toLedCount(T scale)
(indexable) Return a led count in 0-ledCount scaled by scale
Definition: lamp_type.hpp:455
static constexpr float lampBodyRadius_mm
real radius of the lamp body
Definition: lamp_type.hpp:420
static constexpr LampTypes flavor
Which lamp flavor is currently used by the implementation?
Definition: lamp_type.hpp:336
static constexpr uint32_t frameDurationMs
Hardward try to call .loop() every frameDurationMs (12ms for 83.3fps)
Definition: lamp_type.hpp:339
void LMBD_INLINE fill(const colors::PaletteTy &palette, uint16_t start, uint16_t end)
(indexable) Fill lamp with target palette, from start to end
Definition: lamp_type.hpp:845
static constexpr uint16_t maxWidth
(indexable) Width of "pixel space" w/ lamp taken as a LED matrix
Definition: lamp_type.hpp:366
brightness_t LMBD_INLINE getBrightness(const bool readPreviousBrightness=false)
Get brightness of the lamp.
Definition: lamp_type.hpp:694
void LMBD_INLINE fill(uint32_t color)
(indexable) Fill lamp with target color
Definition: lamp_type.hpp:832
static constexpr uint16_t maxOverflowWidth
Larger width, taken as the absolute maximum X coordinate on all rows.
Definition: lamp_type.hpp:372
void getColorsToBuffer()
(indexable) Copy all current LEDs color to bufIdx temp. buffer
Definition: lamp_type.hpp:1038
static constexpr uint16_t ledCount
(indexable) Count of indexable LEDs on the lamp
Definition: lamp_type.hpp:353
brightness_t LMBD_INLINE getSavedBrightness()
Alias for getBrightness(true)
Definition: lamp_type.hpp:703
static constexpr uint8_t nbBuffers
(indexable) Number of color buffers available for direct access
Definition: lamp_type.hpp:443
volatile const uint32_t raw_frame_count
(physical) Raw frame count, incremented at an undefined rate
Definition: lamp_type.hpp:1092
static constexpr uint32_t brightnessDurationMs
Limit mode-requested brightness changes to one every few frames.
Definition: lamp_type.hpp:347
void LMBD_INLINE cancel_blip() const
Cancel the ongoing blip, if any.
Definition: lamp_type.hpp:526
void LMBD_INLINE fadeToBlackBy(uint8_t fadeBy)
Fade currently displayed content by fadeBy units.
Definition: lamp_type.hpp:723
Handle the analysis of a sound sample. This structure handled the FastFourrier analysis of a sound sa...
Definition: sound.h:33
Define the system hardware constants.
Define all time related platform functions.
Use this to convert color to bytes.
Definition: utils.h:128
User defined constants, relative to specific lamp types.
Convertion header to use the print and debug functions from C code.