Skip to content

Commit

Permalink
Change review qmk#1
Browse files Browse the repository at this point in the history
  • Loading branch information
Lefuneste83 committed Sep 7, 2024
1 parent c0d4c82 commit d360b52
Show file tree
Hide file tree
Showing 11 changed files with 127 additions and 285 deletions.
52 changes: 3 additions & 49 deletions keyboards/electronlab/klor/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,40 +24,23 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define I2C1_SCL_PIN GP3
#define I2C1_SDA_PIN GP2

// ┌─────────────────────────────────────────────────┐
// │ k e y m a t r i x │
// └─────────────────────────────────────────────────┘

#define MATRIX_ROWS 8
#define MATRIX_COLS 6
#define DEBOUNCE 5


// ┌─────────────────────────────────────────────────┐
// │ s p l i t c o m m u n i c a t i o n │
// └─────────────────────────────────────────────────┘

#define USE_SERIAL
#define SERIAL_USE_MULTI_TRANSACTION
#define SPLIT_USB_DETECT
//#define SPLIT_USB_DETECT

//Half Duplex communication
#define SERIAL_USART_TX_PIN GP1 // USART TX pin

//#define SERIAL_USART_TX_PIN GP1 // USART TX pin
//
//Full Duplex communication
//#define SERIAL_USART_TX_PIN GP4 // USART TX pin
//#define SERIAL_USART_RX_PIN GP1 // USART RX pin
//#define SERIAL_USART_FULL_DUPLEX
//#define SERIAL_USART_PIN_SWAP


// ┌─────────────────────────────────────────────────┐
// │ e n c o d e r s │
// └─────────────────────────────────────────────────┘

#define ENCODER_RESOLUTION { 2 }
#define ENCODER_RESOLUTIONS_RIGHT { 2 }

// ┌─────────────────────────────────────────────────┐
// │ o l e d s │
// └─────────────────────────────────────────────────┘
Expand All @@ -69,33 +52,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#endif


// ┌─────────────────────────────────────────────────┐
// │ r g b l e d s │
// └─────────────────────────────────────────────────┘

#define RGBLED_NUM 42
#define RGBLED_SPLIT { 21, 21 }
#define RGB_MATRIX_LED_COUNT RGBLED_NUM

#ifdef RGB_MATRIX_ENABLE
# define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_BREATHING
# define SPLIT_TRANSPORT_MIRROR true
# define DRIVER_LED_TOTAL 42 // Number of LEDs
# define RGB_MATRIX_SPLIT { 21, 21 }
# define RGB_MATRIX_TIMEOUT 120000
# define RGB_MATRIX_SLEEP
# define RGB_MATRIX_LED_FLUSH_LIMIT 16
# define RGB_MATRIX_MAXIMUM_BRIGHTNESS 255
# define RGB_MATRIX_STARTUP_HUE 299
# define RGB_MATRIX_DEFAULT_ON true
# define RGB_MATRIX_DEFAULT_SAT 255
# define RGB_MATRIX_DEFAULT_SPD 127
# define RGB_MATRIX_STARTUP_VAL RGB_MATRIX_MAXIMUM_BRIGHTNESS
# define RGB_DISABLE_WHEN_USB_SUSPENDED
# define RGB_MATRIX_KEYPRESSES
#endif


// ┌─────────────────────────────────────────────────┐
// │ a u d i o │
// └─────────────────────────────────────────────────┘
Expand All @@ -104,10 +60,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define AUDIO_PWM_CHANNEL RP2040_PWM_CHANNEL_B
#define AUDIO_STATE_TIMER GPTD4
#define AUDIO_PIN GP9
#define AUDIO_VOICES
#define AUDIO_DAC_SAMPLE_MAX 4095U
#define AUDIO_VOICE_DEFAULT butts_fader

#ifdef AUDIO_ENABLE
# define KLOR_SOUND W__NOTE(_DS0), W__NOTE(_DS1), H__NOTE(_DS2), H__NOTE(_DS3), Q__NOTE(_DS4), Q__NOTE(_DS5), E__NOTE(_DS6), E__NOTE(_DS7), S__NOTE(_DS8), Q__NOTE(_GS0)
# define STARTUP_SONG SONG(KLOR_SOUND)
Expand Down
18 changes: 16 additions & 2 deletions keyboards/electronlab/klor/glcdfont.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,19 @@
// This is the 'classic' fixed-space bitmap font for Adafruit_GFX since 1.0.
// See gfxfont.h for newer custom bitmap font info.
/*
Copyright 2024 ElectronLab
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

#pragma once

Expand Down
58 changes: 49 additions & 9 deletions keyboards/electronlab/klor/keyboard.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"diode_direction": "COL2ROW",
"encoder": {
"rotary": [
{"pin_a": "GP28", "pin_b": "GP29"}
{"pin_a": "GP28", "pin_b": "GP29", "resolution": 2}
]
},
"features": {
Expand All @@ -26,6 +26,14 @@
"pointing_device": false,
"rgb_matrix": true
},
"audio": {
"default": {
"on": true,
"clicky": true
},
"driver": "pwm_hardware",
"voices": true
},
"haptic": {
"driver": "drv2605l"
},
Expand Down Expand Up @@ -79,6 +87,14 @@
"splash": true,
"typing_heatmap": true
},
"default": {
"animation": "breathing",
"on": true,
"hue": 128,
"sat": 255,
"val": 255,
"speed": 128
},
"driver": "ws2812",
"layout": [
{"matrix": [0, 1], "x": 13, "y": 17, "flags": 4},
Expand Down Expand Up @@ -124,14 +140,31 @@
{"matrix": [7, 2], "x": 150, "y": 49, "flags": 1},
{"matrix": [7, 1], "x": 166, "y": 48, "flags": 1}
],
"split_count": [21, 21]
"split_count": [21, 21],
"led_flush_limit": 16,
"led_process_limit": 10,
"max_brightness": 255,
"react_on_keyup": false,
"sat_steps": 16,
"sleep": true,
"speed_steps": 16,
"timeout": 120000,
"val_steps": 16,
"hue_steps": 3
},
"split": {
"enabled": true,
"bootmagic": {
"matrix": [4, 1]
},
"serial": {
"driver": "vendor",
"pin": "GP1"
},
"encoder": {
"right": {
"rotary": [
{"pin_a": "GP29", "pin_b": "GP28"}
{"pin_a": "GP29", "pin_b": "GP28", "resolution": 2}
]
}
},
Expand All @@ -146,7 +179,10 @@
"modifiers": true,
"oled": true
}
}
},
"usb_detect": {
"enabled": true
},
},
"url": "https://github.com/Lefuneste83/KLOR",
"usb": {
Expand All @@ -155,10 +191,14 @@
"vid": "0x3A3C"
},
"ws2812": {
"pin": "GP0"
"pin": "GP0",
"driver": "vendor"
},
"layout_aliases": {
"LAYOUT_all": "LAYOUT_polydactyl"
},
"layouts": {
"LAYOUT_konrad": {
"LAYOUT_polydactyl": {
"layout": [
{"label": "L01", "matrix": [0, 1], "x": 1, "y": 0},
{"label": "L02", "matrix": [0, 2], "x": 2, "y": 0},
Expand Down Expand Up @@ -199,12 +239,14 @@
{"label": "L31", "matrix": [3, 1], "x": 2, "y": 3},
{"label": "L32", "matrix": [3, 2], "x": 3, "y": 3},
{"label": "L33", "matrix": [3, 3], "x": 4, "y": 3},
{"label": "L34", "matrix": [3, 4], "x": 5, "y": 3},
{"label": "R31", "matrix": [7, 4], "x": 9, "y": 3},
{"label": "R32", "matrix": [7, 3], "x": 10, "y": 3},
{"label": "R33", "matrix": [7, 2], "x": 11, "y": 3},
{"label": "R34", "matrix": [7, 1], "x": 12, "y": 3}
]
},
"LAYOUT_polydactyl": {
"LAYOUT_konrad": {
"layout": [
{"label": "L01", "matrix": [0, 1], "x": 1, "y": 0},
{"label": "L02", "matrix": [0, 2], "x": 2, "y": 0},
Expand Down Expand Up @@ -245,8 +287,6 @@
{"label": "L31", "matrix": [3, 1], "x": 2, "y": 3},
{"label": "L32", "matrix": [3, 2], "x": 3, "y": 3},
{"label": "L33", "matrix": [3, 3], "x": 4, "y": 3},
{"label": "L34", "matrix": [3, 4], "x": 5, "y": 3},
{"label": "R31", "matrix": [7, 4], "x": 9, "y": 3},
{"label": "R32", "matrix": [7, 3], "x": 10, "y": 3},
{"label": "R33", "matrix": [7, 2], "x": 11, "y": 3},
{"label": "R34", "matrix": [7, 1], "x": 12, "y": 3}
Expand Down
14 changes: 1 addition & 13 deletions keyboards/electronlab/klor/keymaps/default/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

#pragma once

/* The way how "handedness" is decided (which half is which),
Expand All @@ -35,13 +36,6 @@ for more options.
#define AUTO_SHIFT_TIMEOUT TAPPING_TERM
#define AUTO_SHIFT_NO_SETUP

#undef LOCKING_SUPPORT_ENABLE
#undef LOCKING_RESYNC_ENABLE
#define NO_ACTION_ONESHOT
//#define NO_ACTION_TAPPING
//#define NO_MUSIC_MODE

#define COMBO_COUNT 25
// RGB matrix support
#ifdef RGB_MATRIX_ENABLE
// RGB Matrix Animation modes. Explicitly enabled
Expand Down Expand Up @@ -96,12 +90,6 @@ for more options.
# define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH
#endif

// Bootmagic support
# define BOOTMAGIC_ROW 0
# define BOOTMAGIC_COLUMN 1
# define BOOTMAGIC_ROW_RIGHT 4
# define BOOTMAGIC_COLUMN_RIGHT 1

// Haptic support
#ifdef HAPTIC_ENABLE
//# define NO_HAPTIC_ALPHA
Expand Down
Loading

0 comments on commit d360b52

Please sign in to comment.