1
0
Fork 0

Add noeeprom speed function for RGBLIGHT (#9706)

* [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>
This commit is contained in:
Drashna Jael're 2020-08-25 02:08:09 -07:00 committed by GitHub
parent 1fd2f2f022
commit b338a4d886
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 28 additions and 4 deletions

View file

@ -406,17 +406,28 @@ void rgblight_decrease_val_helper(bool write_to_eeprom) {
}
void rgblight_decrease_val_noeeprom(void) { rgblight_decrease_val_helper(false); }
void rgblight_decrease_val(void) { rgblight_decrease_val_helper(true); }
void rgblight_increase_speed(void) {
void rgblight_increase_speed_helper(bool write_to_eeprom) {
if (rgblight_config.speed < 3) rgblight_config.speed++;
// RGBLIGHT_SPLIT_SET_CHANGE_HSVS; // NEED?
eeconfig_update_rgblight(rgblight_config.raw); // EECONFIG needs to be increased to support this
if (write_to_eeprom) {
eeconfig_update_rgblight(rgblight_config.raw); // EECONFIG needs to be increased to support this
}
}
void rgblight_increase_speed(void) { rgblight_increase_speed_helper(true); }
void rgblight_increase_speed_noeeprom(void) { rgblight_increase_speed_helper(false); }
void rgblight_decrease_speed(void) {
void rgblight_decrease_speed_helper(bool write_to_eeprom) {
if (rgblight_config.speed > 0) rgblight_config.speed--;
// RGBLIGHT_SPLIT_SET_CHANGE_HSVS; // NEED??
eeconfig_update_rgblight(rgblight_config.raw); // EECONFIG needs to be increased to support this
if (write_to_eeprom) {
eeconfig_update_rgblight(rgblight_config.raw); // EECONFIG needs to be increased to support this
}
}
void rgblight_decrease_speed(void) { rgblight_decrease_speed_helper(true); }
void rgblight_decrease_speed_noeeprom(void) { rgblight_decrease_speed_helper(false); }
void rgblight_sethsv_noeeprom_old(uint8_t hue, uint8_t sat, uint8_t val) {
if (rgblight_config.enable) {