aboutsummaryrefslogtreecommitdiff
path: root/keyboards/terrazzo
diff options
context:
space:
mode:
Diffstat (limited to 'keyboards/terrazzo')
-rw-r--r--keyboards/terrazzo/rules.mk2
-rw-r--r--keyboards/terrazzo/terrazzo.c5
-rw-r--r--keyboards/terrazzo/terrazzo_effects/dino.h2
-rw-r--r--keyboards/terrazzo/terrazzo_effects/dot.h4
-rw-r--r--keyboards/terrazzo/terrazzo_effects/heart.h2
-rw-r--r--keyboards/terrazzo/terrazzo_effects/outrun.h2
-rw-r--r--keyboards/terrazzo/terrazzo_effects/pac_dude.h2
-rw-r--r--keyboards/terrazzo/terrazzo_effects/wpm_chart.h4
8 files changed, 11 insertions, 12 deletions
diff --git a/keyboards/terrazzo/rules.mk b/keyboards/terrazzo/rules.mk
index 7a08fb769..843dbb88d 100644
--- a/keyboards/terrazzo/rules.mk
+++ b/keyboards/terrazzo/rules.mk
@@ -16,7 +16,7 @@ BOOTLOADER = atmel-dfu
16# Build Options 16# Build Options
17# comment out to disable the options. 17# comment out to disable the options.
18# 18#
19BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration 19BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration
20MOUSEKEY_ENABLE = no # Mouse keys 20MOUSEKEY_ENABLE = no # Mouse keys
21EXTRAKEY_ENABLE = yes # Audio control and System control 21EXTRAKEY_ENABLE = yes # Audio control and System control
22CONSOLE_ENABLE = no # Console for debug 22CONSOLE_ENABLE = no # Console for debug
diff --git a/keyboards/terrazzo/terrazzo.c b/keyboards/terrazzo/terrazzo.c
index f079ded4d..1319b05e7 100644
--- a/keyboards/terrazzo/terrazzo.c
+++ b/keyboards/terrazzo/terrazzo.c
@@ -17,7 +17,6 @@
17#include "terrazzo.h" 17#include "terrazzo.h"
18 18
19#ifdef LED_MATRIX_ENABLE 19#ifdef LED_MATRIX_ENABLE
20 #include "is31fl3731-simple.h"
21 #include <math.h> 20 #include <math.h>
22 #include "print.h" 21 #include "print.h"
23 #include "quantum.h" 22 #include "quantum.h"
@@ -59,7 +58,7 @@ uint8_t terrazzo_effect = 1;
59void terrazzo_set_pixel(uint8_t x, uint8_t y, uint8_t value) { 58void terrazzo_set_pixel(uint8_t x, uint8_t y, uint8_t value) {
60 uint8_t target = y * LED_MATRIX_COLS + x; 59 uint8_t target = y * LED_MATRIX_COLS + x;
61 if (target < DRIVER_LED_TOTAL && target >= 0) { 60 if (target < DRIVER_LED_TOTAL && target >= 0) {
62 led_matrix_set_index_value(y * LED_MATRIX_COLS + x, value); 61 led_matrix_set_value(y * LED_MATRIX_COLS + x, value);
63 } 62 }
64} 63}
65 64
@@ -113,7 +112,7 @@ void terrazzo_mode_off(void) {
113void terrazzo_render(void) { 112void terrazzo_render(void) {
114 switch(terrazzo_effect) { 113 switch(terrazzo_effect) {
115 case TERRAZZO_NONE: 114 case TERRAZZO_NONE:
116 led_matrix_set_index_value_all(0); 115 led_matrix_set_value_all(0);
117 break; 116 break;
118 #define TERRAZZO_EFFECT(name, ...) \ 117 #define TERRAZZO_EFFECT(name, ...) \
119 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
150void DINO(uint8_t i, bool dir) { 150void 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
21void DOT(uint8_t i, bool dir) { 21void 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
93void HEART(uint8_t i, bool dir) { 93void 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;
89uint8_t change_index = 0; 89uint8_t change_index = 0;
90 90
91void OUTRUN(uint8_t i, bool dir) { 91void 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
53void PAC_DUDE(uint8_t i, bool dir) { 53void 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] = {
85uint8_t wpm_levels[10] = {20, 9, 8, 7, 6, 5, 4, 3, 2, 1}; 85uint8_t wpm_levels[10] = {20, 9, 8, 7, 6, 5, 4, 3, 2, 1};
86 86
87void WPM_CHART(uint8_t i, bool dir) { 87void 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