mirror of
https://github.com/wled/WLED.git
synced 2025-07-15 14:56:32 +00:00
Fix for Octopus on ESP32 C3
Apparently the C3 can not convert negative floats to uint8_t directly, casting it into an int first fixes it.
This commit is contained in:
parent
a0e81da8c5
commit
44e28f96e0
@ -7749,7 +7749,7 @@ uint16_t mode_2Doctopus() {
|
||||
const int C_Y = (rows / 2) + ((SEGMENT.custom2 - 128)*rows)/255;
|
||||
for (int x = 0; x < cols; x++) {
|
||||
for (int y = 0; y < rows; y++) {
|
||||
rMap[XY(x, y)].angle = 40.7436f * atan2f((y - C_Y), (x - C_X)); // avoid 128*atan2()/PI
|
||||
rMap[XY(x, y)].angle = int(40.7436f * atan2f((y - C_Y), (x - C_X))); // avoid 128*atan2()/PI
|
||||
rMap[XY(x, y)].radius = hypotf((x - C_X), (y - C_Y)) * mapp; //thanks Sutaburosu
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user