From a28fbcda2306634c74e196ce98f8bebb701445b0 Mon Sep 17 00:00:00 2001 From: Ryan Date: Tue, 13 Apr 2021 19:51:31 +1000 Subject: [PATCH] Terrazzo: Fix wrong LED Matrix function names (#12561) --- docs/feature_led_matrix.md | 2 +- docs/ja/feature_led_matrix.md | 2 +- keyboards/terrazzo/terrazzo.c | 4 ++-- keyboards/terrazzo/terrazzo_effects/dino.h | 2 +- keyboards/terrazzo/terrazzo_effects/dot.h | 4 ++-- keyboards/terrazzo/terrazzo_effects/heart.h | 2 +- keyboards/terrazzo/terrazzo_effects/outrun.h | 2 +- keyboards/terrazzo/terrazzo_effects/pac_dude.h | 2 +- keyboards/terrazzo/terrazzo_effects/wpm_chart.h | 4 ++-- 9 files changed, 12 insertions(+), 12 deletions(-) diff --git a/docs/feature_led_matrix.md b/docs/feature_led_matrix.md index f4a6616340..ac2be2e775 100644 --- a/docs/feature_led_matrix.md +++ b/docs/feature_led_matrix.md @@ -79,7 +79,7 @@ Custom layer effects can be done by defining this in your `.c`: ```c void led_matrix_indicators_kb(void) { - led_matrix_set_index_value(index, value); + led_matrix_set_value(index, value); } ``` diff --git a/docs/ja/feature_led_matrix.md b/docs/ja/feature_led_matrix.md index b73487ca63..62e22859fb 100644 --- a/docs/ja/feature_led_matrix.md +++ b/docs/ja/feature_led_matrix.md @@ -76,7 +76,7 @@ I2C IS31FL3731 RGB コントローラを使ったアドレス指定可能な LED カスタムレイヤー効果は `.c` 内で以下を定義することで行うことができます: void led_matrix_indicators_kb(void) { - led_matrix_set_index_value(index, value); + led_matrix_set_value(index, value); } 同様の関数がキーマップ内で `led_matrix_indicators_user` として動作します。 diff --git a/keyboards/terrazzo/terrazzo.c b/keyboards/terrazzo/terrazzo.c index 2afda085b3..1319b05e76 100644 --- a/keyboards/terrazzo/terrazzo.c +++ b/keyboards/terrazzo/terrazzo.c @@ -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: \ diff --git a/keyboards/terrazzo/terrazzo_effects/dino.h b/keyboards/terrazzo/terrazzo_effects/dino.h index 747ef6178e..18c629f414 100644 --- a/keyboards/terrazzo/terrazzo_effects/dino.h +++ b/keyboards/terrazzo/terrazzo_effects/dino.h @@ -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 { diff --git a/keyboards/terrazzo/terrazzo_effects/dot.h b/keyboards/terrazzo/terrazzo_effects/dot.h index e8eb8e0fce..07c4621c26 100644 --- a/keyboards/terrazzo/terrazzo_effects/dot.h +++ b/keyboards/terrazzo/terrazzo_effects/dot.h @@ -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 diff --git a/keyboards/terrazzo/terrazzo_effects/heart.h b/keyboards/terrazzo/terrazzo_effects/heart.h index bdcd2d7b97..bfbd6acc38 100644 --- a/keyboards/terrazzo/terrazzo_effects/heart.h +++ b/keyboards/terrazzo/terrazzo_effects/heart.h @@ -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]); } diff --git a/keyboards/terrazzo/terrazzo_effects/outrun.h b/keyboards/terrazzo/terrazzo_effects/outrun.h index b4455ef49f..127e714b2f 100644 --- a/keyboards/terrazzo/terrazzo_effects/outrun.h +++ b/keyboards/terrazzo/terrazzo_effects/outrun.h @@ -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; diff --git a/keyboards/terrazzo/terrazzo_effects/pac_dude.h b/keyboards/terrazzo/terrazzo_effects/pac_dude.h index aa4fc9923f..aaf0c55457 100644 --- a/keyboards/terrazzo/terrazzo_effects/pac_dude.h +++ b/keyboards/terrazzo/terrazzo_effects/pac_dude.h @@ -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); diff --git a/keyboards/terrazzo/terrazzo_effects/wpm_chart.h b/keyboards/terrazzo/terrazzo_effects/wpm_chart.h index 5c66bc39ad..b80b604d26 100644 --- a/keyboards/terrazzo/terrazzo_effects/wpm_chart.h +++ b/keyboards/terrazzo/terrazzo_effects/wpm_chart.h @@ -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