added periodic resending, free memory readout, rgb callibration.

This commit is contained in:
2019-01-07 18:59:05 +01:00
parent 775ff9313b
commit d2bb858317
8 changed files with 129 additions and 29 deletions

View File

@ -7,9 +7,11 @@ private:
Pwm8b* _pwmA;
Pwm8b* _pwmB;
static constexpr uint16_t calBlue[] = {1000, 1000, 1000};
static constexpr uint16_t calRed[] = {650, 650, 650};
static constexpr uint16_t calGreen[] = {1000, 1000, 1000};
static constexpr uint16_t calRed[] = {1000, 1000, 1000};
static constexpr uint16_t calBlue[] = {200, 250, 300};
uint8_t _pattern = 0;
@ -25,6 +27,10 @@ private:
bool _powerd = false;
void patternStep();
uint16_t getCalValue();
uint8_t applyCal(uint16_t value, const uint16_t* cal);
void adjustHeadroom(uint8_t& r, uint8_t& g, uint8_t& b, const uint8_t lumina);
public:
RgbLed( Pwm8b* pwmA, Pwm8b* pwmB );