示例#1
0
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);
}
示例#2
0
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);
}
示例#3
0
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);
}
示例#4
0
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);
}
示例#5
0
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);
}
示例#6
0
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);
}
示例#7
0
void rgb_matrix_mode(uint8_t mode) {
  rgb_matrix_config.mode = mode;
  rgb_task_state = STARTING;
  eeconfig_update_rgb_matrix(rgb_matrix_config.raw);
}
示例#8
0
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
}
示例#9
0
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);
}
示例#10
0
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);
}
示例#11
0
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);
}
示例#12
0
void rgb_matrix_decrease_hue(void) {
  rgb_matrix_config.hue -= RGB_MATRIX_HUE_STEP;
  eeconfig_update_rgb_matrix(rgb_matrix_config.raw);
}
示例#13
0
void rgb_matrix_disable(void) {
	rgb_matrix_config.enable = 0;
  eeconfig_update_rgb_matrix(rgb_matrix_config.raw);
}