void rgb_matrix_step_reverse(void) { rgb_matrix_config.mode--; if (rgb_matrix_config.mode < 1) rgb_matrix_config.mode = RGB_MATRIX_EFFECT_MAX - 1; rgb_task_state = STARTING; eeconfig_update_rgb_matrix(rgb_matrix_config.raw); }
void rgb_matrix_step(void) { rgb_matrix_config.mode++; if (rgb_matrix_config.mode >= RGB_MATRIX_EFFECT_MAX) rgb_matrix_config.mode = 1; rgb_task_state = STARTING; eeconfig_update_rgb_matrix(rgb_matrix_config.raw); }
void rgb_matrix_toggle(void) { rgb_matrix_config.enable++; if (!rgb_matrix_config.enable) { rgb_task_state = STARTING; } eeconfig_update_rgb_matrix(rgb_matrix_config.raw); }
void eeconfig_update_rgb_matrix_default(void) { dprintf("eeconfig_update_rgb_matrix_default\n"); rgb_matrix_config.enable = 1; rgb_matrix_config.mode = RGB_MATRIX_CYCLE_LEFT_RIGHT; rgb_matrix_config.hue = 0; rgb_matrix_config.sat = 255; rgb_matrix_config.val = RGB_MATRIX_MAXIMUM_BRIGHTNESS; rgb_matrix_config.speed = 0; eeconfig_update_rgb_matrix(rgb_matrix_config.raw); }
void eeconfig_update_rgb_matrix_default(void) { dprintf("eeconfig_update_rgb_matrix_default\n"); rgb_matrix_config.enable = 1; #ifndef DISABLE_RGB_MATRIX_CYCLE_ALL rgb_matrix_config.mode = RGB_MATRIX_CYCLE_LEFT_RIGHT; #else // fallback to solid colors if RGB_MATRIX_CYCLE_LEFT_RIGHT is disabled in userspace rgb_matrix_config.mode = RGB_MATRIX_SOLID_COLOR; #endif rgb_matrix_config.hue = 0; rgb_matrix_config.sat = 255; rgb_matrix_config.val = RGB_MATRIX_MAXIMUM_BRIGHTNESS; rgb_matrix_config.speed = 0; eeconfig_update_rgb_matrix(rgb_matrix_config.raw); }
void rgb_matrix_sethsv(uint16_t hue, uint8_t sat, uint8_t val) { rgb_matrix_sethsv_noeeprom(hue, sat, val); eeconfig_update_rgb_matrix(rgb_matrix_config.raw); }
void rgb_matrix_mode(uint8_t mode) { rgb_matrix_config.mode = mode; rgb_task_state = STARTING; eeconfig_update_rgb_matrix(rgb_matrix_config.raw); }
void rgb_matrix_decrease_speed(void) { rgb_matrix_config.speed = qsub8(rgb_matrix_config.speed, RGB_MATRIX_SPD_STEP); eeconfig_update_rgb_matrix(rgb_matrix_config.raw);//EECONFIG needs to be increased to support this }
void rgb_matrix_decrease_val(void) { rgb_matrix_config.val = qsub8(rgb_matrix_config.val, RGB_MATRIX_VAL_STEP); eeconfig_update_rgb_matrix(rgb_matrix_config.raw); }
void rgb_matrix_increase_val(void) { rgb_matrix_config.val = qadd8(rgb_matrix_config.val, RGB_MATRIX_VAL_STEP); if (rgb_matrix_config.val > RGB_MATRIX_MAXIMUM_BRIGHTNESS) rgb_matrix_config.val = RGB_MATRIX_MAXIMUM_BRIGHTNESS; eeconfig_update_rgb_matrix(rgb_matrix_config.raw); }
void rgb_matrix_decrease_sat(void) { rgb_matrix_config.sat = qsub8(rgb_matrix_config.sat, RGB_MATRIX_SAT_STEP); eeconfig_update_rgb_matrix(rgb_matrix_config.raw); }
void rgb_matrix_decrease_hue(void) { rgb_matrix_config.hue -= RGB_MATRIX_HUE_STEP; eeconfig_update_rgb_matrix(rgb_matrix_config.raw); }
void rgb_matrix_disable(void) { rgb_matrix_config.enable = 0; eeconfig_update_rgb_matrix(rgb_matrix_config.raw); }