small fixes
This commit is contained in:
2
main.cpp
2
main.cpp
@ -391,7 +391,7 @@ void reciverError(uint8_t code, void* userData)
|
|||||||
if(!sensorsPaused)
|
if(!sensorsPaused)
|
||||||
{
|
{
|
||||||
Serial* serial = reinterpret_cast<Serial*>(userData);
|
Serial* serial = reinterpret_cast<Serial*>(userData);
|
||||||
serial->write_p(PSTR("ERROR CODE: "));
|
serial->write_p(PSTR("RECV ERROR CODE: "));
|
||||||
serial->write(code);
|
serial->write(code);
|
||||||
serial->putChar('\n');
|
serial->putChar('\n');
|
||||||
}
|
}
|
||||||
|
@ -114,14 +114,14 @@ uint8_t RgbLed::applyCal(uint16_t value, const uint16_t* cal)
|
|||||||
return (value*calValue)/1000;
|
return (value*calValue)/1000;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//unfinished
|
||||||
void RgbLed::adjustHeadroom(uint8_t& r, uint8_t& g, uint8_t& b, const uint8_t lumina)
|
void RgbLed::adjustHeadroom(uint8_t& r, uint8_t& g, uint8_t& b, const uint8_t lumina)
|
||||||
{
|
{
|
||||||
uint8_t postCalLumina = ((uint16_t)r+g+b)/3;
|
uint8_t postCalLumina = ((uint16_t)r+g+b)/3;
|
||||||
while(postCalLumina < lumina && r < 255 && g < 255 && b < 255)
|
while(postCalLumina < lumina && r < 255 && g < 255 && b < 255)
|
||||||
{
|
{
|
||||||
if(r > 255);
|
if(r > 255) break;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void RgbLed::patternStep()
|
void RgbLed::patternStep()
|
||||||
|
2
rgbled.h
2
rgbled.h
@ -11,8 +11,6 @@ private:
|
|||||||
static constexpr uint16_t calGreen[] = {1000, 1000, 1000};
|
static constexpr uint16_t calGreen[] = {1000, 1000, 1000};
|
||||||
static constexpr uint16_t calBlue[] = {400, 500, 500};
|
static constexpr uint16_t calBlue[] = {400, 500, 500};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
uint8_t _pattern = 0;
|
uint8_t _pattern = 0;
|
||||||
|
|
||||||
uint16_t _counter = 0;
|
uint16_t _counter = 0;
|
||||||
|
Reference in New Issue
Block a user