Rename to Kaleidoscope-Colormap

Fixes #2.

Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
pull/389/head
Gergely Nagy 8 years ago
parent f7196ef26d
commit 947019733d

@ -1,18 +1,18 @@
# Kaleidoscope-EEPROM-Colormap # Kaleidoscope-Colormap
![status][st:experimental] [![Build Status][travis:image]][travis:status] ![status][st:experimental] [![Build Status][travis:image]][travis:status]
[travis:image]: https://travis-ci.org/keyboardio/Kaleidoscope-EEPROM-Colormap.svg?branch=master [travis:image]: https://travis-ci.org/keyboardio/Kaleidoscope-Colormap.svg?branch=master
[travis:status]: https://travis-ci.org/keyboardio/Kaleidoscope-EEPROM-Colormap [travis:status]: https://travis-ci.org/keyboardio/Kaleidoscope-Colormap
[st:stable]: https://img.shields.io/badge/stable-✔-black.svg?style=flat&colorA=44cc11&colorB=494e52 [st:stable]: https://img.shields.io/badge/stable-✔-black.svg?style=flat&colorA=44cc11&colorB=494e52
[st:broken]: https://img.shields.io/badge/broken-X-black.svg?style=flat&colorA=e05d44&colorB=494e52 [st:broken]: https://img.shields.io/badge/broken-X-black.svg?style=flat&colorA=e05d44&colorB=494e52
[st:experimental]: https://img.shields.io/badge/experimental----black.svg?style=flat&colorA=dfb317&colorB=494e52 [st:experimental]: https://img.shields.io/badge/experimental----black.svg?style=flat&colorA=dfb317&colorB=494e52
The `EEPROM-ColorMap` extension provides an easier way to set up a different - The `Colormap` extension provides an easier way to set up a different - static -
static - color map per-layer. This means that we can set up a map of colors for color map per-layer. This means that we can set up a map of colors for each key,
each key, on a per-layer basis, and whenever a layer becomes active, the color on a per-layer basis, and whenever a layer becomes active, the color map for
map for that layer is applied on top of everything else. The extension supports that layer is applied on top of everything else. The extension supports
transparent colors, to make things easier. transparent colors, to make things easier.
Both the palette and the color map is stored in EEPROM, and the palette is Both the palette and the color map is stored in EEPROM, and the palette is
@ -30,14 +30,14 @@ and it will do the rest.
```c++ ```c++
#include <Kaleidoscope.h> #include <Kaleidoscope.h>
#include <Kaleidoscope-LED-Palette-Theme.h> #include <Kaleidoscope-LED-Palette-Theme.h>
#include <Kaleidoscope-EEPROM-Colormap.h> #include <Kaleidoscope-Colormap.h>
#include <Kaleidoscope-Focus.h> #include <Kaleidoscope-Focus.h>
void setup (void) { void setup (void) {
Kaleidoscope.setup (); Kaleidoscope.setup ();
USE_PLUGINS (&EEPROMColormapEffect, &Focus); USE_PLUGINS (&ColormapEffect, &Focus);
EEPROMColormapEffect.configure (1); ColormapEffect.configure (1);
Focus.addHook (FOCUS_HOOK_LEDPALETTETHEME); Focus.addHook (FOCUS_HOOK_LEDPALETTETHEME);
Focus.addHook (FOCUS_HOOK_COLORMAP); Focus.addHook (FOCUS_HOOK_COLORMAP);
} }
@ -45,7 +45,7 @@ void setup (void) {
## Extension methods ## Extension methods
The extension provides an `EEPROMColormapEffect` singleton object, with a single method: The extension provides an `ColormapEffect` singleton object, with a single method:
### `.configure(maxLayers)` ### `.configure(maxLayers)`
@ -62,4 +62,4 @@ The extension provides an `EEPROMColormapEffect` singleton object, with a single
Starting from the [example][plugin:example] is the recommended way of getting Starting from the [example][plugin:example] is the recommended way of getting
started with the plugin. started with the plugin.
[plugin:example]: https://github.com/keyboardio/Kaleidoscope-EEPROM-Colormap/blob/master/examples/EEPROM-Colormap/EEPROM-Colormap.ino [plugin:example]: https://github.com/keyboardio/Kaleidoscope-Colormap/blob/master/examples/Colormap/Colormap.ino

@ -17,7 +17,7 @@
*/ */
#include <Kaleidoscope.h> #include <Kaleidoscope.h>
#include <Kaleidoscope-EEPROM-Colormap.h> #include <Kaleidoscope-Colormap.h>
const Key keymaps[][ROWS][COLS] PROGMEM = { const Key keymaps[][ROWS][COLS] PROGMEM = {
[0] = KEYMAP_STACKED [0] = KEYMAP_STACKED
@ -41,11 +41,11 @@ const Key keymaps[][ROWS][COLS] PROGMEM = {
}; };
void setup () { void setup () {
Kaleidoscope.use (&EEPROMColormapEffect, NULL); Kaleidoscope.use (&ColormapEffect, NULL);
Kaleidoscope.setup (); Kaleidoscope.setup ();
EEPROMColormapEffect.configure (1); ColormapEffect.configure (1);
EEPROMColormapEffect.activate (); ColormapEffect.activate ();
} }
void loop () { void loop () {

@ -1,10 +1,10 @@
name=Kaleidoscope-EEPROM-Colormap name=Kaleidoscope-Colormap
version=0.0.0 version=0.0.0
author=Gergely Nagy author=Gergely Nagy
maintainer=Gergely Nagy <kaleidoscope@gergo.csillger.hu> maintainer=Gergely Nagy <kaleidoscope@gergo.csillger.hu>
sentence=Per-layer colormap effect for Kaleidoscope, with EEPROM storage. sentence=Per-layer colormap effect for Kaleidoscope, with EEPROM storage.
paragraph=Colors keys according to a colormap whenever a layer changes. paragraph=Colors keys according to a colormap whenever a layer changes.
category=Communication category=Communication
url=https://github.com/keyboardio/Kaleidoscope-EEPROM-Colormap url=https://github.com/keyboardio/Kaleidoscope-Colormap
architectures=avr architectures=avr
dot_a_linkage=true dot_a_linkage=true

@ -1,6 +1,6 @@
/* -*- mode: c++ -*- /* -*- mode: c++ -*-
* Kaleidoscope-EEPROM-Colormap -- Per-layer colormap effect * Kaleidoscope-Colormap -- Per-layer colormap effect
* Copyright (C) 2017 Gergely Nagy * Copyright (C) 2016, 2017 Gergely Nagy
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@ -18,4 +18,4 @@
#pragma once #pragma once
#include <Kaleidoscope/EEPROM-Colormap.h> #include <Kaleidoscope/Colormap.h>

@ -1,6 +1,6 @@
/* -*- mode: c++ -*- /* -*- mode: c++ -*-
* Kaleidoscope-EEPROM-Colormap -- Per-layer colormap effect * Kaleidoscope-Colormap -- Per-layer colormap effect
* Copyright (C) 2017 Gergely Nagy * Copyright (C) 2016, 2017 Gergely Nagy
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@ -16,21 +16,21 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#include <Kaleidoscope-EEPROM-Colormap.h> #include <Kaleidoscope-Colormap.h>
#include <Kaleidoscope-EEPROM-Settings.h> #include <Kaleidoscope-EEPROM-Settings.h>
#include <Kaleidoscope-Focus.h> #include <Kaleidoscope-Focus.h>
#include <EEPROM.h> #include <EEPROM.h>
namespace KaleidoscopePlugins { namespace KaleidoscopePlugins {
uint16_t EEPROMColormapEffect::mapBase; uint16_t ColormapEffect::mapBase;
uint8_t EEPROMColormapEffect::maxLayers; uint8_t ColormapEffect::maxLayers;
EEPROMColormapEffect::EEPROMColormapEffect (void) { ColormapEffect::ColormapEffect (void) {
} }
void void
EEPROMColormapEffect::configure (uint8_t maxLayers_) { ColormapEffect::configure (uint8_t maxLayers_) {
USE_PLUGINS (&::EEPROMSettings, &::LEDPaletteTheme); USE_PLUGINS (&::EEPROMSettings, &::LEDPaletteTheme);
maxLayers = maxLayers_; maxLayers = maxLayers_;
@ -38,7 +38,7 @@ EEPROMColormapEffect::configure (uint8_t maxLayers_) {
} }
void void
EEPROMColormapEffect::update (void) { ColormapEffect::update (void) {
for (uint8_t l = 0; l < 32; l++) { for (uint8_t l = 0; l < 32; l++) {
if (!Layer.isOn (l)) if (!Layer.isOn (l))
continue; continue;
@ -48,10 +48,10 @@ EEPROMColormapEffect::update (void) {
} }
bool bool
EEPROMColormapEffect::focusHook (const char *command) { ColormapEffect::focusHook (const char *command) {
return ::LEDPaletteTheme.themeFocusHandler (command, PSTR("colormap.map"), mapBase, maxLayers); return ::LEDPaletteTheme.themeFocusHandler (command, PSTR("colormap.map"), mapBase, maxLayers);
} }
}; };
KaleidoscopePlugins::EEPROMColormapEffect EEPROMColormapEffect; KaleidoscopePlugins::ColormapEffect ColormapEffect;

@ -1,6 +1,6 @@
/* -*- mode: c++ -*- /* -*- mode: c++ -*-
* Kaleidoscope-EEPROM-Colormap -- Per-layer colormap effect * Kaleidoscope-Colormap -- Per-layer colormap effect
* Copyright (C) 2017 Gergely Nagy * Copyright (C) 2016, 2017 Gergely Nagy
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@ -22,9 +22,9 @@
#include <Kaleidoscope-LED-Palette-Theme.h> #include <Kaleidoscope-LED-Palette-Theme.h>
namespace KaleidoscopePlugins { namespace KaleidoscopePlugins {
class EEPROMColormapEffect : public LEDMode { class ColormapEffect : public LEDMode {
public: public:
EEPROMColormapEffect (void); ColormapEffect (void);
virtual void update (void) final; virtual void update (void) final;
void configure (uint8_t maxLayers); void configure (uint8_t maxLayers);
@ -37,7 +37,7 @@ class EEPROMColormapEffect : public LEDMode {
}; };
}; };
extern KaleidoscopePlugins::EEPROMColormapEffect EEPROMColormapEffect; extern KaleidoscopePlugins::ColormapEffect ColormapEffect;
#define FOCUS_HOOK_COLORMAP FOCUS_HOOK(EEPROMColormapEffect.focusHook, \ #define FOCUS_HOOK_COLORMAP FOCUS_HOOK(ColormapEffect.focusHook, \
"colormap.map") "colormap.map")
Loading…
Cancel
Save