From e305e514557630556f15b07e50fa4520d313513f Mon Sep 17 00:00:00 2001 From: Gergely Nagy Date: Sun, 12 Feb 2017 00:18:05 +0100 Subject: [PATCH] The Big Rename Rename the firmware from KeyboardioFirmware to Kaleidoscope. Signed-off-by: Gergely Nagy --- ...builder.conf => .kaleidoscope-builder.conf | 6 +-- Makefile | 2 +- README.md | 18 ++++----- examples/AppSwitcher/AppSwitcher.ino | 11 +++--- examples/AppSwitcher/Macros.cpp | 8 ++-- examples/AppSwitcher/Macros.h | 4 +- .../Kaleidoscope.ino} | 38 +++++++++---------- .../generated/keymaps.h | 0 .../layouts/colemak | 0 .../layouts/dvorak | 0 .../layouts/generic_fn2 | 0 .../layouts/generic_fn2-moo | 0 .../layouts/maltron | 0 .../layouts/numpad | 0 .../layouts/qwerty | 0 .../layouts/qwerty-moo | 0 .../layouts/qwerty_alt_cmd | 0 .../layouts/qwerty_piers | 0 .../layouts/workman | 0 library.properties | 6 +-- ...eyboardioFirmware.cpp => Kaleidoscope.cpp} | 16 ++++---- src/{KeyboardioFirmware.h => Kaleidoscope.h} | 10 ++--- src/key_events.h | 2 +- src/plugin.h | 2 +- ...eyboardio-builder => kaleidoscope-builder} | 16 ++++---- 25 files changed, 70 insertions(+), 69 deletions(-) rename .keyboardio-builder.conf => .kaleidoscope-builder.conf (63%) rename examples/{KeyboardioFirmware/KeyboardioFirmware.ino => Kaleidoscope/Kaleidoscope.ino} (62%) rename examples/{KeyboardioFirmware => Kaleidoscope}/generated/keymaps.h (100%) rename examples/{KeyboardioFirmware => Kaleidoscope}/layouts/colemak (100%) rename examples/{KeyboardioFirmware => Kaleidoscope}/layouts/dvorak (100%) rename examples/{KeyboardioFirmware => Kaleidoscope}/layouts/generic_fn2 (100%) rename examples/{KeyboardioFirmware => Kaleidoscope}/layouts/generic_fn2-moo (100%) rename examples/{KeyboardioFirmware => Kaleidoscope}/layouts/maltron (100%) rename examples/{KeyboardioFirmware => Kaleidoscope}/layouts/numpad (100%) rename examples/{KeyboardioFirmware => Kaleidoscope}/layouts/qwerty (100%) rename examples/{KeyboardioFirmware => Kaleidoscope}/layouts/qwerty-moo (100%) rename examples/{KeyboardioFirmware => Kaleidoscope}/layouts/qwerty_alt_cmd (100%) rename examples/{KeyboardioFirmware => Kaleidoscope}/layouts/qwerty_piers (100%) rename examples/{KeyboardioFirmware => Kaleidoscope}/layouts/workman (100%) rename src/{KeyboardioFirmware.cpp => Kaleidoscope.cpp} (74%) rename src/{KeyboardioFirmware.h => Kaleidoscope.h} (78%) rename tools/{keyboardio-builder => kaleidoscope-builder} (92%) diff --git a/.keyboardio-builder.conf b/.kaleidoscope-builder.conf similarity index 63% rename from .keyboardio-builder.conf rename to .kaleidoscope-builder.conf index db892892..28c95290 100644 --- a/.keyboardio-builder.conf +++ b/.kaleidoscope-builder.conf @@ -3,10 +3,10 @@ generate_keymaps () { . ${ROOT}/tools/settings.sh - rm -f examples/KeyboardioFirmware/generated/keymaps.h - (cd examples/KeyboardioFirmware/layouts && \ + rm -f examples/Kaleidoscope/generated/keymaps.h + (cd examples/Kaleidoscope/layouts && \ ( find . -type f | sort | xargs -n 1 -I % sh -c 'perl ../../../tools/generate_keymaps.pl < % >> ../generated/keymaps.h' )) } -DEFAULT_SKETCH=KeyboardioFirmware +DEFAULT_SKETCH=Kaleidoscope compile_HOOKS="generate_keymaps" diff --git a/Makefile b/Makefile index f1bb475c..e73d34f0 100644 --- a/Makefile +++ b/Makefile @@ -7,4 +7,4 @@ astyle: find . -type f -name \*.h |xargs -n 1 astyle --style=google %: - @tools/keyboardio-builder $@ + @tools/kaleidoscope-builder $@ diff --git a/README.md b/README.md index 8f82eb96..92671e6d 100644 --- a/README.md +++ b/README.md @@ -5,13 +5,13 @@ Right now, the code is really ugly. It'll be nicer soon. Please don't judge us t # Getting Started -Pick a directory to work in, you'll need to clone multiple repositories. We'll assume you picked `$HOME/keyboardio`, if you chose another adapt the commands below accordingly. +Pick a directory to work in, you'll need to clone multiple repositories. We'll assume you picked `$HOME/kaleidoscope`, if you chose another adapt the commands below accordingly. ## Setup the Arduino IDE Setup the Arduino IDE on your system. Make sure you install at least version 1.6, since older version may not support all required features. -* On Linux, follow the instructions [on the wiki](https://github.com/keyboardio/KeyboardioFirmware/wiki/Arduino-Setup-Linux). +* On Linux, follow the instructions [on the wiki](https://github.com/keyboardio/Kaleidoscope/wiki/Arduino-Setup-Linux). * On macOS, install using [homebrew](http://brew.sh/) [cask](https://caskroom.github.io/) with `brew cask install arduino` or download the application from [the official website](https://www.arduino.cc/en/Main/Software) and move it to your `/Applications` folder. ## Install the Keyboardio Hardware Definitions @@ -24,8 +24,8 @@ SKETCHBOOK_DIR=$HOME/Documents/Arduino # on Linux the default is SKETCHBOOK_DIR=$HOME/Arduino -# go to your keyboardio directory -cd $HOME/keyboardio +# go to your kaleidoscope directory +cd $HOME/kaleidoscope # then clone the hardware definitions git clone --recursive https://github.com/keyboardio/Arduino-Boards.git # and make them available to the arduino environment @@ -33,19 +33,19 @@ mkdir -p $SKETCHBOOK_DIR/hardware/keyboardio ln -s $HOME/keyboardio/Arduino-Boards $SKETCHBOOK_DIR/hardware/keyboardio/avr ``` -## Clone and Build the Keyboardio Firmware +## Clone and Build the Kaleidoscope Firmware ```sh # go to your keyboardio directory -cd $HOME/keyboardio +cd $HOME/kaleidoscope # then clone the firmware repository -git clone https://github.com/keyboardio/KeyboardioFirmware.git +git clone https://github.com/keyboardio/Kaleidoscope.git # and build your firmware! -cd KeyboardioFirmware +cd Kaleidoscope make ``` <3 jesse [![Build -Status](https://travis-ci.org/keyboardio/KeyboardioFirmware.svg?branch=master)](https://travis-ci.org/keyboardio/KeyboardioFirmware) +Status](https://travis-ci.org/keyboardio/Kaleidoscope.svg?branch=master)](https://travis-ci.org/keyboardio/Kaleidoscope) diff --git a/examples/AppSwitcher/AppSwitcher.ino b/examples/AppSwitcher/AppSwitcher.ino index 453325b2..d90d981e 100644 --- a/examples/AppSwitcher/AppSwitcher.ino +++ b/examples/AppSwitcher/AppSwitcher.ino @@ -1,5 +1,5 @@ /* -*- mode: c++ -*- - * AppSwitcher -- A Keyboardio Example + * AppSwitcher -- A Kaleidoscope Example * Copyright (C) 2016, 2017 Gergely Nagy * * This program is free software; you can redistribute it and/or modify @@ -17,7 +17,8 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ -#include "Akela-HostOS.h" +#include "Kaleidoscope.h" +#include "Kaleidoscope-HostOS.h" #include "Macros.h" @@ -56,10 +57,10 @@ const macro_t *macroAction(uint8_t macroIndex, uint8_t keyState) { } void setup () { - Keyboardio.setup (KEYMAP_SIZE); - Keyboardio.use (&HostOS, &Macros, NULL); + Kaleidoscope.setup (KEYMAP_SIZE); + Kaleidoscope.use (&HostOS, &Macros, NULL); } void loop () { - Keyboardio.loop (); + Kaleidoscope.loop (); } diff --git a/examples/AppSwitcher/Macros.cpp b/examples/AppSwitcher/Macros.cpp index 112db56a..b1b158f1 100644 --- a/examples/AppSwitcher/Macros.cpp +++ b/examples/AppSwitcher/Macros.cpp @@ -1,5 +1,5 @@ /* -*- mode: c++ -*- - * AppSwitcher -- A Keyboardio Example + * AppSwitcher -- A Kaleidoscope Example * Copyright (C) 2016, 2017 Gergely Nagy * * This program is free software; you can redistribute it and/or modify @@ -17,13 +17,13 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ -#define AKELA_HOSTOS_GUESSER 1 +#define KALEIDOSCOPE_HOSTOS_GUESSER 1 -#include +#include #include "Macros.h" -using namespace Akela::HostOS; +using namespace KaleidoscopePlugins::HostOS; static bool appSwitchActive = false; diff --git a/examples/AppSwitcher/Macros.h b/examples/AppSwitcher/Macros.h index 76205826..2c74654f 100644 --- a/examples/AppSwitcher/Macros.h +++ b/examples/AppSwitcher/Macros.h @@ -1,5 +1,5 @@ /* -*- mode: c++ -*- - * AppSwitcher -- A Keyboardio Example + * AppSwitcher -- A Kaleidoscope Example * Copyright (C) 2016, 2017 Gergely Nagy * * This program is free software; you can redistribute it and/or modify @@ -19,7 +19,7 @@ #pragma once -#include +#include enum { M_APPSWITCH, diff --git a/examples/KeyboardioFirmware/KeyboardioFirmware.ino b/examples/Kaleidoscope/Kaleidoscope.ino similarity index 62% rename from examples/KeyboardioFirmware/KeyboardioFirmware.ino rename to examples/Kaleidoscope/Kaleidoscope.ino index affe535d..0443e7f1 100644 --- a/examples/KeyboardioFirmware/KeyboardioFirmware.ino +++ b/examples/Kaleidoscope/Kaleidoscope.ino @@ -4,19 +4,19 @@ #define DEBUG_SERIAL false -#include "Keyboardio-MouseKeys.h" -#include "Keyboardio-Macros.h" -#include "Keyboardio-LEDControl.h" -#include "Keyboardio-Numlock.h" -#include "KeyboardioFirmware.h" +#include "Kaleidoscope-MouseKeys.h" +#include "Kaleidoscope-Macros.h" +#include "Kaleidoscope-LEDControl.h" +#include "Kaleidoscope-Numlock.h" +#include "Kaleidoscope.h" #include "generated/keymaps.h" #include "LED-Off.h" -#include "Keyboardio-LEDEffect-SolidColor.h" -#include "Keyboardio-LEDEffect-Breathe.h" -#include "Keyboardio-LEDEffect-Chase.h" -#include "Keyboardio-LEDEffect-Rainbow.h" -#include "Keyboardio-Model01-TestMode.h" +#include "Kaleidoscope-LEDEffect-SolidColor.h" +#include "Kaleidoscope-LEDEffect-Breathe.h" +#include "Kaleidoscope-LEDEffect-Chase.h" +#include "Kaleidoscope-LEDEffect-Rainbow.h" +#include "Kaleidoscope-Model01-TestMode.h" uint8_t primary_keymap = 0; uint8_t temporary_keymap = 0; @@ -52,21 +52,21 @@ const macro_t *macroAction(uint8_t macroIndex, uint8_t keyState) { } void setup() { - Keyboardio.setup(KEYMAP_SIZE); + Kaleidoscope.setup(KEYMAP_SIZE); - Keyboardio.use(&TestMode, - &LEDControl, &LEDOff, - &solidRed, &solidOrange, &solidYellow, &solidGreen, &solidBlue, &solidIndigo, &solidViolet, - &LEDBreatheEffect, &LEDRainbowEffect, &LEDChaseEffect, &NumLock, + Kaleidoscope.use(&TestMode, + &LEDControl, &LEDOff, + &solidRed, &solidOrange, &solidYellow, &solidGreen, &solidBlue, &solidIndigo, &solidViolet, + &LEDBreatheEffect, &LEDRainbowEffect, &LEDChaseEffect, &NumLock, - &Macros, - &MouseKeys, - NULL); + &Macros, + &MouseKeys, + NULL); LEDOff.activate(); } void loop() { - Keyboardio.loop(); + Kaleidoscope.loop(); } diff --git a/examples/KeyboardioFirmware/generated/keymaps.h b/examples/Kaleidoscope/generated/keymaps.h similarity index 100% rename from examples/KeyboardioFirmware/generated/keymaps.h rename to examples/Kaleidoscope/generated/keymaps.h diff --git a/examples/KeyboardioFirmware/layouts/colemak b/examples/Kaleidoscope/layouts/colemak similarity index 100% rename from examples/KeyboardioFirmware/layouts/colemak rename to examples/Kaleidoscope/layouts/colemak diff --git a/examples/KeyboardioFirmware/layouts/dvorak b/examples/Kaleidoscope/layouts/dvorak similarity index 100% rename from examples/KeyboardioFirmware/layouts/dvorak rename to examples/Kaleidoscope/layouts/dvorak diff --git a/examples/KeyboardioFirmware/layouts/generic_fn2 b/examples/Kaleidoscope/layouts/generic_fn2 similarity index 100% rename from examples/KeyboardioFirmware/layouts/generic_fn2 rename to examples/Kaleidoscope/layouts/generic_fn2 diff --git a/examples/KeyboardioFirmware/layouts/generic_fn2-moo b/examples/Kaleidoscope/layouts/generic_fn2-moo similarity index 100% rename from examples/KeyboardioFirmware/layouts/generic_fn2-moo rename to examples/Kaleidoscope/layouts/generic_fn2-moo diff --git a/examples/KeyboardioFirmware/layouts/maltron b/examples/Kaleidoscope/layouts/maltron similarity index 100% rename from examples/KeyboardioFirmware/layouts/maltron rename to examples/Kaleidoscope/layouts/maltron diff --git a/examples/KeyboardioFirmware/layouts/numpad b/examples/Kaleidoscope/layouts/numpad similarity index 100% rename from examples/KeyboardioFirmware/layouts/numpad rename to examples/Kaleidoscope/layouts/numpad diff --git a/examples/KeyboardioFirmware/layouts/qwerty b/examples/Kaleidoscope/layouts/qwerty similarity index 100% rename from examples/KeyboardioFirmware/layouts/qwerty rename to examples/Kaleidoscope/layouts/qwerty diff --git a/examples/KeyboardioFirmware/layouts/qwerty-moo b/examples/Kaleidoscope/layouts/qwerty-moo similarity index 100% rename from examples/KeyboardioFirmware/layouts/qwerty-moo rename to examples/Kaleidoscope/layouts/qwerty-moo diff --git a/examples/KeyboardioFirmware/layouts/qwerty_alt_cmd b/examples/Kaleidoscope/layouts/qwerty_alt_cmd similarity index 100% rename from examples/KeyboardioFirmware/layouts/qwerty_alt_cmd rename to examples/Kaleidoscope/layouts/qwerty_alt_cmd diff --git a/examples/KeyboardioFirmware/layouts/qwerty_piers b/examples/Kaleidoscope/layouts/qwerty_piers similarity index 100% rename from examples/KeyboardioFirmware/layouts/qwerty_piers rename to examples/Kaleidoscope/layouts/qwerty_piers diff --git a/examples/KeyboardioFirmware/layouts/workman b/examples/Kaleidoscope/layouts/workman similarity index 100% rename from examples/KeyboardioFirmware/layouts/workman rename to examples/Kaleidoscope/layouts/workman diff --git a/library.properties b/library.properties index 2f1c8d32..2a0714cc 100644 --- a/library.properties +++ b/library.properties @@ -1,10 +1,10 @@ -name=KeyboardioFirmware +name=Kaleidoscope version=0.0.1 author=Jesse Vincent maintainer=Jesse Vincent -sentence=Firmware for the Keyboardio Model 01. +sentence=Firmware for the Keyboardio Model 01, and other Arduino-powered keyboards. paragraph=... category=Communication -url=https://github.com/keyboardio/KeyboardioFirmware +url=https://github.com/keyboardio/Kaleidoscope architectures=avr dot_a_linkage=true diff --git a/src/KeyboardioFirmware.cpp b/src/Kaleidoscope.cpp similarity index 74% rename from src/KeyboardioFirmware.cpp rename to src/Kaleidoscope.cpp index 1afef270..61ab7483 100644 --- a/src/KeyboardioFirmware.cpp +++ b/src/Kaleidoscope.cpp @@ -1,13 +1,13 @@ -#include "KeyboardioFirmware.h" +#include "Kaleidoscope.h" #include -Keyboardio_::Keyboardio_(void) { +Kaleidoscope_::Kaleidoscope_(void) { memset(eventHandlers, 0, HOOK_MAX * sizeof(custom_handler_t)); memset(loopHooks, 0, HOOK_MAX * sizeof(custom_handler_t)); } void -Keyboardio_::setup(const byte keymap_count) { +Kaleidoscope_::setup(const byte keymap_count) { wdt_disable(); delay(100); Keyboard.begin(); @@ -22,7 +22,7 @@ Keyboardio_::setup(const byte keymap_count) { custom_loop_t loopHooks[HOOK_MAX]; void -Keyboardio_::loop(void) { +Kaleidoscope_::loop(void) { KeyboardHardware.scan_matrix(); for (byte i = 0; loopHooks[i] != NULL && i < HOOK_MAX; i++) { @@ -40,16 +40,16 @@ Keyboardio_::loop(void) { } void -Keyboardio_::use(KeyboardioPlugin *plugin, ...) { +Kaleidoscope_::use(KaleidoscopePlugin *plugin, ...) { va_list ap; - KeyboardioPlugin *p; + KaleidoscopePlugin *p; plugin->begin(); va_start(ap, plugin); - while ((p = va_arg(ap, KeyboardioPlugin*)) != NULL) { + while ((p = va_arg(ap, KaleidoscopePlugin*)) != NULL) { p->begin(); }; va_end(ap); } -Keyboardio_ Keyboardio; +Kaleidoscope_ Kaleidoscope; diff --git a/src/KeyboardioFirmware.h b/src/Kaleidoscope.h similarity index 78% rename from src/KeyboardioFirmware.h rename to src/Kaleidoscope.h index d18aeb96..d1319b29 100644 --- a/src/KeyboardioFirmware.h +++ b/src/Kaleidoscope.h @@ -20,7 +20,7 @@ void setup(); #include #include -#include KEYBOARDIO_HARDWARE_H +#include KALEIDOSCOPE_HARDWARE_H #include "key_events.h" #include "plugin.h" #include "layers.h" @@ -33,13 +33,13 @@ extern HARDWARE_IMPLEMENTATION KeyboardHardware; #define KEYMAP_SIZE (sizeof(keymaps) / ROWS / COLS / sizeof(Key)) -class Keyboardio_ { +class Kaleidoscope_ { public: - Keyboardio_(void); + Kaleidoscope_(void); void setup(const byte keymap_count); void loop(void); - void use(KeyboardioPlugin *plugin, ...) __attribute__((sentinel)); + void use(KaleidoscopePlugin *plugin, ...) __attribute__((sentinel)); }; -extern Keyboardio_ Keyboardio; +extern Kaleidoscope_ Kaleidoscope; diff --git a/src/key_events.h b/src/key_events.h index 5ee039bc..0192d494 100644 --- a/src/key_events.h +++ b/src/key_events.h @@ -2,7 +2,7 @@ #include #include "KeyboardioHID.h" -#include KEYBOARDIO_HARDWARE_H +#include KALEIDOSCOPE_HARDWARE_H #include "key_defs.h" #include "keyswitch_state.h" #include "hooks.h" diff --git a/src/plugin.h b/src/plugin.h index d8ab78a0..87b1a817 100644 --- a/src/plugin.h +++ b/src/plugin.h @@ -1,6 +1,6 @@ #pragma once -class KeyboardioPlugin { +class KaleidoscopePlugin { public: virtual void begin(void) = 0; }; diff --git a/tools/keyboardio-builder b/tools/kaleidoscope-builder similarity index 92% rename from tools/keyboardio-builder rename to tools/kaleidoscope-builder index 46e59e28..97d1188b 100755 --- a/tools/keyboardio-builder +++ b/tools/kaleidoscope-builder @@ -17,14 +17,14 @@ firmware_size () { } find_sketch () { - if [ -e "${SOURCEDIR}/.keyboardio-builder.conf" ]; then - . "${SOURCEDIR}/.keyboardio-builder.conf" + if [ -e "${SOURCEDIR}/.kaleidoscope-builder.conf" ]; then + . "${SOURCEDIR}/.kaleidoscope-builder.conf" fi SKETCH="${SKETCH:-${DEFAULT_SKETCH}}" LIBRARY="${LIBRARY:-${SKETCH}}" - for path in "hardware/keyboardio/avr/libraries/Akela-${LIBRARY}/examples/${SKETCH}" \ + for path in "hardware/keyboardio/avr/libraries/Kaleidoscope-${LIBRARY}/examples/${SKETCH}" \ "examples/${LIBRARY}" \ "src"; do if [ -f "${path}/${SKETCH}.ino" ]; then @@ -134,7 +134,7 @@ compile () { } _find_all () { - for plugin in hardware/keyboardio/avr/libraries/Akela-*/examples/* \ + for plugin in hardware/keyboardio/avr/libraries/Kaleidoscope-*/examples/* \ examples/* \ src/*.ino; do if [ -d "$(dirname ${plugin})" ] || [ -f "${plugin}" ]; then @@ -251,12 +251,12 @@ ROOT="$(cd $(dirname $0)/..; pwd)" export ROOT export SOURCEDIR="$(pwd)" -if [ -e "${HOME}/.keyboardio-builder.conf" ]; then - . "${HOME}/.keyboardio-builder.conf" +if [ -e "${HOME}/.kaleidoscope-builder.conf" ]; then + . "${HOME}/.kaleidoscope-builder.conf" fi -if [ -e "${SOURCEDIR}/.keyboardio-builder.conf" ]; then - . "${SOURCEDIR}/.keyboardio-builder.conf" +if [ -e "${SOURCEDIR}/.kaleidoscope-builder.conf" ]; then + . "${SOURCEDIR}/.kaleidoscope-builder.conf" fi