Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master'
Browse files Browse the repository at this point in the history
* upstream/master: (73 commits)
  [Keyboard] Add Kalakos Bahrnob65 (qmk#20424)
  Tidy up stray RGB_DISABLE_TIMEOUT references (qmk#20460)
  [Keyboard] Add zoom75 wired (qmk#20396)
  [Keyboard] Add dymium65 (qmk#20257)
  Lotus58 glow (qmk#20386)
  ADPenrose Obi Layout Macro Conversion and Addition (qmk#20445)
  Add hardware information momokai keyboards (qmk#20434)
  4pplet/eagle_viper_rep/rev_a Layout Macro Conversion and Additions (qmk#20414)
  [Keymap] Add paulomp90 lily58 keymap (qmk#20327)
  [Keymap] Add personal keymap for Lily58 (qmk#18735)
  [Keyboard] Fix h87 g2 VID conflict (qmk#20388)
  [Keymap] PHSC138 Keymap for Atom47 (qmk#18768)
  [Keyboard] add kb2040 flavor of gherkin (qmk#18360)
  [Keyboard] ymdk/id75 (qmk#19967)
  fixing bug that caused KC_DEL and KC_MUTE (encoder press) to be swapped (qmk#20420)
  4pplet/bootleg/rev_a Layout Macro Conversion and Addition (qmk#20400)
  4pplet/aekiso60 Layout Macro Conversion and Additions (qmk#20399)
  Reject info.json at keymap level (qmk#20408)
  Bump anothrNick/github-tag-action from 1.61.0 to 1.62.0 (qmk#20407)
  [Keyboard] Update angle65 VID/PID (qmk#20401)
  ...
  • Loading branch information
sudish committed Apr 16, 2023
2 parents 2d2343c + 697f53a commit 4130864
Show file tree
Hide file tree
Showing 479 changed files with 33,015 additions and 4,358 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/auto_tag.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
fetch-depth: 0

- name: Bump version and push tag
uses: anothrNick/github-tag-action@1.61.0
uses: anothrNick/github-tag-action@1.62.0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
DEFAULT_BUMP: 'patch'
28 changes: 21 additions & 7 deletions .github/workflows/ci_builds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,27 @@ permissions:
contents: read

on:
push:
branches: [master, develop]
workflow_dispatch:
schedule:
- cron: '0 0,12 * * *'
inputs:
branch:
type: choice
description: 'Branch to build'
options: [master, develop]

concurrency: ci_build-${{ github.event.inputs.branch || github.ref_name }}

jobs:
ci_builds:
if: github.repository == 'qmk/qmk_firmware'
name: "CI Build"
runs-on: self-hosted
timeout-minutes: 1380

if: github.repository == 'qmk/qmk_firmware'

strategy:
fail-fast: false
matrix:
branch: [master, develop]
keymap: [default, via]

container: qmkfm/qmk_cli
Expand All @@ -31,7 +36,7 @@ jobs:
- uses: actions/checkout@v3
with:
submodules: recursive
ref: ${{ matrix.branch }}
ref: ${{ github.event.inputs.branch || github.ref }}

- name: Install dependencies
run: pip3 install -r requirements.txt
Expand All @@ -51,10 +56,19 @@ jobs:
uses: actions/upload-artifact@v3
if: always()
with:
name: artifacts-${{ matrix.branch }}-${{ matrix.keymap }}
name: artifacts-${{ github.event.inputs.branch || github.ref_name }}-${{ matrix.keymap }}
if-no-files-found: ignore
path: |
*.bin
*.hex
*.uf2
.build/failed.*
- name: 'CI Discord Notification'
if: always()
working-directory: util/ci/
env:
DISCORD_WEBHOOK: ${{ secrets.CI_DISCORD_WEBHOOK }}
run: |
python3 -m pip install -r requirements.txt
python3 ./discord-results.py --branch ${{ github.event.inputs.branch || github.ref_name }} --keymap ${{ matrix.keymap }} --url ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
2 changes: 1 addition & 1 deletion .github/workflows/format_push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ jobs:
git config user.email '[email protected]'
- name: Create Pull Request
uses: peter-evans/create-pull-request@v4
uses: peter-evans/create-pull-request@v5
if: ${{ github.repository == 'qmk/qmk_firmware'}}
with:
token: ${{ secrets.QMK_BOT_TOKEN }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/regen_push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
git config user.email '[email protected]'
- name: Create Pull Request
uses: peter-evans/create-pull-request@v4
uses: peter-evans/create-pull-request@v5
if: ${{ github.repository == 'qmk/qmk_firmware'}}
with:
token: ${{ secrets.QMK_BOT_TOKEN }}
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ quantum/version.h
*.qmk
*.uf2

# DD config at wrong location
/keyboards/**/keymaps/*/info.json

# Old-style QMK Makefiles
/keyboards/**/Makefile

Expand Down
1 change: 0 additions & 1 deletion docs/feature_converters.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ Currently the following converters are available:
| `promicro` | `bit_c_pro` |
| `promicro` | `stemcell` |
| `promicro` | `bonsai_c4` |
| `promicro` | `elite_pi` |
| `promicro` | `rp2040_ce` |
| `promicro` | `elite_pi` |
| `promicro` | `helios` |
Expand Down
92 changes: 46 additions & 46 deletions docs/feature_debounce_type.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,78 +57,78 @@ susceptible to noise, you must choose a debounce method that will also mitigate
if the scanning is slow, and you are using a timestamp-based algorithm, you might end up making a debouncing decision based on only two
sampled values, which will limit the noise-resistance of the algorithm.
* Currently all built-in debounce algorithms support timestamp-based debouncing only. In the future we might
implement cycles-based debouncing, and it will be selectable via a ```config.h``` macro.
implement cycles-based debouncing, and it will be selectable via a `config.h` macro.

2) Symmetric vs Asymmetric
* Symmetric - apply the same debouncing algorithm, to both key-up and key-down events.
* Recommended naming convention: ```sym_*```
* Recommended naming convention: `sym_*`
* Asymmetric - apply different debouncing algorithms to key-down and key-up events. E.g. Eager key-down, Defer key-up.
* Recommended naming convention: ```asym_*``` followed by details of the type of algorithm in use, in order, for key-down and then key-up
* Recommended naming convention: `asym_*` followed by details of the type of algorithm in use, in order, for key-down and then key-up

3) Eager vs Defer
* Eager - any key change is reported immediately. All further inputs for DEBOUNCE ms are ignored.
* Eager algorithms are not noise-resistant.
* Recommended naming conventions:
* ```sym_eager_*```
* ```asym_eager_*_*```: key-down is using eager algorithm
* ```asym_*_eager_*```: key-up is using eager algorithm
* `sym_eager_*`
* `asym_eager_*_*`: key-down is using eager algorithm
* `asym_*_eager_*`: key-up is using eager algorithm
* Defer - wait for no changes for DEBOUNCE ms before reporting change.
* Defer algorithms are noise-resistant
* Recommended naming conventions:
* ```sym_defer_*```
* ```asym_defer_*_*```: key-down is using defer algorithm
* ```asym_*_defer_*```: key-up is using defer algorithm
* `sym_defer_*`
* `asym_defer_*_*`: key-down is using defer algorithm
* `asym_*_defer_*`: key-up is using defer algorithm

4) Global vs Per-Key vs Per-Row
* Global - one timer for all keys. Any key change state affects global timer
* Recommended naming convention: ```*_g```
* Recommended naming convention: `*_g`
* Per-key - one timer per key
* Recommended naming convention: ```*_pk```
* Recommended naming convention: `*_pk`
* Per-row - one timer per row
* Recommended naming convention: ```*_pr```
* Recommended naming convention: `*_pr`
* Per-key and per-row algorithms consume more resources (in terms of performance,
and ram usage), but fast typists might prefer them over global.

## Debounce algorithms supported by QMK
## Supported Debounce Algorithms

QMK supports multiple debounce algorithms through its debounce API.
QMK supports multiple algorithms through its debounce API.

### Debounce selection
### Debounce Time

| DEBOUNCE_TYPE | Description | What else is needed |
| ------------- | --------------------------------------------------- | ----------------------------- |
| Not defined | Use the default algorithm, currently sym_defer_g | Nothing |
| custom | Use your own debounce code | ```SRC += debounce.c``` add your own debounce.c and implement necessary functions |
| Anything Else | Use another algorithm from quantum/debounce/* | Nothing |
Default debounce time is 5 milliseconds and it can be changed with the following line in `config.h`:
```
#define DEBOUNCE 10
```
?> Setting `DEBOUNCE` to `0` will disable this feature.

**Regarding split keyboards**:
The debounce code is compatible with split keyboards.
### Debounce Method

### Selecting an included debouncing method
Keyboards may select one of the already implemented debounce methods, by adding to ```rules.mk``` the following line:
Keyboards may select one of the core debounce methods by adding the following line into `rules.mk`:
```
DEBOUNCE_TYPE = <name of algorithm>
```
Where name of algorithm is one of:
* ```sym_defer_g``` - debouncing per keyboard. On any state change, a global timer is set. When ```DEBOUNCE``` milliseconds of no changes has occurred, all input changes are pushed.
* This is the current default algorithm. This is the highest performance algorithm with lowest memory usage, and it's also noise-resistant.
* ```sym_eager_pr``` - debouncing per row. On any state change, response is immediate, followed by locking the row ```DEBOUNCE``` milliseconds of no further input for that row.
For use in keyboards where refreshing ```NUM_KEYS``` 8-bit counters is computationally expensive / low scan rate, and fingers usually only hit one row at a time. This could be
appropriate for the ErgoDox models; the matrix is rotated 90°, and hence its "rows" are really columns, and each finger only hits a single "row" at a time in normal use.
* ```sym_eager_pk``` - debouncing per key. On any state change, response is immediate, followed by ```DEBOUNCE``` milliseconds of no further input for that key
* ```sym_defer_pr``` - debouncing per row. On any state change, a per-row timer is set. When ```DEBOUNCE``` milliseconds of no changes have occurred on that row, the entire row is pushed. Can improve responsiveness over `sym_defer_g` while being less susceptible than per-key debouncers to noise.
* ```sym_defer_pk``` - debouncing per key. On any state change, a per-key timer is set. When ```DEBOUNCE``` milliseconds of no changes have occurred on that key, the key status change is pushed.
* ```asym_eager_defer_pk``` - debouncing per key. On a key-down state change, response is immediate, followed by ```DEBOUNCE``` milliseconds of no further input for that key. On a key-up state change, a per-key timer is set. When ```DEBOUNCE``` milliseconds of no changes have occurred on that key, the key-up status change is pushed.

### A couple algorithms that could be implemented in the future:
* ```sym_defer_pr```
* ```sym_eager_g```

### Use your own debouncing code
You have the option to implement you own debouncing algorithm. To do this:
* Set ```DEBOUNCE_TYPE = custom``` in ```rules.mk```.
* Add ```SRC += debounce.c``` in ```rules.mk```
* Add your own ```debounce.c```. Look at current implementations in ```quantum/debounce``` for examples.
Name of algorithm is one of:

| Algorithm | Description |
| --------------------- | ----------- |
| `sym_defer_g` | Debouncing per keyboard. On any state change, a global timer is set. When `DEBOUNCE` milliseconds of no changes has occurred, all input changes are pushed. This is the highest performance algorithm with lowest memory usage and is noise-resistant. |
| `sym_defer_pr` | Debouncing per row. On any state change, a per-row timer is set. When `DEBOUNCE` milliseconds of no changes have occurred on that row, the entire row is pushed. This can improve responsiveness over `sym_defer_g` while being less susceptible to noise than per-key algorithm. |
| `sym_defer_pk` | Debouncing per key. On any state change, a per-key timer is set. When `DEBOUNCE` milliseconds of no changes have occurred on that key, the key status change is pushed. |
| `sym_eager_pr` | Debouncing per row. On any state change, response is immediate, followed by `DEBOUNCE` milliseconds of no further input for that row. |
| `sym_eager_pk` | Debouncing per key. On any state change, response is immediate, followed by `DEBOUNCE` milliseconds of no further input for that key. |
| `asym_eager_defer_pk` | Debouncing per key. On a key-down state change, response is immediate, followed by `DEBOUNCE` milliseconds of no further input for that key. On a key-up state change, a per-key timer is set. When `DEBOUNCE` milliseconds of no changes have occurred on that key, the key-up status change is pushed. |

?> `sym_defer_g` is the default if `DEBOUNCE_TYPE` is undefined.

?> `sym_eager_pr` is suitable for use in keyboards where refreshing `NUM_KEYS` 8-bit counters is computationally expensive or has low scan rate while fingers usually hit one row at a time. This could be appropriate for the ErgoDox models where the matrix is rotated 90°. Hence its "rows" are really columns and each finger only hits a single "row" at a time with normal usage.

### Implementing your own debouncing code

You have the option to implement you own debouncing algorithm with the following steps:

* Set `DEBOUNCE_TYPE = custom` in `rules.mk`.
* Add `SRC += debounce.c` in `rules.mk`
* Implement your own `debounce.c`. See `quantum/debounce` for examples.
* Debouncing occurs after every raw matrix scan.
* Use num_rows rather than MATRIX_ROWS, so that split keyboards are supported correctly.
* If the algorithm might be applicable to other keyboards, please consider adding it to ```quantum/debounce```
* Use num_rows instead of MATRIX_ROWS to support split keyboards correctly.
* If your custom algorithm is applicable to other keyboards, please consider making a pull request.
2 changes: 2 additions & 0 deletions docs/newbs_getting_started.md
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,8 @@ For example, to build a firmware for a Clueboard 66% you would use:

qmk compile -kb clueboard/66/rev3 -km default

?> The keyboard option is the path relative to the keyboard directory, the above example would be found in `qmk_firmware/keyboards/clueboard/66/rev3`. If you're unsure you can view a full list of supported keyboards with `qmk list-keyboards`.

When it is done you should have a lot of output that ends similar to this:

```
Expand Down
53 changes: 43 additions & 10 deletions docs/other_vscode.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,16 +46,7 @@ Before starting, you will want to make sure that you have all of the build tools

This part is super simple. However, there is some configuration that we need to do to ensure things are configured correctly.

### Configuring VS Code

First, we need to set up IntelliSense. This isn't strictly required, but it will make your life a LOT easier. To do this, we need to create the `.vscode/c_cpp_properties.json` file in the QMK Firmware folder, You can do this all manually, but I've done most of the work already.

Grab [this file](https://gist.github.com/drashna/48e2c49ce877be592a1650f91f8473e8) and save it. You may need to edit this file, if you didn't install MSYS2 to the default location, or are using WSL/LxSS.

Once you have saved this file, you will need to reload VS Code, if it was already running.

?> You should see an `extensions.json` and `settings.json` file in the `.vscode` folder, as well.

#### MSYS2 Setup

Now, we will set up the MSYS2 window to show up in VSCode as the integrated terminal. This has a number of advantages. Mostly, you can control+click on errors and jump to those files. This makes debugging much easier. It's also nice, in that you don't have to jump to another window.

Expand Down Expand Up @@ -110,8 +101,50 @@ This installs a bunch of Git related tools that may make using Git with QMK Firm
Restart once you've installed any extensions

# Configure VS Code for QMK

1. Click <kbd><kbd>File</kbd> > <kbd>Open Folder</kbd></kbd>
2. Open the QMK Firmware folder that you cloned from GitHub.
3. Click <kbd><kbd>File</kbd> > <kbd>Save Workspace As...</kbd></kbd>

## Configuring VS Code

Using the [standard `compile_commands.json` database](https://clang.llvm.org/docs/JSONCompilationDatabase.html), we can get VS code C/C++ extension to use the exact same includes and defines used for your keyboard and keymap.

1. Run `qmk generate-compilation-database -kb <keyboard> -km <keymap>` to generate the `compile_commands.json`.
1. Create `.vscode/c_cpp_properties.json` with the following content:
```
{
"configurations": [
{
"name": "qmk",
"compilerArgs": ["-mmcu=atmega32u4"],
"compilerPath": "/usr/bin/avr-gcc",
"cStandard": "gnu11",
"cppStandard": "gnu++14",
"compileCommands": "${workspaceFolder}/compile_commands.json",
"intelliSenseMode": "linux-gcc-arm",
"browse": {
"path": [
"${workspaceFolder}"
],
"limitSymbolsToIncludedHeaders": true,
"databaseFilename": ""
}
}
],
"version": 4
}
```
Change values in `.vscode/c_cpp_properties.json` for your environment:
1. Copy the `-mmcu` argument from `compile_commands.json` into your `compilerArgs`. This is to work around a [bug in vscode c/c++ extension](https://github.com/microsoft/vscode-cpptools/issues/6478).
1. Use the `compilerPath` from `compile_commands.json`.
1. Modify `cStandard`, `cppStandard` and `intelliSenseMode` values to the correct values for your platform. See [this section](https://code.visualstudio.com/docs/cpp/c-cpp-properties-schema-reference#_configuration-properties) for reference. For WSL, it should still be gcc-x64.
And now you're ready to code QMK Firmware in VS Code
## Troubleshooting VSCode C/C++ extension
If the defines are not matching what you expect, open the source code and run action `C/C++: Log Diagnostics`. This will list the exact list of defines and include paths defined in `compile_commands.json`, and if it's not part of your compilation database, it will tell you so.
1 change: 1 addition & 0 deletions docs/pr_checklist.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ https://github.com/qmk/qmk_firmware/pulls?q=is%3Apr+is%3Aclosed+label%3Akeyboard

- keyboard moves within the repository *must* go through the `develop` branch instead of `master`, so as to ensure compatibility for users
- `data/mappings/keyboard_aliases.hjson` must be updated to reflect the move, so users with pre-created configurator keymap.json files continue to detect the correct keyboard
- keyboard updates and refactors (eg. to data driven) *must* go through `develop` to reduce `master` -> `develop` merge conflicts
- PR submissions from a `kbfirmware` export (or equivalent) will not be accepted unless converted to new QMK standards -- try `qmk import-kbfirmware` first
- `info.json`
- With the move to [data driven](https://docs.qmk.fm/#/data_driven_config) keyboard configuration, we encourage contributors to utilise as many features as possible of the info.json [schema](https://github.com/qmk/qmk_firmware/blob/master/data/schemas/keyboard.jsonschema).
Expand Down
22 changes: 22 additions & 0 deletions keyboards/40percentclub/gherkin/kb2040/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Gherkin

![Gherkin](https://i.imgur.com/XrqqtTq.jpg)
![KB2040](https://cdn-shop.adafruit.com/640x480/5302-12.jpg)

===

A 30 key keyboard with Adafruit's KB2040 as microcontroller.

* [The original TMK firmware](https://github.com/di0ib/tmk_keyboard/tree/master/keyboard/gherkin)

Keyboard Maintainer: QMK Community
Hardware Supported: Gherkin PCB & Adafruit KB2040
Hardware Availability: [Gherkin project on 40% Keyboards](http://www.40percent.club/2016/11/gherkin.html) and [Adafruit KB2040](https://www.adafruit.com/product/5302)

Make example for this keyboard (after setting up your build environment):

make 40percentclub/gherkin/kb2040:default

See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).

Use the KB2040 microcontroller as a drop-in replacement for the Pro Micro in this cute 30% keyboard.
1 change: 1 addition & 0 deletions keyboards/40percentclub/gherkin/kb2040/rules.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
CONVERT_TO = kb2040
2 changes: 1 addition & 1 deletion keyboards/40percentclub/gherkin/readme.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Gherkin

![Gherkin](https://4.bp.blogspot.com/-sQ18-lNZXOc/WCzlTde-4PI/AAAAAAAB_JQ/qQrehAMG6DMKf3i4oj4mkmLGOfTUvb3KgCLcB/s640/IMG_20161116_122926.jpg)
![Gherkin](https://i.imgur.com/XrqqtTq.jpg)
===

A 30 key keyboard.
Expand Down
Loading

0 comments on commit 4130864

Please sign in to comment.