-
Notifications
You must be signed in to change notification settings - Fork 263
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Colormap-Overlay plugin #1359
Conversation
74ae4c5
to
14e8920
Compare
Just now I found that there's a focus command for retrieving the palette, which had me find out that (it seems that) the palette isn't set correctly, though I don't know why. Based on my findings, the colors are retrieved from the palette correctly, so it seems I'm missing something when setting the palette. This is from my sketch: enum {
PALETTE_PURPLE,
PALETTE_RED,
PALETTE_GREEN,
PALETTE_PINK,
PALETTE_YELLOW,
PALETTE_UNUSED_1,
PALETTE_UNUSED_2,
PALETTE_UNUSED_3,
PALETTE_UNUSED_4,
PALETTE_UNUSED_5,
PALETTE_UNUSED_6,
PALETTE_UNUSED_7,
PALETTE_UNUSED_8,
PALETTE_UNUSED_9,
PALETTE_UNUSED_10,
PALETTE_UNUSED_11,
};
PALETTE(
[PALETTE_PURPLE] = CRGB(0x99, 0x11, 0xb5),
[PALETTE_RED] = CRGB(0xff, 0x00, 0x00),
[PALETTE_GREEN] = CRGB(0x1a, 0xb0, 0x04),
[PALETTE_PINK] = CRGB(0xd0, 0x08, 0x8a),
[PALETTE_YELLOW] = CRGB(0xef, 0xca, 0x1c),
// unused
[PALETTE_UNUSED_1] = CRGB(0x00, 0x00, 0x00),
[PALETTE_UNUSED_2] = CRGB(0x00, 0x00, 0x00),
[PALETTE_UNUSED_3] = CRGB(0x00, 0x00, 0x00),
[PALETTE_UNUSED_4] = CRGB(0x00, 0x00, 0x00),
[PALETTE_UNUSED_5] = CRGB(0x00, 0x00, 0x00),
[PALETTE_UNUSED_6] = CRGB(0x00, 0x00, 0x00),
[PALETTE_UNUSED_7] = CRGB(0x00, 0x00, 0x00),
[PALETTE_UNUSED_8] = CRGB(0x00, 0x00, 0x00),
[PALETTE_UNUSED_9] = CRGB(0x00, 0x00, 0x00),
[PALETTE_UNUSED_10] = CRGB(0x00, 0x00, 0x00),
[PALETTE_UNUSED_11] = CRGB(0x00, 0x00, 0x00)
) And this is the palette as returned by the keyboard: $ bin/focus-send palette |xargs -n3 printf '%02x%02x%02x\n'
a2feff
000064
05f63b
0000ff
ff0000
ffd6ff
cdfecd
fc17ff
a7fffd
0000fd
000000
000000
000000
000000
000000
000000 |
3de0b54
to
0e7c39c
Compare
Signed-off-by: Evy Bongers <[email protected]>
Signed-off-by: Evy Bongers <[email protected]>
Signed-off-by: Evy Bongers <[email protected]>
Signed-off-by: Evy Bongers <[email protected]>
Signed-off-by: Evy Bongers <[email protected]>
Signed-off-by: Evy Bongers <[email protected]>
Signed-off-by: Evy Bongers <[email protected]>
2decf4c
to
b8a0ab4
Compare
#include <Kaleidoscope.h> | ||
#include <Kaleidoscope-LEDControl.h> | ||
#include <Kaleidoscope-LED-Palette-Theme.h> | ||
#include <Kaleidoscope-Colormap.h> // DefaultColorMap |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't really like that I need to include this, just to have DefaultColormap
.
The extension only has a single method: | ||
|
||
### `.setup()` | ||
|
||
> Intended to be called from the `setup()` method of the sketch, it reserves the | ||
> required space in EEPROM. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I feel this shouldn't be needed at all. I tries moving the contents to ColormapOverlay::onSetup()
, but that resulted in the overlays briefly flashing in their assigned color, before being turned off again.
void ColormapOverlay::setup() { | ||
map_base_ = ::LEDPaletteTheme.reserveThemes(1); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As stated above, I would prefer to remove this and move that single line to ColormapOverlay::onSetup()
, but that doesn't work as I expect it to.
I'd appreciate some help
No description provided.