Skip to content

Commit

Permalink
Revert "Fixup boardsource/equals (qmk#23106)"
Browse files Browse the repository at this point in the history
This reverts commit 35602bc.
  • Loading branch information
fpb committed Feb 20, 2024
1 parent 12450d7 commit 29bc2d8
Show file tree
Hide file tree
Showing 8 changed files with 191 additions and 93 deletions.
47 changes: 47 additions & 0 deletions keyboards/boardsource/equals/48/info.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,53 @@
"pin": "GP21"
},
"rgb_matrix": {
"driver": "ws2812",
"max_brightness": 150,
"animations": {
"alphas_mods": true,
"band_pinwheel_sat": true,
"band_pinwheel_val": true,
"band_sat": true,
"band_spiral_sat": true,
"band_spiral_val": true,
"band_val": true,
"breathing": true,
"cycle_all": true,
"cycle_left_right": true,
"cycle_out_in": true,
"cycle_out_in_dual": true,
"cycle_pinwheel": true,
"cycle_spiral": true,
"cycle_up_down": true,
"digital_rain": true,
"dual_beacon": true,
"gradient_left_right": true,
"gradient_up_down": true,
"hue_breathing": true,
"hue_pendulum": true,
"hue_wave": true,
"jellybean_raindrops": true,
"multisplash": true,
"pixel_flow": true,
"pixel_fractal": true,
"pixel_rain": true,
"rainbow_beacon": true,
"rainbow_moving_chevron": true,
"rainbow_pinwheels": true,
"raindrops": true,
"solid_multisplash": true,
"solid_reactive": true,
"solid_reactive_cross": true,
"solid_reactive_multicross": true,
"solid_reactive_multinexus": true,
"solid_reactive_multiwide": true,
"solid_reactive_nexus": true,
"solid_reactive_simple": true,
"solid_reactive_wide": true,
"solid_splash": true,
"splash": true,
"typing_heatmap": true
},
"layout": [
{ "flags": 2, "x": 220, "y": 17 },
{ "flags": 2, "x": 172, "y": 17 },
Expand Down
47 changes: 47 additions & 0 deletions keyboards/boardsource/equals/60/info.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,53 @@
"pin": "GP21"
},
"rgb_matrix": {
"driver": "ws2812",
"max_brightness": 150,
"animations": {
"alphas_mods": true,
"band_pinwheel_sat": true,
"band_pinwheel_val": true,
"band_sat": true,
"band_spiral_sat": true,
"band_spiral_val": true,
"band_val": true,
"breathing": true,
"cycle_all": true,
"cycle_left_right": true,
"cycle_out_in": true,
"cycle_out_in_dual": true,
"cycle_pinwheel": true,
"cycle_spiral": true,
"cycle_up_down": true,
"digital_rain": true,
"dual_beacon": true,
"gradient_left_right": true,
"gradient_up_down": true,
"hue_breathing": true,
"hue_pendulum": true,
"hue_wave": true,
"jellybean_raindrops": true,
"multisplash": true,
"pixel_flow": true,
"pixel_fractal": true,
"pixel_rain": true,
"rainbow_beacon": true,
"rainbow_moving_chevron": true,
"rainbow_pinwheels": true,
"raindrops": true,
"solid_multisplash": true,
"solid_reactive": true,
"solid_reactive_cross": true,
"solid_reactive_multicross": true,
"solid_reactive_multinexus": true,
"solid_reactive_multiwide": true,
"solid_reactive_nexus": true,
"solid_reactive_simple": true,
"solid_reactive_wide": true,
"solid_splash": true,
"splash": true,
"typing_heatmap": true
},
"layout": [
{ "flags": 2, "x": 220, "y": 17 },
{ "flags": 2, "x": 172, "y": 17 },
Expand Down
47 changes: 47 additions & 0 deletions keyboards/boardsource/equals/avr/info.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,53 @@
"pin": "C6"
},
"rgb_matrix": {
"driver": "ws2812",
"max_brightness": 150,
"animations": {
"alphas_mods": true,
"band_pinwheel_sat": true,
"band_pinwheel_val": true,
"band_sat": true,
"band_spiral_sat": true,
"band_spiral_val": true,
"band_val": true,
"breathing": true,
"cycle_all": true,
"cycle_left_right": true,
"cycle_out_in": true,
"cycle_out_in_dual": true,
"cycle_pinwheel": true,
"cycle_spiral": true,
"cycle_up_down": true,
"digital_rain": true,
"dual_beacon": true,
"gradient_left_right": true,
"gradient_up_down": true,
"hue_breathing": true,
"hue_pendulum": true,
"hue_wave": true,
"jellybean_raindrops": true,
"multisplash": true,
"pixel_flow": true,
"pixel_fractal": true,
"pixel_rain": true,
"rainbow_beacon": true,
"rainbow_moving_chevron": true,
"rainbow_pinwheels": true,
"raindrops": true,
"solid_multisplash": true,
"solid_reactive": true,
"solid_reactive_cross": true,
"solid_reactive_multicross": true,
"solid_reactive_multinexus": true,
"solid_reactive_multiwide": true,
"solid_reactive_nexus": true,
"solid_reactive_simple": true,
"solid_reactive_wide": true,
"solid_splash": true,
"splash": true,
"typing_heatmap": true
},
"layout": [
{ "flags": 2, "x": 220, "y": 17 },
{ "flags": 2, "x": 172, "y": 17 },
Expand Down
1 change: 0 additions & 1 deletion keyboards/boardsource/equals/avr/rules.mk

This file was deleted.

46 changes: 5 additions & 41 deletions keyboards/boardsource/equals/equals.c
Original file line number Diff line number Diff line change
@@ -1,54 +1,18 @@
// Copyright 2023 @boardsource
// SPDX-License-Identifier: GPL-2.0-or-later

#include "quantum.h"
__attribute__((weak)) void ui_init(void) {};
__attribute__((weak)) void ui_task(void) {};

#ifdef QUANTUM_PAINTER_ENABLE
#include "qp.h"
#include "qp_st7735.h"
#include "graphics/thintel15.qff.c"

static painter_device_t oled;
static painter_font_handle_t font;

__attribute__((weak)) void ui_init(void) {
oled = qp_st7735_make_spi_device(128, 160, OLED_CS_PIN, OLED_DC_PIN, OLED_RST_PIN, 8, 0);
font = qp_load_font_mem(font_thintel15);
qp_init(oled, QP_ROTATION_0);
qp_rect(oled, 0, 0, 130, 162, 0, 0, 0, true);
qp_rect(oled, 20, 20, 108, 60, 55, 55, 55, true);
qp_rect(oled, 20, 80, 108, 120, 55, 55, 55, true);
qp_flush(oled);
}

__attribute__((weak)) void ui_task(void) {
static const char *text = "Layer:";
int16_t width = qp_textwidth(font, text);
qp_drawtext(oled, 20, 140, font, text);

switch (get_highest_layer(layer_state)) {
case 0:
qp_drawtext(oled, (20 + width), 140, font, "QWERTY");
break;
case 1:
qp_drawtext(oled, (20 + width), 140, font, "SYMBOL");
break;
case 2:
qp_drawtext(oled, (20 + width), 140, font, "NUMBER");
break;
default:
qp_drawtext(oled, (20 + width), 140, font, "_PANIC_");
break;
}
}

void keyboard_post_init_kb(void) {
// Init the display
ui_init();
keyboard_post_init_user();
}

void housekeeping_task_kb(void) {
// Draw the display
ui_task();
housekeeping_task_user();
}
#endif // QUANTUM_PAINTER_ENABLE
#endif //QUANTUM_PAINTER_ENABLE
54 changes: 4 additions & 50 deletions keyboards/boardsource/equals/info.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,64 +4,18 @@
"diode_direction": "COL2ROW",
"features": {
"bootmagic": true,
"command": false,
"console": false,
"extrakey": true,
"mousekey": true,
"nkro": true,
"rgb_matrix": true
},
"url": "",
"usb": {
"device_version": "1.0.0",
"pid": "0x7688",
"vid": "0x4273"
},
"rgb_matrix": {
"driver": "ws2812",
"max_brightness": 150,
"sleep": true,
"animations": {
"alphas_mods": true,
"band_pinwheel_sat": true,
"band_pinwheel_val": true,
"band_sat": true,
"band_spiral_sat": true,
"band_spiral_val": true,
"band_val": true,
"breathing": true,
"cycle_all": true,
"cycle_left_right": true,
"cycle_out_in": true,
"cycle_out_in_dual": true,
"cycle_pinwheel": true,
"cycle_spiral": true,
"cycle_up_down": true,
"digital_rain": true,
"dual_beacon": true,
"gradient_left_right": true,
"gradient_up_down": true,
"hue_breathing": true,
"hue_pendulum": true,
"hue_wave": true,
"jellybean_raindrops": true,
"multisplash": true,
"pixel_flow": true,
"pixel_fractal": true,
"pixel_rain": true,
"rainbow_beacon": true,
"rainbow_moving_chevron": true,
"rainbow_pinwheels": true,
"raindrops": true,
"solid_multisplash": true,
"solid_reactive": true,
"solid_reactive_cross": true,
"solid_reactive_multicross": true,
"solid_reactive_multinexus": true,
"solid_reactive_multiwide": true,
"solid_reactive_nexus": true,
"solid_reactive_simple": true,
"solid_reactive_wide": true,
"solid_splash": true,
"splash": true,
"typing_heatmap": true
}
}

}
2 changes: 1 addition & 1 deletion keyboards/boardsource/equals/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
![equals](https://i.imgur.com/c3adFqsh.jpeg)

* Keyboard Maintainer: [Cole Smith](https://github.com/boardsource)
* Hardware Supported: Equals PCB w/ RP2040 or Equals Kit w/ Pro Micro
* Hardware Supported: Equals PCB w/ RP2040
* Hardware Availability: [boardsource](https://boardsource.xyz)

Make example for this keyboard (after setting up your build environment):
Expand Down
40 changes: 40 additions & 0 deletions keyboards/boardsource/equals/ui.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
// Copyright 2023 Cole Smith (@boardsource)
// SPDX-License-Identifier: GPL-2.0-or-later
#include <stdio.h>
#include "qp.h"
#include "qp_st7735.h"
#include "graphics/thintel15.qff.c"

static painter_device_t oled;
static painter_font_handle_t font;

__attribute__((weak)) void ui_init(void) {
oled = qp_st7735_make_spi_device(128, 160, OLED_CS_PIN, OLED_DC_PIN, OLED_RST_PIN, 8, 0);
font = qp_load_font_mem(font_thintel15);
qp_init(oled, QP_ROTATION_0);
qp_rect(oled, 0, 0, 130, 162, 0, 0, 0, true);
qp_rect(oled, 20, 20, 108, 60, 55, 55, 55, true);
qp_rect(oled, 20, 80, 108, 120, 55, 55, 55, true);
qp_flush(oled);
}

__attribute__((weak)) void ui_task(void) {
static const char *text = "Layer:";
int16_t width = qp_textwidth(font, text);
qp_drawtext(oled, 20, 140, font, text);

switch (get_highest_layer(layer_state)) {
case 0:
qp_drawtext(oled, (20 + width), 140, font, "QWERTY");
break;
case 1:
qp_drawtext(oled, (20 + width), 140, font, "SYMBOL");
break;
case 2:
qp_drawtext(oled, (20 + width), 140, font, "NUMBER");
break;
default:
qp_drawtext(oled, (20 + width), 140, font, "_PANIC_");
break;
}
}

0 comments on commit 29bc2d8

Please sign in to comment.