Terrazzo: Fix wrong LED Matrix function names (#12561)

master
Ryan 2021-04-13 19:51:31 +10:00 committed by GitHub
parent ce99f98bb5
commit a28fbcda23
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
9 changed files with 12 additions and 12 deletions

View File

@ -79,7 +79,7 @@ Custom layer effects can be done by defining this in your `<keyboard>.c`:
```c
void led_matrix_indicators_kb(void) {
led_matrix_set_index_value(index, value);
led_matrix_set_value(index, value);
}
```

View File

@ -76,7 +76,7 @@ I2C IS31FL3731 RGB コントローラを使ったアドレス指定可能な LED
カスタムレイヤー効果は `<keyboard>.c` 内で以下を定義することで行うことができます:
void led_matrix_indicators_kb(void) {
led_matrix_set_index_value(index, value);
led_matrix_set_value(index, value);
}
同様の関数がキーマップ内で `led_matrix_indicators_user` として動作します。

View File

@ -58,7 +58,7 @@ uint8_t terrazzo_effect = 1;
void terrazzo_set_pixel(uint8_t x, uint8_t y, uint8_t value) {
uint8_t target = y * LED_MATRIX_COLS + x;
if (target < DRIVER_LED_TOTAL && target >= 0) {
led_matrix_set_index_value(y * LED_MATRIX_COLS + x, value);
led_matrix_set_value(y * LED_MATRIX_COLS + x, value);
}
}
@ -112,7 +112,7 @@ void terrazzo_mode_off(void) {
void terrazzo_render(void) {
switch(terrazzo_effect) {
case TERRAZZO_NONE:
led_matrix_set_index_value_all(0);
led_matrix_set_value_all(0);
break;
#define TERRAZZO_EFFECT(name, ...) \
case TERRAZZO_EFFECT_##name: \

View File

@ -148,7 +148,7 @@ static uint8_t dino_bg[10][42] = {
};
void DINO(uint8_t i, bool dir) {
led_matrix_set_index_value_all(0);
led_matrix_set_value_all(0);
if (dir) {
terrazzo_draw_at(0, 7, 7, 8, dino_frames[i % 2]);
} else {

View File

@ -19,8 +19,8 @@ TERRAZZO_EFFECT(DOT)
# ifdef TERRAZZO_EFFECT_IMPLS
// Animation for debugging. Lights one pixel according to animation index
void DOT(uint8_t i, bool dir) {
led_matrix_set_index_value_all(0);
led_matrix_set_index_value(i, 10);
led_matrix_set_value_all(0);
led_matrix_set_value(i, 10);
}
# endif

View File

@ -91,7 +91,7 @@ static uint8_t heart_frames[4][105] = {
void HEART(uint8_t i, bool dir) {
led_matrix_set_index_value_all(0);
led_matrix_set_value_all(0);
terrazzo_draw_at(0, 0, 7, 15, heart_frames[i % 4]);
}

View File

@ -89,7 +89,7 @@ bool last_dir;
uint8_t change_index = 0;
void OUTRUN(uint8_t i, bool dir) {
led_matrix_set_index_value_all(0);
led_matrix_set_value_all(0);
if(dir != last_dir) {
change_index = i;

View File

@ -51,7 +51,7 @@ static uint8_t pac_ghost[20] = {
void PAC_DUDE(uint8_t i, bool dir) {
led_matrix_set_index_value_all(0);
led_matrix_set_value_all(0);
if (dir) {
terrazzo_draw_at(1, 4, 5, 5, pac_frames[i % 2]);
terrazzo_set_pixel(3, 0 + i % 3, 5);

View File

@ -85,14 +85,14 @@ static uint8_t number_3_4[10][12] = {
uint8_t wpm_levels[10] = {20, 9, 8, 7, 6, 5, 4, 3, 2, 1};
void WPM_CHART(uint8_t i, bool dir) {
led_matrix_set_index_value_all(0);
led_matrix_set_value_all(0);
uint8_t c_wpm = get_current_wpm();
uint8_t half_wpm = floor(c_wpm / 2);
uint8_t max_rows = 10;
/* Turn on LED for current WPM. Each pixel is 2 wpm. */
for (int k = 0; k < half_wpm && k < 70; k++) {
uint8_t current_row = (int)floor(k / 7);
led_matrix_set_index_value(k, wpm_levels[max_rows - current_row]);
led_matrix_set_value(k, wpm_levels[max_rows - current_row]);
};
uint8_t d1 = (int)floor(c_wpm / 10);
/* There is only room to print 2 digits. If the WPM is greater than