From 5dce776df465b4c8faf80a338c46c66b8dad98f3 Mon Sep 17 00:00:00 2001 From: Jesse Vincent Date: Wed, 6 Dec 2023 20:47:56 -0800 Subject: [PATCH] temporarily remove a bunch of keyboard firmware bits so that we can build with focus working --- .../Devices/Keyboardio/Model101/Model101.ino | 168 +----------------- 1 file changed, 1 insertion(+), 167 deletions(-) diff --git a/examples/Devices/Keyboardio/Model101/Model101.ino b/examples/Devices/Keyboardio/Model101/Model101.ino index 247fe330d0..8f73aa646d 100644 --- a/examples/Devices/Keyboardio/Model101/Model101.ino +++ b/examples/Devices/Keyboardio/Model101/Model101.ino @@ -367,16 +367,6 @@ const macro_t *macroAction(uint8_t macro_id, KeyEvent &event) { // These 'solid' color effect definitions define a rainbow of // LED color modes calibrated to draw 500mA or less on the // Keyboardio Model 100. - - -static kaleidoscope::plugin::LEDSolidColor solidRed(160, 0, 0); -static kaleidoscope::plugin::LEDSolidColor solidOrange(140, 70, 0); -static kaleidoscope::plugin::LEDSolidColor solidYellow(130, 100, 0); -static kaleidoscope::plugin::LEDSolidColor solidGreen(0, 160, 0); -static kaleidoscope::plugin::LEDSolidColor solidBlue(0, 70, 130); -static kaleidoscope::plugin::LEDSolidColor solidIndigo(0, 0, 170); -static kaleidoscope::plugin::LEDSolidColor solidViolet(130, 0, 120); - /** toggleLedsOnSuspendResume toggles the LEDs off when the host goes to sleep, * and turns them back on when it wakes up. */ @@ -466,8 +456,6 @@ KALEIDOSCOPE_INIT_PLUGINS( // The EEPROMSettings & EEPROMKeymap plugins make it possible to have an // editable keymap in EEPROM. - EEPROMSettings, - EEPROMKeymap, // Focus allows bi-directional communication with the host, and is the // interface through which the keymap in EEPROM can be edited. @@ -486,38 +474,6 @@ KALEIDOSCOPE_INIT_PLUGINS( // programmatically. FirmwareVersion, - // The LayerNames plugin allows Chrysalis to display - and edit - custom layer - // names, to be shown instead of the default indexes. - LayerNames, - - // Enables setting, saving (via Chrysalis), and restoring (on boot) the - // default LED mode. - DefaultLEDModeConfig, - - // Enables controlling (and saving) the brightness of the LEDs via Focus. - LEDBrightnessConfig, - - // ---------------------------------------------------------------------- - // Keystroke-handling plugins - - // The Qukeys plugin enables the "Secondary action" functionality in - // Chrysalis. Keys with secondary actions will have their primary action - // performed when tapped, but the secondary action when held. - Qukeys, - - // SpaceCadet can turn your shifts into parens on tap, while keeping them as - // Shifts when held. SpaceCadetConfig lets Chrysalis configure some aspects of - // the plugin. - SpaceCadet, - SpaceCadetConfig, - - // Enables the "Sticky" behavior for modifiers, and the "Layer shift when - // held" functionality for layer keys. - OneShot, - OneShotConfig, - EscapeOneShot, - EscapeOneShotConfig, - // The macros plugin adds support for macros Macros, @@ -535,70 +491,11 @@ KALEIDOSCOPE_INIT_PLUGINS( // Enables the GeminiPR Stenography protocol. Unused by default, but with the // plugin enabled, it becomes configurable - and then usable - via Chrysalis. - GeminiPR, - - // ---------------------------------------------------------------------- - // LED mode plugins - - // The boot greeting effect pulses the LED button for 10 seconds after the - // keyboard is first connected - BootGreetingEffect, - // LEDControl provides support for other LED modes LEDControl, // We start with the LED effect that turns off all the LEDs. - LEDOff, - - // The rainbow effect changes the color of all of the keyboard's keys at the same time - // running through all the colors of the rainbow. - LEDRainbowEffect, - - // The rainbow wave effect lights up your keyboard with all the colors of a rainbow - // and slowly moves the rainbow across your keyboard - LEDRainbowWaveEffect, - - // The chase effect follows the adventure of a blue pixel which chases a red pixel across - // your keyboard. Spoiler: the blue pixel never catches the red pixel - LEDChaseEffect, - - // These static effects turn your keyboard's LEDs a variety of colors - solidRed, - solidOrange, - solidYellow, - solidGreen, - solidBlue, - solidIndigo, - solidViolet, - - // The breathe effect slowly pulses all of the LEDs on your keyboard - LEDBreatheEffect, - - // The AlphaSquare effect prints each character you type, using your - // keyboard's LEDs as a display - AlphaSquareEffect, - - // The stalker effect lights up the keys you've pressed recently - StalkerEffect, - - // The LED Palette Theme plugin provides a shared palette for other plugins, - // like Colormap below - LEDPaletteTheme, - - // The Colormap effect makes it possible to set up per-layer colormaps - ColormapEffect, - - // The numpad plugin is responsible for lighting up the 'numpad' mode - // with a custom LED effect - NumPad, - - // The HostPowerManagement plugin allows us to turn LEDs off when then host - // goes to sleep, and resume them when it wakes up. - HostPowerManagement, - - // Turns LEDs off after a configurable amount of idle time. - IdleLEDs, - PersistentIdleLEDs, + LEDOff // ---------------------------------------------------------------------- // Miscellaneous plugins @@ -607,11 +504,6 @@ KALEIDOSCOPE_INIT_PLUGINS( // comfortable - or able - to do automatically, but can be useful // nevertheless. Such as toggling the key report protocol between Boot (used // by BIOSes) and Report (NKRO). - USBQuirks, - - // The hardware test mode, which can be invoked by tapping Prog, LED and the - // left Fn button at the same time. - HardwareTestMode //, ); /** The 'setup' function is one of the two standard Arduino sketch functions. @@ -622,64 +514,6 @@ void setup() { // First, call Kaleidoscope's internal setup function Kaleidoscope.setup(); - // Set the hue of the boot greeting effect to something that will result in a - // nice green color. - BootGreetingEffect.hue = 85; - - // While we hope to improve this in the future, the NumPad plugin - // needs to be explicitly told which keymap layer is your numpad layer - NumPad.numPadLayer = NUMPAD; - - // We configure the AlphaSquare effect to use RED letters - AlphaSquare.color = CRGB(255, 0, 0); - - // Set the rainbow effects to be reasonably bright, but low enough - // to mitigate audible noise in some environments. - LEDRainbowEffect.brightness(170); - LEDRainbowWaveEffect.brightness(160); - - // Set the action key the test mode should listen for to Left Fn - HardwareTestMode.setActionKey(R3C6); - - // The LED Stalker mode has a few effects. The one we like is called - // 'BlazingTrail'. For details on other options, see - // https://github.com/keyboardio/Kaleidoscope/blob/master/docs/plugins/LED-Stalker.md - StalkerEffect.variant = STALKER(BlazingTrail); - - // To make the keymap editable without flashing new firmware, we store - // additional layers in EEPROM. For now, we reserve space for eight layers. If - // one wants to use these layers, just set the default layer to one in EEPROM, - // by using the `settings.defaultLayer` Focus command, or by using the - // `keymap.onlyCustom` command to use EEPROM layers only. - EEPROMKeymap.setup(8); - - // We need to tell the Colormap plugin how many layers we want to have custom - // maps for. To make things simple, we set it to eight layers, which is how - // many editable layers we have (see above). - ColormapEffect.max_layers(8); - - // For Dynamic Macros, we need to reserve storage space for the editable - // macros. A kilobyte is a reasonable default. - DynamicMacros.reserve_storage(1024); - - // If there's a default layer set in EEPROM, we should set that as the default - // here. - Layer.move(EEPROMSettings.default_layer()); - - // To avoid any surprises, SpaceCadet is turned off by default. However, it - // can be permanently enabled via Chrysalis, so we should only disable it if - // no configuration exists. - SpaceCadetConfig.disableSpaceCadetIfUnconfigured(); - - // Editable layer names are stored in EEPROM too, and we reserve 16 bytes per - // layer for them. We need one extra byte per layer for bookkeeping, so we - // reserve 17 / layer in total. - LayerNames.reserve_storage(17 * 8); - - // Unless configured otherwise with Chrysalis, we want to make sure that the - // firmware starts with LED effects off. This avoids over-taxing devices that - // don't have a lot of power to share with USB devices - DefaultLEDModeConfig.activateLEDModeIfUnconfigured(&LEDOff); } /** loop is the second of the standard Arduino sketch functions.