Commit Graph

2197 Commits (876b9ed680a01b02aff64b0764abc36af6e92ed3)

Author SHA1 Message Date
precondition db4c4b1f78
Fix Bépo's BP_NNBS (narrow non-breaking space) (#17999)
Co-authored-by: Ryan <fauxpark@gmail.com>
2022-08-12 19:13:22 -07:00
QMK Bot 15422b3b26 Merge remote-tracking branch 'origin/master' into develop 2022-08-12 02:04:13 +00:00
Joel Challis 7e7387c0d1
Remove legacy keycode use from command (#18002) 2022-08-12 03:03:36 +01:00
Albert Y cde9dd8b90
Refactor Pixel Fractal effect (#17602)
* Refactor effect with smaller array

* Add RGB_MATRIX_USE_LIMITS call

* Remove spaces

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

Co-authored-by: Drashna Jaelre <drashna@live.com>
2022-08-11 22:41:42 +01:00
QMK Bot 67461a0a47 Merge remote-tracking branch 'origin/master' into develop 2022-08-07 19:33:39 +00:00
Takeshi ISHII 5ecd745514
fix comment space code in quantum/matrix_common.c (#17942) 2022-08-07 20:32:59 +01:00
Drashna Jaelre ac25109312
Always run pointing device init (#17936) 2022-08-07 02:18:03 -07:00
Stefan Kerkmann f27b617f36
[Core] Process all changed keys in one scan loop, deprecate `QMK_KEYS_PER_SCAN` (#15292) 2022-08-06 20:51:13 +10:00
Stefan Kerkmann ed9bdcbc36
[Core] guard RPC invocation by checking RPC info against crc checksum (#17840) 2022-08-06 18:46:59 +10:00
David Hoelscher 2bdd73f801
Add ST7735 driver to Quantum Painter (#17848) 2022-07-31 19:58:25 -07:00
Drzony 0b726a437b
Implement relative mode for Cirque trackpad (#17760) 2022-07-29 21:20:34 -07:00
QMK Bot 0c487cbeba Merge remote-tracking branch 'origin/master' into develop 2022-07-30 00:32:42 +00:00
Drashna Jaelre d93dfbff3c
Fix check when compiling HID Joystick with digital driver (#17844) 2022-07-30 01:32:06 +01:00
precondition 95c1cc425e
Rename postprocess_steno_user → post_process_steno_user (#17823) 2022-07-28 21:51:01 -07:00
Daniel Kao b8b2e99976
Constrain Cirque Pinnacle coordinates (#17803)
Static x & y should be the same type as touchData.xValue &
touchData.yValue: uint16_t.
Their delta could be larger than int8_t and should be constrained to
mouse_xy_report_t.
2022-07-26 19:35:41 +01:00
Joel Challis c982d6c5e3
Avoid OOB in dynamic_keymap_reset (#17695) 2022-07-26 17:38:28 +01:00
Daniel Kao 1de6811ebe
Cirque circular scroll: Support POINTING_DEVICE_COMBINED (#17654) 2022-07-25 23:19:33 -07:00
Drashna Jaelre 325da02e57
Fix QK_MAKE's reboot check (#17795) 2022-07-25 23:06:26 +01:00
JayceFayne d02cefe613
implement `tap_code16_delay` (#17748) 2022-07-23 19:21:20 +01:00
jack a6f3194397
Add ability to enter bootloader mode from `QK_MAKE` (#17745) 2022-07-23 17:43:32 +01:00
Drashna Jaelre 5f32690cba
Move Pointing Device Initialization (#17740)
Move Pointing Device Initialization to after Split Post Initialization

If both pointing device and split is enabled, the pointing device init needs to be called after the split post init, otherwise the connection (serial/etc) isn't initialized yet, and any commands that need to send data over (such as calling the set cpi command) never get sent over.
2022-07-21 10:16:44 -07:00
Wilba 4efe6330c4
VIA Encoder Map Support (#17734) 2022-07-21 09:53:42 +10:00
mknj 9a31bbb3fa
fix syntax error (#17732) 2022-07-20 22:59:18 +01:00
Drashna Jaelre ee17ffadea
Move Pointing Device code to a subdirectory (#17684) 2022-07-20 17:32:00 +01:00
Drashna Jaelre 12eb6444c6
Add support for PAW3204 Optical Sensor (#17669)
Co-authored-by: gompa <gompa@h-bomb.nl>
Co-authored-by: Stefan Kerkmann <karlk90@pm.me>
2022-07-19 17:46:22 -07:00
Joel Challis 42eff8c372
Allow dynamic keymap to compile without via.h (#17703) 2022-07-18 11:55:27 +01:00
Albert Y 2f73e65837
Add LED limit call (#17679) 2022-07-14 12:37:47 +01:00
Albert Y 1862ac5454
Fix the use of LED limits (#17678) 2022-07-14 12:36:51 +01:00
Albert Y 300dab7962
[Code] Add solid reactive gradient mode (#17228) 2022-07-14 12:22:53 +01:00
Stefan Kerkmann 3c58f98929
[Core] PMW33XX drivers overhaul (#17613)
* PMW33XX drivers overhaul

This combines the PMW3389 and PM3360 drivers as they only differ in the
firmware blobs and CPI get and set functions. The following changes have
been made:

* PMW3389 now gets the same multi-sensor feature that is already available on the
  PMW3360.

* Introduced a shared pmw33xx_report_t struct is now directly readable via SPI
  transactions instead of individual byte-sized reads, saving multiple
  copies and bitshift operations.

* pmw33(89/60)_get_report functions had unreachable branches in their motion
  detection logic these have been simplied as much as possible.

* The fast firmware upload option has been removed as this becomes obsolete by
  the newly introduced polled waiting functions for ChibiOS polled waiting

* PMW33(60/89)_SPI_LSBFIRST and PMW33(60/89)_SPI_MODE config options
  have been removed as they don't need to be configurable.

* All PMW3389 and PMW3360 defines have been unified to a PMW33XX prefix
  to reduce code duplication and make the defines interchangeable

* Adjust keyboards to PMW33XX naming scheme
2022-07-14 11:50:00 +02:00
Drashna Jaelre 09e4001bba
[Bug] Fix compile issue with LED Matrix (#17658) 2022-07-13 01:10:51 -07:00
Drashna Jaelre 1dfe2bb49a
Update LED/RGB Matrix flag function behavior (#17651) 2022-07-12 22:18:02 -07:00
Daniel Kao 5db705d054
Cirque trackpad features: circular scroll, inertial cursor (#17482) 2022-07-12 21:17:40 -07:00
FREEWING.JP 61df87ae2c
Added Delay time dynamic keymap's macro feature (#16810)
Co-authored-by: Joel Challis <git@zvecr.com>
Co-authored-by: Ryan <fauxpark@gmail.com>
2022-07-11 12:59:16 -07:00
Stefan Kerkmann 643f6367a1
[Fix] Patches after printf library update (#17584)
* Add missing '(' to print_bin_reverse32 declaration
* Fix insufficient character buffers on satisfaction75
* Remove \0 character in format string and use corrected offset math
  instead on rocketboard 16
* Replace snprintf_ with snprintf for djinn
* Explicitly ignore format checks for tracktyl manuform that uses %b
  specifier
* Print properly escaped version string in command.c, as PRODUCT or
  other defines can contain constructs like 'Vendor keyboard 66%' which
  will be interpreted as a format specifier
2022-07-07 14:14:09 +02:00
Stefan Kerkmann 8224f62806
Make debounce() signal changes in the cooked matrix as return value (#17554) 2022-07-07 10:00:40 +02:00
Stefan Kerkmann d9bb189e25
[Core] Update mpaland/printf to eyalroz/printf fork (#16163)
mpaland printf implementation was abandoned in ~2019 and the fork by
eyalroz is now regarded to be the goto replacement of it. So this commit
incoporates the changes needed to use this fork in QMK.

Note that pointer ptrdiff_t is always supported since commit
51c90f93a97fdaef895783ecbe24569be0db7cb8
2022-07-07 09:27:50 +02:00
Nick Brassel 0e5d67145a
Allow for `keymaps` array to be implemented in a file other than `$(KEYMAP_C)` (#17559) 2022-07-05 08:58:35 +10:00
QMK Bot a6faf3bc9e Merge remote-tracking branch 'origin/master' into develop 2022-07-02 12:49:52 +00:00
CoffeeIsLife 0365f640af
Allow for RGB actions to take place on Keydown instead of Keyup (#16886)
* Allow for switch on keydown

* add docs
2022-07-02 22:49:49 +10:00
Marek Wyborski b8e8a20ca6
Improve ENCODER_DEFAULT_POS to recognize lost ticks (#16932) 2022-07-02 22:12:41 +10:00
Ryan 3ecb0a80af
Feature-ify Send String (#17275) 2022-07-02 22:10:08 +10:00
Osamu Aoki 871eeae4ea
PoC: Swap Escape and Caps (#16336) 2022-07-02 22:08:48 +10:00
torkel104 8b78fac451
Fix keys being discarded after using the leader key (#17287) 2022-07-02 22:03:40 +10:00
Jouke Witteveen 0112938140
Expose the time of the last change to the LED state (#17222) 2022-07-02 21:57:05 +10:00
FREEWING.JP 9dc7b9d40c
Added Wait time to sending each Keys for Dynamic Macros function (#16800)
Co-authored-by: Joel Challis <git@zvecr.com>
2022-07-02 21:48:26 +10:00
Nick Brassel 5846b40f74
RP2040 emulated EEPROM. (#17519) 2022-07-02 15:18:50 +10:00
QMK Bot 3def7b98d4 Merge remote-tracking branch 'origin/master' into develop 2022-07-02 03:23:21 +00:00
Nick Brassel c8fbfca1b6
[QP] Explicit buffer alignment. (#17532) 2022-07-02 13:22:46 +10:00
Nick Brassel b67ae67687
[QP] Add ILI9488 support. (#17438) 2022-07-02 13:20:45 +10:00
Stefan Kerkmann d717396708
[Core] Add Raspberry Pi RP2040 support (#14877)
* Disable RESET keycode because of naming conflicts

* Add Pico SDK as submodule

* Add RP2040 build support to QMK

* Adjust USB endpoint structs for RP2040

* Add RP2040 bootloader and double-tap reset routine

* Add generic and pro micro RP2040 boards

* Add RP2040 onekey keyboard

* Add WS2812 PIO DMA enabled driver and documentation

Supports regular and open-drain output configuration. RP2040 GPIOs are
sadly not 5V tolerant, so this is a bit use-less or needs extra hardware
or you take the risk to fry your hardware.

* Adjust SIO Driver for RP2040

* Adjust I2C Driver for RP2040

* Adjust SPI Driver for RP2040

* Add PIO serial driver and documentation

* Add general RP2040 documentation

* Apply suggestions from code review

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

Co-authored-by: Nick Brassel <nick@tzarc.org>
2022-06-30 13:19:27 +02:00
Nick Brassel 34e244cecf
Wear-leveling EEPROM drivers: `embedded_flash`, `spi_flash`, `legacy` (#17376) 2022-06-30 07:42:23 +10:00
Dasky dcdc7290e5
RGB Matrix Heatmap - Skip positions with NO_LED (#17488) 2022-06-29 01:25:03 -07:00
QMK Bot f7eb7926e8 Merge remote-tracking branch 'origin/master' into develop 2022-06-29 08:17:56 +00:00
Drashna Jaelre 74bec84740
[Bug] Fix 3 speed mousekey mode (#17500) 2022-06-29 01:16:31 -07:00
QMK Bot 2daad28ab1 Merge remote-tracking branch 'origin/master' into develop 2022-06-28 22:29:19 +00:00
Drashna Jaelre 43f8d365ba
[Bug] Fix issue with mousekey movement getting stuck (#17493)
* [Bug] Fix issue with mousekey movement getting stuck

* Lint
2022-06-28 15:28:44 -07:00
Nick Brassel 01ecf332ff
Generic wear-leveling algorithm (#16996)
* Initial import of wear-leveling algorithm.

* Alignment.

* Docs tweaks.

* Lock/unlock.

* Update quantum/wear_leveling/wear_leveling_internal.h

Co-authored-by: Stefan Kerkmann <karlk90@pm.me>

* More tests, fix issue with consolidation when unlocked.

* More tests.

* Review comments.

* Add plumbing for FNV1a.

* Another test checking that checksum mismatch clears the cache.

* Check that the write log still gets played back.

Co-authored-by: Stefan Kerkmann <karlk90@pm.me>
2022-06-27 07:18:21 +10:00
Thomas Kriechbaumer 0d013a21e1
[Split] Verify Split Pointing Device config (#17481) 2022-06-26 09:15:25 -07:00
Thomas Kriechbaumer 01bc974365
improvements for Cirque Pinnacle trackpads (#17091) 2022-06-25 22:22:28 +02:00
precondition 3b9e186019
Do not enable PERMISSIVE_HOLD when TAPPING_TERM exceeds 500ms (#15674) 2022-06-24 12:40:09 +02:00
precondition 7060cb7b26
Refactor steno and add `STENO_PROTOCOL = [all|txbolt|geminipr]` (#17065)
* Refactor steno into STENO_ENABLE_[ALL|GEMINI|BOLT]

* Update stenography documentation

* STENO_ENABLE_TXBOLT → STENO_ENABLE_BOLT

TXBOLT is a better name but BOLT is more consistent with the
pre-existing TX Bolt related constants, which all drop the "TX " prefix

* Comments

* STENO_ENABLE_[GEMINI|BOLT|ALL] → STENO_PROTOCOL = [geminipr|txbolt|all]

* Add note on lacking V-USB support

* Clear chord at the end of the switch(mode){send_steno_chord} block

* Return true if NOEVENT

* update_chord_xxx → add_xxx_key_to_chord

* Enable the defines for all the protocols if STENO_PROTOCOL = all

* Mention how to use `steno_set_mode`

* Set the default steno protocol to "all"

This is done so that existing keymaps invoking `steno_set_mode` don't
all suddenly break

* Add data driver equivalents for stenography feature

* Document format of serial steno packets

(Thanks dnaq)

* Add missing comma
2022-06-23 20:43:24 +02:00
SmugSam 2239527871
In honor of king terry (#17387) 2022-06-23 02:47:15 +01:00
Dasky be42c5fb98
Fix RGB heatmap to use XY positions and use correct led limits (#17184)
* Fix RGB heatmap to use XY positions

* lower effect area limit and make configurable

* tidy up macro

* Fix triggering in both directions.

* add docs

* fix bug when decreasing value

* performance tweak
2022-06-21 10:53:34 -07:00
Dasky 62eaec52e0
Init eeconfig before reading handedness (#17256) 2022-06-20 15:31:27 +01:00
Albert Y c725b6bf89
[Core] Mouse key kinetic mode fix (#17176)
Co-authored-by: Drashna Jaelre <drashna@live.com>
2022-06-19 11:15:55 -07:00
Drashna Jaelre 0da6562c4d
Make default layer size 16-bit (#15286)
Co-authored-by: James Young <18669334+noroadsleft@users.noreply.github.com>
2022-06-19 07:37:51 +10:00
Jouke Witteveen 1706da9054
tap-dance: Restructure code and document in more detail (#16394) 2022-06-13 22:12:55 +02:00
Drashna Jaelre 80034a847f
Ensure that rgb+via compiles in all cases (#17355) 2022-06-10 22:01:46 -07:00
Dasky 568924c76c
Add missing bracket for VIA brightness scaling (#17354) 2022-06-10 19:07:58 -07:00
yiancar 0fd08da806
Scale brigthness for VIA (#17352)
Co-authored-by: yiancar <yiancar@gmail.com>
2022-06-10 17:20:01 -07:00
Drashna Jaelre 0ab51ee29d
Add support for large Mouse Reports (#16371)
Co-authored-by: Sergey Vlasov <sigprof@gmail.com>
Co-authored-by: Ryan <fauxpark@gmail.com>
2022-06-08 18:39:16 -07:00
Dasky 85b3b98570
Move SPLIT_HAND_PIN setup to split_pre_init (#17271)
* Move SPLIT_HAND_PIN setup to split_pre_init

* doppelganger should use old behaviour

* Add comment for future

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

Co-authored-by: Joel Challis <git@zvecr.com>
2022-06-06 01:33:32 +01:00
QMK Bot d6402fe9fb Merge remote-tracking branch 'origin/master' into develop 2022-06-05 11:15:11 +02:00
Pascal Getreuer 95d20e6d8b
Fix and add unit tests for Caps Word to work with Unicode Map, Auto Shift, Retro Shift. (#17284)
* Fix Caps Word and Unicode Map

* Tests for Caps Word + Auto Shift and Unicode Map.

* Fix formatting

* Add additional keyboard report expectation macros

This commit defines five test utilities, EXPECT_REPORT, EXPECT_UNICODE,
EXPECT_EMPTY_REPORT, EXPECT_ANY_REPORT and EXPECT_NO_REPORT for use with
TestDriver.

EXPECT_REPORT sets a gmock expectation that a given keyboard report will
be sent. For instance,

  EXPECT_REPORT(driver, (KC_LSFT, KC_A));

is shorthand for

  EXPECT_CALL(driver,
      send_keyboard_mock(KeyboardReport(KC_LSFT, KC_A)));

EXPECT_UNICODE sets a gmock expectation that a given Unicode code point
will be sent using UC_LNX input mode. For instance for U+2013,

  EXPECT_UNICODE(driver, 0x2013);

expects the sequence of keys:

  "Ctrl+Shift+U, 2, 0, 1, 3, space".

EXPECT_EMPTY_REPORT sets a gmock expectation that a given keyboard
report will be sent. For instance

  EXPECT_EMPTY_REPORT(driver);

expects a single report without keypresses or modifiers.

EXPECT_ANY_REPORT sets a gmock expectation that a arbitrary keyboard
report will be sent, without matching its contents. For instance

  EXPECT_ANY_REPORT(driver).Times(1);

expects a single arbitrary keyboard report will be sent.

EXPECT_NO_REPORT sets a gmock expectation that no keyboard report will
be sent at all.

* Add tap_key() and tap_keys() to TestFixture.

This commit adds a `tap_key(key)` method to TestFixture that taps a
given KeymapKey, optionally with a specified delay between press and
release.

Similarly, the method `tap_keys(key_a, key_b, key_c)` taps a sequence of
KeymapKeys.

* Use EXPECT_REPORT, tap_keys, etc. in most tests.

This commit uses EXPECT_REPORT, EXPECT_UNICODE, EXPECT_EMPTY_REPORT,
EXPECT_NO_REPORT, tap_key() and tap_keys() test utilities from the
previous two commits in most tests. Particularly the EXPECT_REPORT
macro is frequently useful and makes a nice reduction in boilerplate
needed to express many tests.

Co-authored-by: David Kosorin <david@kosorin.net>
2022-06-05 09:14:02 +02:00
Nick Brassel 08c556b78b
Add keymap wrappers for introspection into the keymap. (#17229)
* Introspection handlers for keymaps.

* Renaming.
2022-06-05 10:26:02 +10:00
Dasky af02baae78
Allow larger SPLIT_USB_TIMEOUT with default SPLIT_USB_TIMEOUT_POLL (#17272)
* Switch SPLIT_USB_DETECT loop to uint16_t

* Add assertion
2022-06-01 00:10:05 +01:00
precondition d44a950c10
Use TAP_HOLD_CAPS_DELAY for KC_LOCKING_CAPS_LOCK (#17099) 2022-05-30 22:55:33 -07:00
Nick Brassel 8545473307
Removes terminal from QMK. (#17258) 2022-05-30 22:38:08 -07:00
Pascal Getreuer b5608cbb6d
Continue Caps Word when AltGr (right Alt) is held. (#17156)
This is a minor bug fix for Caps Word. Currently, Caps Word turns off
whenever a non-shift mod becomes active. This is done to avoid
interfering with hotkeys.

This commit makes an exception to continue Caps Word when AltGr (right
Alt) is held. Outside the US, the AltGr key is used to type additional
symbols (https://en.wikipedia.org/wiki/AltGr_key). Depending on the
language, these may include symbols used within words like accented
letters where it would be desirable to continue Caps Word.
2022-05-20 01:39:00 +01:00
Ryan 4a8bd7b9a5
Rename keymap_extras headers for consistency (#16939) 2022-05-15 21:27:01 +10:00
Drashna Jaelre f090881aeb
[Feature] Add support for multiple switchs/solenoids to Haptic Feedback engine (#15657) 2022-05-15 21:24:35 +10:00
Drashna Jaelre db887e63d7
Enhancement and fixes of "Secure" feature (#16958) 2022-05-14 23:07:08 +01:00
Drashna Jaelre cd8d2b7f7f
Revert "Fix kinetic mouse mode (#16951)" (#17095) 2022-05-14 13:03:07 -07:00
Pascal Getreuer 68b16bba68
[Core] Add Caps Word feature to core (#16588)
Co-authored-by: precondition <57645186+precondition@users.noreply.github.com>
Co-authored-by: Drashna Jaelre <drashna@live.com>
2022-05-14 16:00:32 +10:00
Yorick Peterse 90eef4cd15
Fix kinetic mouse mode (#16951)
Co-authored-by: Jan Christoph Ebersbach <jceb@e-jc.de>
2022-05-14 15:26:12 +10:00
Drashna Jaelre 787a68948f
[Core] Add Reboot keycode to core (#15990) 2022-05-14 13:35:49 +10:00
Joel Challis ef8db9f104
Remove ARM pgm_read_word workaround in rgblight (#16961) 2022-04-28 23:58:55 -07:00
Joel Challis d458d4a596
Move disable_jtag to platforms (#16960) 2022-04-29 01:23:50 +01:00
Ryan 0de08b09e7
Sendstring keycode overhaul (#16941) 2022-04-29 09:36:48 +10:00
QMK Bot fc52a30780 Merge remote-tracking branch 'origin/master' into develop 2022-04-27 23:12:15 +00:00
Ryan e99d6d582c
Add Ukrainian keymap header (#16947)
* Add Ukrainian keymap header

* Docs
2022-04-28 00:11:41 +01:00
Ryan 645359e5d0
Joystick: Simplify report descriptor and clean up error messages (#16926) 2022-04-26 08:54:34 +10:00
QMK Bot 178b70f355 Merge remote-tracking branch 'origin/master' into develop 2022-04-25 09:30:59 +00:00
Ryan 73688057f4
Add missing dead key LUTs for sendstring headers (#16929) 2022-04-25 19:30:20 +10:00
customMK 0100629fa2
Fix AVR backlight breathing: low brightness limit & exceeding breathing table max index (#16770)
Co-authored-by: Drashna Jaelre <drashna@live.com>
Co-authored-by: David Hoelscher <infinityis@users.noreply.github.com>
2022-04-22 17:33:59 +10:00
QMK Bot bcb7e471d5 Merge remote-tracking branch 'origin/master' into develop 2022-04-21 16:34:10 +00:00
Simon Arlott 1e389c7904
rgblight: Fix rgblight_blink_layer when multiple layers are active (#16824) 2022-04-21 09:33:29 -07:00
Drashna Jaelre 9056775e20
Add hacky via support for RGB Matrix (#16086) 2022-04-19 21:18:28 +10:00
KoenGoe 671b62efab
Fixes #16705 : digital rain follows val (#16716)
Co-authored-by: Drashna Jaelre <drashna@live.com>
2022-04-19 21:02:21 +10:00
Stefan Kerkmann 7712a286dc
[Core] Use a mutex guard for split shared memory (#16647) 2022-04-19 20:56:16 +10:00
uqs 690dc4bdaf
Add support for multiple sensors to pmw3360 (#15996) 2022-04-19 20:29:17 +10:00
Denis Savran b1ceb4bb6a
Fix one-shot locked modifiers (#16114)
* Fix state updates of one-shot locked modifiers

Activating additional one-shot locked modifiers removed previously enabled locked modifiers from the state.
`get_oneshot_locked_mods` returned zero when two or more one-shot locked modifiers were enabled and then one was disabled.

* Do not delete one-shot locked modifiers on a one-shot layer toggle

Non-locked one-shot modifiers are not removed so this behavior adds inconsistency.
Also the one-shot locked modifiers state was reset without unregistering any modifiers.
2022-04-18 02:12:25 -07:00
Michał Szczepaniak 5b6faa173b
Add customizable snake and knight animation increments (#16337) 2022-04-18 02:07:36 -07:00
Nick Brassel df95495d5b
Fix #16859. (#16865) 2022-04-17 00:09:37 +01:00
Stefan Kerkmann 147e57fd59
[QP] Check BPP capabilities before loading the palette (#16863) 2022-04-17 08:30:51 +10:00
Simon Arlott 5841c755ae
rgblight: Add functions to stop blinking one or all but one layer (#16859) 2022-04-17 00:02:32 +02:00
Albert Y e5918cf968
Heatmap incorrect matrix effect workaround (#16315) 2022-04-16 11:34:07 -07:00
Jouke Witteveen 8f585153c4
Add GET_TAPPING_TERM macro to reduce duplicate code (#16681)
* Add GET_TAPPING_TERM macro to reduce duplicate code

The macro gives the right tapping term depending on whether per-key
tapping terms and/or dynamic tapping terms are enabled. Unnecessary
function calls and variable resolution are avoided.

Fixes #16472.

* Use GET_TAPPING_TERM for Cirque trackpads

Co-authored-by: Stefan Kerkmann <karlk90@pm.me>
2022-04-16 11:24:09 -07:00
Joel Challis 92a61aa0cd
Implement XAP 'secure' core requirements (#16843)
Co-authored-by: Drashna Jaelre <drashna@live.com>
Co-authored-by: Stefan Kerkmann <karlk90@pm.me>
2022-04-16 11:13:05 -07:00
QMK Bot ae4d518352 Merge remote-tracking branch 'origin/master' into develop 2022-04-16 17:41:18 +00:00
Simon Arlott 1cfe49714f
rgblight: Limit max repeat times in rgblight_blink_layer_repeat (#16860) 2022-04-16 10:40:48 -07:00
Nick Brassel 1f2b1dedcc
Quantum Painter (#10174)
* Install dependencies before executing unit tests.

* Split out UTF-8 decoder.

* Fixup python formatting rules.

* Add documentation for QGF/QFF and the RLE format used.

* Add CLI commands for converting images and fonts.

* Add stub rules.mk for QP.

* Add stream type.

* Add base driver and comms interfaces.

* Add support for SPI, SPI+D/C comms drivers.

* Include <qp.h> when enabled.

* Add base support for SPI+D/C+RST panels, as well as concrete implementation of ST7789.

* Add support for GC9A01.

* Add support for ILI9341.

* Add support for ILI9163.

* Add support for SSD1351.

* Implement qp_setpixel, including pixdata buffer management.

* Implement qp_line.

* Implement qp_rect.

* Implement qp_circle.

* Implement qp_ellipse.

* Implement palette interpolation.

* Allow for streams to work with either flash or RAM.

* Image loading.

* Font loading.

* QGF palette loading.

* Progressive decoder of pixel data supporting Raw+RLE, 1-,2-,4-,8-bpp monochrome and palette-based images.

* Image drawing.

* Animations.

* Font rendering.

* Check against 256 colours, dump out the loaded palette if debugging enabled.

* Fix build.

* AVR is not the intended audience.

* `qmk format-c`

* Generation fix.

* First batch of docs.

* More docs and examples.

* Review comments.

* Public API documentation.
2022-04-13 18:00:18 +10:00
QMK Bot 4ce0203208 Merge remote-tracking branch 'origin/master' into develop 2022-04-09 18:49:52 +00:00
Simon Arlott 84c9d6ff39
[Bug] Fix matrix scan reporting interval (#16825) 2022-04-09 11:49:20 -07:00
Ryan c05e8afe45
Joystick feature updates (#16732)
* Joystick feature updates

* Move new functions to joystick.h

* Docs
2022-03-26 18:38:09 +00:00
Drashna Jaelre 02655690f4
[Core] Add compile/make macro to core (#15959)
* [Core] Add KC_MAKE keycode to core

fix linting

fix testing error

work around test idiocyncracies

fix more lint

something something stupid tests

add doc

* updates based on feedback

* Add bad names

* Fixup docs

* semantics but cleaner

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

* Hide oneshot checks behind preprocessors

* Move no-compile option around

* Fix formatting

* make shift optional

* Make opt in

* fix formatting

* update send string function name

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

Co-authored-by: precondition <57645186+precondition@users.noreply.github.com>
Co-authored-by: Joel Challis <git@zvecr.com>
2022-03-17 21:19:34 +00:00
Stefan Kerkmann 7e669421f8
Rename TICK to TICK_EVENT to prevent naming conflicts (#16649) 2022-03-14 20:06:21 +00:00
jack 86a35483a1
Mousekeys fix (#16640) 2022-03-13 18:53:53 -07:00
Drashna Jaelre b8574efcd6
Fix oneshot toggle logic (#16630)
* Fix oneshot toggle logic

* Enable oneshots by default

* Decrement eeconfig magic number due to eeconfig changes
2022-03-14 01:11:42 +00:00
Drashna Jaelre 921b9dad6c
[Core] Move `has_mouse_report_changed` function to `report.c` (#16543)
* Move 'has_mouse_report_changed' checkto report.c

* change mousekeys to use memcpy

* fix linting issues
2022-03-14 00:01:47 +00:00
Pascal Getreuer 0eb42e042c
Fix flipped One Shot logic (#16617) 2022-03-11 13:28:52 +00:00
QMK Bot cf44bde909 Merge remote-tracking branch 'origin/master' into develop 2022-03-10 12:18:47 +00:00
Ryan bd70f5261c
Remove `matrix_key_count()` (#16603)
* Remove `matrix_key_count()`

* Remove `matrix_bitpop()`
2022-03-10 12:18:07 +00:00
Nick Brassel edd1f33013
Missed some erroneous prints. (#16597) 2022-03-10 05:43:12 +11:00
Nick Brassel 77180a6649
Fixup builds. (#16596) 2022-03-09 17:09:38 +00:00
Nick Brassel 5d67c4d908
Fix missing definition for non-encoder case. (#16593) 2022-03-09 21:06:33 +11:00
Nick Brassel 8d5eacb7dd
Add support for encoder mapping. (#13286) 2022-03-09 19:29:00 +11:00
Nick Brassel 2f6751e48a
Asymmetric encoders, encoder tests. (#16068) 2022-03-08 16:58:05 +11:00
QMK Bot e71f8f89d2 Merge remote-tracking branch 'origin/master' into develop 2022-03-08 04:17:05 +00:00
ZiTe 0880850b15
[Bug] Rename has_mouse_report_changed parameters (#16417)
Fixes compilation issues when bluetooth is enabled, due to issues 
with cpp used by bluetooth code. 

Co-authored-by: Ryan <fauxpark@gmail.com>
Co-authored-by: Drashna Jaelre <drashna@live.com>
2022-03-07 20:16:35 -08:00
Ryan f634fddd34
Remove `send_unicode_hex_string()` (#16518) 2022-03-04 11:04:45 +00:00
Gompa ae2c77c827
[Bug] fix v-usb connection enumeration, ifdef workaround (#16511)
Co-authored-by: Joel Challis <git@zvecr.com>
2022-03-03 09:24:04 -08:00
QMK Bot 25ba9b41c1
Format code according to conventions (#16421) 2022-02-21 08:29:54 -08:00
fauxpark a44abeb99a Merge remote-tracking branch 'upstream/master' into develop 2022-02-22 03:04:41 +11:00
Takeshi ISHII b1de11c275
Fix a potential bug in encoder_init(). (#16372)
After executing `setPinInputHigh(pin)`, it is necessary to wait for the charging time to read from the corresponding pin. This is the same as requiring `matrix_output_unselect_delay()` after doing `unselect_row()` in matrix.c.
2022-02-21 23:13:06 +09:00
fauxpark 5b688a09ec Merge remote-tracking branch 'upstream/master' into develop 2022-02-19 04:27:09 +11:00
Joakim Tufvegren 7dd993fb06
Fix build error for LED Matrix effect solid_reactive_wide. (#16383) 2022-02-17 08:53:06 -08:00
Drashna Jael're da280739ef
Merge remote-tracking branch 'origin/master' into develop 2022-02-17 08:44:30 -08:00
Joakim Tufvegren 7f63bcf38b
[Bug] Re-add call to `suspend_power_down_kb()` (#16382) 2022-02-17 08:33:07 -08:00
QMK Bot 63646e8906
Format code according to conventions (#16322) 2022-02-12 18:29:31 +00:00
Dasky 00cc64638c
Fix right side ws2812 leds having two indices (#15985)
* Fix right side leds having two indices

* remove redundant left check
2022-02-11 20:13:22 +00:00
precondition 7148a69d5e
Pass in the keyrecord_t of the dual-role/tapping key when calling per-key tap hold functions (#15938)
* Replace keyp by &tapping_key in the record arg of per-key tap hold funcs

* Replace NULL by &(keyrecord_t){} in 2nd arg of get_tapping_term
2022-02-11 19:53:26 +00:00
Joel Challis 39bec3bfa5
Various fixes for matrix _RIGHT handling (#16292)
* Various fixes for matrix _RIGHT handling

* clang
2022-02-11 19:01:16 +00:00
Nick Brassel a2ffdb4abd Merge remote-tracking branch 'upstream/master' into develop 2022-02-09 16:00:09 +11:00
Nick Brassel efdaa7f972
Add support for driving unselected row/col. (#16278) 2022-02-09 15:50:13 +11:00
Drashna Jaelre 9124f5dc2d
Add layout change callbacks to VIA (#16087)
* Add layout change callbacks to VIA

* Update worklouder example
2022-02-06 22:01:04 +00:00
MasterSpoon 0452ad9479
Add RGB matrix & LED Matrix support for IS31FL3742A, IS31FL3743A, IS31FL3745, IS31FL3746A (#14989)
Co-authored-by: Xelus22 <17491233+Xelus22@users.noreply.github.com>
2022-02-06 09:04:43 -08:00
Desprez Jean-Marc 5a0e129f11
[Bug] Fix layer_state restoration at end of dynamic macro feature (#16230) 2022-02-06 08:55:16 -08:00
Adam Lickel eb8ace0855
RGB Matrix: Reload from EEPROM (#15923)
Co-authored-by: Sergey Vlasov <sigprof@gmail.com>
2022-02-04 19:08:48 -08:00
QMK Bot b4ceefde37
Format code according to conventions (#16211) 2022-02-04 19:23:30 +00:00
Albert Y 6a35788b63 [Core] Add Pixel Flow RGB matrix effect (#15829)
* Initial PIXEL FLOW matrix effect commit

* Commit suggested use of rgb_matrix_check_finished_leds

Co-authored-by: Sergey Vlasov <sigprof@gmail.com>

* Code change support for split RGB

Co-authored-by: Sergey Vlasov <sigprof@gmail.com>
2022-02-05 05:58:16 +11:00
QMK Bot 578d3f6951 Merge remote-tracking branch 'origin/master' into develop 2022-02-04 18:57:58 +00:00
Nick Brassel 1fffcbc298
Revert "[Core] Add Pixel Flow RGB matrix effect (#15829)" (#16209)
This reverts commit e8fa329073.
2022-02-05 05:57:21 +11:00
QMK Bot f2384d062b Merge remote-tracking branch 'origin/master' into develop 2022-02-04 18:56:47 +00:00
Albert Y e8fa329073
[Core] Add Pixel Flow RGB matrix effect (#15829)
* Initial PIXEL FLOW matrix effect commit

* Commit suggested use of rgb_matrix_check_finished_leds

Co-authored-by: Sergey Vlasov <sigprof@gmail.com>

* Code change support for split RGB

Co-authored-by: Sergey Vlasov <sigprof@gmail.com>
2022-02-05 05:55:51 +11:00
Joel Challis 135c935990
Initial migration of suspend callbacks (#16067)
* Initial migration of suspend logic

* Add header
2022-02-05 05:10:00 +11:00
Nick Brassel e22efc037a
Don't make EEPROM size assumptions with dynamic keymaps. (#16054)
* Don't make EEPROM size assumptions with dynamic keymaps.

* Add support for checking against emulated flash, error out if someone attempts to build a board without specifying EEPROM size.

* Reorder defines so that MCU is considered last.

* Refactor EEPROM definitions for simplicity.

* Fix max sizing of kabedon/kabedon980.

* Fix max sizing of mechlovin/olly/jf.

* Fix unit tests.

* Review comments, add messages with values during build failures.
2022-02-02 15:04:37 +11:00
QMK Bot b79b8dcdd0
Format code according to conventions (#16110) 2022-01-29 12:25:49 +00:00
Pete Sevander d700447dda
Combo `TAP_CODE_DELAY` and `clear_weak_mods` (#15866) 2022-01-28 23:19:36 -08:00
Ga68 1f59fe6d1b
Adjust tap_code16 to account for TAP_HOLD_CAPS_DELAY (#15635)
Co-authored-by: Ga68 <github.ga68.e@grxme.com>
2022-01-28 23:03:21 -08:00
QMK Bot f25977bcd4 Merge remote-tracking branch 'origin/master' into develop 2022-01-27 15:37:50 +00:00
KraXen72 b31f814e8c
Fixes for slovak language-specific keycodes (#16019) 2022-01-27 15:36:43 +00:00
Stefan Kerkmann be59e8af2b
Deprecate split transactions status field (#16023) 2022-01-26 21:13:27 -08:00
Dasky 7b31fc54df
Enable a default task throttle for split pointing. (#15925) 2022-01-26 19:24:29 +00:00
QMK Bot efbfd30318 Merge remote-tracking branch 'origin/master' into develop 2022-01-25 13:41:28 +00:00
Ryan 3e0ee6fb74
Fix joystick button off-by-one error (#16037) 2022-01-25 13:40:55 +00:00
Joel Challis 5249a606f1
Fix up issue with PROGMEM and hand_swap_config (#16027) 2022-01-24 22:20:08 +00:00
Ryan 1d11ae3087
Rip out old macro and action_function system (#16025)
* Rip out old macro and action_function system

* Update quantum/action_util.c

Co-authored-by: Joel Challis <git@zvecr.com>
2022-01-24 21:22:20 +00:00
Joel Challis a8700404f7
Relocate matrix_init_quantum content (#15953)
* Relocate matrix_init_quantum content

* Update include order

* Fix cherry pick from 15722
2022-01-23 02:41:57 +00:00
Drashna Jaelre 8101a836a4
[Bug] Fix compilation issues for led indicators (#16001) 2022-01-22 23:43:39 +00:00
Joel Challis eddd1c0567
Fix BACKLIGHT_CAPS_LOCK warning (#15999)
* Fix BACKLIGHT_CAPS_LOCK warning

* align defs
2022-01-22 23:11:42 +00:00
Joel Challis 6e83b44940
Align location of some host led logic (#15954)
* Align location of host led logic

* Move more

* align ifdefs

* Fix up includes

* Move callback defs

* Convert comment to build message
2022-01-22 21:17:02 +00:00
Ryan Hausen 489475814a
fixed typo in orange HSV colors decalartion (#15976) 2022-01-22 06:12:14 +00:00
Albert Y fed36fc5f8
Adjust mouse key defaults (#15883) 2022-01-21 22:09:44 -08:00
Drashna Jaelre 909003cce9
[Bug] Fix hack for chibiOS reset name (#15984) 2022-01-22 04:59:19 +00:00
Ryan b45a037c7e
Rename some Quantum keycodes (#15968)
* Rename some Quantum keycodes

* Tweak EEPROM clear and debug keycode short aliases
2022-01-22 03:34:15 +00:00
Joel Challis d840ef2b28
Relocate matrix_scan_quantum tasks (#15882)
* Move matrix_scan_quantum tasks

* Fix tests

* Fix up missing refs
2022-01-19 17:38:48 +00:00
Albert Y 1d3c2ceded
Add init function to clear previous effect (#15815) 2022-01-17 06:48:09 +11:00
QMK Bot 9cd2024814 Merge remote-tracking branch 'origin/master' into develop 2022-01-15 07:28:32 +00:00
Drashna Jaelre 5bad37cb56
[Bug] Remove config.h include in dynamic_keymap.c (#15886) 2022-01-15 18:28:29 +11:00
Alabastard-64 2842ab4052
Add PMW3389 optical sensor Support (Updated) (#15740)
Co-authored-by: Drashna Jaelre <drashna@live.com>
2022-01-11 14:33:13 -08:00
Nick Brassel 0c402157fc
Advanced deferred_exec for core-side code. (#15579) 2022-01-10 18:26:46 +00:00
Pete Sevander 21958a9343
New combo configuration options (#15083)
Co-authored-by: precondition <57645186+precondition@users.noreply.github.com>
2022-01-09 12:02:25 -08:00
Joel Challis 7562f6644f
Slight tidy up of keyboard task loop (#15725) 2022-01-09 03:50:44 +00:00
Leo Deng 82d3bdb733
IS31FL3733 driver for LED Matrix (#15088) 2022-01-08 19:37:03 -08:00
Joel Challis 8dbc8a802c
Unify the key up/down behaviour of RGB keycodes (#15730) 2022-01-06 18:52:32 +11:00
QMK Bot 5fcdff9935
Format code according to conventions (#15693) 2021-12-31 23:46:23 +00:00
Dasky 4fe6f3cd7a
Fix split pointing for analog joystick (#15691)
Co-authored-by: Nick Brassel <nick@tzarc.org>
2021-12-31 15:38:23 -08:00
Drashna Jaelre 14d5c3f2f1
[Bug] Include missing string.h include (#15606) 2021-12-28 10:57:41 +11:00
Drashna Jaelre c86baf3ece
[Core] Fix bug and code regression for Split Common (#15603) 2021-12-28 10:01:51 +11:00
uqs d3952523fe
pwm3360 driver cleanup and diff reduction to adns9800 (#15559)
* Diff reduction between ADNS9800 and PMW3360 drivers.

They are very similar devices. This (somewhat) unreadable diff is
essentially a no-op, but it makes a `vimdiff` between the 2 drivers much
more readable.

* Cleanup pwm3360 driver some more.

Remove redundant calls to spi_start() and spi_stop(), as pmw3360_write()
will already call these.
2021-12-27 21:26:09 +11:00
Jay Greco ac31863021
Custom matrix lite support for split keyboards (#14674)
* Custom matrix lite support for split keyboards

* WIP: matrix -> matrix_common refactor

* Move matrix_post_scan() to matrix_common.c
2021-12-27 21:03:40 +11:00
QMK Bot eadfcb9a40
Format code according to conventions (#15590) 2021-12-27 14:34:15 +11:00
QMK Bot c20096c7aa Merge remote-tracking branch 'origin/master' into develop 2021-12-27 02:51:13 +00:00
Erik Berthold 2c8d46f408
fix RGB_DISABLE_TIMEOUT flicker on split keyboards (#14954) 2021-12-27 13:50:44 +11:00
Chad Austin 25713dc222
Add sym_defer_pr debouncer type (#14948) 2021-12-27 13:44:56 +11:00
Drashna Jaelre 672c6b4721
Make (un)register code functions weak (#15285) 2021-12-27 12:15:56 +11:00
QMK Bot f9cf09ebd1
Format code according to conventions (#15588) 2021-12-27 12:10:04 +11:00
Dasky 7f7364c559
[Core] Split support for pointing devices. (#15304)
* Draft implementation

* formatting

* fix combined buttons

* remove pimoroni throttle

* sync pointing on a throttle loop with checksum

* no longer used

* doh

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

* switch pimoroni to a cpi equivalent

* add cpi support

* allow user modification of seperate mouse reports

* a little tidy up

* add *_RIGHT defines.

* docs

* doxygen comments

* basic changelog

* clean up pimoroni

* small doc fixes

* Update docs/feature_pointing_device.md

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

* performance tweak if side has usb

* Don't run init funtions on wrong side

* renamed some variables for consistency

* fix pimoroni typos

* Clamp instead of OR

* Promote combined values to uint16_t

* Update pointing_device.c

Co-authored-by: Drashna Jaelre <drashna@live.com>
Co-authored-by: Nick Brassel <nick@tzarc.org>
2021-12-27 12:05:51 +11:00
vectorstorm 0391801267
Fixes potential wpm sampling overflow, along with code comment fixes (#15277)
Co-authored-by: Trevor Powell <trevor@vectorstorm.com.au>
2021-12-27 11:52:56 +11:00
QMK Bot 53472a4e7b Merge remote-tracking branch 'origin/master' into develop 2021-12-24 22:31:48 +00:00
Chris Broekema c4b03509da
Save a single byte of memory for joystick buttons (#15555)
Co-authored-by: Joel Challis <git@zvecr.com>
2021-12-24 14:31:15 -08:00
QMK Bot 3a2d01df6a Merge remote-tracking branch 'origin/master' into develop 2021-12-16 18:05:44 +00:00
billybraga f383d3d8be
Fix inverted gt and lt send_string mapping in canadian multilingual (#15487)
Co-authored-by: Ryan <fauxpark@gmail.com>
Co-authored-by: Billy Braga <bbraga@progi.com>
2021-12-16 10:05:06 -08:00
QMK Bot c8fd62432a Merge remote-tracking branch 'origin/master' into develop 2021-12-16 05:59:42 +00:00
Yoichiro Tanaka 231cd7a39f
Fix some wrong keycode macros in locale mapping files (#15488) 2021-12-16 16:59:04 +11:00
Ryan c12268807d
Migrate serial_uart usages to UART driver (#15479)
* Migrate Thermal Printer feature to UART driver

* Migrate 40percentclub UT47 to UART driver

* Migrate Centromere to UART driver

* Migrate Chimera Ergo to UART driver

* Migrate Chimera Let's Split to UART driver

* Migrate Chimera Ortho to UART driver

* Migrate Chimera Ortho Plus to UART driver

* Migrate Comet46 to UART driver

* Migrate Palm USB converter to UART driver

* Migrate Sun USB converter to UART driver

* Migrate Dichotomy to UART driver

* Migrate Honeycomb to UART driver

* Migrate Mitosis to UART driver

* Migrate Redox W to UART driver

* Migrate Uni660 to UART driver

* Migrate Telophase to UART driver
2021-12-15 11:00:39 +00:00
Stefan Kerkmann 8b865a9d64
[Core] Don't send keyboard reports that propagate no changes to the host (#14065) 2021-12-14 10:40:18 -08:00
Dipl.-Ing. Raoul Rubien, BSc 415faebd65
added missing audio_off_user() callback (#15457)
Co-authored-by: Raoul Rubien <raoul.rubienr@gmail.com>
2021-12-11 16:58:25 -08:00
Drashna Jaelre 5f7c0e3097
Add missing define for unicode common (#15416) 2021-12-06 11:36:30 -08:00
Drashna Jaelre 942b3cf16c
Generalize Unicode defines (#15409) 2021-12-06 09:38:36 -08:00
Joel Challis 2726856cde
Implement MAGIC_TOGGLE_CONTROL_CAPSLOCK (#15368) 2021-11-30 17:34:08 -08:00
Stefan Kerkmann c1297ceb97
[Core] Remove matrix_is_modified() and debounce_is_active() (#15349) 2021-11-29 08:22:10 -08:00
QMK Bot 5ebeb32ec0 Merge remote-tracking branch 'origin/master' into develop 2021-11-29 15:08:12 +00:00
Karl Shea 84b8cdc1a4
Fix bit loss in cie_lightness() when doing division to resolve #15331 (#15344)
* Fix bit loss in cie_lightness() when doing division.

* Use the right types

* Format

Co-authored-by: zvecr <git@zvecr.com>
2021-11-29 15:07:36 +00:00
wheredoesyourmindgo 7f67504993
Added cancel_key_lock function (#15321) 2021-11-29 00:17:07 -08:00
Stefan Kerkmann ca5670762b
Fix HOLD_ON_OTHER_KEY_PRESS after #11059 (#15307)
that broke compilation because of a typo: KEYPRESS should have been
KEY_PRESS
2021-11-28 05:54:51 +11:00
Drashna Jaelre b3fc33faf7
Re-add encoder tests (#15312)
Co-authored-by: Balz Guenat <balz.guenat@gmail.com>
2021-11-27 22:19:22 +11:00
Drashna Jaelre 4d0dd1eab7
[Bug] Revert Assymmetrical Split Encoder support (#12090) (#15311)
* Revert "fix broken macro in transport.h (#15239)"

This reverts commit 06f18e22d9.

* Revert "Rework encoders to enable asymmetric split keyboards (#12090)"

This reverts commit 32215d5bff.
2021-11-27 14:40:09 +11:00
precondition 4bac5f53d8
New feature: `DYNAMIC_TAPPING_TERM_ENABLE` (#11036)
* New feature: `DYNAMIC_TAPPING_TERM_ENABLE`

3 new quantum keys to configure the tapping term on the fly.

* Replace sprintf call in tapping_term_report by get_u16_str

* Replace tab with 4 spaces
2021-11-26 07:06:50 +11:00
Isaac Elenbaas d9393b8684
Add Retro Shift (Auto Shift for Tap Hold via Retro Tapping) and Custom Auto Shifts (#11059)
* Add Retro Shift and Custom Auto Shifts

* Fix compilation errors with no RETRO_SHIFT value
2021-11-25 23:12:14 +11:00
Nick Brassel 7746aefe94 Revert "[Tests] Increase QMK test coverage (#13789)"
This reverts commit b6054c0206.
2021-11-23 09:54:04 +11:00
Stefan Kerkmann b6054c0206
[Tests] Increase QMK test coverage (#13789)
* Add per-test keymaps

* Add better trace and info logs for failed unit-tests

* Add layer state assertion with tracing message

* Use individual test binaries configuration options

* Add basic qmk functionality tests

* Add tap hold configurations tests

* Add auto shift tests

* `qmk format-c

* Fix tests

Co-authored-by: Nick Brassel <nick@tzarc.org>
2021-11-23 08:15:04 +11:00
Drashna Jaelre 32a87d3517
Add uint to char functions (#15244)
* Add uint to char functions

* appease the all mighty lint

* Further appease Lint

* Update functions

* Add doxygen comment

* Update quantum/quantum.c

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

* Apply suggestions from code review

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

* Add declaration for get_numeric_string

* fix formatting and bug

Co-authored-by: Nick Brassel <nick@tzarc.org>
2021-11-23 08:13:22 +11:00
Zach White 08ce0142ba
Macros in JSON keymaps (#14374)
* macros in json keymaps

* add advanced macro support to json

* add a note about escaping macro strings

* add simple examples

* format json

* add support for language specific keymap extras

* switch to dictionaries instead of inline text for macros

* use SS_TAP on the innermost tap keycode

* add the new macro format to the schema

* document the macro limit

* add the json keyword for syntax highlighting

* fix format that vscode screwed up

* Update feature_macros.md

* add tests for macros

* change ding to beep

* add json support for SENDSTRING_BELL

* update doc based on feedback from sigprof

* document host_layout

* remove unused var

* improve carriage return handling

* support tab characters as well

* Update docs/feature_macros.md

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

* escape backslash characters

* format

* flake8

* Update quantum/quantum_keycodes.h

Co-authored-by: Nick Brassel <nick@tzarc.org>
2021-11-22 11:11:35 -08:00
Balz Guenat 06f18e22d9
fix broken macro in transport.h (#15239) 2021-11-20 20:09:21 +00:00
Balz Guenat 32215d5bff
Rework encoders to enable asymmetric split keyboards (#12090)
Co-authored-by: Balz Guenat <balz.guenat@siemens.com>
Co-authored-by: Nick Brassel <nick@tzarc.org>
2021-11-20 09:06:08 -08:00
Joel Challis 2728603fe6
Move tmk_core/common/<plat> (#13918) 2021-11-19 10:41:02 -08:00
Drashna Jaelre 50dc313e80
[Bug] Revert backlight pins on function call (#15205) 2021-11-19 06:06:55 +11:00
Drashna Jaelre 88eaf78628
[Bug] Fix missing variable for Backlight Breathing (#15199)
* [Bug] Fix missing varaible for Backlight Breathing

* Better fix

* formatting
2021-11-18 16:37:34 +11:00
QMK Bot cc7600cf0e
Format code according to conventions (#15196) 2021-11-18 08:07:45 +11:00
Mikkel Jeppesen e0a5056963
Made AVR backlight pwm resolution configurable (#7521)
* Made static backlight pwm resolution configurable

* Made breathing backlighting configurable too

* Finished my ifdef

* Ran clang-format

* Added missing semi-colon

* Solved weird behaviour by right-shifting the right amount

* Made breathing period scaled on actual pwm frequency

* Made the low end deadzone scaled on the top value

* Moved 'pwm_frequency' declaration outside ifdef

* Fixed 'never used' error

* Fixed 'never used' error

* Fixed breathing ISR to 120Hz

* Removed pwm_frequency constant
Constant is no longer needed since running the breathing ISR at a fixed 120Hz

* Re-add brightness limiting

* re-introduce scaling
2021-11-18 07:56:13 +11:00
QMK Bot 25b087925c
Format code according to conventions (#15195) 2021-11-17 20:42:00 +00:00
Albert Y 557e5ddf99
Rename RGB fractal (#15174)
Co-authored-by: filterpaper <filterpaper@localhost>
2021-11-16 11:14:57 -08:00
Drashna Jaelre 160b0558f5
Require explicit enabling of RGB Matrix modes (#15018) 2021-11-15 10:41:04 -08:00
vectorstorm c9fd698711
Reimplements WPM feature to be smaller & precise (#13902)
* Reimplements WPM feature.

 - Now calculates exact WPM over the last up to three seconds of typing.
 - WPM_SMOOTHING removed, as it's no longer needed.
 - WPM_SAMPLE_SECONDS added, to specify how long a period to average WPM
   over, set to 5 seconds by default.
 - WPM_SAMPLE_PERIODS added, to specify how many sampling buffers we'll
   use.  Each one uses one extra byte of space.  Having more will lead
   to smoother decay of WPM values.  Defaults to 50 (we're saving so
   many bytes of firmware space I felt like being extravagent, and this
   change is still a big size saving overall)
 - WPM_UNFILTERED option added (defaults to unset), which disables all
   filtering within the WPM feature.  This saves some space in the
   firmware and also reduces latency between typing and the WPM
   calculation measuring it.  (saves 70 bytes in my tests)
 - WPM_LAUNCH_CONTROL added (defaults to unset).  When typing begins
   while the current displayed WPM value is zero, the WPM calculation
   only considers the time elapsed since typing began, not the whole
   WPM_SAMPLE_SECONDS buffer.  The result of this is that the displayed
   WPM value much more rapidly reaches an accurate WPM value, even when
   results are being filtered. (costs 22 bytes in my tests)
 - Updates documentation to reflect changed options.

Saves about 900 bytes, in my tests, compared against the previous implementation,
with default settings.

* Apply suggestions from code review

Co-authored-by: Sergey Vlasov <sigprof@gmail.com>

Co-authored-by: Trevor Powell <trevor@vectorstorm.org>
Co-authored-by: Nick Brassel <nick@tzarc.org>
Co-authored-by: Sergey Vlasov <sigprof@gmail.com>
2021-11-16 05:40:52 +11:00
Nick Brassel 36d123e9c5
Add support for deferred executors. (#14859)
* Add support for deferred executors.

* More docs.

* Include from quantum.h

* Cleanup.

* Parameter checks

* Comments.

* qmk format-c

* I accidentally a few words.

* API name change.

* Apply suggestions from code review

Co-authored-by: Sergey Vlasov <sigprof@gmail.com>

* Review comments.

* qmk format-c

* Review comments.

Co-authored-by: Sergey Vlasov <sigprof@gmail.com>
2021-11-15 18:21:09 +00:00
Drashna Jaelre b3ee124da6
Add needed include to pointing_device.c (#15167) 2021-11-16 04:09:31 +11:00
Drashna Jaelre 56e3f06a26
Rework and expand Pointing Device support (#14343)
Co-authored-by: Dasky <32983009+daskygit@users.noreply.github.com>
2021-11-14 22:03:24 -08:00
Drashna Jael're 7e86c37962
Merge remote-tracking branch 'origin/master' into develop 2021-11-13 09:32:14 -08:00
Markus Fritsche 8323177472
add wait to unicode for win (#15061)
Co-authored-by: Markus Fritsche <fritsche.markus@gmail.com>
2021-11-12 15:00:36 -08:00
Ryan f529580860
Basic keycode overhaul (#14726) 2021-11-03 22:22:17 -07:00
Joel Challis 2d0ed4367b
Remove deprecated KEYMAP alias (#15037)
* Remove deprecated KEYMAP alias

* Remove some KEYMAP references

* Remove some KEYMAP references
2021-11-03 12:18:11 +11:00
Joel Challis 634e42b2b4
Revert to old init order for host driver (#15029)
* Partially revert 14888
2021-11-02 18:53:46 +00:00
Nick Brassel 699e69bec5
Fixup LED matrix. (#15020) 2021-11-02 10:05:42 +00:00
Purdea Andrei 76fb54403c
haptic: Feature to disable it when usb port is not configured or suspended. (#12692)
This also add support for specifying a LED pin to indicate haptic status,
and also adds support for a haptic-enable pin, which is useful to turn off
the boost converter on the solenoid driver.
2021-11-02 16:54:29 +11:00
Albert Y 2173b5373c
Add Pixel Rain RGB Matrix effect (#14155)
* Add Pixel animation header file

* Add Pixel animation to documentation

* Add Pixel animation to core include file

* Remove unintended spaces

* Remove seeding of PRNG

* Increase frequency of lit keys

Co-authored-by: filterpaper <filterpaper@localhost>
2021-11-02 10:40:25 +11:00
lalalademaxiya1 f4ea262c17
Add a new led driver for Keychron's keyboards. (#14872)
* Add a new led driver for Keychron's keyboards.

* Update ckled2001.c/ckled2001.h.

* Update ckled2001.c/ckled2001.h.

* Update ckled2001.c/ckled2001.h.

* Update ckled2001.c

* Add a new led driver

* Update ckled2001.c

* Update ckled2001.c

* Update ckled2001.c

* Update ckled2001.c

* Delete ckled2001.c

* Create ckled2001.c

* Update ckled2001.c

* Update chibios-contrib

Co-authored-by: keychron-dev <85598583+keychron-dev@users.noreply.github.com>
Co-authored-by: lokher <lokher@gmail.com>
2021-11-02 09:43:53 +11:00
Woody f775da96b1
define to AUTO_SHIFT_DISABLED_AT_STARTUP (#14201)
Co-authored-by: agodinhost <agodinhost@globo.com>
2021-11-02 09:11:55 +11:00
Vlad K a29ca1e7f1
Add support for ISSI drivers on both sides of a split keyboard (#13842)
* Gets RGB working on a split keyboard with IS31FL3733. Currently needs small tweak to re-enable WS2812

* Added helper function

* Trying to integrate the function

* Moved functionality into a macro

* Swapped conditional for a macro everywhere

* Tidying up

* More code cleanup

* Documentation updates

* Fixed formatting via linter

* Switching to a function from a macro

* Fixed compile error

* Fixing WS2812 behavior. UNTESTED.

* Updated documentation about the driver addresses.

* Fixed code for WS2812

* Trying to add in LED_MATRIX support

* Updated effects for LED matrix

* Updated third-party effect defines.

* Ran format-c on modified files

* Apply suggestions from code review

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

* Move to static inline. Avoids issues with gcc v8+

* Move helper function for LED_matrix to static inline to avoid issues with gcc v8+

Co-authored-by: Vlad Kvitnevskiy <vladkvit@outlook.com>
Co-authored-by: Ryan <fauxpark@gmail.com>
2021-11-02 09:04:37 +11:00
Joel Challis 92385e30cd
Manually format develop (#15003) 2021-11-01 19:18:33 +00:00
Albert Y 4bf7ce2298
Add Fractal RGB matrix effects (#12670)
* Squashed fractal effect commit for easier rebase

* Update documentation

* Squashed fractal effect commit for easier rebase

* Update documentation

* Update doc spacing

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

* Update feature_rgb_matrix.md

Co-authored-by: filterpaper <filterpaper@localhost>
Co-authored-by: Ryan <fauxpark@gmail.com>
Co-authored-by: Nick Brassel <nick@tzarc.org>
2021-11-02 04:30:07 +11:00
Drashna Jaelre 2980c63d3d
Fix issues with Oneshot disabling (#14934) 2021-11-01 09:41:24 -07:00
Joel Challis 0f92614240
Fix develop after recent changes (#14975)
* Fix sleep led issues

* Fix tests
2021-10-28 23:43:57 +01:00
Joel Challis dcfffa7b67
Relocate protocol files within tmk_core/common/ (#14972)
* Relocate non platform files within tmk_core/common/

* clang
2021-10-28 22:31:59 +01:00
Joel Challis 780e763c13
Remove SERIAL_MOUSE (#14969) 2021-10-28 02:43:51 +01:00
Joel Challis b780c797be
Migrate makefile utilities to sub-directory (#14917) 2021-10-28 01:07:53 +01:00
Chad Austin ee23aae87f
Optimize matrix scanning by removing variable shifts (#14947) 2021-10-26 20:01:57 -07:00
QMK Bot 462323418e Merge remote-tracking branch 'origin/master' into develop 2021-10-26 23:11:25 +00:00
MasterSpoon 015c4cf5be
Update mcu_selection.mk with current ChibiOS path (#14909) 2021-10-26 16:10:48 -07:00
Joel Challis 2ec268bd21
Begin to carve out platform/protocol API - Migrate keyboard_* calls (#14888) 2021-10-24 20:39:41 +01:00
QMK Bot 1fb2a0c74e Merge remote-tracking branch 'origin/master' into develop 2021-10-20 03:51:11 +00:00
Drashna Jaelre 0fd45d5984
Fix type of Tap Dance max index variable (#14887) 2021-10-19 20:50:44 -07:00
QMK Bot 034e78c083 Merge remote-tracking branch 'origin/master' into develop 2021-10-20 01:48:39 +00:00
Sergey Vlasov c9562ebfde
Make the MAGIC_TOGGLE_GUI keycode work (#14886) 2021-10-19 18:48:01 -07:00
Stefan Kerkmann e50867d52d
[Core] Add support for RISC-V builds and GD32VF103 MCU (#12508)
* Add support for RISC-V builds and GD32VF103 MCU

* Add toolchain selection in chibios.mk based on the mcu selected in
mcu_selection.mk
* Reorder and added comments to chibios.mk to have a streamlined makefile
* Add GD32VF103 mcu to possible targets for QMK.
* Add STM32 compatibility for GD32VF103 MCU, this is hacky but more efficent
  then rewriting every driver.
* Add GigaDevice DFU bootloader as flash target, please note that
  dfu-util of at least version 0.10 is needed.
* Add analog driver compatibility
* Add apa102 bitbang driver compatibility
* Add ws2812 bitbang driver compatibility
* Add eeprom in flash emulation compatibility
* Allow faster re-builds with ccache

* Add SiPeed Longan Nano to platform files

* Add SiPeed Longan Nano Onekeys

* Make quine compatible with other bootloaders

* Support builds with picolibc

* Add risc-v toolchain to arch and debian/ubuntu scripts
2021-10-18 16:23:20 +11:00
Joel Challis 83e978da1f
Further tidy up of STM32 eeprom emulation (#14591) 2021-10-16 02:58:48 +01:00
Ryan 61cc9e8042
Fix misplaced endif in led_matrix_drivers.c (#14785) 2021-10-10 21:32:29 -07:00
Ryan b487e10753
Clean up LED/RGB Matrix driver config (#14760) 2021-10-10 16:57:49 -07:00
Joel Challis dace4d5f0d
Remove QWIIC_DRIVERS (#14174) 2021-10-09 14:48:27 +01:00
Joel Challis 00fd404433
Put back eeconfig_update_ functions (#14751) 2021-10-08 13:44:07 +01:00
Joel Challis e0d688d4c8
Move converter specific tmk_core protocols (#14743) 2021-10-07 23:14:26 +01:00
precondition 0d72438ad6
Correct the Turkish F '?' keycode (TR_QUES) (#14740)
define TR_QUES S(TR_ASTR) // ? → define TR_QUES S(TR_SLSH) // ?
2021-10-07 15:01:50 +01:00
Joel Challis 1c0347b8b8
Remove SERIAL_LINK feature (#14727)
* Remove SERIAL_LINK

* more stale paths in doxygen-todo

* Fix

* More refs

* Update testing docs

* Update doxygen-todo

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

Co-authored-by: Ryan <fauxpark@gmail.com>
2021-10-07 12:32:05 +11:00
Joel Challis 60297a1099
Reuse of EEPROM debounce logic (#14699)
* reuse rgb debounce logic

* Refactor led matrix

* Remove log line

* timeout should not be hard coded
2021-10-07 01:47:14 +01:00
Nick Brassel b2a186cf92
Purge uGFX. (#14720)
* Purge uGFX.

* Remove remnants of visualizer.

* Remove remnants of uGFX.
2021-10-07 10:57:48 +11:00
Ryan d8f0c8783a
Remove sysex API (#14723) 2021-10-06 19:34:46 +11:00
Drashna Jaelre ba8f1454f4
Move Audio drivers from quantum to platform drivers folder (#14308)
* Move Audio drivers from quantum to platform drivers folder

* fix path for audio drivers

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

Co-authored-by: Ryan <fauxpark@gmail.com>
2021-10-06 12:01:45 +11:00
QMK Bot 9f0e74802a Merge remote-tracking branch 'origin/master' into develop 2021-10-06 00:50:53 +00:00
Drashna Jaelre 3b8c4979dc
[Bug] Fix command feature if mousekey is enabled and using 3-speed setting (#14697) 2021-10-05 17:50:23 -07:00
Purdea Andrei eb5b24f97c
Add LM() keys to the list of keys disabled by NO_HAPTIC_MOD (#14181) 2021-10-03 12:02:05 -07:00
Ryan 1a9e7b95ab
Change `MK66F18` -> `MK66FX1M0` (#14659) 2021-09-30 23:14:37 +01:00
Purdea Andrei b02a539625
Added power tracking api (#12691)
* Add power tracking API to lufa and chibios targets

* power.c: Pass through power state to the notify function

* power: added notify_power_state_change_user too.

* making it pass the PR linter

* Add a POWER_STATE_NO_INIT state, that we start in before calling power_init();

* Rename *power* to *usb_power*

* removing stray newline

* Rename usb_power* to usb_device_state*

* Update quantum/usb_device_state.h

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

* Fix comment

* usb_device_state.h: Don't include quantum.h, only the necessary headers.

Co-authored-by: Drashna Jaelre <drashna@live.com>
2021-09-30 06:31:39 +10:00
QMK Bot be3d7063a0 Merge remote-tracking branch 'origin/master' into develop 2021-09-29 18:37:46 +00:00
Drashna Jaelre 02ab7b1888
[Core] Fix "6kro enable" and clarify naming (#14563)
* Fix USB_6KRO_ENABLE compilation errors

* Add info to docs

* Rename define to be more accurate

* Remove unused rule

* Refixe docs
2021-09-29 11:37:11 -07:00
Drashna Jaelre e1bf49fc97
Remove GCC version check from song list inclusion (#14600) 2021-09-25 18:35:27 +01:00
Joel Challis 3a2a39e5ec
Initial pass of F405 support (#14584)
* Initial pass of F405 support

* remove some conf files

* docs

* clang
2021-09-25 00:19:41 +01:00
Marcus van Houdt 8b6c16ea1f
Add ability to use numpad digits for unicode mode UC_WIN (#14496)
Co-authored-by: Konstantin Đorđević <vomindoraan@gmail.com>
2021-09-21 15:23:49 -07:00
Joakim Tufvegren 8130690a28
Improvements to handling of disconnected split keyboards. (#14033)
* Use memcmp and memcpy to compare and copy slave matrix.

...and memset to initialize `matrix` and `raw_matrix`.

Increased my scan rate (while connected) by ~100 (on Ergodox Infinity).
Effect on AVR is unknown.

Co-authored-by: Stefan Kerkmann <karlk90@pm.me>

* Fix `matrix_post_scan` signalling change on every scan while disconnected.

* Undo removal of initialization of `slave_matrix`.

This has the effect of increasing my Ergodox Infinity firmware size by 8
bytes instead of decreasing by 8 bytes, and lowers the scan rate while
connected back to the initial value before these changes, but _might_
solve some issues on AVR.

Co-authored-by: Stefan Kerkmann <karlk90@pm.me>
2021-09-18 17:29:22 +10:00
QMK Bot bf23e4647b Merge remote-tracking branch 'origin/master' into develop 2021-09-15 17:07:47 +00:00
Drashna Jaelre 169d5bd21d
[Bug] Fix IS31fl3741 driver to accept 1 or 2 addresses (#14451)
Co-authored-by: Joel Challis <git@zvecr.com>
2021-09-15 10:07:08 -07:00
Thomas Weißschuh 83988597f4
Add Support for USB programmable buttons (#12950) 2021-09-15 08:40:22 -07:00
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
Joel Challis 4ef8ff458d
Minor tidy up of key overrides (#13747)
* Minor tidy up of key overrides

* Update quantum/quantum.c

* Update quantum/quantum.c
2021-07-28 12:01:49 +01:00
Joel Challis 03d258c222
matrix_scan_x -> x_task (#13748) 2021-07-28 12:01:23 +01:00
Joel Challis 3858a784c7
Align AW20216 driver (#13712)
* Align AW20216 driver

* Update drivers/awinic/aw20216.h

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

* Review comments

* formatting fixes

* stop if start failed?

* review comments

Co-authored-by: Ryan <fauxpark@gmail.com>
2021-07-27 23:55:51 +01:00
Joel Challis f945c352e7
Haptic: driver-> feature (#13713) 2021-07-25 19:14:58 -07:00
Nick Brassel 4ec8764c70 Merge remote-tracking branch 'upstream/master' into develop 2021-07-25 12:17:15 +10:00
Joel Challis b5bcd5b0a1
Refactor some platform dependent logic (#13675) 2021-07-24 19:56:45 +01:00
Joel Challis 567da49ed0
Avoid LTO conficts on arm_atsam (#13676) 2021-07-24 12:13:06 +01:00