Skip to content

Commit

Permalink
Make FlowFields run the opposite Y coordinate
Browse files Browse the repository at this point in the history
  • Loading branch information
robertlipe committed Aug 8, 2023
1 parent 7037669 commit e2bf77c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions include/effects/matrix/PatternSMFlowFields.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,15 @@ class PatternSMFlowFields : public LEDStripEffect

[[nodiscard]] CRGB getPixColorXY(uint8_t x, uint8_t y) const
{
y = MATRIX_HEIGHT - y;
if (!g()->isValidPixel(x, y))
return 0;
return g()->leds[XY(x, MATRIX_HEIGHT - 1 - y)];
}

void drawPixelXY(int8_t x, int8_t y, CRGB color)
{
y = MATRIX_HEIGHT - y;
if (!g()->isValidPixel(x, y))
return;
// Mesmerizer flips the Y axis here.
Expand Down

0 comments on commit e2bf77c

Please sign in to comment.