wip commit
This commit is contained in:
@ -6,6 +6,9 @@ class Args {
|
||||
String *str;
|
||||
public:
|
||||
Args(String *str) : str(str) {}
|
||||
operator const char*() const {
|
||||
return str->c_str();
|
||||
}
|
||||
String operator[](int pos) {
|
||||
char buf[64];
|
||||
strncpy(buf, str->c_str(), sizeof(buf));
|
||||
|
@ -108,7 +108,7 @@ struct InputEvent: public Variant {
|
||||
InputEvent()
|
||||
: Variant(), intent(None) {}
|
||||
|
||||
bool operator!=(const InputEvent::Intent& otherIntent) {
|
||||
bool operator!=(const InputEvent::Intent& otherIntent) const {
|
||||
return intent != otherIntent;
|
||||
}
|
||||
|
||||
|
@ -21,6 +21,7 @@ Renderer::loop()
|
||||
{
|
||||
uint16_t totalPower = 0;
|
||||
for(Display* dpy : m_displays) {
|
||||
dpy->clear();
|
||||
totalPower += calculate_unscaled_power_mW(dpy->pixelBacking(), dpy->pixelCount());
|
||||
for(Figment* figment : m_figments) {
|
||||
if (figment->state == Task::Running) {
|
||||
|
0
lib/Figments/Scheduler.h
Normal file
0
lib/Figments/Scheduler.h
Normal file
@ -43,6 +43,14 @@ Surface::operator+=(const CRGB& color)
|
||||
return *this;
|
||||
}
|
||||
|
||||
void
|
||||
Surface::blend(const CRGB& color, uint8_t pct)
|
||||
{
|
||||
paintWith([&](CRGB& pixel) {
|
||||
nblend(pixel, color, pct);
|
||||
});
|
||||
}
|
||||
|
||||
void
|
||||
Surface::paintWith(std::function<void(CRGB&)> func)
|
||||
{
|
||||
|
@ -31,6 +31,8 @@ public:
|
||||
*/
|
||||
Surface& operator+=(const CRGB& color);
|
||||
|
||||
void blend(const CRGB& color, uint8_t pct);
|
||||
|
||||
/**
|
||||
* OR operation that applies the given color to every pixel on the surface
|
||||
*/
|
||||
|
Reference in New Issue
Block a user