diff --git a/README.md b/README.md index 93a1fdb7..2e8241cd 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Akela-HostOS +# Kaleidoscope-HostOS ![status][st:stable] @@ -19,35 +19,36 @@ information can then be reused by other plugins. See the [Unicode][plugin:unicode] extension for an example about how to use `HostOS` in practice. - [plugin:unicode]: https://github.com/keyboardio/Akela-Unicode + [plugin:unicode]: https://github.com/keyboardio/Kaleidoscope-Unicode ## Using the extension The extension provides a `HostOS` singleton object. It can either be a simple one without auto-detection (the default), or one that will try to detect the Host OS, using the [FingerprintUSBHost][fprdetect] library. To enable -auto-detection, `AKELA_HOSTOS_GUESSER` must be defined before including the -`HostOS` library header. +auto-detection, `KALEIDOSCOPE_HOSTOS_GUESSER` must be defined before including +the `HostOS` library header. [fprdetect]: https://github.com/keyboardio/FingerprintUSBHost ```c++ -#define AKELA_HOSTOS_GUESSER 1 +#define KALEIDOSCOPE_HOSTOS_GUESSER 1 -#include +#include +#include void someFunction (void) { - if (HostOS.os() == Akela::HostOS::LINUX) { + if (HostOS.os() == Kaleidoscope::HostOS::LINUX) { // do something linux-y } - if (HostOS.os() == Akela::HostOS::OSX) { + if (HostOS.os() == Kaleidoscope::HostOS::OSX) { // do something OSX-y } } void setup (void) { - Keyboardio.setup (KEYMAP_SIZE); - Keyboardio.use (&HostOS); + Kaleidoscope.setup (KEYMAP_SIZE); + Kaleidoscope.use (&HostOS); } ``` @@ -69,4 +70,4 @@ The extension provides the following methods on the `HostOS` singleton: Starting from the [example][plugin:example] is the recommended way of getting started with the extension. - [plugin:example]: https://github.com/keyboardio/Akela-HostOS/blob/master/examples/HostOS/HostOS.ino + [plugin:example]: https://github.com/keyboardio/Kaleidoscope-HostOS/blob/master/examples/HostOS/HostOS.ino diff --git a/examples/HostOS/HostOS.ino b/examples/HostOS/HostOS.ino index 9262c2f7..f49471f0 100644 --- a/examples/HostOS/HostOS.ino +++ b/examples/HostOS/HostOS.ino @@ -1,5 +1,5 @@ /* -*- mode: c++ -*- - * Akela -- Animated Keyboardio Extension Library for Anything + * Kaleidoscope-HostOS -- Host OS detection and tracking for Kaleidoscope * Copyright (C) 2016, 2017 Gergely Nagy * * This program is free software: you can redistribute it and/or modify @@ -16,7 +16,7 @@ * along with this program. If not, see . */ -#include +#include const Key keymaps[][ROWS][COLS] PROGMEM = { [0] = KEYMAP_STACKED @@ -42,13 +42,13 @@ const Key keymaps[][ROWS][COLS] PROGMEM = { void setup () { Serial.begin (9600); - Keyboardio.setup (KEYMAP_SIZE); - Keyboardio.use (&HostOS, NULL); + Kaleidoscope.setup (KEYMAP_SIZE); + Kaleidoscope.use (&HostOS, NULL); Serial.print ("Host OS id is: "); Serial.println (HostOS.os (), DEC); } void loop () { - Keyboardio.loop (); + Kaleidoscope.loop (); } diff --git a/library.properties b/library.properties index 87709782..3f04b3fe 100644 --- a/library.properties +++ b/library.properties @@ -1,10 +1,10 @@ -name=Akela-HostOS +name=Kaleidoscope-HostOS version=0.0.0 author=Gergely Nagy -maintainer=Gergely Nagy -sentence=Host OS detection and tracking for Keyboardio boards. +maintainer=Gergely Nagy +sentence=Host OS detection and tracking for Kaleidoscope. paragraph=Provides functions to help guessing and/or tracking the host OS. category=Communication -url=https://github.com/keyboardio/Akela-HostOS +url=https://github.com/keyboardio/Kaleidoscope-HostOS architectures=avr dot_a_linkage=true diff --git a/src/Akela-HostOS.h b/src/Kaleidoscope-HostOS.h similarity index 69% rename from src/Akela-HostOS.h rename to src/Kaleidoscope-HostOS.h index d0b545e4..e7c8cb06 100644 --- a/src/Akela-HostOS.h +++ b/src/Kaleidoscope-HostOS.h @@ -1,5 +1,5 @@ /* -*- mode: c++ -*- - * Akela -- Animated Keyboardio Extension Library for Anything + * Kaleidoscope-HostOS -- Host OS detection and tracking for Kaleidoscope * Copyright (C) 2016, 2017 Gergely Nagy * * This program is free software: you can redistribute it and/or modify @@ -18,12 +18,12 @@ #pragma once -#include -#include -#include +#include +#include +#include -#ifdef AKELA_HOSTOS_GUESSER -extern Akela::HostOS::Guesser HostOS; +#ifdef KALEIDOSCOPE_HOSTOS_GUESSER +extern KaleidoscopePlugins::HostOS::Guesser HostOS; #else -extern Akela::HostOS::Tracker HostOS; +extern KaleidoscopePlugins::HostOS::Tracker HostOS; #endif diff --git a/src/Akela/HostOS-Guesser.cpp b/src/Kaleidoscope/HostOS-Guesser.cpp similarity index 86% rename from src/Akela/HostOS-Guesser.cpp rename to src/Kaleidoscope/HostOS-Guesser.cpp index 599d35e1..dc2dd196 100644 --- a/src/Akela/HostOS-Guesser.cpp +++ b/src/Kaleidoscope/HostOS-Guesser.cpp @@ -1,5 +1,5 @@ /* -*- mode: c++ -*- - * Akela -- Animated Keyboardio Extension Library for Anything + * Kaleidoscope-HostOS -- Host OS detection and tracking for Kaleidoscope * Copyright (C) 2016, 2017 Gergely Nagy * * This program is free software: you can redistribute it and/or modify @@ -16,11 +16,11 @@ * along with this program. If not, see . */ -#include +#include #include -namespace Akela { +namespace KaleidoscopePlugins { namespace HostOS { Guesser::Guesser (void) { } @@ -49,4 +49,4 @@ namespace Akela { }; }; -Akela::HostOS::Guesser HostOS; +KaleidoscopePlugins::HostOS::Guesser HostOS; diff --git a/src/Akela/HostOS-Guesser.h b/src/Kaleidoscope/HostOS-Guesser.h similarity index 86% rename from src/Akela/HostOS-Guesser.h rename to src/Kaleidoscope/HostOS-Guesser.h index 4ff01abd..6b634bc0 100644 --- a/src/Akela/HostOS-Guesser.h +++ b/src/Kaleidoscope/HostOS-Guesser.h @@ -1,5 +1,5 @@ /* -*- mode: c++ -*- - * Akela -- Animated Keyboardio Extension Library for Anything + * Kaleidoscope-HostOS -- Host OS detection and tracking for Kaleidoscope * Copyright (C) 2016, 2017 Gergely Nagy * * This program is free software: you can redistribute it and/or modify @@ -18,9 +18,9 @@ #pragma once -#include +#include -namespace Akela { +namespace KaleidoscopePlugins { namespace HostOS { class Guesser : public Base { public: diff --git a/src/Akela/HostOS-Tracker.cpp b/src/Kaleidoscope/HostOS-Tracker.cpp similarity index 81% rename from src/Akela/HostOS-Tracker.cpp rename to src/Kaleidoscope/HostOS-Tracker.cpp index 2089b87e..5c2007c1 100644 --- a/src/Akela/HostOS-Tracker.cpp +++ b/src/Kaleidoscope/HostOS-Tracker.cpp @@ -1,5 +1,5 @@ /* -*- mode: c++ -*- - * Akela -- Animated Keyboardio Extension Library for Anything + * Kaleidoscope-HostOS -- Host OS detection and tracking for Kaleidoscope * Copyright (C) 2016, 2017 Gergely Nagy * * This program is free software: you can redistribute it and/or modify @@ -16,6 +16,6 @@ * along with this program. If not, see . */ -#include +#include -Akela::HostOS::Tracker HostOS; +KaleidoscopePlugins::HostOS::Tracker HostOS; diff --git a/src/Akela/HostOS-Tracker.h b/src/Kaleidoscope/HostOS-Tracker.h similarity index 86% rename from src/Akela/HostOS-Tracker.h rename to src/Kaleidoscope/HostOS-Tracker.h index 2ce095e7..090908d3 100644 --- a/src/Akela/HostOS-Tracker.h +++ b/src/Kaleidoscope/HostOS-Tracker.h @@ -1,5 +1,5 @@ /* -*- mode: c++ -*- - * Akela -- Animated Keyboardio Extension Library for Anything + * Kaleidoscope-HostOS -- Host OS detection and tracking for Kaleidoscope * Copyright (C) 2016, 2017 Gergely Nagy * * This program is free software: you can redistribute it and/or modify @@ -18,9 +18,9 @@ #pragma once -#include +#include -namespace Akela { +namespace KaleidoscopePlugins { namespace HostOS { class Tracker : public Base { public: diff --git a/src/Akela/HostOS.cpp b/src/Kaleidoscope/HostOS.cpp similarity index 90% rename from src/Akela/HostOS.cpp rename to src/Kaleidoscope/HostOS.cpp index 32970a32..b68366df 100644 --- a/src/Akela/HostOS.cpp +++ b/src/Kaleidoscope/HostOS.cpp @@ -1,5 +1,5 @@ /* -*- mode: c++ -*- - * Akela -- Animated Keyboardio Extension Library for Anything + * Kaleidoscope-HostOS -- Host OS detection and tracking for Kaleidoscope * Copyright (C) 2016, 2017 Gergely Nagy * * This program is free software: you can redistribute it and/or modify @@ -16,13 +16,13 @@ * along with this program. If not, see . */ -#include +#include #include #define EEPROM_HOSTOS_TYPE_LOCATION 2 -namespace Akela { +namespace KaleidoscopePlugins { namespace HostOS { void Base::begin (void) { diff --git a/src/Akela/HostOS.h b/src/Kaleidoscope/HostOS.h similarity index 86% rename from src/Akela/HostOS.h rename to src/Kaleidoscope/HostOS.h index 80bcd2b6..9ebb8c82 100644 --- a/src/Akela/HostOS.h +++ b/src/Kaleidoscope/HostOS.h @@ -1,5 +1,5 @@ /* -*- mode: c++ -*- - * Akela -- Animated Keyboardio Extension Library for Anything + * Kaleidoscope-HostOS -- Host OS detection and tracking for Kaleidoscope * Copyright (C) 2016, 2017 Gergely Nagy * * This program is free software: you can redistribute it and/or modify @@ -18,9 +18,9 @@ #pragma once -#include +#include -namespace Akela { +namespace KaleidoscopePlugins { namespace HostOS { typedef enum { LINUX, @@ -31,7 +31,7 @@ namespace Akela { AUTO = 0xff, } Type; - class Base : public KeyboardioPlugin { + class Base : public KaleidoscopePlugin { public: virtual void begin (void) final;