Commit Graph

1604 Commits (1a68feb842ebcc6a7d1aef7cd7f83865cc18fab1)

Author SHA1 Message Date
Joel Challis fa141a5a8f
Migrate STM32_EEPROM_ENABLE to use EEPROM_DRIVER (#14433) 2021-09-15 01:21:36 -07:00
Drashna Jaelre 26e796fb9c
fix typo in backlight code from #14439 (#14442) 2021-09-15 03:37:45 +01:00
Joel Challis a78f0e8a0b
Refactor use of _STM32_ defines (#14439) 2021-09-15 11:19:51 +10:00
QMK Bot d2eb9c03af Merge remote-tracking branch 'origin/master' into develop 2021-09-12 23:48:41 +00:00
Drashna Jaelre ab34ecb669
Apply `TAP_CODE_DELAY` to Tap Dance key sequences (#14412)
* Add  support to tap dances

* Move default tap code defines to header file
2021-09-13 00:48:11 +01:00
QMK Bot 1837d98425 Merge remote-tracking branch 'origin/master' into develop 2021-09-09 01:35:09 +00:00
JayceFayne f3bef84dac
`ST7565_TIMEOUT 0` and `ST7565_DISABLE_TIMEOUT` should behave the same (#14315) 2021-09-08 18:34:49 -07:00
JayceFayne da81e5c7cd
`OLED TIMEOUT 0` and `OLED_DISABLE_TIMEOUT` should behave the same (#14302) 2021-09-08 18:34:34 -07:00
Drashna Jaelre 15710db4ad
Move feature suspend logic out of platform specific code (#14210) 2021-08-30 20:21:03 +01:00
Purdea Andrei 9583f9f589
[Bug] Fix build error when enabling NO_HAPTIC_MOD (#14178)
Without this build would fail, if a keyboard had haptic feedback enabled,
TAPPING_TOGGLE was not overridden in a config.h, and if NO_HAPTIC_MOD was
defined in config.h.
2021-08-30 11:22:53 -07:00
Joel Challis a84de5e22b
Revert 14083 && 14144 (#14150)
* Revert "Short term bodge for firmware size bloat (#14144)"

This reverts commit a8d6547346.

* Revert "Tidy up quantum.c now some of tmk_core has been merged (#14083)"

This reverts commit c4dbf4bf01.
2021-08-25 01:16:59 +01:00
Joel Challis 2cade3a483
Align some quantum sub-directories (#14134)
* Misc folder tidy

* Review comments

* Remove redundant entry
2021-08-24 17:07:11 +01:00
Joel Challis a8d6547346
Short term bodge for firmware size bloat (#14144) 2021-08-24 16:09:23 +01:00
Joel Challis c4dbf4bf01
Tidy up quantum.c now some of tmk_core has been merged (#14083) 2021-08-24 14:28:37 +01:00
Xelus22 4e1c5887c5
[Core] Refactor OLED to allow easy addition of other types (#13454)
* add docs

* core changes

* update keyboards to new OLED

* updated users to new OLED

* update layouts to new OLED

* fixup docs

* drashna's suggestion

* fix up docs

* new keyboards with oled

* core split changes

* remaining keyboard files

* Fix The Helix keyboards oled options

* reflect develop

Co-authored-by: Drashna Jaelre <drashna@live.com>
Co-authored-by: mtei <2170248+mtei@users.noreply.github.com>
2021-08-24 16:28:26 +10:00
Donald Kjer e756a21636
eeprom_stm32: implement high density wear leveling (#12567)
* eeprom_stm32: implement wear leveling
Update EECONFIG_MAGIC_NUMBER
eeprom_stm32: check emulated eeprom size is large enough
* eeprom_stm32: Increasing simulated EEPROM density on stm32
* Adding utility script to decode emulated eeprom
* Adding unit tests
* Applying qmk cformat changes
* cleaned up flash mocking
* Fix for stm32eeprom_parser.py checking via signature with wrong base
* Fix for nk65 keyboard

Co-authored-by: Ilya Zhuravlev <whatever@xyz.is>
Co-authored-by: zvecr <git@zvecr.com>
2021-08-23 23:15:34 +01:00
QMK Bot 2481e109a0 Merge remote-tracking branch 'origin/master' into develop 2021-08-23 22:06:37 +00:00
Olli Helenius 9472c4b8cb
Fix US_RDQU keycode (#13464)
`US_RDQU` and `US_LDQU` were aliased to the same keycode. `US_RDQU`
should use the right bracket.
2021-08-24 08:06:04 +10:00
Path Nirvana f314705921
adding uf2 flash support for blackpill 401 (#13968)
* adding uf2 flash support for blackpill 401

* forgot to add blackpill to keyboard header file

* making changes requested by drashna

* fixing tzarc s comments

* removing the keyboard

* undo the change to dactyl_manuform.h
2021-08-24 08:05:10 +10:00
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
Drashna Jaelre a80d789147
Fix issues with VIA EEPROM init and bring in line with eeconfig functionality (#13243)
Co-authored-by: Ryan <fauxpark@gmail.com>
2021-08-20 21:02:53 -07:00
Ryan a7d48b063e
Fix LED Matrix suspend code (#14090) 2021-08-20 10:43:49 -07:00
Drashna Jaelre 92fa07336c
[Bug] Fix RGB/LED Matrix Suspend code (#14084) 2021-08-20 06:14:42 -07:00
Joel Challis 69c71d4843
Align DIP_SWITCH_PINS_RIGHT implementation with encoders (#14079) 2021-08-20 10:15:11 +01:00
XScorpion2 9d1c98c891
Added right vs left specific pin assignments for dip switch (#13074)
* Added right vs left specific pin assignments for dip switch

* Update feature_dip_switch.md

* Ran formatting tools
2021-08-19 18:39:15 +01:00
tucvbif 703f027717
Allow for removal of hysteresis on 4x encoders (#13698)
* Remove hysteresis on 4x encoders

Sometimes, controller skips encoder pulses and when it returns to default position, the encoder_pulses variable isn't equals 0. And when I turn encoder in opposite direciton, it skips first click becase of encoder_pulses crosses zero. To prevent this, I add the ENCODER_DEFAULT_POS constant, and reset encoder_pulses into 0 when the state variable equals ENCODER_DEFAULT_POS.

* Documentation for ENCODER_DEFAULT_POS
2021-08-18 09:40:00 +10:00
Joel Challis b8e913c8db
Migrate platform independent code from tmk_core -> quantum (#13673)
* Migrate action|keyboard|keycode|eeconfig from tmk_core -> quantum
2021-08-18 00:18:58 +01:00
Joel Challis 96e2b13d1d
Begin to carve out platform/protocol API - Single main loop (#13843)
* Begin to carve out platform/protocol API

* Fix up after rebase
2021-08-18 00:11:07 +01:00
Drashna Jaelre 4c4f632378
Add a toggle key for GUI On/Off in Magic feature (#13830) 2021-08-18 08:47:50 +10:00
a-chol 75b49aff56
Digitizer HID interface : absolute coordinates for mouse cursor (#12851)
* Add digitizer HID interface for setting the mouse cursor position at
absolute screen coordinates. Tested on Pro Micro, Proton C and
Blackpill.

* Update docs/feature_digitizer.md

Co-authored-by: Ryan <fauxpark@gmail.com>

* Update tmk_core/protocol/usb_descriptor.c

Co-authored-by: Ryan <fauxpark@gmail.com>

* Add missing copyrights
Add V-USB support

* Add support for digitizer dedicated endpoint for lufa and chibios.
Fix formatting issues
Move digitizer_task definition to the feature's base implementation file

* Run cformat on modified files

* Change digitizer report usage to Digitizer instead of Pen to avoid
pointer disappearing on Windows.

* Update tmk_core/protocol/vusb/vusb.c

Co-authored-by: Ryan <fauxpark@gmail.com>

* Run cformat from docker image

* Remove send_digitizer from host_driver_t and instead rely on the
declaration being the interface to the implementation in each
HW-specific usb implementation.

* Fix build : send_digitizer shouldn't be static in vusb and add
weak-linkage implementation for tests without usb implementation

* Change digitizer user interface to match pointing device's

* Update documentation with new API

Co-authored-by: a-chol <nothing@none.com>
Co-authored-by: Ryan <fauxpark@gmail.com>
2021-08-18 04:52:44 +10:00
freqmod 705774f7bf
Steno combinedkeys (#12538)
* Add support for steno keys that press adjacent keys simultaniously

* Add some docs for steno combined keys
2021-08-18 04:48:00 +10:00
Drashna Jaelre 7da97c293d
Rgb matrix/enable modes explicitly (#13758)
* Change animations to require explicet activation

* Add support for legacy config

* Make default for now

* Add LED Matrix support

* change LED Matrix docs
2021-08-18 04:19:00 +10:00
Drashna Jaelre 4e3726bfe1
Fixup Audio startup and add to documents (#13606)
* Fixup Audio startup and add to documents

* fix doc descriptions
2021-08-15 21:51:50 +01:00
Drashna Jaelre f56c202fb3
Fix ifdefs for OLED split sync code (#14017) 2021-08-15 00:54:08 -07:00
Drashna Jaelre 488aaa0980
Enable sync of OLED/ST7565 display on/off state on Splits (#13542)
* Enable sync of OLED/ST7565 display on/off state on Splits

* Only send if states are not matched

Co-authored-by: Nick Brassel <nick@tzarc.org>

Co-authored-by: Nick Brassel <nick@tzarc.org>
2021-08-15 15:39:08 +10:00
Pete Sevander fd3dc3a997
Fix `combo_disable` (#13988)
- Dump key buffer when combos are disabled.
- Recursive calls to `dump_key_buffer` need to start dumping the buffer
  from index i+1 to avoid possible infinite loops.
- Handle combo key releases even though combo processing is disabled.
2021-08-14 14:45:52 +10:00
Nick Brassel 65e3760853
Fix compilation issue. (#13926) 2021-08-09 13:20:15 +10:00
thpoll83 b43c6bc176
Add support for STM32F407x MCUs. (#13718)
* Add support for STM32F407x MCUs.

* Removing STMF407 MCU variation

* Update quantum/mcu_selection.mk

Remove options for dfu flashing

Co-authored-by: Ryan <fauxpark@gmail.com>

* DISABLE STM32_USB_USE_OTG1

* Update platforms/chibios/GENERIC_STM32_F407XE/configs/mcuconf.h

Co-authored-by: Drashna Jaelre <drashna@live.com>

* Update platforms/chibios/GENERIC_STM32_F407XE/configs/mcuconf.h

Co-authored-by: thomas.pollak <thomas.pollak@dynatrace.com>
Co-authored-by: Ryan <fauxpark@gmail.com>
Co-authored-by: Drashna Jaelre <drashna@live.com>
Co-authored-by: Nick Brassel <nick@tzarc.org>
2021-08-09 06:52:13 +10:00
Liyang HU 383fae55c5
Refactor `quantum/command.{c,h}` for code size & {read,maintain}ability (#11842)
* quantum/command.c: coalesce `print()`s in `command_common_help()` & `print_version()`

Also undo some damage by clang-format in b624f32f94

* quantum/command.c: replace `print(…); print_{,val_}{dec,hex}*(…);` sequences with single `xprintf(…)`

`print_{dec,hex}*(…)` are just `#define`s for `xprintf(…)` anyway.

Each additional `xprintf(…)` costs ~8 bytes: the call instructions,
plus an additional NUL terminator.

This _really_ adds up: this commit saves 814 bytes on my ATmega32.

* quantum/command.c: optimise `mousekey_console()` for size & legibility

Made various tweaks to the interface, but still functionally identical.

Assume `KC_1`…`KC_0` to be contiguous, and removed `numkey2num(…)` entirely.
It was exported in `command.h` by 1a0bac8bcc for no obvious reason, before
which it was `static`. I doubt anyone uses it.

`mousekey_console()` is now enabled regardless of `MK_3_SPEED`.
Needs fleshing out for things other than the X11 variant though.

This commit saves 638 bytes on my ATmega32.
2021-08-07 17:12:57 +10:00
James Young a03aa301de
Remove Full Bootmagic (#13846)
* disambiguate Bootmagic rules in keymaps

The files edited by this commit were added at a point in time where `BOOTMAGIC_ENABLE = yes` enabled full Bootmagic.

This commit edits the files to specify that full Bootmagic is intended.

* remove BOOTMAGIC_ENABLE=full setting

* unify commented BOOTMAGIC_ENABLE rules in keyboards

Explicitly sets `BOOTMAGIC_ENABLE = no` in keyboards where the rule was commented out.

Command:

```
find keyboards/ -type f -name 'rules.mk' -and -not -path '*/keymaps/*' -exec sed -i -e 's;#[ \t]*\(BOOTMAGIC_ENABLE\)[ \t=]\+\([a-zA-Z]\+\).*;\1 = no       # Virtual DIP switch configuration;g' {} +
```

* remove commented Bootmagic rules from keymap/user level

Command:

```
find keyboards/ layouts/ users/ -type f -name 'rules.mk' -exec sed -i -e '/#.*\(BOOTMAGIC_ENABLE\)[ \t=]\+\([a-z]\+\).*/d' {} +
```

* update keyboard BOOTMAGIC_ENABLE rule formatting

Sets the formatting of BOOTMAGIC_ENABLE rules to `BOOTMAGIC_ENABLE = [value]`, without the inline comments (which will be replaced later).

Command:

```
find keyboards/ -type f -name 'rules.mk' -and -not -path '*/keymaps/*' -exec sed -i -e 's;\(BOOTMAGIC_ENABLE\)[ \t=]\+\([a-z]\+\).*;\1 = \2;g' '{}' +
```

* update keyboards' BOOTMAGIC_ENABLE settings

Updates keyboard `rules.mk` files to use `BOOTMAGIC_ENABLE = lite` where `BOOTMAGIC_ENABLE = full` was being used.

Command:

```
find keyboards/ -type f -name 'rules.mk' -and -not -path '*/keymaps/*' -exec sed -i -e 's;\(BOOTMAGIC_ENABLE = \)full;\1lite;g' '{}' +
```

* update keymap/user BOOTMAGIC_ENABLE settings

Updates keymap/user `rules.mk` files to use `BOOTMAGIC_ENABLE = lite` where `BOOTMAGIC_ENABLE = full` was being used.

Commands:

```
find keyboards/ -type f -name 'rules.mk' -and -path '*/keymaps/*' -exec sed -i -e 's;\(BOOTMAGIC_ENABLE[ \t=]\+\)full;\1lite;g' '{}' +
find layouts/community/ users/ -type f -name 'rules.mk' -exec sed -i -e 's;\(BOOTMAGIC_ENABLE[ \t=]\+\)full;\1lite;g' '{}' +
```

* remove and replace inline comments in keyboards and keymap/user files

Removes and replaces the inline comments, which have been updated to read `Enable Bootmagic Lite`.

Commands:

```
find keyboards/ -type f -name 'rules.mk' -and -path '*/keymaps/*' -exec sed -i -e 's;\(BOOTMAGIC_ENABLE\)[ \t=]\+\([a-z]\+\).*;\1 = \2;g' '{}' +
find layouts/community/ users/ -type f -name 'rules.mk' -exec sed -i -e 's;\(BOOTMAGIC_ENABLE\)[ \t=]\+\([a-z]\+\).*;\1 = \2;g' '{}' +
find keyboards/ layouts/community/ users/ -type f -name 'rules.mk' -exec sed -i -e 's;\(BOOTMAGIC_ENABLE = lite\);\1     # Enable Bootmagic Lite;g' '{}' +
find keyboards/ layouts/community/ users/ -type f -name 'rules.mk' -exec sed -i -e 's;\(BOOTMAGIC_ENABLE = yes\);\1      # Enable Bootmagic Lite;g' '{}' +
find keyboards/ layouts/community/ users/ -type f -name 'rules.mk' -exec sed -i -e 's;\(BOOTMAGIC_ENABLE = no\);\1       # Enable Bootmagic Lite;g' '{}' +
```

* rename improperly named makefiles

Some files intended to be used as makefiles had improper names causing them to not be used as intended when building.

This commit corrects the filenames of the affected files.

* update renamed file with new rule formatting

* update QMK's template files

Updates QMK's `rules.mk` templates to use the new inline comment.

* update QMK Docs

- remove documentation of full Bootmagic
- update links to Bootmagic Lite doc
- add doc for Magic Keycodes

* rules.mk patch for coarse/ixora and coarse/vinta
2021-08-06 23:59:56 -07:00
QMK Bot 538d9d7890 Merge remote-tracking branch 'origin/master' into develop 2021-08-06 05:54:10 +00:00
Joel Challis c588d232cb
Avoid name conflicts with usb_hid Arduino code (#13870)
* Avoid name conflicts with usb_hid Arduino code

* Fix tests
2021-08-06 15:53:38 +10:00
Pete Sevander 7e983796e1
Process combos earlier & overlapping combos (#8591)
* Combo processing improvements.

Now it is possible to use ModTap and LayerTap keys as part of combos.
Overlapping combos also don't trigger all the combos, just exactly the
one that you press.

New settings:
- COMBO_MUST_HOLD_MODS
- COMBO_MOD_TERM
- COMBO_TERM_PER_COMBO
- COMBO_MUST_HOLD_PER_COMBO
- COMBO_STRICT_TIMER
- COMBO_NO_TIMER

* Remove the size flags from combo_t struct boolean members.

This in the end actually saves space as the members are accessed so many
times. The amount of operations needed to access the bits uses more
memory than setting the size saves.

* Fix `process_combo_key_release` not called correctly with tap-only combos

* Fix not passing a pointer when NO_ACTION_TAPPING is defined.

* Docs for `COMBO_ONLY_FROM_LAYER`

* Update docs/feature_combo.md

Co-authored-by: precondition <57645186+precondition@users.noreply.github.com>

* Update quantum/process_keycode/process_combo.c

Co-authored-by: precondition <57645186+precondition@users.noreply.github.com>

* Add `EXTRA_SHORT_COMBOS` option.

Stuff combo's `disabled` and `active` flags into `state`. Possibly can
save some space.

* Add more examples and clarify things with dict management system.

- Simple examples now has a combo that has modifiers included.
- The slightly more advanced examples now are actually more advanced
  instead of just `tap_code16(<modded-keycode>)`.
- Added a note that `COMBO_ACTION`s are not needed anymore as you can
  just use custom keycodes.
- Added a note that the `g/keymap_combo.h` macros use the
  `process_combo_event` function and that it is not usable in one's
  keymap afterwards.

* Update docs/feature_combo.md

Co-authored-by: precondition <57645186+precondition@users.noreply.github.com>

* Update docs/feature_combo.md

Co-authored-by: precondition <57645186+precondition@users.noreply.github.com>

* Update docs/feature_combo.md

Co-authored-by: precondition <57645186+precondition@users.noreply.github.com>

* Update docs/feature_combo.md

Co-authored-by: precondition <57645186+precondition@users.noreply.github.com>

* Update docs/feature_combo.md

Co-authored-by: precondition <57645186+precondition@users.noreply.github.com>

* Change "the" combo action example to "email" example.

* Update docs/feature_combo.md

Co-authored-by: precondition <57645186+precondition@users.noreply.github.com>

* Fix sneaky infinite loop with `combo_disable()`

No need to call `dump_key_buffer` when disabling combos because the
buffer is either being dumped if a combo-key was pressed, or the buffer is empty
if a non-combo-key is pressed.

* Update docs/feature_combo.md

Co-authored-by: precondition <57645186+precondition@users.noreply.github.com>

* Update docs/feature_combo.md

Co-authored-by: precondition <57645186+precondition@users.noreply.github.com>

Co-authored-by: precondition <57645186+precondition@users.noreply.github.com>
Co-authored-by: Drashna Jaelre <drashna@live.com>
2021-08-06 09:44:57 +10:00
QMK Bot 600faab707 Merge remote-tracking branch 'origin/master' into develop 2021-08-04 00:23:25 +00:00
Drashna Jaelre a0f2be18a4
Add bootloader section to keyboard template (#13774)
* Add bootloader section to keyboard template

* Apply suggestions from code review

Co-authored-by: Ryan <fauxpark@gmail.com>

Co-authored-by: Ryan <fauxpark@gmail.com>
2021-08-04 01:23:18 +01:00
QMK Bot c48d9c2b2a Merge remote-tracking branch 'origin/master' into develop 2021-08-03 21:40:39 +00:00
Joakim Tufvegren 2b097d670a
Fix overflows in WPM calculations (#13128)
* Fix overflow in WPM calculations.

First, the "fresh" WPM calculation could end up being up to 12000 (with
default `WPM_ESTIMATED_WORD_SIZE`) if keys were pressed more or less
simultaneously. This value has now been clamped down to 255, in effect
clamping WPM to its max value of 255.

Second, with `WPM_ALLOW_COUNT_REGRESSION` enabled, it was possible to
regress the WPM below 0 (i.e. to 255) by just repeatedly pressing
backspace.

* Fix WPM being limited to 235 due to float/int logic.
2021-08-04 07:40:08 +10:00
Joel Challis 34de7ca224
Move print/debug files to quantum (#12069)
* move print/debug files to quantum

* Update comments
2021-08-03 18:49:33 +01:00
Joel Challis 3f419dc872
Unconditionally call led_init_ports (#12116)
* Unconditionally call led_init_ports

* Another call to led_init_ports
2021-08-03 18:34:32 +01:00
Drashna Jaelre ebed2e9a81
[BUG] Fix Key Override includes (#13831)
* [BUG] Fix Key Override includes

* simplify includes
2021-08-01 16:29:23 +01:00