Converted initial level of LedPin from uint8_t to float
This commit is contained in:
parent
98a5a895cc
commit
3ea8f956a5
Binary file not shown.
|
|
@ -47,7 +47,7 @@ LedC::LedC(uint8_t pin, uint16_t freq){
|
||||||
|
|
||||||
///////////////////
|
///////////////////
|
||||||
|
|
||||||
LedPin::LedPin(uint8_t pin, uint8_t level, uint16_t freq) : LedC(pin, freq){
|
LedPin::LedPin(uint8_t pin, float level, uint16_t freq) : LedC(pin, freq){
|
||||||
|
|
||||||
if(!channel)
|
if(!channel)
|
||||||
Serial.printf("\n*** ERROR: Can't create LedPin(%d) - no open PWM channels and/or Timers ***\n\n",pin);
|
Serial.printf("\n*** ERROR: Can't create LedPin(%d) - no open PWM channels and/or Timers ***\n\n",pin);
|
||||||
|
|
|
||||||
|
|
@ -51,7 +51,7 @@ class LedC {
|
||||||
class LedPin : public LedC {
|
class LedPin : public LedC {
|
||||||
|
|
||||||
public:
|
public:
|
||||||
LedPin(uint8_t pin, uint8_t level=0, uint16_t freq=DEFAULT_PWM_FREQ); // assigns pin to be output of one of 16 PWM channels initial level and frequency
|
LedPin(uint8_t pin, float level=0, uint16_t freq=DEFAULT_PWM_FREQ); // assigns pin to be output of one of 16 PWM channels initial level and frequency
|
||||||
void set(float level); // sets the PWM duty to level (0-100)
|
void set(float level); // sets the PWM duty to level (0-100)
|
||||||
|
|
||||||
static void HSVtoRGB(float h, float s, float v, float *r, float *g, float *b ); // converts Hue/Saturation/Brightness to R/G/B
|
static void HSVtoRGB(float h, float s, float v, float *r, float *g, float *b ); // converts Hue/Saturation/Brightness to R/G/B
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue