Skip to content

Commit

Permalink
fixed orbit pairs check
Browse files Browse the repository at this point in the history
  • Loading branch information
Unreal-Dan committed Nov 23, 2024
1 parent c35aaec commit 1a571ba
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion VortexEngine/src/Leds/LedTypes.h
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,10 @@ enum Pair : uint8_t
};

// Compile-time check on the number of pairs and leds
static_assert(LED_COUNT == (PAIR_COUNT * 2), "Incorrect number of Pairs for Leds! Adjust the Led enum or Pair enum to match");
// Orbit has different definition of a 'pair' since the edge
// leds are in their own pairs as both the 'even and odd' led
// it causes there to be more pairs than expected
static_assert(LED_COUNT == ((PAIR_COUNT * 2) - 4), "Incorrect number of Pairs for Leds! Adjust the Led enum or Pair enum to match");

// check if an led is even or odd
#define isEven(pos) ((pos % 2) == 0)
Expand Down

0 comments on commit 1a571ba

Please sign in to comment.