diff options
author | Amber Holly <[email protected]> | 2019-10-01 02:34:12 +0100 |
---|---|---|
committer | Drashna Jaelre <[email protected]> | 2019-09-30 18:34:12 -0700 |
commit | c7b28bffc13d405bea2e0c0243437920659232f2 (patch) | |
tree | 6e141d4a1f6b40525c075ec0448ba3cec8ba4cc1 /keyboards/cutie_club/wraith/keymaps/timer/readme.md | |
parent | c47fa31a0031a911eb4d97a043fe32792a57eba6 (diff) | |
download | qmk_firmware-c7b28bffc13d405bea2e0c0243437920659232f2.tar.gz qmk_firmware-c7b28bffc13d405bea2e0c0243437920659232f2.zip |
[Keyboard] Add Wraith keyboard (#6810)
* start wraith firmware
* completed initial setup
* added amber keymap to wraith
* fixed LEDs, wrote readme files
* reverted bootloader type after troubleshooting
* decapitalised files and directory as per qmk standards
* Update Wraith keyboard folder
- Add timer keymap with documentation
- Remove boilerplate in rules.mk, ready for pull request
- Update info.json with ISO and ANSI layouts, ready for QMK Configurator
* Add Wraith image to readme.md
* Fix Wraith keyboard's QMK Configurator support
- Update info.json
- Add layout macros in wraith.h
- Update keymap.c files to use LAYOUT_all
- Fix readme formatting
Diffstat (limited to 'keyboards/cutie_club/wraith/keymaps/timer/readme.md')
-rw-r--r-- | keyboards/cutie_club/wraith/keymaps/timer/readme.md | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/keyboards/cutie_club/wraith/keymaps/timer/readme.md b/keyboards/cutie_club/wraith/keymaps/timer/readme.md new file mode 100644 index 0000000000..1e812f3aed --- /dev/null +++ b/keyboards/cutie_club/wraith/keymaps/timer/readme.md @@ -0,0 +1,30 @@ +# Timed function layer keymap + +Amber's personal keymap for the Wraith, but with a custom timed function layer keycode. `config.h` contains defines that you can edit to control various aspects of this function. + +## How does it work? +We are reading QMK's software timer in `matrix_scan_user()`. + +Once the `TIME_TOGGLE` key is pressed, `layer_time_remaining` is set equal to `LAYER_TIMEOUT`, the layer defined in `LAYER_SWITCH` becomes active, and the LED on the Escape key (pin B0) will light up. + +Each time the matrix is scanned, the software timer is read, and the value of `layer_time_remaining` is decreased by `prev_loop_time` - the amount of time elapsed since the last matrix scan. + +When there are `TIMEOUT_WARNING`ms left in `LAYER_TIMEOUT`, the LED will begin to flash at intervals of `FLASH_PERIOD`ms. + +When there are `TIMEOUT_WARNING/TIMEOUT_SCALE`ms left, the LED will begin to flash at intervals of `FLASH_PERIOD/SPEED_SCALE`ms. + +When `layer_time_remaining` is equal to or less than 0, the layer defined in `LAYER_SWITCH` is removed from the layer stack. + + +## What are the defaults? +`LAYER_TIMEOUT` controls how long the layer will stay active for. The default is 10 seconds. + +`TIMEOUT_WARNING` controls how long the warning (LED flash) will occur before the layer becomes inactive. The default is 3 seconds. + +`FLASH_PERIOD` controls how long each LED flash interval is in the warning time. The default flash period is 250ms. + +`SPEED_SCALE` controls how many times faster the LED will flash in the second flash period. The default scale is 2, twice as fast. + +`TIMEOUT_SCALE` controls the length of the second flash period, relative to `TIMEOUT_WARNING`. The default scale is 4; for 750ms of the secondary flash period. + +`LAYER_SWITCH` is the layer that will be activated by the key. The default is layer 1. |