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:
parent
e55d55edc0
commit
d0e0202b27
6 changed files with 50 additions and 12 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue