Kevin O'Connor
86fee2d517
tmc: Track requested hold_current so SET_TMC_CURRENT doesn't reduce it
...
The code automatically reduces the hold_current so that it is no
greater than the run_current. However, this could lead to confusing
behavior if one reduced and then increased the run_current via
SET_TMC_CURRENT commands. To avoid that, this change adds support for
tracking the requested hold_current - thus changes to run_current
don't subtly alter the hold_current.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-10-27 12:13:38 -04:00
Kevin O'Connor
573fceefeb
input_shaper: Fix python3 string encoding
...
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-10-26 20:01:33 -04:00
Kevin O'Connor
b62171f350
input_shaper: Restore shaper_type config option
...
The shaper_type config option got removed in commit d5a7a7f0
- restore
that option.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-10-26 18:06:11 -04:00
Dmitry Butyugin
54e21a7c26
input_shaper: Factored out AxisInputShaper class
...
Signed-off-by: Dmitry Butyugin <dmbutyugin@google.com>
2021-10-26 16:14:50 -04:00
Dmitry Butyugin
d5a7a7f00f
input_shaper: Define input shapers in a single place in Python code
...
Signed-off-by: Dmitry Butyugin <dmbutyugin@google.com>
2021-10-26 16:14:50 -04:00
Eric Callahan
ec2116b4f7
temperature_sensor: round reported temps to 2 decimal places
...
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
2021-10-15 18:01:19 -04:00
Eric Callahan
cd58a945e2
temperature_host: round reported temps to 2 decimal places
...
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
2021-10-15 18:01:19 -04:00
Eric Callahan
bf598d0922
lm75: round reported temps to 2 decimal places
...
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
2021-10-15 18:01:19 -04:00
Eric Callahan
916ef4483a
htu21d: round reported temps to 2 decimal places
...
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
2021-10-15 18:01:19 -04:00
Eric Callahan
e65b2593c6
heaters: round reported temps to 2 decimal places
...
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
2021-10-15 18:01:19 -04:00
Eric Callahan
1153803360
ds18b20: round reported temps to 2 decimal places
...
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
2021-10-15 18:01:19 -04:00
Eric Callahan
c499451ab8
bme280: round reported temps to 2 decimal places
...
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
2021-10-15 18:01:19 -04:00
Dmitry Butyugin
91466ebd43
adxl345: Renamed decode_samples and fixed/added checks on empty data
...
Signed-off-by: Dmitry Butyugin <dmbutyugin@google.com>
2021-10-13 11:56:52 -04:00
Philipp Temminghoff
64e4649877
tmc: add current values to get_status() ( #4696 )
...
Signed-off-by: Philipp Temminghoff <philipptemminghoff@gmail.com>
2021-10-11 12:03:08 -04:00
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
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
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
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
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
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
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
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
1eecd412ef
motion_report: Fix typo causing error reports to not propagate
...
The APIDumpHelper._start() method should propagate errors to its
caller.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-09-26 12:21:36 -04:00
Kevin O'Connor
46167cae67
configfile: Add support for reporting deprecated options
...
Add a new printer.configfile.warnings with a list of config features
that are deprecated.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-09-16 13:44:54 -04:00
Kevin O'Connor
c84956befe
heaters: Change default smooth_time from 2 seconds to 1 second
...
A larger smooth_time results in a slower reaction time for the PID.
This increased delay can cause temperature oscillations with high
power heaters. Many boards produce good results without any
smoothing. So, it seems a smooth_time of 1 second is a better
default.
Reported by @ReXT3D.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-09-03 18:11:05 -04:00
github@matthewlloyd.net
830c80a88a
tuning_tower: Add STEP_DELTA and STEP_HEIGHT parameters as alternate tuning tower syntax
...
Signed-off-by: Matthew Lloyd <github@matthewlloyd.net>
2021-09-02 12:05:31 -04:00
github@matthewlloyd.net
286cc1becc
tuning_tower: Add SKIP parameter
...
Signed-off-by: Matthew Lloyd <github@matthewlloyd.net>
2021-09-02 12:05:31 -04:00
Kevin O'Connor
dcf8cb82a3
tmc: Fix typo in get_status()
...
Fix missing variable assignement introduced in commit 5fd1c985
.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-08-30 14:17:42 -04:00
Kevin O'Connor
0b4fbc78a8
adxl345: Allow multiple simultaneous clients
...
It is now possible to have multiple tools gathering adxl345 data at
the same time.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-08-30 12:26:39 -04:00
Kevin O'Connor
404b64fd62
adxl345: Change default chip name from "default" to "adxl345"
...
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-08-30 12:26:36 -04:00
Kevin O'Connor
22167f9510
adxl345: Compress each sample from 6 bytes to 5 bytes
...
Transmit data from mcu to host using 5 bytes per sample and up to 10
samples per message block. This improves bandwidth efficiency.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-08-30 12:25:50 -04:00
Kevin O'Connor
e34137582d
adxl345: Implement timing via new adxl345_status messages
...
Query the adxl345 message counter every 100ms so that accurate timing
can be obtained during measurements. This allows the adxl345 data to
be exported with timestamps while captures are running.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-08-30 12:25:50 -04:00
Kevin O'Connor
dd95f80d9d
adxl345: Support querying accelerometer data from webhooks interface
...
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-08-30 12:25:50 -04:00
Kevin O'Connor
d87f7a77c3
adxl345: Add new start_internal_client() function and use in callers
...
Introduce a new start_internal_client() function and change all client
code to use that instead of manually calling start_measurements() and
finish_measurements().
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-08-30 12:25:50 -04:00
Kevin O'Connor
8cfaed441d
adxl345: Always initialize device on start_measurements() call
...
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-08-30 12:25:50 -04:00
Kevin O'Connor
e03e0e9dac
adxl345: Move g-code commands to new helper class
...
Separate out the G-Code command handlers to a new ADXLCommandHelper()
class. This helps separate the sensing code from the user interface
code.
Deprecate the RATE parameter of the ACCELEROMETER_MEASURE command.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-08-30 12:25:45 -04:00
Kevin O'Connor
6999ff6256
motion_report: Add helper tool for internal subscribers of data
...
Add support for internal clients to "subscribe" to data like external
clients.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-08-30 12:12:11 -04:00
Kevin O'Connor
5fd1c9853d
tmc: Add support for a get_status() method
...
Export mcu_phase_offset and drv_status information.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-08-30 12:00:46 -04:00
Kevin O'Connor
2e131497ca
homing: Fix error in retract move causing "must home axis" errors
...
It's possible for the original homing move of an axis to alter the
position of other axes. Make sure those other axes are not requested
to move on a subsequent second home retract move, as that could cause
an error if those other axes have not been homed.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-08-28 15:45:11 -04:00
Kevin O'Connor
8d4d16d51a
manual_stepper: Add missing calc_position() wrapper call
...
Commit 3814a132
added code to homing.py to call calc_position() - add
that function to manual_stepper.py .
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-08-26 12:23:12 -04:00
Kevin O'Connor
84ac5b0146
configfile: Support config.getchoice() with integer keys
...
If the choice mapping uses integer keys then lookup the config option
using self.getint(). This simplifies the callers and improves the
encoding of the printer.configfile.settings export.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-08-25 10:36:45 -04:00
Kevin O'Connor
2fdd8a420d
motion_report: Add support for dumping steps/trapq via API server
...
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-08-22 11:10:19 -04:00
Kevin O'Connor
f2d10b5729
tmc: Use config.getint() when reading microstep setting
...
Don't use config.getchoice() as that results in a string reported by
printer.configfile.settings.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-08-22 10:50:18 -04:00
Kevin O'Connor
e5d5c25154
bed_mesh: Use config lists
...
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-08-21 18:08:11 -04:00
Kevin O'Connor
fe1b2f5124
tmc_uart: Use config.getlist() for select_pins config option
...
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-08-21 18:08:11 -04:00
Kevin O'Connor
31564f3b43
static_digital_output: Use config.getlist() for pins config option
...
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-08-21 18:08:11 -04:00
Kevin O'Connor
92e1821423
multi_pin: Use config.getlist() for pins config option
...
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-08-21 18:08:11 -04:00
Kevin O'Connor
e784c19a96
duplicate_pin_override: Use config.getlist() for pins config option
...
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-08-21 18:08:11 -04:00