Skip to content

Commit

Permalink
Need to reserve space in EEPROM
Browse files Browse the repository at this point in the history
Signed-off-by: Evy Bongers <[email protected]>
  • Loading branch information
EvyBongers committed Dec 2, 2023
1 parent c22973a commit f0365d6
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,11 @@

namespace kaleidoscope {
namespace plugin {
uint16_t ColormapOverlay::map_base_;

void ColormapOverlay::setup() {
map_base_ = ::LEDPaletteTheme.reserveThemes(1);
}

bool ColormapOverlay::hasOverlay(KeyAddr k) {
uint8_t layer_index = Layer.lookupActiveLayer(k);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ struct Overlay {

class ColormapOverlay : public kaleidoscope::Plugin {
public:
static void setup();
// Function for defining the array of overlays. It's a template function that
// takes as its sole argument an array reference of size `_overlay_count`, so
// there's no need to use `sizeof` to calculate the correct size, and pass it
Expand All @@ -59,6 +60,7 @@ class ColormapOverlay : public kaleidoscope::Plugin {
EventHandlerResult afterEachCycle();

private:
static uint16_t map_base_;
Overlay const *overlays_;
uint8_t overlay_count_;
cRGB selectedColor;
Expand Down

0 comments on commit f0365d6

Please sign in to comment.