1
0
Fork 0

Add query functions for RGB Light and RGB Matrix (#8960)

* 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
This commit is contained in:
Drashna Jael're 2020-05-18 06:05:35 -07:00 committed by GitHub
parent e55d55edc0
commit d0e0202b27
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 50 additions and 12 deletions

View file

@ -368,6 +368,8 @@ void rgblight_disable_noeeprom(void) {
rgblight_set();
}
bool rgblight_is_enabled(void) { return rgblight_config.enable; }
void rgblight_increase_hue_helper(bool write_to_eeprom) {
uint8_t hue = rgblight_config.hue + RGBLIGHT_HUE_STEP;
rgblight_sethsv_eeprom_helper(hue, rgblight_config.sat, rgblight_config.val, write_to_eeprom);
@ -522,6 +524,10 @@ uint8_t rgblight_get_sat(void) { return rgblight_config.sat; }
uint8_t rgblight_get_val(void) { return rgblight_config.val; }
HSV rgblight_get_hsv(void) {
return (HSV){ rgblight_config.hue, rgblight_config.sat, rgblight_config.val };
}
void rgblight_setrgb(uint8_t r, uint8_t g, uint8_t b) {
if (!rgblight_config.enable) {
return;