diff options
| author | Ryan <fauxpark@gmail.com> | 2021-04-13 19:51:31 +1000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-04-13 19:51:31 +1000 |
| commit | a28fbcda2306634c74e196ce98f8bebb701445b0 (patch) | |
| tree | 31e24d9b9e9c35de22724be01cf0be11b319fb2a | |
| parent | ce99f98bb5217ede628cfbf7e20924346b4279da (diff) | |
| download | qmk_firmware-a28fbcda2306634c74e196ce98f8bebb701445b0.tar.gz qmk_firmware-a28fbcda2306634c74e196ce98f8bebb701445b0.zip | |
Terrazzo: Fix wrong LED Matrix function names (#12561)
| -rw-r--r-- | docs/feature_led_matrix.md | 2 | ||||
| -rw-r--r-- | docs/ja/feature_led_matrix.md | 2 | ||||
| -rw-r--r-- | keyboards/terrazzo/terrazzo.c | 4 | ||||
| -rw-r--r-- | keyboards/terrazzo/terrazzo_effects/dino.h | 2 | ||||
| -rw-r--r-- | keyboards/terrazzo/terrazzo_effects/dot.h | 4 | ||||
| -rw-r--r-- | keyboards/terrazzo/terrazzo_effects/heart.h | 2 | ||||
| -rw-r--r-- | keyboards/terrazzo/terrazzo_effects/outrun.h | 2 | ||||
| -rw-r--r-- | keyboards/terrazzo/terrazzo_effects/pac_dude.h | 2 | ||||
| -rw-r--r-- | 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 f4a661634..ac2be2e77 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 `<keyboard>.c`: | |||
| 79 | 79 | ||
| 80 | ```c | 80 | ```c |
| 81 | void led_matrix_indicators_kb(void) { | 81 | void led_matrix_indicators_kb(void) { |
| 82 | led_matrix_set_index_value(index, value); | 82 | led_matrix_set_value(index, value); |
| 83 | } | 83 | } |
| 84 | ``` | 84 | ``` |
| 85 | 85 | ||
diff --git a/docs/ja/feature_led_matrix.md b/docs/ja/feature_led_matrix.md index b73487ca6..62e22859f 100644 --- a/docs/ja/feature_led_matrix.md +++ b/docs/ja/feature_led_matrix.md | |||
| @@ -76,7 +76,7 @@ I2C IS31FL3731 RGB コントローラを使ったアドレス指定可能な LED | |||
| 76 | カスタムレイヤー効果は `<keyboard>.c` 内で以下を定義することで行うことができます: | 76 | カスタムレイヤー効果は `<keyboard>.c` 内で以下を定義することで行うことができます: |
| 77 | 77 | ||
| 78 | void led_matrix_indicators_kb(void) { | 78 | void led_matrix_indicators_kb(void) { |
| 79 | led_matrix_set_index_value(index, value); | 79 | led_matrix_set_value(index, value); |
| 80 | } | 80 | } |
| 81 | 81 | ||
| 82 | 同様の関数がキーマップ内で `led_matrix_indicators_user` として動作します。 | 82 | 同様の関数がキーマップ内で `led_matrix_indicators_user` として動作します。 |
diff --git a/keyboards/terrazzo/terrazzo.c b/keyboards/terrazzo/terrazzo.c index 2afda085b..1319b05e7 100644 --- a/keyboards/terrazzo/terrazzo.c +++ b/keyboards/terrazzo/terrazzo.c | |||
| @@ -58,7 +58,7 @@ uint8_t terrazzo_effect = 1; | |||
| 58 | void terrazzo_set_pixel(uint8_t x, uint8_t y, uint8_t value) { | 58 | void terrazzo_set_pixel(uint8_t x, uint8_t y, uint8_t value) { |
| 59 | uint8_t target = y * LED_MATRIX_COLS + x; | 59 | uint8_t target = y * LED_MATRIX_COLS + x; |
| 60 | if (target < DRIVER_LED_TOTAL && target >= 0) { | 60 | if (target < DRIVER_LED_TOTAL && target >= 0) { |
| 61 | led_matrix_set_index_value(y * LED_MATRIX_COLS + x, value); | 61 | led_matrix_set_value(y * LED_MATRIX_COLS + x, value); |
| 62 | } | 62 | } |
| 63 | } | 63 | } |
| 64 | 64 | ||
| @@ -112,7 +112,7 @@ void terrazzo_mode_off(void) { | |||
| 112 | void terrazzo_render(void) { | 112 | void terrazzo_render(void) { |
| 113 | switch(terrazzo_effect) { | 113 | switch(terrazzo_effect) { |
| 114 | case TERRAZZO_NONE: | 114 | case TERRAZZO_NONE: |
| 115 | led_matrix_set_index_value_all(0); | 115 | led_matrix_set_value_all(0); |
| 116 | break; | 116 | break; |
| 117 | #define TERRAZZO_EFFECT(name, ...) \ | 117 | #define TERRAZZO_EFFECT(name, ...) \ |
| 118 | case TERRAZZO_EFFECT_##name: \ | 118 | case TERRAZZO_EFFECT_##name: \ |
diff --git a/keyboards/terrazzo/terrazzo_effects/dino.h b/keyboards/terrazzo/terrazzo_effects/dino.h index 747ef6178..18c629f41 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] = { | |||
| 148 | }; | 148 | }; |
| 149 | 149 | ||
| 150 | void DINO(uint8_t i, bool dir) { | 150 | void DINO(uint8_t i, bool dir) { |
| 151 | led_matrix_set_index_value_all(0); | 151 | led_matrix_set_value_all(0); |
| 152 | if (dir) { | 152 | if (dir) { |
| 153 | terrazzo_draw_at(0, 7, 7, 8, dino_frames[i % 2]); | 153 | terrazzo_draw_at(0, 7, 7, 8, dino_frames[i % 2]); |
| 154 | } else { | 154 | } else { |
diff --git a/keyboards/terrazzo/terrazzo_effects/dot.h b/keyboards/terrazzo/terrazzo_effects/dot.h index e8eb8e0fc..07c4621c2 100644 --- a/keyboards/terrazzo/terrazzo_effects/dot.h +++ b/keyboards/terrazzo/terrazzo_effects/dot.h | |||
| @@ -19,8 +19,8 @@ TERRAZZO_EFFECT(DOT) | |||
| 19 | # ifdef TERRAZZO_EFFECT_IMPLS | 19 | # ifdef TERRAZZO_EFFECT_IMPLS |
| 20 | // Animation for debugging. Lights one pixel according to animation index | 20 | // Animation for debugging. Lights one pixel according to animation index |
| 21 | void DOT(uint8_t i, bool dir) { | 21 | void DOT(uint8_t i, bool dir) { |
| 22 | led_matrix_set_index_value_all(0); | 22 | led_matrix_set_value_all(0); |
| 23 | led_matrix_set_index_value(i, 10); | 23 | led_matrix_set_value(i, 10); |
| 24 | } | 24 | } |
| 25 | 25 | ||
| 26 | # endif | 26 | # endif |
diff --git a/keyboards/terrazzo/terrazzo_effects/heart.h b/keyboards/terrazzo/terrazzo_effects/heart.h index bdcd2d7b9..bfbd6acc3 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] = { | |||
| 91 | 91 | ||
| 92 | 92 | ||
| 93 | void HEART(uint8_t i, bool dir) { | 93 | void HEART(uint8_t i, bool dir) { |
| 94 | led_matrix_set_index_value_all(0); | 94 | led_matrix_set_value_all(0); |
| 95 | terrazzo_draw_at(0, 0, 7, 15, heart_frames[i % 4]); | 95 | terrazzo_draw_at(0, 0, 7, 15, heart_frames[i % 4]); |
| 96 | } | 96 | } |
| 97 | 97 | ||
diff --git a/keyboards/terrazzo/terrazzo_effects/outrun.h b/keyboards/terrazzo/terrazzo_effects/outrun.h index b4455ef49..127e714b2 100644 --- a/keyboards/terrazzo/terrazzo_effects/outrun.h +++ b/keyboards/terrazzo/terrazzo_effects/outrun.h | |||
| @@ -89,7 +89,7 @@ bool last_dir; | |||
| 89 | uint8_t change_index = 0; | 89 | uint8_t change_index = 0; |
| 90 | 90 | ||
| 91 | void OUTRUN(uint8_t i, bool dir) { | 91 | void OUTRUN(uint8_t i, bool dir) { |
| 92 | led_matrix_set_index_value_all(0); | 92 | led_matrix_set_value_all(0); |
| 93 | 93 | ||
| 94 | if(dir != last_dir) { | 94 | if(dir != last_dir) { |
| 95 | change_index = i; | 95 | change_index = i; |
diff --git a/keyboards/terrazzo/terrazzo_effects/pac_dude.h b/keyboards/terrazzo/terrazzo_effects/pac_dude.h index aa4fc9923..aaf0c5545 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] = { | |||
| 51 | 51 | ||
| 52 | 52 | ||
| 53 | void PAC_DUDE(uint8_t i, bool dir) { | 53 | void PAC_DUDE(uint8_t i, bool dir) { |
| 54 | led_matrix_set_index_value_all(0); | 54 | led_matrix_set_value_all(0); |
| 55 | if (dir) { | 55 | if (dir) { |
| 56 | terrazzo_draw_at(1, 4, 5, 5, pac_frames[i % 2]); | 56 | terrazzo_draw_at(1, 4, 5, 5, pac_frames[i % 2]); |
| 57 | terrazzo_set_pixel(3, 0 + i % 3, 5); | 57 | 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 5c66bc39a..b80b604d2 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] = { | |||
| 85 | uint8_t wpm_levels[10] = {20, 9, 8, 7, 6, 5, 4, 3, 2, 1}; | 85 | uint8_t wpm_levels[10] = {20, 9, 8, 7, 6, 5, 4, 3, 2, 1}; |
| 86 | 86 | ||
| 87 | void WPM_CHART(uint8_t i, bool dir) { | 87 | void WPM_CHART(uint8_t i, bool dir) { |
| 88 | led_matrix_set_index_value_all(0); | 88 | led_matrix_set_value_all(0); |
| 89 | uint8_t c_wpm = get_current_wpm(); | 89 | uint8_t c_wpm = get_current_wpm(); |
| 90 | uint8_t half_wpm = floor(c_wpm / 2); | 90 | uint8_t half_wpm = floor(c_wpm / 2); |
| 91 | uint8_t max_rows = 10; | 91 | uint8_t max_rows = 10; |
| 92 | /* Turn on LED for current WPM. Each pixel is 2 wpm. */ | 92 | /* Turn on LED for current WPM. Each pixel is 2 wpm. */ |
| 93 | for (int k = 0; k < half_wpm && k < 70; k++) { | 93 | for (int k = 0; k < half_wpm && k < 70; k++) { |
| 94 | uint8_t current_row = (int)floor(k / 7); | 94 | uint8_t current_row = (int)floor(k / 7); |
| 95 | led_matrix_set_index_value(k, wpm_levels[max_rows - current_row]); | 95 | led_matrix_set_value(k, wpm_levels[max_rows - current_row]); |
| 96 | }; | 96 | }; |
| 97 | uint8_t d1 = (int)floor(c_wpm / 10); | 97 | uint8_t d1 = (int)floor(c_wpm / 10); |
| 98 | /* There is only room to print 2 digits. If the WPM is greater than | 98 | /* There is only room to print 2 digits. If the WPM is greater than |
