FastLED 3.9.7
Loading...
Searching...
No Matches
fl::ScreenMap Class Reference

Detailed Description

Definition at line 28 of file screenmap.h.

Public Member Functions

 ScreenMap (uint32_t length, float mDiameter=-1.0f)
 
 ScreenMap (const pair_xy_float *lut, uint32_t length, float diameter=-1.0)
 
template<uint32_t N>
 ScreenMap (const pair_xy_float(&lut)[N], float diameter=-1.0)
 
 ScreenMap (const ScreenMap &other)
 
const pair_xy_floatoperator[] (uint32_t x) const
 
void set (uint16_t index, const pair_xy_float &p)
 
pair_xy_floatoperator[] (uint32_t x)
 
void setDiameter (float diameter)
 
ScreenMapoperator= (const ScreenMap &other)
 
pair_xy_float mapToIndex (uint32_t x) const
 
uint32_t getLength () const
 
float getDiameter () const
 

Static Public Member Functions

static ScreenMap Circle (int numLeds, float cm_between_leds=1.5f, float cm_led_diameter=0.5f)
 
static bool ParseJson (const char *jsonStrScreenMap, FixedMap< Str, ScreenMap, 16 > *segmentMaps, Str *err=nullptr)
 
static bool ParseJson (const char *jsonStrScreenMap, const char *screenMapName, ScreenMap *screenmap, Str *err=nullptr)
 
static void toJsonStr (const FixedMap< Str, ScreenMap, 16 > &, Str *jsonBuffer)
 
static void toJson (const FixedMap< Str, ScreenMap, 16 > &, JsonDocument *doc)
 

Constructor & Destructor Documentation

◆ ScreenMap() [1/4]

fl::ScreenMap::ScreenMap ( uint32_t length,
float mDiameter = -1.0f )

Definition at line 150 of file screenmap.cpp.

◆ ScreenMap() [2/4]

fl::ScreenMap::ScreenMap ( const pair_xy_float * lut,
uint32_t length,
float diameter = -1.0 )

Definition at line 160 of file screenmap.cpp.

◆ ScreenMap() [3/4]

template<uint32_t N>
fl::ScreenMap::ScreenMap ( const pair_xy_float(&) lut[N],
float diameter = -1.0 )
inline

Definition at line 42 of file screenmap.h.

◆ ScreenMap() [4/4]

fl::ScreenMap::ScreenMap ( const ScreenMap & other)

Definition at line 170 of file screenmap.cpp.

Member Function Documentation

◆ Circle()

ScreenMap fl::ScreenMap::Circle ( int numLeds,
float cm_between_leds = 1.5f,
float cm_led_diameter = 0.5f )
static

Definition at line 21 of file screenmap.cpp.

◆ getDiameter()

float fl::ScreenMap::getDiameter ( ) const

Definition at line 197 of file screenmap.cpp.

◆ getLength()

uint32_t fl::ScreenMap::getLength ( ) const

Definition at line 195 of file screenmap.cpp.

◆ mapToIndex()

pair_xy_float fl::ScreenMap::mapToIndex ( uint32_t x) const

Definition at line 186 of file screenmap.cpp.

◆ operator=()

ScreenMap & fl::ScreenMap::operator= ( const ScreenMap & other)

Definition at line 221 of file screenmap.cpp.

◆ operator[]() [1/2]

pair_xy_float & fl::ScreenMap::operator[] ( uint32_t x)

Definition at line 212 of file screenmap.cpp.

◆ operator[]() [2/2]

const pair_xy_float & fl::ScreenMap::operator[] ( uint32_t x) const

Definition at line 204 of file screenmap.cpp.

◆ ParseJson() [1/2]

bool fl::ScreenMap::ParseJson ( const char * jsonStrScreenMap,
const char * screenMapName,
ScreenMap * screenmap,
Str * err = nullptr )
static

Definition at line 80 of file screenmap.cpp.

◆ ParseJson() [2/2]

bool fl::ScreenMap::ParseJson ( const char * jsonStrScreenMap,
FixedMap< Str, ScreenMap, 16 > * segmentMaps,
Str * err = nullptr )
static

Definition at line 37 of file screenmap.cpp.

◆ set()

void fl::ScreenMap::set ( uint16_t index,
const pair_xy_float & p )

Definition at line 176 of file screenmap.cpp.

◆ setDiameter()

void fl::ScreenMap::setDiameter ( float diameter)

Definition at line 184 of file screenmap.cpp.

◆ toJson()

void fl::ScreenMap::toJson ( const FixedMap< Str, ScreenMap, 16 > & segmentMaps,
JsonDocument * doc )
static

Definition at line 111 of file screenmap.cpp.

◆ toJsonStr()

void fl::ScreenMap::toJsonStr ( const FixedMap< Str, ScreenMap, 16 > & segmentMaps,
Str * jsonBuffer )
static

Definition at line 139 of file screenmap.cpp.


The documentation for this class was generated from the following files: