aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoel Challis <git@zvecr.com>2021-10-10 00:23:10 +0100
committerGitHub <noreply@github.com>2021-10-10 00:23:10 +0100
commitf895e966b780f80fb9882ea512115e845e661f57 (patch)
tree1b827a8aa6e829b7d0d60736fef12d1cc699c773
parentff85eb8ee5c50ea1720b97713e95f2fb67a200ea (diff)
downloadqmk_firmware-f895e966b780f80fb9882ea512115e845e661f57.tar.gz
qmk_firmware-f895e966b780f80fb9882ea512115e845e661f57.zip
Fix OLED timeout on recent qwiic migrations (#14775)
-rw-r--r--keyboards/boston_meetup/2019/2019.c13
-rw-r--r--keyboards/hadron/ver3/ver3.c12
2 files changed, 12 insertions, 13 deletions
diff --git a/keyboards/boston_meetup/2019/2019.c b/keyboards/boston_meetup/2019/2019.c
index 268576eb0..7428f1ccf 100644
--- a/keyboards/boston_meetup/2019/2019.c
+++ b/keyboards/boston_meetup/2019/2019.c
@@ -38,7 +38,8 @@ oled_rotation_t oled_init_user(oled_rotation_t rotation) {
38 38
39__attribute__ ((weak)) 39__attribute__ ((weak))
40void oled_task_user(void) { 40void oled_task_user(void) {
41 oled_write_P(PSTR("BOSTON MK LAYER "), false); 41 oled_write_P(PSTR("BOSTON MK LAYER"), false);
42 oled_advance_char();
42 oled_write_char(get_highest_layer(layer_state) + 0x30, true); 43 oled_write_char(get_highest_layer(layer_state) + 0x30, true);
43 44
44 led_t led_state = host_keyboard_led_state(); 45 led_t led_state = host_keyboard_led_state();
@@ -68,6 +69,10 @@ void oled_task_user(void) {
68 for (uint8_t x = 0; x < MATRIX_ROWS; x++) { 69 for (uint8_t x = 0; x < MATRIX_ROWS; x++) {
69 for (uint8_t y = 0; y < MATRIX_COLS; y++) { 70 for (uint8_t y = 0; y < MATRIX_COLS; y++) {
70 bool on = (matrix_get_row(x) & (1 << y)) > 0; 71 bool on = (matrix_get_row(x) & (1 << y)) > 0;
72
73 // force on for oled location
74 if((x == 0) && (y >= (MATRIX_COLS - 2))) on = 1;
75
71 oled_write_pixel(MATRIX_DISPLAY_X + y + y + 2, MATRIX_DISPLAY_Y + x + x + 2, on); 76 oled_write_pixel(MATRIX_DISPLAY_X + y + y + 2, MATRIX_DISPLAY_Y + x + x + 2, on);
72 oled_write_pixel(MATRIX_DISPLAY_X + y + y + 3, MATRIX_DISPLAY_Y + x + x + 2, on); 77 oled_write_pixel(MATRIX_DISPLAY_X + y + y + 3, MATRIX_DISPLAY_Y + x + x + 2, on);
73 oled_write_pixel(MATRIX_DISPLAY_X + y + y + 2, MATRIX_DISPLAY_Y + x + x + 3, on); 78 oled_write_pixel(MATRIX_DISPLAY_X + y + y + 2, MATRIX_DISPLAY_Y + x + x + 3, on);
@@ -85,12 +90,6 @@ void oled_task_user(void) {
85 oled_write_pixel(MATRIX_DISPLAY_X + 12, MATRIX_DISPLAY_Y+y, true); 90 oled_write_pixel(MATRIX_DISPLAY_X + 12, MATRIX_DISPLAY_Y+y, true);
86 } 91 }
87 92
88 // oled location
89 for (uint8_t x = 0; x < 6; x++) {
90 oled_write_pixel(MATRIX_DISPLAY_X + 5 + x, MATRIX_DISPLAY_Y + 2, true);
91 oled_write_pixel(MATRIX_DISPLAY_X + 5 + x, MATRIX_DISPLAY_Y + 3, true);
92 }
93
94 // bodge for layer number left hand side 93 // bodge for layer number left hand side
95 for (uint8_t y = 0; y < 8; y++) { 94 for (uint8_t y = 0; y < 8; y++) {
96 oled_write_pixel(95, 0 + y, true); 95 oled_write_pixel(95, 0 + y, true);
diff --git a/keyboards/hadron/ver3/ver3.c b/keyboards/hadron/ver3/ver3.c
index 7eabe5855..40bc57c20 100644
--- a/keyboards/hadron/ver3/ver3.c
+++ b/keyboards/hadron/ver3/ver3.c
@@ -41,7 +41,8 @@ oled_rotation_t oled_init_user(oled_rotation_t rotation) {
41 41
42__attribute__ ((weak)) 42__attribute__ ((weak))
43void oled_task_user(void) { 43void oled_task_user(void) {
44 oled_write_P(PSTR("LAYER "), false); 44 oled_write_P(PSTR("LAYER"), false);
45 oled_advance_char();
45 oled_write_char(get_highest_layer(layer_state) + 0x30, true); 46 oled_write_char(get_highest_layer(layer_state) + 0x30, true);
46 47
47 led_t led_state = host_keyboard_led_state(); 48 led_t led_state = host_keyboard_led_state();
@@ -71,6 +72,10 @@ void oled_task_user(void) {
71 for (uint8_t x = 0; x < MATRIX_ROWS; x++) { 72 for (uint8_t x = 0; x < MATRIX_ROWS; x++) {
72 for (uint8_t y = 0; y < MATRIX_COLS; y++) { 73 for (uint8_t y = 0; y < MATRIX_COLS; y++) {
73 bool on = (matrix_get_row(x) & (1 << y)) > 0; 74 bool on = (matrix_get_row(x) & (1 << y)) > 0;
75
76 // force on for oled location
77 if((x == 0) && (y >= (MATRIX_COLS - 3))) on = 1;
78
74 oled_write_pixel(MATRIX_DISPLAY_X + y + 2, MATRIX_DISPLAY_Y + x + 2, on); 79 oled_write_pixel(MATRIX_DISPLAY_X + y + 2, MATRIX_DISPLAY_Y + x + 2, on);
75 } 80 }
76 } 81 }
@@ -85,11 +90,6 @@ void oled_task_user(void) {
85 oled_write_pixel(MATRIX_DISPLAY_X + 19, MATRIX_DISPLAY_Y+y, true); 90 oled_write_pixel(MATRIX_DISPLAY_X + 19, MATRIX_DISPLAY_Y+y, true);
86 } 91 }
87 92
88 // oled location
89 for (uint8_t x = 0; x < 3; x++) {
90 oled_write_pixel(MATRIX_DISPLAY_X + 14 + x, MATRIX_DISPLAY_Y + 2, true);
91 }
92
93 // bodge for layer number left hand side 93 // bodge for layer number left hand side
94 for (uint8_t y = 0; y < 8; y++) { 94 for (uint8_t y = 0; y < 8; y++) {
95 oled_write_pixel(35, 0 + y, true); 95 oled_write_pixel(35, 0 + y, true);