Open-source keyboard firmware for Atmel AVR and Arm USB families. Mirror of https://github.com/qmk/qmk_firmware
Go to file
Joakim Tufvegren 0ae20e7457
Make solo half of split keyboards (more) usable. (#13523)
* Make solo half of split keyboards (more) usable.

Using only one half of a split keyboard (that's using the split_common
framework to communicate) is not a great experience, since several read
timeouts per scan cycle cause an unusably slow scan rate.

This change blocks all split communication attempts for 500 ms
(configurable) after an error occurs, causing the scan rate to become at
least _more_ usable, but might need some tweaking to work fully on most
keyboards. One read timeout still needs to occur after the 500 ms has
passed, and if that timeout isn't low enough, some scan cycles may still
be too slow.

* Fix lint complaint.

* Require 25 consecutive comm errors to see comms as disconnected.

The number of max errors can be overridden by defining
`SPLIT_MAX_CONNECTION_ERRORS`.

* Add comments to new defines, and ability to disable disconnection check.

Also increase `SPLIT_MAX_CONNECTION_ERRORS` to 40, since it's divisible
by most relevant numbers for the description.

* Make lint happy ...again

* Only update `connection_check_timer` when needed.

* Add new defines to split keyboard documentation.

* Move connection timeout logic to transport.c, add `is_transport_connected`.

* Use split_common disconnection logic in matrix.c.

Instead of doing more or less the same thing twice.

* Move disconnection logic to `transport_master`.

Is a cleaner implementation, and causes the scan rate while disconnected
to increase instead of decrease.

* Lint fixes.

* Lower default `SERIAL_USART_TIMEOUT` to 20 ms.

The read timeout must be low enough to not cause exessively long scan
cycles when using a solo split half. 10 ms was determined from testing
to work fine even with the slowest defined baudrate of 19200 (5 ms was
too low for that case), so 20 ms should be fine for most cases.

* Remove `SERIAL_USART_TIMEOUT` from ergodox_infinity/config.h

Was somewhat mistakenly included in an earlier PR.

* Fix building with `USE_I2C`.

* Reduce built firmware size.

Not really sure why this works, the idea was taken from tzarc's work on
split disconnection.

* Tweak and improve opt-out for split disconnection logic.

There are now two ways to opt out from this feature:
* Set `SPLIT_MAX_CONNECTION_ERRORS` to 0. This will completely disable
  the connection status checks (also affects the slave matrix reset logic in
  matrix.c, though).
* Set `SPLIT_CONNECTION_CHECK_TIMEOUT` to 0. This will only disable the
  communication throttling while disconnected. Will make the firmware
  smaller.

* Make split disconnection logic work with custom transports.

Includes a fallback implementation for keyboards using a custom
split_util.c but not a custom matrix.c (currently no such keyboard seems
to be merged, though).

* Remove unnecessary include of timer.h

Co-authored-by: Joel Challis <git@zvecr.com>

Co-authored-by: Joel Challis <git@zvecr.com>
2021-08-22 10:51:17 +10:00
.github CLI/Docs: Fix the format commands' name (#13668) 2021-07-23 21:41:33 +01:00
.vscode do not automatically format json (#13320) 2021-06-25 22:47:48 -07:00
api_data Generate api data on each push (#10609) 2020-10-25 14:48:44 -07:00
bin Ensure that safe_commands always run (#13199) 2021-06-14 16:51:58 -07:00
data Fix issues with recent keymap.json changes (#14089) 2021-08-20 19:11:49 +10:00
docs Make solo half of split keyboards (more) usable. (#13523) 2021-08-22 10:51:17 +10:00
drivers Improve pmw3360 sensor and make it more hardware agnostic (#14097) 2021-08-20 21:14:23 -07:00
keyboards Make solo half of split keyboards (more) usable. (#13523) 2021-08-22 10:51:17 +10:00
layouts [Keymap] Drashna's Improve OLEDs and custom Split code (#14063) 2021-08-21 13:34:44 -07:00
lib Merge remote-tracking branch 'origin/master' into develop 2021-08-20 08:22:41 -07:00
nix Update Python dependencies for Nix (#12855) 2021-06-20 14:30:16 +01:00
platforms Make solo half of split keyboards (more) usable. (#13523) 2021-08-22 10:51:17 +10:00
quantum Make solo half of split keyboards (more) usable. (#13523) 2021-08-22 10:51:17 +10:00
tests Allow output of logging when running unit tests (#13556) 2021-07-25 17:18:09 +01:00
tmk_core Support using a timer for wait_us() on ChibiOS-based boards (#12211) 2021-08-20 00:31:23 +01:00
users Updated RGB Matrix suspend define part 3 (#13954) 2021-08-22 09:46:35 +10:00
util Merge remote-tracking branch 'origin/master' into develop 2021-08-20 22:32:01 +00:00
.clang-format fix indent size 2019-06-11 01:51:40 -07:00
.editorconfig QMK CLI and JSON keymap support (#6176) 2019-07-15 12:14:27 -07:00
.gitattributes [nix] Use niv and poetry2nix to more easily manage dependencies (#11181) 2021-04-03 08:05:46 -07:00
.gitignore Cleanup gitignore (#13390) 2021-07-02 16:08:34 +10:00
.gitmodules 2020 May 30 Breaking Changes Update (#9215) 2020-05-30 13:14:59 -07:00
book.json adds redirects for docs 2017-08-19 08:31:54 -04:00
bootloader.mk Update LUFA (18-07-2021) and add QMK-HID Bootloader support (#13588) 2021-07-24 23:00:57 -07:00
build_full_test.mk Ensure single newline at EOF for core files (#11310) 2020-12-28 04:36:32 +11:00
build_json.mk Add config.h and rules.mk support for data driven keymaps (#12859) 2021-08-18 21:52:41 +01:00
build_keyboard.mk Fix issues with recent keymap.json changes (#14089) 2021-08-20 19:11:49 +10:00
build_layout.mk Add config.h and rules.mk support for data driven keymaps (#12859) 2021-08-18 21:52:41 +01:00
build_test.mk Move print/debug files to quantum (#12069) 2021-08-03 18:49:33 +01:00
CODE_OF_CONDUCT.md updates the coc 2019-08-24 12:43:39 -04:00
common_features.mk Various fixes from reorg of files (#14051) 2021-08-18 09:54:41 +10:00
common.mk Relocate platform specific drivers (#13894) 2021-08-17 23:43:09 +01:00
disable_features.mk Add a <FEATURE>_SUPPORTED flag (#9058) 2021-01-30 13:08:58 -08:00
Dockerfile Update docker util script and travis to use new base container 2019-07-14 21:01:38 -07:00
Doxyfile Generate API docs from source code comments (#2491) 2018-03-22 02:50:38 -04:00
doxygen-todo Various fixes from reorg of files (#14051) 2021-08-18 09:54:41 +10:00
LICENSE add an explicit lisence file for github to pickup 2017-11-13 20:50:54 -05:00
license_GPLv2.md Clarify the quantum license (#1042) 2017-03-28 15:20:36 -07:00
license_GPLv3.md Clarify the quantum license (#1042) 2017-03-28 15:20:36 -07:00
license_Modified_BSD.md Clarify the quantum license (#1042) 2017-03-28 15:20:36 -07:00
Makefile Merge remote-tracking branch 'origin/master' into develop 2021-07-28 11:02:58 +00:00
message.mk --parallel improvements (#13800) 2021-08-18 08:46:59 +10:00
nose2.cfg Setup a python test framework 2019-09-07 07:58:41 -07:00
readme.md [Core] [Docs] Remove travis-ci references (#13916) 2021-08-20 23:31:26 +01:00
requirements-dev.txt Move hid and pyusb to requirements.txt (#13134) 2021-06-07 16:30:55 -07:00
requirements.txt switch to qmk-dotty-dict (#13460) 2021-07-14 09:08:48 -07:00
secrets.tar.enc update building for .hex, secrets moving 2017-08-21 21:57:46 -04:00
setup.cfg Use the schema to eliminate custom code (#11108) 2021-01-09 13:34:14 -08:00
shell.nix Update Python dependencies for Nix (#12855) 2021-06-20 14:30:16 +01:00
show_options.mk Remove ONEHAND_ENABLE (#13920) 2021-08-09 19:46:03 +01:00
testlist.mk Avoid 8-bit timer overflows in debounce algorithms (#12240) 2021-06-09 17:23:21 +10:00
Vagrantfile Upgrades Vagrant box to Debian 10 to fix Docker build error on Debian 9. (#13236) 2021-06-19 13:52:34 +01:00

Quantum Mechanical Keyboard Firmware

Current Version Discord Docs Status GitHub contributors GitHub forks

This is a keyboard firmware based on the tmk_keyboard firmware with some useful features for Atmel AVR and ARM controllers, and more specifically, the OLKB product line, the ErgoDox EZ keyboard, and the Clueboard product line.

Documentation

The docs are powered by Docsify and hosted on GitHub. They are also viewable offline; see Previewing the Documentation for more details.

You can request changes by making a fork and opening a pull request, or by clicking the "Edit this page" link at the bottom of any page.

Supported Keyboards

The project also includes community support for lots of other keyboards.

Maintainers

QMK is developed and maintained by Jack Humbert of OLKB with contributions from the community, and of course, Hasu. The OLKB product firmwares are maintained by Jack Humbert, the Ergodox EZ by ZSA Technology Labs, the Clueboard by Zach White, and the Atreus by Phil Hagelberg.

Official Website

qmk.fm is the official website of QMK, where you can find links to this page, the documentation, and the keyboards supported by QMK.