79 float Get()
const {
return value_; }
82 const float*
GetPtr()
const {
return &value_; }
88 operator float()
const {
return value_; }
118 const float default_;
120 const char* unitStr_;
122 const bool forceSign_;
123 static constexpr float coarseStepSize0to1_ = 0.05f;
124 static constexpr float fineStepSize0to1_ = 0.01f;
155 int Get()
const {
return value_; }
158 const int*
GetPtr()
const {
return &value_; }
164 operator int()
const {
return value_; }
193 const int stepSizeFine_;
194 const int stepSizeCoarse_;
195 const char* unitStr_;
196 const bool forceSign_;
220 const char*
GetString()
const {
return itemStrings_[index_]; }
229 operator int()
const {
return index_; }
232 operator const char*()
const {
return itemStrings_[index_]; }
259 const char** itemStrings_;
Definition leddriver.h:33
Definition MappedValue.h:42
~MappedFloatValue() override
Definition MappedValue.h:76
float Get() const
Definition MappedValue.h:79
void SetFrom0to1(float normalizedValue0to1) override
Mapping
Definition MappedValue.h:46
void Step(int16_t numStepsUp, bool useCoarseStepSize) override
MappedFloatValue(float min, float max, float defaultValue, Mapping mapping=Mapping::lin, const char *unitStr="", uint8_t numDecimals=1, bool forceSign=false)
void AppentToString(FixedCapStrBase< char > &string) const override
MappedFloatValue & operator=(float val)
Definition MappedValue.h:91
void ResetToDefault() override
float GetAs0to1() const override
const float * GetPtr() const
Definition MappedValue.h:82
Definition MappedValue.h:132
float GetAs0to1() const override
int Get() const
Definition MappedValue.h:155
~MappedIntValue() override
Definition MappedValue.h:152
const int * GetPtr() const
Definition MappedValue.h:158
void ResetToDefault() override
MappedIntValue(int min, int max, int defaultValue, int stepSizeFine, int stepSizeCoarse, const char *unitStr="", bool forceSign=false)
void SetFrom0to1(float normalizedValue0to1) override
void Step(int16_t numStepsUp, bool useCoarseStepSize) override
MappedIntValue & operator=(int val)
Definition MappedValue.h:167
void AppentToString(FixedCapStrBase< char > &string) const override
Definition MappedValue.h:203
const uint32_t * GetIndexPtr() const
Definition MappedValue.h:223
MappedStringListValue & operator=(int index)
Definition MappedValue.h:235
MappedStringListValue(const char **itemStrings, uint16_t numItems, uint32_t defaultIndex)
void AppentToString(FixedCapStrBase< char > &string) const override
const char * GetString() const
Definition MappedValue.h:220
void SetFrom0to1(float normalizedValue0to1) override
void Step(int16_t numStepsUp, bool useCoarseStepSize) override
void ResetToDefault() override
~MappedStringListValue() override
Definition MappedValue.h:214
void SetIndex(uint32_t index)
float GetAs0to1() const override
int GetIndex() const
Definition MappedValue.h:217
Definition MappedValue.h:12
virtual void SetFrom0to1(float normalizedValue0to1)=0
virtual void AppentToString(FixedCapStrBase< char > &string) const =0
virtual void ResetToDefault()=0
virtual float GetAs0to1() const =0
virtual void Step(int16_t numStepsUp, bool useCoarseStepSize)=0
virtual ~MappedValue()
Definition MappedValue.h:14
Hardware defines and helpers for daisy field platform.
Definition index.h:2