Commit Graph

5042 Commits

Author SHA1 Message Date
Rufo Sanchez b336a21fe7 button: Support half-stepping encoders
Adds support for half-stepping encoders (encoders that only emit two
steps per detent, instead of four). Incorporates the feedback from
@susisstrolch's PR: https://github.com/KevinOConnor/klipper/pull/4202
, which was itself built upon a previous PR from @nickbrennan01:
https://github.com/KevinOConnor/klipper/pull/730

Uses the table from the Rotary Arduino library linked in buttons.py:
6b784cca67/Rotary.cpp (L21-L40)

Signed-off-by: Rufo Sanchez <rufo@rufosanchez.com>
2021-10-11 11:29:53 -04:00
Kevin O'Connor 5f184e3f98 test: Add a configfile test with unicode characters
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-10-09 19:57:55 -04:00
Kevin O'Connor c56c34fa1c configfile: Use Python2's ConfigParser when running on Python2
The backport of Python3's configparser causes issues when there is
unicode characters in the config file.  To avoid introducing new
errors, go back to using the Python2 version of ConfigParser when
running on Python2.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-10-09 19:37:48 -04:00
Kevin O'Connor 21d5a34d22 console: Fix Python2 compatibility
Make sure to import util prior to reactor.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-10-08 13:00:11 -04:00
Kevin O'Connor 5251bf23f1 configfile: Workaround for non-ascii comments on Python2
Explicitly specify the comment_prefixes as regular Python2 strings -
otherwise the configparser wont ignore non-ascii characters in
comments.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-10-08 00:23:31 -04:00
Kevin O'Connor 1a4d655a18 spi_flash: Improve Python3 compatibility
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-10-07 20:05:15 -04:00
Kevin O'Connor 64cb8d9820 ds18b20: Improve Python3 compatibility
Reported by @matthewlloyd.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-10-07 14:47:49 -04:00
Simon Kühling d90da37433 atsamd: Add i2c_read() implementation
Signed-off-by: Simon Kühling <mail@simonkuehling.de>
2021-10-06 21:27:51 -04:00
Dmitry Butyugin 2822680eb4 adxl345: Expanded invalid adxl345 id message
Signed-off-by: Dmitry Butyugin <dmbutyugin@google.com>
2021-10-06 21:17:56 -04:00
Dmitry Butyugin bd5dc03317 adxl345: Renamed debug commands to fix their parsing by Klipper
Signed-off-by: Dmitry Butyugin <dmbutyugin@google.com>
2021-10-06 21:16:31 -04:00
Kevin O'Connor e3905eb241 stm32: Add an MACH_STM32F4x5 alias for F405, F407, and F429 chips
The F405, F407, and F429 chips are in the same series and almost all
code definitions should apply to all chips in that series.  Implement
the alias and fix defintions in adc.c and Kconfig that were only
applying to a subset of that series.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-10-06 19:56:46 -04:00
D4SK c1136bef10 stm32: Add hardware pwm for stm32h7
Signed-off-by: Konstantin Vogel <konstantin.vogel@gmx.net>
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-10-06 18:20:29 -04:00
D4SK 0a55489e2c stm32: Add initial support for stm32h7
Signed-off-by: Konstantin Vogel <konstantin.vogel@gmx.net>
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-10-06 18:20:29 -04:00
D4SK 28b3c9e88c armc_boot: Support cortex-m7 chips
Signed-off-by: Konstantin Vogel <konstantin.vogel@gmx.net>
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-10-06 18:17:06 -04:00
D4SK a05650f33c armcm_irq: Support cortex-m7 chips
Signed-off-by: Konstantin Vogel <konstantin.vogel@gmx.net>
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-10-06 18:17:06 -04:00
D4SK 53b98ebaed lib: Added cmsis libraries for stm32h7
Signed-off-by: Konstantin Vogel <konstantin.vogel@gmx.net>
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-10-06 18:17:06 -04:00
D4SK 309fbbc104 lib: Updated existing cmsis-core for stm32h7 support
Signed-off-by: Konstantin Vogel <konstantin.vogel@gmx.net>
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-10-06 18:17:06 -04:00
Kevin O'Connor c7b65f50e3 configfile: Ignore trailing comments starting with a semicolon
Newer versions of configparser no longer default to ignoring trailing
comments that start with a semicolon.  Add that setting explicitly to
avoid breaking existing config files.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-10-06 14:07:32 -04:00
Kevin O'Connor cc63fd51b2 scripts: Use backport of a recent Python3 configparser on Python2
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-10-04 15:10:46 -04:00
Kevin O'Connor 41d42a07bf klippy: Add a build import test tool
Add a test case to verify that every optional module successfully
loads on both Python2 and Python3.  This is intended to catch syntax
and module imports that are not compatible between Python versions.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-10-04 14:36:08 -04:00
Kevin O'Connor b743a64685 scripts: Update klippy build tests to verify on both Python2 and Python3
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-10-04 14:36:08 -04:00
Kevin O'Connor f1747b5118 klippy: Add Python2 module wrappers and use Python3 module naming
Add wrappers for some common Python modules so that the code can run
on both Python2 and Python3.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-10-04 14:36:08 -04:00
Kevin O'Connor b8c91914b7 webhooks: Convert to Python3 string encoding
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-10-04 14:36:08 -04:00
Kevin O'Connor adeb869f56 gcode: Convert to Python3 string encoding
The error checking is not complete in this change - the code should
handle the case where an input string is not valid utf8.

The code will continue to run on Python2 after this change, however
the execution time on Python2 is measurably slower after making this
change.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-10-01 21:00:03 -04:00
Kevin O'Connor 1717263b5a buildcommands: Convert to Python3 string encoding
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-10-01 19:28:27 -04:00
Kevin O'Connor 8714282570 console: Convert to Python3 string encoding
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-10-01 19:22:13 -04:00
Kevin O'Connor b3a39bebd4 virtual_sdcard: Convert to Python3 string encoding
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-10-01 19:22:13 -04:00
Kevin O'Connor 0da3d84a87 configfile: Convert to Python3 string encoding
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-10-01 19:22:13 -04:00
Kevin O'Connor b859c11378 util: Convert to Python3 string encoding
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-10-01 19:22:13 -04:00
Kevin O'Connor 9ce07921c4 test_klippy: Convert to Python3 string encoding
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-10-01 19:22:13 -04:00
Kevin O'Connor 2978771ce5 mcu: Convert to Python3 string encoding
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-10-01 19:22:13 -04:00
Kevin O'Connor fa25986adc reactor: Convert to Python3 string encoding
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-10-01 19:18:58 -04:00
Kevin O'Connor 0fc52f9496 serialhdl: Convert to Python3 string encoding
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-10-01 19:12:42 -04:00
Kevin O'Connor de38ef4290 kinematics: Convert to Python3 string encoding
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-10-01 19:12:30 -04:00
Kevin O'Connor 68b939c756 display: Convert to Python3 string encoding
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-10-01 19:12:21 -04:00
Kevin O'Connor cc2a313c10 klippy-requirements: Update dependencies to support Python 3.9+
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-10-01 19:07:48 -04:00
Kevin O'Connor bcbdc983a8 screws_tilt_adjust: Improve Python3 compatibility
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-09-30 13:14:20 -04:00
Kevin O'Connor 01ab8267a6 hybrid_corexy: Improve Python3 compatibility
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-09-30 13:10:45 -04:00
Kevin O'Connor af86c5f306 fan: Improve python3 compatibility
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-09-30 13:10:45 -04:00
Kevin O'Connor b806d71eb0 docs: Fix link in Releases.md
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-09-29 21:43:58 -04:00
Kevin O'Connor 2a964a4614 docs: Note the release of v0.10.0
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-09-29 21:36:52 -04:00
Kevin O'Connor 1b166dd599 docs: Update Features.md
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-09-29 21:20:40 -04:00
Kevin O'Connor e4089e846e docs: Update CONTRIBUTING.md with new repo location; minor wording changes
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-09-29 21:13:08 -04:00
Yifei Ding b3b597a215 docs: add Translation Contributor Guide
Signed-off-by: Yifei Ding <yifeiding@protonmail.com>
2021-09-29 21:05:42 -04:00
Kevin O'Connor 164060ccfe stepper: Make sure to report an error if endstop_pin is not defined
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-09-29 20:10:57 -04:00
Kevin O'Connor 17dcf4e5f0 docs: Fix table rendering in RPi_microcontroller.md
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-09-29 10:56:50 -04:00
Eric Callahan 00a9e4ad9a docs: background color fix for bed_mesh svgs
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2021-09-29 09:56:09 -04:00
Kevin O'Connor 0ec13bc27a docs: Change Kinematics.md images to use a solid white background
Avoid transparent backgrounds as they don't render well if there is a
dark background.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-09-27 18:33:58 -04:00
Kevin O'Connor 6e87befa21 docs: Fix typo in Bed_Mesh.md
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-09-27 17:22:49 -04:00
Kevin O'Connor 31ac9dc6f9 config: Fix spi bus comment in generic-duet3-mini.cfg
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-09-26 13:44:45 -04:00