Merge pull request #105 from algernon/f/rename

The Big Rename
pull/107/head
Jesse Vincent 8 years ago committed by GitHub
commit 830ab623e3

@ -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"

@ -7,4 +7,4 @@ astyle:
find . -type f -name \*.h |xargs -n 1 astyle --style=google
%:
@tools/keyboardio-builder $@
@tools/kaleidoscope-builder $@

@ -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)

@ -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 ();
}

@ -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 <Akela-HostOS.h>
#include <Kaleidoscope-HostOS.h>
#include "Macros.h"
using namespace Akela::HostOS;
using namespace KaleidoscopePlugins::HostOS;
static bool appSwitchActive = false;

@ -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 <Keyboardio-Macros.h>
#include <Kaleidoscope-Macros.h>
enum {
M_APPSWITCH,

@ -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();
}

@ -1,10 +1,10 @@
name=KeyboardioFirmware
name=Kaleidoscope
version=0.0.1
author=Jesse Vincent
maintainer=Jesse Vincent <jesse@keyboard.io>
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

@ -1,13 +1,13 @@
#include "KeyboardioFirmware.h"
#include "Kaleidoscope.h"
#include <stdarg.h>
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;

@ -20,7 +20,7 @@ void setup();
#include <math.h>
#include <avr/wdt.h>
#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;

@ -2,7 +2,7 @@
#include <Arduino.h>
#include "KeyboardioHID.h"
#include KEYBOARDIO_HARDWARE_H
#include KALEIDOSCOPE_HARDWARE_H
#include "key_defs.h"
#include "keyswitch_state.h"
#include "hooks.h"

@ -1,6 +1,6 @@
#pragma once
class KeyboardioPlugin {
class KaleidoscopePlugin {
public:
virtual void begin(void) = 0;
};

@ -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
Loading…
Cancel
Save