1
0
Fork 0

Add and fix _noeeprom functions to many of the RGB Underglow functions (#3070)

* And and fix _noeeprom functions to many of the RGB Underglow functions

* Many functions are unnecessarily calling the eeprom write code. The toggle/enable is command is especially guilty of this, as it writes to EEPROM 3 times.  But rgb mode writes twice, every time it's called. And init resets the rgb eeprom range and then writes back to it twice!
* Fixed the rgblight_sethsv_noeeprom to work as expected, by moving a lot of the code to a helper function.
* Added a noeeprom function for mode, enable, disable, and toggle functions. (didn't bother for increase/decrease stuff, and didn't add new keycodes)
* Add to predefined colors list
* Add new functions to manual/docs

* Update RGB Sleep feature to use _noeeprom

Because that's exactly what it should be doing, actually!
This commit is contained in:
Drashna Jael're 2018-05-29 08:05:22 -07:00 committed by Jack Humbert
parent 034a25aedf
commit 751719e6cb
5 changed files with 137 additions and 28 deletions

View file

@ -76,6 +76,30 @@
#define rgblight_sethsv_magenta() rgblight_sethsv (300, 255, 255)
#define rgblight_sethsv_pink() rgblight_sethsv (330, 128, 255)
/* SET HSV List */
/* If you're doing layer indication, this is best, as it won't */
/* write to the eeprom, since it's limited (very high value). */
/* If you want to use modes with this (since you can), then you */
/* want to use rgblight_mode_noeeprom(x) instead. */
#define rgblight_sethsv_noeeprom_white() rgblight_sethsv_noeeprom ( 0, 0, 255)
#define rgblight_sethsv_noeeprom_red() rgblight_sethsv_noeeprom ( 0, 255, 255)
#define rgblight_sethsv_noeeprom_coral() rgblight_sethsv_noeeprom ( 16, 176, 255)
#define rgblight_sethsv_noeeprom_orange() rgblight_sethsv_noeeprom ( 39, 255, 255)
#define rgblight_sethsv_noeeprom_goldenrod() rgblight_sethsv_noeeprom ( 43, 218, 218)
#define rgblight_sethsv_noeeprom_gold() rgblight_sethsv_noeeprom ( 51, 255, 255)
#define rgblight_sethsv_noeeprom_yellow() rgblight_sethsv_noeeprom ( 60, 255, 255)
#define rgblight_sethsv_noeeprom_chartreuse() rgblight_sethsv_noeeprom ( 90, 255, 255)
#define rgblight_sethsv_noeeprom_green() rgblight_sethsv_noeeprom (120, 255, 255)
#define rgblight_sethsv_noeeprom_springgreen() rgblight_sethsv_noeeprom (150, 255, 255)
#define rgblight_sethsv_noeeprom_turquoise() rgblight_sethsv_noeeprom (174, 90, 112)
#define rgblight_sethsv_noeeprom_teal() rgblight_sethsv_noeeprom (180, 255, 128)
#define rgblight_sethsv_noeeprom_cyan() rgblight_sethsv_noeeprom (180, 255, 255)
#define rgblight_sethsv_noeeprom_azure() rgblight_sethsv_noeeprom (186, 102, 255)
#define rgblight_sethsv_noeeprom_blue() rgblight_sethsv_noeeprom (240, 255, 255)
#define rgblight_sethsv_noeeprom_purple() rgblight_sethsv_noeeprom (270, 255, 255)
#define rgblight_sethsv_noeeprom_magenta() rgblight_sethsv_noeeprom (300, 255, 255)
#define rgblight_sethsv_noeeprom_pink() rgblight_sethsv_noeeprom (330, 128, 255)
/* SET HSV List */
#define rgblight_sethsv_white_at(at) rgblight_sethsv_at ( 0, 0, 255, at)
#define rgblight_sethsv_red_at(at) rgblight_sethsv_at ( 0, 255, 255, at)