Skip to content

Commit

Permalink
Merge branch 'develop' into rgb-matrix-naming-cleanups
Browse files Browse the repository at this point in the history
  • Loading branch information
fauxpark authored Aug 22, 2023
2 parents 2053979 + dfb6d38 commit 607e086
Show file tree
Hide file tree
Showing 695 changed files with 12,569 additions and 4,913 deletions.
18 changes: 8 additions & 10 deletions builddefs/common_features.mk
Original file line number Diff line number Diff line change
Expand Up @@ -317,14 +317,10 @@ ifneq ($(strip $(FLASH_DRIVER)), none)
endif

RGBLIGHT_ENABLE ?= no
VALID_RGBLIGHT_TYPES := WS2812 APA102 custom

ifeq ($(strip $(RGBLIGHT_CUSTOM_DRIVER)), yes)
RGBLIGHT_DRIVER ?= custom
endif
VALID_RGBLIGHT_TYPES := ws2812 apa102 custom

ifeq ($(strip $(RGBLIGHT_ENABLE)), yes)
RGBLIGHT_DRIVER ?= WS2812
RGBLIGHT_DRIVER ?= ws2812

ifeq ($(filter $(RGBLIGHT_DRIVER),$(VALID_RGBLIGHT_TYPES)),)
$(call CATASTROPHIC_ERROR,Invalid RGBLIGHT_DRIVER,RGBLIGHT_DRIVER="$(RGBLIGHT_DRIVER)" is not a valid RGB type)
Expand All @@ -338,11 +334,11 @@ ifeq ($(strip $(RGBLIGHT_ENABLE)), yes)
RGB_KEYCODES_ENABLE := yes
endif

ifeq ($(strip $(RGBLIGHT_DRIVER)), WS2812)
ifeq ($(strip $(RGBLIGHT_DRIVER)), ws2812)
WS2812_DRIVER_REQUIRED := yes
endif

ifeq ($(strip $(RGBLIGHT_DRIVER)), APA102)
ifeq ($(strip $(RGBLIGHT_DRIVER)), apa102)
APA102_DRIVER_REQUIRED := yes
endif

Expand All @@ -367,6 +363,7 @@ endif
COMMON_VPATH += $(QUANTUM_DIR)/led_matrix
COMMON_VPATH += $(QUANTUM_DIR)/led_matrix/animations
COMMON_VPATH += $(QUANTUM_DIR)/led_matrix/animations/runners
POST_CONFIG_H += $(QUANTUM_DIR)/led_matrix/post_config.h
SRC += $(QUANTUM_DIR)/process_keycode/process_backlight.c
SRC += $(QUANTUM_DIR)/led_matrix/led_matrix.c
SRC += $(QUANTUM_DIR)/led_matrix/led_matrix_drivers.c
Expand Down Expand Up @@ -432,6 +429,7 @@ endif
COMMON_VPATH += $(QUANTUM_DIR)/rgb_matrix
COMMON_VPATH += $(QUANTUM_DIR)/rgb_matrix/animations
COMMON_VPATH += $(QUANTUM_DIR)/rgb_matrix/animations/runners
POST_CONFIG_H += $(QUANTUM_DIR)/rgb_matrix/post_config.h
SRC += $(QUANTUM_DIR)/color.c
SRC += $(QUANTUM_DIR)/rgb_matrix/rgb_matrix.c
SRC += $(QUANTUM_DIR)/rgb_matrix/rgb_matrix_drivers.c
Expand Down Expand Up @@ -747,8 +745,8 @@ ifeq ($(strip $(HD44780_ENABLE)), yes)
SRC += hd44780.c
endif

VALID_OLED_DRIVER_TYPES := SSD1306 custom
OLED_DRIVER ?= SSD1306
VALID_OLED_DRIVER_TYPES := custom ssd1306
OLED_DRIVER ?= ssd1306
VALID_OLED_TRANSPORT_TYPES := i2c spi custom
OLED_TRANSPORT ?= i2c
ifeq ($(strip $(OLED_ENABLE)), yes)
Expand Down
2 changes: 1 addition & 1 deletion builddefs/show_options.mk
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ HARDWARE_OPTION_NAMES = \
BACKLIGHT_ENABLE \
BACKLIGHT_DRIVER \
RGBLIGHT_ENABLE \
RGBLIGHT_CUSTOM_DRIVER \
RGBLIGHT_DRIVER \
RGB_MATRIX_ENABLE \
RGB_MATRIX_DRIVER \
CIE1931_CURVE \
Expand Down
1 change: 1 addition & 0 deletions data/mappings/info_rules.hjson
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
"PS2_ENABLE": {"info_key": "ps2.enabled", "value_type": "bool"},
"PS2_MOUSE_ENABLE": {"info_key": "ps2.mouse_enabled", "value_type": "bool"},
"RGB_MATRIX_DRIVER": {"info_key": "rgb_matrix.driver"},
"RGBLIGHT_DRIVER": {"info_key": "rgblight.driver"},
"SECURE_ENABLE": {"info_key": "secure.enabled", "value_type": "bool"},
"SPLIT_KEYBOARD": {"info_key": "split.enabled", "value_type": "bool"},
"SPLIT_TRANSPORT": {"info_key": "split.transport.protocol", "to_c": false},
Expand Down
66 changes: 5 additions & 61 deletions data/mappings/keyboard_aliases.hjson
Original file line number Diff line number Diff line change
@@ -1,13 +1,9 @@
{
// Format for each entry:
// "<alias>": {
// "target": "<keyboard_folder>",
// "layouts": {
// "<layout_alias>": "<layout_target>"
// }
// "target": "<keyboard_folder>"
// }
//
// Both target and layouts are optional.
"2_milk": {
"target": "spaceman/2_milk"
},
Expand Down Expand Up @@ -140,21 +136,6 @@
"daisy": {
"target": "ktec/daisy"
},
"doro67/multi": {
"layouts": {
"LAYOUT_ansi": "LAYOUT_65_ansi_blocker"
}
},
"doro67/regular": {
"layouts": {
"LAYOUT": "LAYOUT_65_ansi_blocker"
}
},
"doro67/rgb": {
"layouts": {
"LAYOUT": "LAYOUT_65_ansi_blocker"
}
},
"drakon": {
"target": "jagdpietr/drakon"
},
Expand Down Expand Up @@ -285,10 +266,7 @@
"target": "keyhive/honeycomb"
},
"idb_60": {
"target": "idb/idb_60",
"layouts": {
"LAYOUT": "LAYOUT_all"
}
"target": "idb/idb_60"
},
"idobo": {
"target": "idobao/id75"
Expand All @@ -309,19 +287,13 @@
"target": "jones/v03_1"
},
"kamigakushi": {
"target": "jaykeeb/kamigakushi",
"layouts": {
"LAYOUT": "LAYOUT_65_ansi_blocker_tsangan"
}
"target": "jaykeeb/kamigakushi"
},
"katana60": {
"target": "rominronin/katana60/rev1"
},
"kbdfans/kbd67mkiirgb": {
"target": "kbdfans/kbd67/mkiirgb",
"layouts": {
"LAYOUT": "LAYOUT_65_ansi_blocker"
}
"target": "kbdfans/kbd67/mkiirgb"
},
"kbdfans/kbd67/mkiirgb": {
"target": "kbdfans/kbd67/mkiirgb/v1"
Expand Down Expand Up @@ -467,11 +439,6 @@
"mschwingen/modelm": {
"target": "ibm/model_m/mschwingen"
},
"noxary/268_2": {
"layouts": {
"LAYOUT": "LAYOUT_65_ansi_blocker"
}
},
"oddball": {
"target": "oddball/v1"
},
Expand All @@ -496,11 +463,6 @@
"peiorisboards/ixora": {
"target": "coarse/ixora"
},
"percent/canoe": {
"layouts": {
"LAYOUT_iso": "LAYOUT_65_iso_blocker"
}
},
"plaid": {
"target": "dm9records/plaid"
},
Expand All @@ -513,21 +475,6 @@
"polilla": {
"target": "polilla/rev1"
},
"preonic/rev1": {
"layouts": {
"LAYOUT_preonic_grid": "LAYOUT_ortho_5x12"
}
},
"preonic/rev2": {
"layouts": {
"LAYOUT_preonic_grid": "LAYOUT_ortho_5x12"
}
},
"preonic/rev3": {
"layouts": {
"LAYOUT_preonic_grid": "LAYOUT_ortho_5x12"
}
},
"primekb/prime_l": {
"target": "primekb/prime_l/v1"
},
Expand Down Expand Up @@ -619,10 +566,7 @@
"target": "underscore33/rev1"
},
"vinta": {
"target": "coarse/vinta",
"layouts": {
"LAYOUT_67_ansi": "LAYOUT_65_ansi_blocker"
}
"target": "coarse/vinta"
},
"wasdat": {
"target": "maartenwut/wasdat"
Expand Down
4 changes: 4 additions & 0 deletions data/schemas/keyboard.jsonschema
Original file line number Diff line number Diff line change
Expand Up @@ -477,6 +477,10 @@
}
},
"brightness_steps": {"$ref": "qmk.definitions.v1#/unsigned_int"},
"driver": {
"type": "string",
"enum": ["apa102", "custom", "ws2812"]
},
"hue_steps": {"$ref": "qmk.definitions.v1#/unsigned_int"},
"layers": {
"type": "object",
Expand Down
1 change: 1 addition & 0 deletions docs/contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ Most of our style is pretty easy to pick up on. If you are familiar with either

We have a few different types of changes in QMK, each requiring a different level of rigor. We'd like you to keep the following guidelines in mind no matter what type of change you're making.

* **Before you contribute:** Please make sure your fork is up to date with the upstream `qmk_firmware` repo. This will help minimize CI failures that may not occur for you when compiling locally.
* Separate PRs into logical units. For example, do not submit one PR covering two separate features, instead submit a separate PR for each feature.
* Check for unnecessary whitespace with `git diff --check` before committing.
* Make sure your code change actually compiles.
Expand Down
26 changes: 13 additions & 13 deletions docs/feature_haptic_feedback.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,29 +94,29 @@ This driver supports 2 different feedback motors. Set the following in your `con
Eccentric Rotating Mass vibration motors (ERM) is motor with a off-set weight attached so when drive signal is attached, the off-set weight spins and causes a sinusoidal wave that translate into vibrations.

```c
#define FB_ERM_LRA 0
#define FB_BRAKEFACTOR 3 /* For 1x:0, 2x:1, 3x:2, 4x:3, 6x:4, 8x:5, 16x:6, Disable Braking:7 */
#define FB_LOOPGAIN 1 /* For Low:0, Medium:1, High:2, Very High:3 */
#define DRV2605L_FB_ERM_LRA 0
#define DRV2605L_FB_BRAKEFACTOR 3 /* For 1x:0, 2x:1, 3x:2, 4x:3, 6x:4, 8x:5, 16x:6, Disable Braking:7 */
#define DRV2605L_FB_LOOPGAIN 1 /* For Low:0, Medium:1, High:2, Very High:3 */

/* Please refer to your datasheet for the optimal setting for your specific motor. */
#define RATED_VOLTAGE 3
#define V_PEAK 5
#define DRV2605L_RATED_VOLTAGE 3
#define DRV2605L_V_PEAK 5
```
##### LRA
Linear resonant actuators (LRA, also know as a linear vibrator) works different from a ERM. A LRA has a weight and magnet suspended by springs and a voice coil. When the drive signal is applied, the weight would be vibrate on a single axis (side to side or up and down). Since the weight is attached to a spring, there is a resonance effect at a specific frequency. This frequency is where the LRA will operate the most efficiently. Refer to the motor's datasheet for the recommanded range for this frequency.
```c
#define FB_ERM_LRA 1
#define FB_BRAKEFACTOR 3 /* For 1x:0, 2x:1, 3x:2, 4x:3, 6x:4, 8x:5, 16x:6, Disable Braking:7 */
#define FB_LOOPGAIN 1 /* For Low:0, Medium:1, High:2, Very High:3 */
#define DRV2605L_FB_ERM_LRA 1
#define DRV2605L_FB_BRAKEFACTOR 3 /* For 1x:0, 2x:1, 3x:2, 4x:3, 6x:4, 8x:5, 16x:6, Disable Braking:7 */
#define DRV2605L_FB_LOOPGAIN 1 /* For Low:0, Medium:1, High:2, Very High:3 */
/* Please refer to your datasheet for the optimal setting for your specific motor. */
#define RATED_VOLTAGE 2
#define V_PEAK 2.8
#define V_RMS 2.0
#define V_PEAK 2.1
#define F_LRA 205 /* resonance freq */
#define DRV2605L_RATED_VOLTAGE 2
#define DRV2605L_V_PEAK 2.8
#define DRV2605L_V_RMS 2.0
#define DRV2605L_V_PEAK 2.1
#define DRV2605L_F_LRA 205 /* resonance freq */
```

#### DRV2605L waveform library
Expand Down
12 changes: 3 additions & 9 deletions docs/feature_led_matrix.md
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,6 @@ enum led_matrix_effects {
LED_MATRIX_CYCLE_UP_DOWN, // Full gradient scrolling top to bottom
LED_MATRIX_CYCLE_OUT_IN, // Full gradient scrolling out to in
LED_MATRIX_DUAL_BEACON, // Full gradient spinning around center of keyboard
#if defined(LED_MATRIX_KEYPRESSES) || defined(LED_MATRIX_KEYRELEASES)
LED_MATRIX_SOLID_REACTIVE_SIMPLE, // Pulses keys hit then fades out
LED_MATRIX_SOLID_REACTIVE_WIDE // Value pulses near a single key hit then fades out
LED_MATRIX_SOLID_REACTIVE_MULTIWIDE // Value pulses near multiple key hits then fades out
Expand All @@ -257,7 +256,6 @@ enum led_matrix_effects {
LED_MATRIX_SOLID_REACTIVE_MULTINEXUS // Value pulses away on the same column and row of multiple key hits then fades out
LED_MATRIX_SOLID_SPLASH, // Value pulses away from a single key hit then fades out
LED_MATRIX_SOLID_MULTISPLASH, // Value pulses away from multiple key hits then fades out
#endif
LED_MATRIX_WAVE_LEFT_RIGHT // Sine wave scrolling from left to right
LED_MATRIX_WAVE_UP_DOWN // Sine wave scrolling from up to down
LED_MATRIX_EFFECT_MAX
Expand All @@ -281,8 +279,6 @@ You can enable a single effect by defining `ENABLE_[EFFECT_NAME]` in your `confi
|`#define ENABLE_LED_MATRIX_WAVE_LEFT_RIGHT` |Enables `LED_MATRIX_WAVE_LEFT_RIGHT` |
|`#define ENABLE_LED_MATRIX_WAVE_UP_DOWN` |Enables `LED_MATRIX_WAVE_UP_DOWN` |

?> These modes don't require any additional defines.

|Reactive Defines |Description |
|-------------------------------------------------------|----------------------------------------------|
|`#define ENABLE_LED_MATRIX_SOLID_REACTIVE_SIMPLE` |Enables `LED_MATRIX_SOLID_REACTIVE_SIMPLE` |
Expand All @@ -295,7 +291,7 @@ You can enable a single effect by defining `ENABLE_[EFFECT_NAME]` in your `confi
|`#define ENABLE_LED_MATRIX_SOLID_SPLASH` |Enables `LED_MATRIX_SOLID_SPLASH` |
|`#define ENABLE_LED_MATRIX_SOLID_MULTISPLASH` |Enables `LED_MATRIX_SOLID_MULTISPLASH` |

?> These modes also require the `LED_MATRIX_KEYPRESSES` or `LED_MATRIX_KEYRELEASES` define to be available.
?> These modes introduce additional logic that can increase firmware size.

## Custom LED Matrix Effects :id=custom-led-matrix-effects

Expand Down Expand Up @@ -361,9 +357,7 @@ For inspiration and examples, check out the built-in effects under `quantum/led_
## Additional `config.h` Options :id=additional-configh-options

```c
#define LED_MATRIX_KEYPRESSES // reacts to keypresses
#define LED_MATRIX_KEYRELEASES // reacts to keyreleases (instead of keypresses)
#define LED_MATRIX_FRAMEBUFFER_EFFECTS // enable framebuffer effects
#define LED_MATRIX_KEYRELEASES // reactive effects respond to keyreleases (instead of keypresses)
#define LED_MATRIX_TIMEOUT 0 // number of milliseconds to wait until led automatically turns off
#define LED_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended
#define LED_MATRIX_LED_PROCESS_LIMIT (LED_MATRIX_LED_COUNT + 4) / 5 // limits the number of LEDs to process in an animation per task run (increases keyboard responsiveness)
Expand All @@ -373,7 +367,7 @@ For inspiration and examples, check out the built-in effects under `quantum/led_
#define LED_MATRIX_DEFAULT_VAL LED_MATRIX_MAXIMUM_BRIGHTNESS // Sets the default brightness value, if none has been set
#define LED_MATRIX_DEFAULT_SPD 127 // Sets the default animation speed, if none has been set
#define LED_MATRIX_SPLIT { X, Y } // (Optional) For split keyboards, the number of LEDs connected on each half. X = left, Y = Right.
// If LED_MATRIX_KEYPRESSES or LED_MATRIX_KEYRELEASES is enabled, you also will want to enable SPLIT_TRANSPORT_MIRROR
// If reactive effects are enabled, you also will want to enable SPLIT_TRANSPORT_MIRROR
```
## EEPROM storage :id=eeprom-storage
Expand Down
8 changes: 4 additions & 4 deletions docs/feature_oled_driver.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,17 +29,17 @@ OLED_ENABLE = yes

|OLED Driver |Supported Device |
|-------------------|------------------------------------|
|SSD1306 (default) |For both SSD1306, SH1106, and SH1107|
|`ssd1306` (default)|For both SSD1306, SH1106, and SH1107|

e.g.
```make
OLED_DRIVER = SSD1306
OLED_DRIVER = ssd1306
```

|OLED Transport | |
|---------------|------------------------------------------------|
|i2c (default) | Uses I2C for communication with the OLED panel |
|spi | Uses SPI for communication with the OLED panel |
|`i2c` (default)| Uses I2C for communication with the OLED panel |
|`spi` | Uses SPI for communication with the OLED panel |

e.g.
```make
Expand Down
Loading

0 comments on commit 607e086

Please sign in to comment.