summaryrefslogtreecommitdiffstats
path: root/quantum/rgblight.c
Commit message (Collapse)AuthorAgeFilesLines
* RGBLight: Allow configurable default settings (#11912)Ryan2021-02-161-5/+25
| | | | | * RGBLight: Allow configurable default settings * Docs
* Merge remote-tracking branch 'upstream/master' into developNick Brassel2021-01-281-0/+11
|\
| * Add rgblight_reload_from_eeprom() (#11411)Joshua Diamond2021-01-281-0/+11
| | | | | | | | | | * Add rgblight_reset_from_eeprom() * reset->reload
* | `qmk cformat`Nick Brassel2021-01-171-1/+1
| |
* | Merge remote-tracking branch 'origin/master' into developQMK Bot2021-01-111-1/+44
|\|
| * Lighting Layers should be disabled when suspended (#11442)Joshua Diamond2021-01-111-1/+44
| | | | | | | | | | * Lighting Layers should be disabled when suspended * bugfixes
* | Refine twinkle to be smoother (use breathing curve) (#11350)Joshua Diamond2021-01-101-33/+48
| | | | | | | | | | | | | | | | | | * Refine twinkle to be smoother (use breathing curve) * tune more for firmware size * fix bug when v=255 ~ drashna approved ~
* | Merge remote-tracking branch 'upstream/master' into developNick Brassel2021-01-031-4/+4
|\|
| * Fix broken Lighting Layers when RGBLIGHT_MAX_LAYERS > 16 (#11406)Joshua Diamond2021-01-021-4/+4
| | | | | | | | | | | | | | | | | | * fix incorrect bit math when RGBLIGHT_MAX_LAYERS > 16 * with 1UL cast is not needed * ...but just casting works and is even more efficient * cformat
* | Merge remote-tracking branch 'origin/master' into developQMK Bot2020-12-121-1/+1
|\|
| * Fix incorrect search order for `rgblight_breathe_table.h` that `rgblight.c` ↵Takeshi ISHII2020-12-131-1/+1
| | | | | | | | | | | | | | | | | | | | | | includes. (#11192) When `rgblight.c` includes `rgblight_breathe_table.h`, the search order should be as follows. * `keyboards/KEYBOARD/keymaps/USER/rgblight_breathe_table.h` * `users/USER/rgblight_breathe_table.h` * `quantum/rgblight_breathe_table.h` However, the current implementation was wrong, so I fixed it.
* | Merge remote-tracking branch 'origin/master' into developQMK Bot2020-12-111-3/+3
|\|
| * Normalise include statements in core code (#11153)Ryan2020-12-111-3/+3
| | | | | | | | | | * Normalise include statements in core code * Missed one
* | [Split] Sync Timer feature (#10997)XScorpion22020-12-011-11/+10
|/ | | A timer that is kept in sync between the halves of a split keyboard
* 2020 November 28 Breaking Changes Update (#11053)James Young2020-11-281-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Branch point for 2020 November 28 Breaking Change * Remove matrix_col_t to allow MATRIX_ROWS > 32 (#10183) * Add support for soft serial to ATmega32U2 (#10204) * Change MIDI velocity implementation to allow direct control of velocity value (#9940) * Add ability to build a subset of all keyboards based on platform. * Actually use eeprom_driver_init(). * Make bootloader_jump weak for ChibiOS. (#10417) * Joystick 16-bit support (#10439) * Per-encoder resolutions (#10259) * Share button state from mousekey to pointing_device (#10179) * Add hotfix for chibios keyboards not wake (#10088) * Add advanced/efficient RGB Matrix Indicators (#8564) * Naming change. * Support for STM32 GPIOF,G,H,I,J,K (#10206) * Add milc as a dependency and remove the installed milc (#10563) * ChibiOS upgrade: early init conversions (#10214) * ChibiOS upgrade: configuration file migrator (#9952) * Haptic and solenoid cleanup (#9700) * XD75 cleanup (#10524) * OLED display update interval support (#10388) * Add definition based on currently-selected serial driver. (#10716) * New feature: Retro Tapping per key (#10622) * Allow for modification of output RGB values when using rgblight/rgb_matrix. (#10638) * Add housekeeping task callbacks so that keyboards/keymaps are capable of executing code for each main loop iteration. (#10530) * Rescale both ChibiOS and AVR backlighting. * Reduce Helix keyboard build variation (#8669) * Minor change to behavior allowing display updates to continue between task ticks (#10750) * Some GPIO manipulations in matrix.c change to atomic. (#10491) * qmk cformat (#10767) * [Keyboard] Update the Speedo firmware for v3.0 (#10657) * Maartenwut/Maarten namechange to evyd13/Evy (#10274) * [quantum] combine repeated lines of code (#10837) * Add step sequencer feature (#9703) * aeboards/ext65 refactor (#10820) * Refactor xelus/dawn60 for Rev2 later (#10584) * add DEBUG_MATRIX_SCAN_RATE_ENABLE to common_features.mk (#10824) * [Core] Added `add_oneshot_mods` & `del_oneshot_mods` (#10549) * update chibios os usb for the otg driver (#8893) * Remove HD44780 References, Part 4 (#10735) * [Keyboard] Add Valor FRL TKL (+refactor) (#10512) * Fix cursor position bug in oled_write_raw functions (#10800) * Fixup version.h writing when using SKIP_VERSION=yes (#10972) * Allow for certain code in the codebase assuming length of string. (#10974) * Add AT90USB support for serial.c (#10706) * Auto shift: support repeats and early registration (#9826) * Rename ledmatrix.h to match .c file (#7949) * Split RGB_MATRIX_ENABLE into _ENABLE and _DRIVER (#10231) * Split LED_MATRIX_ENABLE into _ENABLE and _DRIVER (#10840) * Merge point for 2020 Nov 28 Breaking Change
* `setrgb()`: Use arrow operator (#10451)Ryan2020-09-261-4/+4
|
* format code according to conventions [skip ci]QMK Bot2020-08-291-7/+5
|
* Tweak the Christmas animation effect to be less harsh on the eyes (#7648)Max Rumpf2020-08-291-4/+27
| | | | | | | | | | | | | | | | | | | * Tweak the Christmas animation effect to be less harsh on the eyes * Further improve the tweaked Christmas animation code - Use constants where it makes sense - Instead of complicated math, use a static variable to keep track if it's animating from or to red - Don't use pow (but a simple macro instead) - Using floating point math is necessary for the fraction in the cubic bezier function to work * Update docs for the tweaked Christmas animation effect * Further improve memory usage - Don't use floats, but 32 bit ints instead (where needed) - Replace limits.h with constant * Fix typo
* Add noeeprom speed function for RGBLIGHT (#9706)Drashna Jaelre2020-08-251-4/+15
| | | | | | | | | | | * [Docs] Add Speed functions to RGB Light docs * Add noeeprom functions for speed * Fix wording in doc Co-authored-by: Ryan <fauxpark@gmail.com> Co-authored-by: Ryan <fauxpark@gmail.com>
* Fix layer mask size for RGBLIGHT_LAYER_BLINK (#9260)Joshua Diamond2020-06-011-3/+3
|
* Option to allow lighting layers when RGB Lighting is off (#9051)Joshua Diamond2020-06-011-6/+18
|
* format code according to conventions [skip ci]QMK Bot2020-05-181-3/+1
|
* Add query functions for RGB Light and RGB Matrix (#8960)Drashna Jaelre2020-05-181-0/+6
| | | | | | | | | | | | | * Add additional query functions for RGBLIGHT * Add additional query functions for RGB Matrix * Change names of enable check functions * Fix macro for rgb matrix takeover of rgblight functions * Add documentation for rgb_matrix_get_hsv() * Add *_get_hsv function to rgblight
* Allow expanding from 8 to 32 RGB Lighting Layers (#8941)Joshua Diamond2020-05-131-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Allow 16 lighting layers * Require #define RGBLIGHT_LAYERS_16 to enable 16 layers * Override RGBLIGHT_MAX_LAYERS to set maximum number of lighting layers * Enforce lower bound on RGBLIGHT_MAX_LAYERS Co-Authored-By: Takeshi ISHII <2170248+mtei@users.noreply.github.com> * Fix an error in the check for valid RGBLIGHT_MAX_LAYERS * Don't use bitfield / PACKED, as it causes bloat * Update documentation re: up to 32 lighting layers * Run cformat * Add note about increasing FW size in docs/config_options.md Co-authored-by: Drashna Jaelre <drashna@live.com> * Remove no-longer-valid comment * Add doc note that split sync will be slower Co-authored-by: Takeshi ISHII <2170248+mtei@users.noreply.github.com> Co-authored-by: Drashna Jaelre <drashna@live.com>
* format code according to conventions [skip ci]QMK Bot2020-05-091-14/+13
|
* New RGB Lighting effect: Twinkle (#8887)Joshua Diamond2020-05-091-1/+64
| | | | | | | | | | | | | * Add twinkle RGB Lighting effect * 2nd twinkle algo - double-buffering * Further refinement: Per-LED twinkle * Add documentation for Twinkle RBG Lighting mode * Bias twinkle saturation closer to the set value * Fix whitespace
* Add ability to blink lighting layer for a specified duration (#8760)Joshua Diamond2020-05-091-0/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Implement momentarily blink of lighting layers * Refactor spidey3 userspace to use rgb layer blink * Remove un-necessary line from example in documentation * Revert "Refactor spidey3 userspace to use rgb layer blink" This reverts commit 831649bb680c41c6d663ae6fa86d13f4f8bebdd8. * Adds a missing bit of documentation about lighting layer blink * Update docs/feature_rgblight.md per suggestions Co-authored-by: James Young <18669334+noroadsleft@users.noreply.github.com> * Update docs/feature_rgblight.md per suggestions Co-authored-by: James Young <18669334+noroadsleft@users.noreply.github.com> * Update docs/feature_rgblight.md per suggestions Co-authored-by: James Young <18669334+noroadsleft@users.noreply.github.com> * cformat, as suggested Co-authored-by: James Young <18669334+noroadsleft@users.noreply.github.com>
* format code according to conventions [skip ci]QMK Bot2020-04-291-6/+3
|
* Convert clipping variables in rgblight.c to a structure (#7720)Drashna Jaelre2020-04-291-36/+37
|
* format code according to conventions [skip ci]QMK Bot2020-03-101-5/+5
|
* Feature: RGBLight layers (#7768)Nathan Gray2020-03-101-0/+71
| | | | | | | | | | | | | | | | | * New feature: RGBLIGHT_LAYERS This feature allows users to define multiple independent layers of lighting that can be toggled on and off individually, making it easy to use your RGB lighting to indicate things like active keyboard layer & modifier state. * Demonstrate built in functions for layer state checking Also link the video in the docs. * Follow existing pattern for setting rgblight_status flags * Eliminate rgblight_is_static_mode since it's not needed Just check to see if the timer is enabled directly.
* Refactor rgblight_reconfig.h (#7773)Takeshi ISHII2020-03-101-12/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Moved contents of rgblight_reconfig.h to rgblight_post_config.h. In #3582, rgblight_reconfig.h had to be newly created. Now, the build system of qmk_firmware has a post_cofig feature, so that what was done in rgblight_reconfig.h can now be realized in rgblight_post_config.h. **This commit does not change the build result.** Testing script ```shell # build on master git checkout master echo master > /tmp/master_md5.txt # RGBLIGHT_ENABLE = no make HELIX=verbose helix/rev2:default:clean make HELIX=verbose helix/rev2:default md5 helix_rev2_default.hex >> /tmp/master_md5.txt # RGBLIGHT_ENABLE = yes, with animations make HELIX=verbose helix/rev2/back:default:clean make HELIX=verbose helix/rev2/back:default md5 helix_rev2_back_default.hex >> /tmp/master_md5.txt # RGBLIGHT_ENABLE = yes, without animations make HELIX=verbose,no_ani helix/rev2/back:default:clean make HELIX=verbose,no_ani helix/rev2/back:default md5 helix_rev2_back_default.hex >> /tmp/master_md5.txt # build on refactor_rgblight_reconfig.h git checkout refactor_rgblight_reconfig.h echo refactor_rgblight_reconfig.h > /tmp/branch_md5.txt # RGBLIGHT_ENABLE = no make HELIX=verbose helix/rev2:default:clean make HELIX=verbose helix/rev2:default md5 helix_rev2_default.hex >> /tmp/branch_md5.txt # RGBLIGHT_ENABLE = yes, with animations make HELIX=verbose helix/rev2/back:default:clean make HELIX=verbose helix/rev2/back:default md5 helix_rev2_back_default.hex >> /tmp/branch_md5.txt # RGBLIGHT_ENABLE = yes, without animations make HELIX=verbose,no_ani helix/rev2/back:default:clean make HELIX=verbose,no_ani helix/rev2/back:default md5 helix_rev2_back_default.hex >> /tmp/branch_md5.txt diff -u /tmp/master_md5.txt /tmp/branch_md5.txt ``` Test result: ``` --- /tmp/master_md5.txt 2020-01-03 15:42:22.000000000 +0900 +++ /tmp/branch_md5.txt 2020-01-03 15:42:42.000000000 +0900 @@ -1,4 +1,4 @@ -master +refactor_rgblight_reconfig.h MD5 (helix_rev2_default.hex) = f360032edd522448366d471d8f4f8181 MD5 (helix_rev2_back_default.hex) = 0c663acc6cccc44476b3b969ad22a48f MD5 (helix_rev2_back_default.hex) = e66b1195ff6d38e6e22c975b8ae42fd3 ``` * Expressions that are too long are difficult to read, so wrap them. * Edit the expression again * remove `defined(RGBLIGHT_ANIMATIONS)` in `tmk_core/common/*/suspend.c`, `tmk_core/protocol/*/main.c` move contents of rgblight_reconfig.h to rgblight.h. The following changes were made to rgblight.h. ```diff +#ifdef RGBLIGHT_USE_TIMER void rgblight_task(void); void rgblight_timer_init(void); void rgblight_timer_enable(void); void rgblight_timer_disable(void); void rgblight_timer_toggle(void); +#else +#define rgblight_task() +#define rgblight_timer_init() +#define rgblight_timer_enable() +#define rgblight_timer_disable() +#define rgblight_timer_toggle() +#endif ``` The following changes were made to tmk_core/common/avr/suspend.c, tmk_core/common/chibios/suspend.c, tmk_core/protocol/chibios/main.c, tmk_core/protocol/lufa/lufa.c, tmk_core/protocol/vusb/main.c. ```diff -# ifdef RGBLIGHT_ANIMATIONS rgblight_timer_enable(); -# endif ``` ```diff -#if defined(RGBLIGHT_ANIMATIONS) && defined(RGBLIGHT_ENABLE) +#if defined(RGBLIGHT_ENABLE) rgblight_task(); #endif ``` * remove 'defined(RGBLIGHT_ANIMATIONS)' in tmk_core/common/keyboard.c Co-authored-by: Joel Challis <git@zvecr.com>
* Add customisable EEPROM driver selection (#7274)Nick Brassel2020-01-241-3/+5
| | | | | | | | | - uprintf -> dprintf - Fix atsam "vendor" eeprom. - Bump Kinetis K20x to 64 bytes, too. - Rollback Kinetis to 32 bytes as partitioning can only be done once. Add warning about changing the value. - Change RAM-backed "fake" EEPROM implementations to match eeconfig's current usage. - Add 24LC128 by request.
* format code according to conventions [skip ci]QMK Bot2020-01-201-4/+2
|
* Add VIA support for QMK backlight, QMK RGBLight (#7911)Wilba2020-01-201-0/+20
| | | | | | * Add VIA support for QMK backlight, QMK RGBLight * clang-format changes
* Run clang-format manually to fix recently changed files (#7934)Joel Challis2020-01-191-3/+3
| | | | | | | | * Run clang-format manually to fix recently changed files * Run clang-format manually to fix recently changed files - revert template files * Run clang-format manually to fix recently changed files - format off for ascii_to_keycode_lut
* Use White channel on RGBW LEDs (#7678)Drashna Jaelre2019-12-311-1/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Use White channel on RGBW LEDs Co-authored-by: kwerdenker <sebastian.spindler@gmail.com> * Manually apply white channel to array * Move where convert_rgb_to_rgbw is called * Fix type for rgbw led struct * Add changes to Ergodox EZ can revert if deemed necessary * Revert "Add changes to Ergodox EZ" This reverts commit aa44db198d40d758ca10470eb94615513592d1dd. * Revert "Fix type for rgbw led struct" This reverts commit c5c744cba040201cc0d124400773cf13f8a2cf22. * Revert "Move where convert_rgb_to_rgbw is called" This reverts commit cd7f17caf6dd30731c54b3be54490fe4519444f9. * Revert changes and fix up functions * Enable white channel for Ergodox EZ as well * Only run conversion of rgblight is enabled Co-authored-by: kwerdenker <sebastian.spindler@gmail.com>
* Run clang-format manually to fix recently changed fileszvecr2019-11-171-1/+1
|
* Remove force of debug on within rgblight - causes lockups waiting for ↵Joel Challis2019-11-111-1/+0
| | | | hid_listen (#7330)
* Unify RGB and RGBW commands (#7297)Drashna Jaelre2019-11-091-4/+24
| | | | | | | | | | | | | | | | | | | | | | * Fix unicode in comments Co-Authored-By: fauxpark <fauxpark@gmail.com> * Remove separate RGBW implementation for a unified function * Set White to 0 in RGBW LEDs This is just to get this working, later, proper brightness can be handled elsewhere. * Use us instead of nanoseconds(?) since it renders correctly on web * Remove RGBW function from arm/ws2812.h * Remove RGBW function from arm/ws2812.c * Formatting changes * Add doc info
* Fix small hiccup in snake animation (#6858)theVDude2019-10-151-0/+3
|
* clang-format changesskullY2019-08-301-756/+688
|
* Change xprintf() calls in rgblight.c to dprintf() (#6363)Konstantin Đorđević2019-07-191-18/+11
|
* Add effect range to rgblight.c (#5856)Takeshi ISHII2019-05-151-50/+67
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * add rgblight_set_effect_range() * implement effect range * Arrange the order of function list in rgblight.h . * update docs/feature_rgblight.md * fix RGBLIGHT_RAINBOW_SWIRL_RANGE default value * add example code about Utility Functions * add example code about direct operation functions * When RGBLIGHT_SPLIT is defined, the following function has no meaning and is invalidated. * rgblight_setrgb_master(r, g, b) * rgblight_setrgb_slave(r, g, b) * rgblight_sethsv_master(h, s, v) * rgblight_sethsv_slave(h, s, v) * add temporary test code for rgblight_set_effect_range * fix rgblight_effect_knight() bug * Test End. Revert "add temporary test code for rgblight_set_effect_range" This reverts commit 5680cddd012d68b2db75a532862a7fef250f8973.
* If RGBLIGHT_EFFECT_BREATHE_CENTER is undefined, use fixed breathe table ↵Takeshi ISHII2019-05-021-0/+12
| | | | | | | | | | instead of exp() and sin() (#5484) * If RGBLIGHT_EFFECT_BREATHE_CENTER is undefined, use fixed breathe table instead of exp() and sin() * Change rgblight breathing table size to be easily selectable. add RGBLIGHT_BREATHE_TABLE_SIZE macro for customize breathing effect.
* rgblight 255 hue (#5547)XScorpion22019-05-011-149/+51
|
* add RGBLIGHT_SPLIT_SET_CHANGE_MODEHSVS; to rgblight_update_dword()mtei2019-04-241-0/+1
|
* add RGBLIGHT_SPLIT_SET_CHANGE_MODEHSVS; to eeconfig_update_rgblight_default()mtei2019-04-241-1/+4
|
* Add function to support split-keyboard in rgblight.[ch]. (#5020)Takeshi ISHII2019-04-191-130/+260
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |