Skip to content

Commit

Permalink
added a deferred exec call to the rgb save on encoder turn. It wasn't…
Browse files Browse the repository at this point in the history
… saving properly, but this seems to have fixed it, similar to the keycode, but for a different reason
  • Loading branch information
sadekbaroudi committed May 1, 2023
1 parent b5c09a9 commit 8f6c4ba
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions keyboards/fingerpunch/src/fp_rgb_common.c
Original file line number Diff line number Diff line change
Expand Up @@ -204,49 +204,49 @@ uint8_t fp_rgb_get_element_from_hsv(uint8_t hue, uint8_t sat, uint8_t val, uint8
void fp_rgblight_step(void) {
fp_rgb_set_hsv_and_mode(fp_config.rgb_hue, fp_config.rgb_sat, fp_config.rgb_val, fp_config.rgb_mode);
rgblight_step();
fp_rgb_set_config_from_current_values();
defer_exec(20, fp_rgb_set_config_from_current_values_deferred, NULL);
}

void fp_rgblight_step_reverse(void) {
fp_rgb_set_hsv_and_mode(fp_config.rgb_hue, fp_config.rgb_sat, fp_config.rgb_val, fp_config.rgb_mode);
rgblight_step_reverse();
fp_rgb_set_config_from_current_values();
defer_exec(20, fp_rgb_set_config_from_current_values_deferred, NULL);
}

void fp_rgblight_increase_hue(void) {
fp_rgb_set_hsv_and_mode(fp_config.rgb_hue, fp_config.rgb_sat, fp_config.rgb_val, fp_config.rgb_mode);
rgblight_increase_hue();
fp_rgb_set_config_from_current_values();
defer_exec(20, fp_rgb_set_config_from_current_values_deferred, NULL);
}

void fp_rgblight_decrease_hue(void) {
fp_rgb_set_hsv_and_mode(fp_config.rgb_hue, fp_config.rgb_sat, fp_config.rgb_val, fp_config.rgb_mode);
rgblight_decrease_hue();
fp_rgb_set_config_from_current_values();
defer_exec(20, fp_rgb_set_config_from_current_values_deferred, NULL);
}

void fp_rgblight_increase_sat(void) {
fp_rgb_set_hsv_and_mode(fp_config.rgb_hue, fp_config.rgb_sat, fp_config.rgb_val, fp_config.rgb_mode);
rgblight_increase_sat();
fp_rgb_set_config_from_current_values();
defer_exec(20, fp_rgb_set_config_from_current_values_deferred, NULL);
}

void fp_rgblight_decrease_sat(void) {
fp_rgb_set_hsv_and_mode(fp_config.rgb_hue, fp_config.rgb_sat, fp_config.rgb_val, fp_config.rgb_mode);
rgblight_decrease_sat();
fp_rgb_set_config_from_current_values();
defer_exec(20, fp_rgb_set_config_from_current_values_deferred, NULL);
}

void fp_rgblight_increase_val(void) {
fp_rgb_set_hsv_and_mode(fp_config.rgb_hue, fp_config.rgb_sat, fp_config.rgb_val, fp_config.rgb_mode);
rgblight_increase_val();
fp_rgb_set_config_from_current_values();
defer_exec(20, fp_rgb_set_config_from_current_values_deferred, NULL);
}

void fp_rgblight_decrease_val(void) {
fp_rgb_set_hsv_and_mode(fp_config.rgb_hue, fp_config.rgb_sat, fp_config.rgb_val, fp_config.rgb_mode);
rgblight_decrease_val();
fp_rgb_set_config_from_current_values();
defer_exec(20, fp_rgb_set_config_from_current_values_deferred, NULL);
}

#endif

0 comments on commit 8f6c4ba

Please sign in to comment.