FireEffect does look a bit better, but still not right.
This commit is contained in:
parent
f7230b54a2
commit
59a987f7e6
@ -38,11 +38,11 @@ void FireEffect::propagate() {
|
||||
int index = y*LED_WIDTH + x;
|
||||
uint8_t below_index = (y-1)*LED_WIDTH + x;
|
||||
if (x==0) {
|
||||
this->data[index] = scale8(this->data[below_index], 170) + scale8(this->data[below_index+1], 85);
|
||||
this->data[index] = scale8(this->data[below_index], 128) + scale8(this->data[below_index+1], 64);
|
||||
} else if (x==LED_WIDTH-1) {
|
||||
this->data[index] = scale8(this->data[below_index], 170) + scale8(this->data[below_index-1], 85);
|
||||
this->data[index] = scale8(this->data[below_index], 128) + scale8(this->data[below_index-1], 64);
|
||||
} else {
|
||||
this->data[index] = scale8(this->data[below_index], 128) + scale8(this->data[below_index-1], 64) + scale8(this->data[below_index+1], 64);
|
||||
this->data[index] = scale8(this->data[below_index], 128) + scale8(this->data[below_index-1], 32) + scale8(this->data[below_index+1], 32);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user