Optional, extra symbols

This adds the Kaleidoscope::AlphaSquareSymbols namespace, for symbols that fall
outside of the normal alphanumerics. The first such symbol is `λ`.

Fixes #3.

Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
pull/365/head
Gergely Nagy 8 years ago
parent d805d50d22
commit b4759decf2

@ -68,6 +68,24 @@ const macro_t *macroAction(uint8_t macroIndex, uint8_t keyState) {
}
delay (100);
}
LEDControl.set_all_leds_to (0, 0, 0);
LEDControl.led_sync ();
delay (100);
for (uint8_t step = 0; step <= 0xf0; step += 8) {
AlphaSquare.color = { step, step, step };
AlphaSquare.display (KaleidoscopePlugins::AlphaSquareSymbols::Lambda, 2);
AlphaSquare.display (KaleidoscopePlugins::AlphaSquareSymbols::Lambda, 10);
delay (10);
}
for (uint8_t step = 0xff; step >= 8; step -= 8) {
AlphaSquare.color = { step, step, step };
AlphaSquare.display (KaleidoscopePlugins::AlphaSquareSymbols::Lambda, 2);
AlphaSquare.display (KaleidoscopePlugins::AlphaSquareSymbols::Lambda, 10);
delay (10);
}
delay (100);
}
LEDControl.set_all_leds_to (0, 0, 0);

@ -20,3 +20,4 @@
#include <Kaleidoscope/LED-AlphaSquare.h>
#include <Kaleidoscope/AlphaSquare-Effect.h>
#include <Kaleidoscope/AlphaSquare-Symbols.h>

@ -0,0 +1,31 @@
/* -*- mode: c++ -*-
* Kaleidoscope-LED-AlphaSquare -- 4x4 pixel LED alphabet
* Copyright (C) 2017 Gergely Nagy
*
* 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
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#pragma once
#include <Kaleidoscope/LED-AlphaSquare.h>
namespace KaleidoscopePlugins {
namespace AlphaSquareSymbols {
/* λ */
static constexpr uint16_t Lambda = SYM4x4(1, 0, 0, 0,
0, 1, 0, 0,
0, 1, 1, 0,
1, 0, 0, 1);
};
};
Loading…
Cancel
Save