Commit Graph

10192 Commits

Author SHA1 Message Date
St. John Johnson
56dd8cfe48 Use keymap instead of username variable for qmk new_keymap (#6885)
Username is not defined and this causes `qmk new_keymap` to error.  This
appears to have originated from a partial update in
https://github.com/qmk/qmk_firmware/pull/6708/files#diff-d5208bcbc79aa428556a743b6ff41086.  This change completes the migration from `username` to `keymap`
2019-11-04 16:51:03 +09:00
Ayman Bagabas
74d3820ff4 Fix qmk doctor 'bytes-like object is required' on linux
This fixes the following issue related to encoding on linux systems. Add
`universal_newlines=True` to subprocess.

<class 'TypeError'>
☒ a bytes-like object is required, not 'str'
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/milc.py", line 564, in __call__
    return self.__call__()
  File "/usr/local/lib/python3.7/site-packages/milc.py", line 569, in __call__
    return self._entrypoint(self)
  File "$HOME/qmk_firmware/lib/python/qmk/cli/doctor.py", line 56, in doctor
    for line in mm_check.stdout.split('\n'):
TypeError: a bytes-like object is required, not 'str'
2019-11-04 16:51:03 +09:00
skullydazed
3f2ea83234 Configuration system for CLI (#6708)
* Rework how bin/qmk handles subcommands

* qmk config wip

* Code to show all configs

* Fully working `qmk config` command

* Mark some CLI arguments so they don't pollute the config file

* Fleshed out config support, nicer subcommand support

* sync with installable cli

* pyformat

* Add a test for subcommand_modules

* Documentation for the `qmk config` command

* split config_token on space so qmk config is more predictable

* Rework how subcommands are imported

* Document `arg_only`

* Document deleting from CLI

* Document how multiple operations work

* Add cli config to the doc index

* Add tests for the cli commands

* Make running the tests more reliable

* Be more selective about building all default keymaps

* Update new-keymap to fit the new subcommand style

* Add documentation about writing CLI scripts

* Document new-keyboard

* Update docs/cli_configuration.md

Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com>

* Update docs/cli_development.md

Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com>

* Update docs/cli_development.md

Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com>

* Update docs/cli_development.md

Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com>

* Address yan's comments.

* Apply suggestions from code review

suggestions from @noahfrederick

Co-Authored-By: Noah Frederick <code@noahfrederick.com>

* Apply suggestions from code review

Co-Authored-By: Noah Frederick <code@noahfrederick.com>

* Remove pip3 from the test runner
2019-11-04 16:51:03 +09:00
Drashna Jaelre
7d58ebe288 Generalize Tap Dance Layer functions (#6629)
* made tapdance dual_role general

* updated original dual_role functionality

* added toggling layer example

* Fix dual role and add alias

* Update docs about new layer tap dances

* Fix up based on feedback
2019-11-04 16:50:33 +09:00
XScorpion2
9dbff9f9c8 Fixing wrapping math logic for timer_expired functions (#6746) 2019-11-04 16:49:55 +09:00
fauxpark
de86a0111a Add list-keymaps make target (#5563) 2019-11-04 16:49:20 +09:00
MechMerlin
42f70cd423 DRV2605L Continuous Haptic Feedback Support (#6461)
* provide means to turn on RTP mode and set the amplitude

* new keycode HPT_CONT to turn RTP off/on

* introduce new keycodes HPT_CONI, and HPT_COND for Haptic Continuous Increase and Decrease

* support for continuous mode amplitude increase and decrease

* code cleanup

* update docs to reference new keycodes and functionality

* don't touch the keymaps

* add function prototypes

* add proper guards

* cleanup guards

* remove extra reserved
2019-11-04 16:48:39 +09:00
XScorpion2
66d3ac0b72 Updated split encoders so indexes are based on left hand encoders first (#6382)
* Updated encoder.c so that split encoders are indexed based on left hand encoders first.
This ensures when swapping master sides that code logic based on encoder index doesn't change.

PR Review fixes

* Removed extra define
2019-11-04 16:48:18 +09:00
XScorpion2
e3f8f475fe Smoother Linear Light Table (#6764) 2019-11-04 16:47:27 +09:00
Florian Didron
1d600f09a8 Increase ergodox-ez debounce to 30 2019-10-01 10:21:12 +09:00
fauxpark
25214378a4 Update bootloader.mk (#6698) 2019-10-01 10:21:12 +09:00
Kenny Hoang
2258b09275 Created new_keymap.py, python version of new_keymap.sh (#6066)
* Created python version of new_keymap.sh: new_keymap.py

* Updated usage message

* Updated new_keymap.py to use python3.5+ syntax & be more similar to new_keyboard.sh

* Updated complete message

* Updated usage in argparser and removed incorrect usage_message

* Reverted the fstrings back to strings that use .format() & updated docstring convention

* Added helper to recursively cd .. until at qmk_firmware root directory

* Revert "Added helper to recursively cd .. until at qmk_firmware root directory"

This reverts commit 61a0ff3b25f91901287bec8d58eb51a1f126e2ad.

* Updated new_keymap.py to use printf-style format strings

* First draft lib/python/qmk/cli/new/keymap.py with milc

* Removed shebang & syspath appending lines

* Added optional args & resolved some cr comemnts

* Added a docstring and updated strings
2019-10-01 10:21:12 +09:00
Drashna Jaelre
fede32c9eb Actually use correct bootloader not found message (#6695) 2019-10-01 10:21:12 +09:00
Drashna Jaelre
241982ea6c Move Bootloader not found message to global variable (#6688)
* Move Bootloader not found message to global variable

* Apply suggestions from code review

Co-Authored-By: fauxpark <fauxpark@gmail.com>
2019-10-01 10:21:12 +09:00
fauxpark
4d97dceac6 Add 328P to mcu_selection.mk (#6682) 2019-10-01 10:21:12 +09:00
fauxpark
abc9586c2a Adafruit BLE: Set SPI2X bit only when F_CPU is 8MHz (#6671) 2019-10-01 10:21:12 +09:00
fauxpark
cd7aba09ee Banish some more magic numbers (#6662) 2019-10-01 10:21:12 +09:00
skullY
ff7a7adbcf Add a command to format python code 2019-10-01 10:21:12 +09:00
skullY
e079d58b7d Make the modem manager check more pythonic 2019-10-01 10:21:12 +09:00
skullY
b198661d18 run yapf on the code 2019-10-01 10:21:12 +09:00
skullY
b4dc878501 Setup a python test framework 2019-10-01 10:21:12 +09:00
Konstantin Đorđević
b5a5ce043b Update docker_build.sh: indentation fix, error echo function (#6659)
* Replace spaces with tab in docker_build.sh

* Use errcho instead of echo >&2
2019-10-01 10:21:12 +09:00
fauxpark
c2788ef766 Make USB polling rate configurable with a define (#6668) 2019-10-01 10:21:12 +09:00
fauxpark
6ee3b53807 Add 16U2, 16U4 and USB646 to mcu_selection.mk (#6566) 2019-10-01 10:21:12 +09:00
bwhelm
97649a2ac4 Fix battery level code in adafruit_ble.cpp (#6648)
* Fix battery level code in adafruit_ble.cpp

The code in tsk_core/protocol/lufa/adafluit_ble.cpp that polls the
battery level for the Adafruit feather BLE controller reads the
regulated voltage, not the raw voltage coming from the battery. To do
that, the Adafruit Feather docs say you should read from pin A9:
https://learn.adafruit.com/adafruit-feather-32u4-basic-proto/power-management#measuring-battery-4-9.
(See also
https://learn.adafruit.com/adafruit-feather-32u4-bluefruit-le/pinouts#logic-pins-2-9.)

I'm not sure why, but analogRead(9); doesn't read the correct pin.
Checking all available analog pins experimentally, it turns out that
analogRead(7); returns the correct value. So the code above should read:

    state.vbat = analogRead(7);

* Update tmk_core/protocol/lufa/adafruit_ble.cpp

Co-Authored-By: Drashna Jaelre <drashna@live.com>

* Remove old comment

* Fix linking error

* Remove `#ifdef` around `#include analog.h`.

* Really fix linking error
2019-10-01 10:21:12 +09:00
Drashna Jaelre
789bdaaf16 Add Dip Switch as a core feature (#6140)
* Add Dip Switches as a core feature

* Add documentation for Dip Switch feature

* Update Preonic Rev3 to use new feature and remove custom matrix

* Apply suggestions from code review

Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com>

* Remove custom matrix line completely

Rather than just disabling it

Co-Authored-By: fauxpark <fauxpark@gmail.com>

* DIP changes

Co-Authored-By: fauxpark <fauxpark@gmail.com>

* Use better check for DIP Switch configuration

* Add to show features

* Add bitmask callback for dip switch

* Fix OLKB Boards dip switch config

* Update docs to include bitmask example

* Fix comments/documentation

Co-Authored-By: fauxpark <fauxpark@gmail.com>

* Fix issues with docs and use example from @tuzonghua

* Fix wording

Co-Authored-By: fauxpark <fauxpark@gmail.com>

* Fix example to use proper formatting

Bad, BAAAAAAD drashna!!!

* Handle dip switch initialization better
2019-10-01 10:21:12 +09:00
Cory Watson
a935511465 Add dfu-programmer to pacman -S (#6619)
* Add `dfu-programmer` to `pacman -S` (#6618)

`dfu-programmer` now resides at `extra/dfu-programmer` and is no longer
in the AUR

* Add `--needed` option to `pacman -S` for efficiency

* Fix

* Update util/linux_install.sh

Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com>
2019-10-01 10:21:12 +09:00
fauxpark
e881dfd17e Fix msys2 not installing any packages because it can't find clang (#6655) 2019-10-01 10:21:12 +09:00
skullY
8a155fe021 readability enhancements 2019-10-01 10:21:12 +09:00
skullY
e9e9233835 Add support for passing files at the command line 2019-10-01 10:21:12 +09:00
skullY
e19fa20802 CLI command to format C code 2019-10-01 10:21:12 +09:00
Mikkel Jeppesen
6eae35c3c0 Removed prescaler define from avr i2c, as it was impossible to use (#6617) 2019-10-01 10:21:12 +09:00
Drashna Jaelre
d978c59b52 Fix Redefinition of OLED_TIMEOUT (#6628) 2019-10-01 10:21:12 +09:00
Drashna Jaelre
6e9ddbc2e2 Update submodule check to include LUFA (#6661)
As LUFA is now a submodule, we should be checking it.
2019-10-01 10:21:12 +09:00
skullY
93f6749e06 clang-format changes 2019-10-01 10:21:12 +09:00
skullY
da34bddba1 add lufa as a submodule 2019-10-01 10:21:12 +09:00
Drashna Jaelre
9f184ab5da Fix the LUFA lib to use a submodule instead of just files (#6245)
* Remove LUFA files

* Update descriptions for newer version of LUFA

* Create PR6245.md

* Fix CDC(Serial) type errors

* Fix missed merge conflict for AUDIO_DTYPE_CSInterface
2019-10-01 10:21:12 +09:00
skullY
d5212f4739 Fix vusb compiling after clang-format 2019-10-01 10:21:12 +09:00
skullY
aba3108289 Have clang ignore the code in bootloader_size.c 2019-10-01 10:21:12 +09:00
skullydazed
d5d631691d Enforce clang-format (#6293)
* Enforce clang-format on commit for core files

* forgot about tests
2019-10-01 10:21:12 +09:00
fauxpark
31f8c4eb3a LUFA USB descriptor cleanup (#4871)
* Fix indentation

* Fix braces

* Expand descriptor headers

* Align descriptor elements

* Nicer formatting

* Tidy up preprocessor statements

* Remove VERSION_BCD redefine - LUFA_VERSION_INTEGER is currently 0x170418

* Tidy up comments

* Tweak ordering of  HID report elements (no functional changes)

* We don't need all of these newlines

* Move default USB_MAX_POWER_CONSUMPTION closer to where it makes sense

* Ask nicely

* Add some more comments

* Change indentation back to 4 spaces

* Add changelog entry
2019-10-01 10:21:12 +09:00
Florian Didron
a5d07e9656 Increase ergodox-ez debounce to 30 2019-09-30 18:07:05 +09:00
fauxpark
ef314477b3 Update bootloader.mk (#6698) 2019-09-26 10:08:39 +09:00
Kenny Hoang
5ad8d221c8 Created new_keymap.py, python version of new_keymap.sh (#6066)
* Created python version of new_keymap.sh: new_keymap.py

* Updated usage message

* Updated new_keymap.py to use python3.5+ syntax & be more similar to new_keyboard.sh

* Updated complete message

* Updated usage in argparser and removed incorrect usage_message

* Reverted the fstrings back to strings that use .format() & updated docstring convention

* Added helper to recursively cd .. until at qmk_firmware root directory

* Revert "Added helper to recursively cd .. until at qmk_firmware root directory"

This reverts commit 61a0ff3b25f91901287bec8d58eb51a1f126e2ad.

* Updated new_keymap.py to use printf-style format strings

* First draft lib/python/qmk/cli/new/keymap.py with milc

* Removed shebang & syspath appending lines

* Added optional args & resolved some cr comemnts

* Added a docstring and updated strings
2019-09-26 10:08:39 +09:00
Drashna Jaelre
200c6bedd1 Actually use correct bootloader not found message (#6695) 2019-09-26 10:08:39 +09:00
Drashna Jaelre
0492378872 Move Bootloader not found message to global variable (#6688)
* Move Bootloader not found message to global variable

* Apply suggestions from code review

Co-Authored-By: fauxpark <fauxpark@gmail.com>
2019-09-26 10:08:39 +09:00
fauxpark
d179863d2e Add 328P to mcu_selection.mk (#6682) 2019-09-26 10:08:39 +09:00
fauxpark
89104e0d2d Adafruit BLE: Set SPI2X bit only when F_CPU is 8MHz (#6671) 2019-09-26 10:08:39 +09:00
fauxpark
9c70eceec1 Banish some more magic numbers (#6662) 2019-09-26 10:08:39 +09:00
skullY
74d97c7c1d Add a command to format python code 2019-09-26 10:08:39 +09:00