Commit Graph

1253 Commits

Author SHA1 Message Date
Kevin O'Connor 25389027de Revert "endstop_phase: wip"
This reverts commit f2e4653ca4.

Revert incomplete testing code that was accidentally committed.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-04-28 20:42:33 -04:00
Kevin O'Connor f2e4653ca4 endstop_phase: wip 2021-04-28 20:32:14 -04:00
Dmitry Butyugin 3b33d6652f resonance_tester: Refactored the testing code
Signed-off-by: Dmitry Butyugin <dmbutyugin@google.com>
2021-04-28 12:36:23 -04:00
Johannes Stuettgen ed6ab6b9cc screws_tilt_adjust: Add MAX_DEVIATION parameter for bed level invariant.
This is useful when a saved bed mesh is used to ensure that the bed level
has not drifted too far from where it was when the mesh was created.

Signed-off-by: Johannes Stuettgen <johannes.stuettgen@gmail.com>
2021-04-28 11:53:18 -04:00
nlef 2d2db0f839
probe: Add deactivate_on_each_sample: param for Probe (#4161)
Signed-off-by: Nick Lefskiy <n.lefskiy@yandex.ru>
2021-04-24 13:39:58 -04:00
Dmitry Butyugin 200b62bcb4 adxl345: Verify the register writes, added debug adxl345 commands
Signed-off-by: Dmitry Butyugin <dmbutyugin@google.com>
2021-04-24 13:15:17 -04:00
Clifford Roche 3a023d0ff4
palette2: Fix get_status (#4171)
Signed-off-by: Clifford Roche <clifford.roche@gmail.com>
2021-04-15 13:53:06 -04:00
Clifford Roche e7b0e7b43b
palette2: Add ping variation + ping status reports (#4114)
Signed-off-by: Clifford Roche <clifford.roche@gmail.com>
2021-04-14 11:37:24 -04:00
Arksine 60372fd0cf bed_mesh: introduce "faulty_regions" option
Users may define "faulty regions", locations within the mesh where a probed value is unreliable. When bed mesh generates points it will substitute points in faulty regions with up to 4 points nearest to the region. After calibration is complete the Z values at these points will be averaged and assigned to the original value inside the faulty region.

Signed-off-by: Eric Callahan <arksine.code@gmail.com>
2021-04-10 11:16:07 -04:00
Arksine 5f5dfbaa7f bed_mesh: Allow user to clear the relative_reference_index via gcode
If a negative number is specified for the RELATIVE_REFERENCE_INDEX parameter clear the internal relative_reference_index.

Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2021-04-10 11:16:07 -04:00
Kevin O'Connor 49a2b0354f statistics: Export the OS and process load in a get_status() method
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-04-09 20:27:38 -04:00
le-Bark eb4abdd830
pca9533: RGB support for the mightyboard (#4150)
Signed-off-by: Marc-André Denis <marcadenis@msn.com>
2021-04-09 17:47:16 -04:00
le-Bark 317402d5ba
hd44780_spi: added lcd support to the mightyboard (#4121)
Signed-off-by: Marc-André Denis <marcadenis@msn.com>
2021-04-07 21:07:23 -04:00
Dmitry Butyugin 165d2fc228 resonance_tester: Fixed multi-point resonance testing
Signed-off-by: Dmitry Butyugin <dmbutyugin@google.com>
2021-04-07 19:05:23 -04:00
Kevin O'Connor b5b2fe2d2b bed_mesh: Perform initialization from klippy:connect instead of klippy:ready
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-04-02 13:50:38 -04:00
Kevin O'Connor 3cfc42e54a bltouch: Minor indentation change
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-04-02 13:43:01 -04:00
Kevin O'Connor 2a9a133f36 bltouch: Raise the probe as soon as the endstop triggers
Start the raise sequence once the endstop notification arrives.  This
can reduce the response time as it does not require waiting for the
homing sequence to fully finalize.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-04-02 13:43:01 -04:00
Kevin O'Connor c9ae89e142 bltouch: Use hmove.check_no_movement() to verify bltouch deployed
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-04-02 13:43:01 -04:00
Kevin O'Connor cdaf9379b0 pause_resume: Perform setup via "klippy:connect" instead of "klippy:ready"
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-04-01 10:10:39 -04:00
Arksine 74d527776e bed_mesh: lookup the toolhead object in "handle_connect"
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2021-04-01 09:32:23 -04:00
Kevin O'Connor d609753a6a gcode_move: Make sure to call reset_last_position() in _handle_ready()
If reset_last_position() is invoked prior to the printer being
"ready", then the transform may not be properly accounted for.  Handle
this by calling reset_last_position() when the printer becomes
"ready".

This should fix some "must home first" errors on extrude-only moves.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-03-31 22:15:54 -04:00
Kevin O'Connor 3390088d3a skew_correction: Register during "connect" phase instead of "ready" phase
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-03-31 22:13:36 -04:00
Kevin O'Connor 58a0eb76c5 homing: Pass the HomingMove class to homing_move_begin/end events
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-03-29 21:20:57 -04:00
Kevin O'Connor 37a263c0b9 homing: Move homing logic from manual_stepper.py to homing.py
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-03-29 21:20:57 -04:00
Kevin O'Connor 38719c1359 homing: Extract out movement verification to new check_no_movement()
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-03-29 21:17:53 -04:00
Kevin O'Connor d39f849203 homing: Separate homing/probing movement logic to its own class
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-03-29 21:17:53 -04:00
Kevin O'Connor 5002dda37c homing: Move home_axes() into cmd_G28()
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-03-29 21:17:53 -04:00
Kevin O'Connor df56c723b9 homing: Minor simplification of verify_movement tracking
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-03-29 21:17:53 -04:00
Kevin O'Connor 862d3f9633 homing: Move low-level probing logic from probe.py to homing.py
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-03-29 21:17:53 -04:00
Kevin O'Connor 00706dec21 output_pin: Fix bug in setting of self.resend_interval
Only set resend_interval if a mcu_duration is specified.  This fixes a
bug introduced in commit 861144d8.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-03-27 14:52:21 -04:00
Denis Ignatenko cc31810fa8
hall_filament_width_sensor: fix range check error (#4113)
Signed-off-by: Denis Ignatenko <deniss979@gmail.com>
2021-03-27 12:53:40 -04:00
Kevin O'Connor d02c80ef08 output_pin: Make sure to not use a cycle_time or max_duration over 5 seconds
Times longer than 5 seconds may result in a 32bit ticks overflow in
the micro-controller (for fast micro-controllers).

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-03-26 11:37:40 -04:00
Kevin O'Connor 861144d884 output_pin: Increase time host has to confirm a pin setting
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-03-26 11:33:05 -04:00
Pascal P 88f6061cd7
output_pin: Support setting max_duration (#3995)
Also added documentation for using powered tools.

Signed-off-by: Pascal Pieper <accounts@pascalpieper.de>
2021-03-26 11:25:09 -04:00
Clifford Roche e2a3217289
palette2: Add support for P2 devices (#4057)
Module which bring support for P2 devices running in connected mode. This enables using a Palette2 directly with Klippy without Octoprint, or without Palette2 plugins for Octoprint which are not functional out of the box with Klipper.

Signed-off-by: Clifford Roche <clifford.roche@gmail.com>
2021-03-26 11:21:10 -04:00
Kevin O'Connor 36b1ccd598 replicape: Don't require a host alias for the enable_pin default
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-03-25 10:49:17 -04:00
Janar Sööt 2130e3e5d4
menu: changes in tune menu according to #4023 (#4086)
- set 1% as input minimum for speed and flow
- set speed maximum from 200% to 500%

Signed-off-by: Janar Sööt <janar.soot@gmail.com>
2021-03-23 10:55:25 -04:00
Dmitry Butyugin 2d8945dc1c graph_accelerometer: Support axis-level comparison of adxl345 data
Signed-off-by: Dmitry Butyugin <dmbutyugin@google.com>
2021-03-20 13:24:43 -04:00
Dmitry Butyugin f248b91414 shaper_calibrate: Reduced min shaper freqs to match max_accel ~= 1500
Signed-off-by: Dmitry Butyugin <dmbutyugin@google.com>
2021-03-20 13:24:43 -04:00
Dmitry Butyugin 57494458f3 shaper_calibrate: Ignore vibrations below max_psd / 20 threshold
The input shaper can only reduce vibrations by 20x. Therefore,
the best-case achievable vibrations level is max(psd) / 20.
Any vibrations below that level can be ignored for the prupose
of input shaper scoring. This allows tuning script to ignore
wide tails of resonances, because it is not helpful to try to
reduce them with input shaping.

Signed-off-by: Dmitry Butyugin <dmbutyugin@google.com>
2021-03-20 13:24:43 -04:00
Dmitry Butyugin 73a39370ad shaper_calibrate: Estimate max_accel to avoid excessive smoothing
Signed-off-by: Dmitry Butyugin <dmbutyugin@google.com>
2021-03-20 13:24:43 -04:00
Jon Sanders 6c9404ac0c
htu21d: sensor definition fix (#4075)
HTU21D sensor class lacked the method `get_report_time_delta` invoked
during watermark control loops. This short fix simply adds that method
in, calling the `self.report_time` attribute created during class
construction.

Signed-off-by: Jon Sanders <jonsan@gmail.com>
2021-03-18 23:38:07 -04:00
Kevin O'Connor 2144f716f6 tmc2660: Fix typo in seup field
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-03-18 23:36:25 -04:00
Kevin O'Connor b6eea021b1 tmc2660: Use lowercase for stallguard/coolstep fields
Use lowercase for the field names so that it matches the
tmc2130/tmc5160 field names.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-03-18 22:44:38 -04:00
Kevin O'Connor 3f04238e79 tmc2660: Report SE in DUMP_TMC even if zero
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-03-16 11:31:30 -04:00
Kevin O'Connor 6ebdc48b7c tmc2130: Report CS_ACTUAL in DUMP_TMC even if zero
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-03-16 11:31:24 -04:00
Kevin O'Connor 22753f3b38 tmc: Only check for tmc2130 reset via CS_ACTUAL if IHOLD > 0
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-03-15 13:48:58 -04:00
Michael Kurz b4437f8eee
bme280: Add support for BMP280 and BME680 sensors (#4040)
This adds support for BMP280 and BME680 sensor ICs,
along with fixing calibration data readout for BME280.

Gas sensor readout for the BME680 is just the raw compensated value.
To get actual meaningful values, more research is needed.

Signed-off-by: Michael Kurz <michi.kurz@gmail.com>
2021-03-15 11:50:29 -04:00
Kevin O'Connor 86a924f5a6 tmc: Improve driver reset check on tmc2130 and tmc2660
Use the CS_ACTUAL/SE field to check for a mid-print driver reset.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-03-15 11:16:15 -04:00
Kevin O'Connor d184d9fd91 tmc: Move clear_gstat check for tmc2130 to within TMCErrorCheck class
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-03-15 10:28:08 -04:00
Kevin O'Connor 88d0af3da3 tmc2660: Change stallguard flags to better match tmc2130/tmc5160
The tmc2660 spec has an ambiguous "SG" field that sometimes refers to
the "stallGuard" flag and sometimes refers to the "SG_RESULT" field.
The tmc2130 and tmc5160 have similar fields that are not ambiguous, so
adopt that naming strategy.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-03-15 10:28:03 -04:00
TheJoshW bf8f7133b4
filament_motion_sensor: Add filament_motion_sensor (#3857)
Add functionality to support a Filament Motion Sensor for detecting extruder jams as well as runouts.  Works by an encoder toggling the switch_pin 0/1 as the filament is pulled through the sensor.

Signed-off-by: Joshua Wherrett <thejoshw.code@gmail.com>
2021-03-14 21:36:19 -04:00
Kevin O'Connor 041692828c mcu: Add support for connecting to devices on a CAN bus
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-03-13 11:29:41 -05:00
Kevin O'Connor 9572ad4327 tmc_uart: Limit to only one active uart at a time on an mcu
The tmcuart_send command increases cpu usage on the micro-controller.
Should multiple tmcuart_send commands be issued at the same time to a
single AVR micro-controller, it could increase the load to the point
that it introduces a failure. It could also lead to tmcuart_send
transmission errors, which would cause retransmission requests, which
further increase the load.

Track and share mutexes so that only one tmcuart_send command can be
active on a single mcu at a time.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-03-12 20:51:11 -05:00
Kevin O'Connor bf5c2505ab tmc2130: Fix broken error report due to missing self.name
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-03-11 17:52:18 -05:00
Kevin O'Connor 7dd2bf4af3 tmc2130: Verify SPI register writes
The tmc2130 (and tmc5160) will respond back with the value written
during the next SPI command.  Use this feature to verify that the
value written matches the value sent.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-03-10 17:12:25 -05:00
Kevin O'Connor 3ea2e4fc58 tmc2660: Do not enable SFILT by default
None of the other TMC driver enable SFILT by default and it seems
enabling SFILT may not be ideal for sensorless homing.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-03-10 12:07:18 -05:00
fleinze 153698c90d
idle_timeout: change standard timeout g-code (#4018)
Machines that have no heaters produce an error when the idle timeout occurs. This commit fixes this by checking if there are any heaters to turn off.

Signed-off-by: Florian Heinze <florian@heinze.at>
2021-03-07 13:48:54 -05:00
Kevin O'Connor 64b3e5642e heaters: Make sure set_temp() command wakes up the idle_timeout
Introduce a heaters.set_temperature() command and call that from
commands that set a heater temperature.  This new function calls
toolhead.register_lookahead_callback() so that the idle_timeout gets
notification that activity has occurred.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-03-05 18:59:01 -05:00
teeminus bc2096f543
st7920: Better support for emulated ST7920 displays (#3979)
Added new ST7920E display driver which is better suited for displays with emulated ST7920

Signed-off-by: Christian Kehe <teeminus@posteo.net>
2021-03-01 18:23:06 -05:00
Kevin O'Connor 4d3d25b1f7 fan: Minor updates to tachometer handling
Add new fields to Command_Templates.md.

Remove unused self.rpm variable.

Use an explicit get_frequency() method in keeping with Klipper's
convention of not "peeking into member variables".

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-03-01 14:57:40 -05:00
Adrian Keet 16d85d1a78 fan: Add tachometer support
This adds new config options for fans:  'tachometer_pin' to specify the
GPIO pin, and 'tachometer_ppr' (default 2) to specify the number of
signal pulses per revolution.  The rpm is also exposed by get_status for
command templates and the API server.  For fast fans (at least 10000
RPM), the polling interval can be shortened using the
'tachometer_poll_interval' option.

There is a new mcu object for a generic edge counter, which repeatedly
polls a GPIO pin and periodically reports the count to the host.

Signed-off-by: Adrian Keet <arkeet@gmail.com>
2021-03-01 14:53:13 -05:00
Kevin O'Connor 1b989b81e0 tmc: Fix order of init during sensorless homing
With commit 53b10d3a the setup of sensorless homing could occur before
the driver was enabled which would cause the reinitialization of the
driver settings to undo the sensorless homing setup.

Use set_field() when setting the sensorless homing registers so that
it wont conflict with a driver init.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-02-28 18:30:25 -05:00
Kevin O'Connor 36ca639e1f tmc: No need to delay init on a stepper enable
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-02-28 18:04:20 -05:00
Kevin O'Connor c9b81e698e tmc: Allow more retries on a TMC UART read error during background checks
Allow three retries if we can't contact the TMC driver at all when it
is in UART mode.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-02-28 16:44:03 -05:00
Kevin O'Connor 86c943467f tmc_uart: Minor change - make the baud rate setting more clear
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-02-27 11:46:03 -05:00
Kevin O'Connor f035de264f tmc: Add support for periodic checking of driver status
Check the status of all Trinamic stepper motor drivers once a second.
If the driver reports an error then invoke a shutdown.  Also log any
serious warnings.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-02-27 10:39:47 -05:00
Kevin O'Connor 53b10d3ae7 tmc: Reinitialize on every driver enable
Send the full TMC stepper motor driver initialization sequence every
time the driver is enabled.

Don't raise an error on startup if unable to contact a tmc2208/tmc2209
driver.  If the driver is still unavailable when it is enabled then a
shutdown will be issued.  This allows users to troubleshoot (and
possibly bring up communication to the driver) prior to enabling the
driver.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-02-27 10:39:47 -05:00
Kevin O'Connor af8bfee210 tmc2660: Fix tmc register reading
The tmc2660 appears to send responses as soon as the clk starts
toggling.  That means the 20 bit response is at the top of the 24bit
sent message.  Also, this implies that RDSEL must already have the
correct value in the prior message.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-02-27 10:39:47 -05:00
Kevin O'Connor e24709b112 tmc2660: Use common warning/error flag names and descriptions
Where the tmc2660 flags match other drivers, use lowercase so that the
same monitoring code can be used for all the tmc drivers.  Also, use
the same field formatters where applicable.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-02-27 10:39:47 -05:00
Kevin O'Connor 2d781b8340 tmc5160: Merge field formatters into tmc2130.py
The tmc5160 field formatters were mostly duplicates of the tmc2130 -
add the "reset" field to tmc2130.py so both drivers have similar
reporting.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-02-27 10:39:46 -05:00
Kevin O'Connor 21383fa32e tmc: Always report values after a SET_TMC_CURRENT command
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-02-27 10:39:46 -05:00
Kevin O'Connor 6e4270fa79 tmc: Move SET_TMC_CURRENT command to TMCCommandHelper()
Refactor the tmc driver implementations so that there is a single
implementation of the SET_TMC_CURRENT command.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-02-27 10:39:46 -05:00
Kevin O'Connor a657aab0bf tmc2660: Add set_current()/get_current() helpers to TMC2660CurrentHelper
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-02-27 10:39:46 -05:00
Kevin O'Connor 8312843bbe tmc5160: Add set_current()/get_current() helpers to TMC5160CurrentHelper
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-02-27 10:39:46 -05:00
Kevin O'Connor 9c9f78037b tmc2130: Add set_current()/get_current() helper functions to TMCCurrentHelper
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-02-27 10:39:46 -05:00
Andre LeBlanc 3fc72da9ae virtual_sdcard: exact filename match before case insensitive one
currently, if there are 2 files on the virtual sd card whose names differ only in
case (eg. MyFile.gcode vs myfile.gcode) the actual file that gets loaded is at
best unpredictable.  this patch checks for an exact match before attempting a
case-insensitive one.

Signed-off-by: Andre LeBlanc <andrepleblanc@gmail.com>
2021-02-26 22:53:35 -05:00
Marco D'Alessio c7688c6bca tmc2130: Add spi daisy chain support
This patch adds the ability to daisy-chain multiple tmc2130 and
tmc5160 drivers.

Signed-off-by: Marco D'Alessio <marco@wrecklab.com>
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-02-26 10:54:47 -05:00
Kevin O'Connor a8742e982d tmc: Improve error message on missing microsteps config
If microsteps is missing, warn about it in the stepper config section,
not the tmc config section.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-02-23 12:00:08 -05:00
Kevin O'Connor 2aa2e91f2c Revert "bme280: Rename sensor_type from BME280 to bme280"
This reverts commit ac61f8b726.

Many temperature sensors are capitalized, so don't make this chaneg to
the bme280.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-02-20 15:39:03 -05:00
Janar Sööt 92cc286159
menu: Default menu should check extruders have heaters (#3969)
For the hotend targets check also available heaters.
It'll solve crash when using shared heaters.

Signed-off-by: Janar Sööt <janar.soot@gmail.com>
2021-02-20 11:33:34 -05:00
Janar Sööt 5a7fbe671e
menu: redesigned name scroller & menu rendering (#3837)
Signed-off-by: Janar Sööt <janar.soot@gmail.com>
2021-02-20 11:31:03 -05:00
Kevin O'Connor ac61f8b726 bme280: Rename sensor_type from BME280 to bme280
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-02-20 09:23:39 -05:00
Kevin O'Connor c29585f7f3 temperature_host: Rename "path" config to "sensor_path"
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-02-20 09:23:13 -05:00
Kevin O'Connor 227d9bdbcf temperature_host: Improve backwards compatibility check
Don't register two names for the same instance of the sensor.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-02-19 18:51:42 -05:00
Evgenii 3d35c003db temperature_host: Rename rpi_temperature and add support for custom paths
Signed-off-by: Evgenii Shavrin <shavrin0591@gmail.com>
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-02-19 18:44:28 -05:00
Christian S bc2f6faa17
probe: Add last_z_result to get the latest z result in an Macro (#3835)
Signed-off-by: Christian Schnellrieder <schnello.android@gmail.com>
2021-02-18 22:03:32 -05:00
Arjan Mels b2cbb9aa96
idle_timeout: Add help to SET_IDLE_TIMEOUT (#3945)
Signed-off-by: Arjan Mels <github@mels.email>
2021-02-18 20:32:46 -05:00
Alan Lord 7d4df65920
ds18b20: new module for 1-wire temperature sensor (#3462)
Initial commit of code to support 1-wire (Dallas) sensors such
as the DS18B20. Requires Linux kernel drivers to create a file
in /sysfs which is read by this module, and temperature
typically returned to a temperature_fan.

Signed-off-by: Alan Lord <alanslists@gmail.com>
Signed-off-by: Josh Headapohl <joshhead@gmail.com>
2021-02-02 14:34:56 -05:00
Lane Roberts 19397a0a2b
temperature_fan: Add MAX_SPEED and MIN_SPEED to SET_TEMPERATURE_FAN_TARGET command (#3873)
Allows setting min_speed and max_speed at runtime, rather than updating the config and restarting.

Signed-off-by Lane Roberts <nolatari@vandarin.net>
2021-02-02 14:30:04 -05:00
Dmitry Butyugin d136b1e41a resonance_tester: Increase test max_accel to 10K and max_freq to 133 Hz
Signed-off-by: Dmitry Butyugin <dmbutyugin@google.com>
2021-02-02 14:13:24 -05:00
Dmitry Butyugin a8b282d67a resonance_tester: Disable input shaping for resonance testing
Signed-off-by: Dmitry Butyugin <dmbutyugin@google.com>
2021-02-02 14:13:24 -05:00
Dmitry Butyugin 0fb2449be0 adxl345: Add accelerometer chip name to the raw data file name
Signed-off-by: Dmitry Butyugin <dmbutyugin@google.com>
2021-02-02 14:13:24 -05:00
Kevin O'Connor 6e79152f47 htu21d: Implement support for min_temp/max_temp checks
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-02-01 11:30:27 -05:00
Kevin O'Connor a15952770b bme280: Implement support for min_temp/max_temp checks
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-02-01 11:27:16 -05:00
Kevin O'Connor 74244ab0eb spi_temperature: Improve handling of min_temp/max_temp overflows
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-02-01 10:37:19 -05:00
Kevin O'Connor 333f8c210f lm75: Implement support for min_temp/max_temp checks
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-02-01 10:37:19 -05:00
Kevin O'Connor 7775e0ed54 lm75: Use getfloat() for reading the lm75_report_time parameter
Reported by @theopensourcer.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-02-01 10:26:14 -05:00
Thomas Kroll 60e4cddf36 hd44780: Add hd44780 protocol init config
LDO OLED needs a different init string.

Fixes: #3722
Signed-off-by: Thomas Kroll <t.kroll@outlook.com>
2021-01-31 19:35:40 -05:00
Kevin O'Connor 5d960aef37 htu21d: Fix time reporting of temperature measurements
The temperature callback takes a "print time" not a "system time".

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-01-24 15:38:16 -05:00
Kevin O'Connor 8de86ad51f rpi_temperature: Fix time reporting of temperature measurements
The temperature callback takes a "print time" not a "system time".

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-01-24 15:37:37 -05:00
Kevin O'Connor bded15b743 temperature_mcu: Improve handling when in debug output mode
Call mcu_adc.setup_minmax() even in debug output mode so that the
debugging output contains a more accurate configuration.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-01-24 15:28:16 -05:00
Kevin O'Connor 04179f3eae bme280: Disable bme280 when using debug output
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-01-24 15:19:43 -05:00
Kevin O'Connor c3e3b2280a rpi_temperature: Fix missing get_report_time_delta() callback
Reported by @ronald5555.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-01-24 14:00:41 -05:00
Kevin O'Connor cf8d5a6606 rpi_temperature: Disable rpi_temperature when using debug output
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-01-24 13:59:09 -05:00
Kevin O'Connor 29831a2f69 rpi_temperature: Minor formatting changes
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-01-24 13:58:54 -05:00
Kevin O'Connor db86a4edcb temperature_mcu: Disable the temperature_mcu when using debug output
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-01-24 13:56:57 -05:00
Chip b9899a23a3
menu: Update menu.cfg sd_card menu enable condition (#3826)
Change SD card enable condition and add Cancel printing option.

Signed-off-by: John Smith <login721@gmail.com>
2021-01-24 10:35:05 -05:00
Pascal P 1e2eb9a4de
hall_filament_width_sensor: Fix race condition (#3790)
Fix race condition of filament width sensor
Added fix to similar code of TSL1401CL filament width sensor

Signed-off-by: Pascal Pieper <accounts@pascalpieper.de>
2021-01-22 13:41:34 -05:00
Kevin O'Connor 023a985bfc gcode_macro: Use deepcopy() on get_status() results
If a get_status() method returns a mutable object (such as a list or
dict) then it would be possible for a gcode command template to
incorrectly alter the program's internal state.  Perform a deepcopy()
operation on all get_status() return results to avoid that.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-01-20 16:25:25 -05:00
Kevin O'Connor 0e9cb2abac save_variables: Import ConfigParser as configparser for better Python3 support
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-01-17 22:46:04 -05:00
Alex Zellner dac0fba50d
menu: Update menu.cfg (#3778)
Update min/max in move menu to printer variables.

Signed-off-by: Alex Zellner <alexander.zellner@googlemail.com>
2021-01-17 22:39:54 -05:00
Maël Kerbiriou 9278f56e36
webhooks: Fix use of deprecated Exception.message attribute (#3781)
Since Python 2.6, the BaseException.message attribute is deprecated (PEP-352[1])
in favor of e.args[0] or str(e). This commit replaces e.message with str(e).

[1] https://www.python.org/dev/peps/pep-0352/

Signed-off-by: Maël Kerbiriou <m431.kerbiriou@gmail.com>
2021-01-17 22:37:41 -05:00
Kevin O'Connor c57352a336 homing: Fix references to CommandError()
Commit ea85d419 moved CommandError from homing.py to gcode.py, but
failed to fix the references to CommandError within homing.py.  Fix
that.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-01-11 10:01:14 -05:00
Kevin O'Connor 8260a3a0c3 homing: Make homing.py an "extras" module
Move klippy/homing.py to klippy/extras/homing.py and convert the code
to an "extras" modules.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-01-08 14:01:34 -05:00
Kevin O'Connor ea85d419de gcode: Move definition of CommandError and Coord from homing.py to gcode.py
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-01-08 12:07:45 -05:00
Justin Schuh a5ebe5825a
heaters: Make MINIMUM optional for TEMPERATURE_WAIT command (#3674)
Signed-off-by: Justin Schuh <code@justinschuh.com>
2020-12-24 11:34:26 -05:00
Justin Schuh 1a9218532b heaters: Add MAXIMUM option to TEMPERATURE_WAIT command
Signed-off-by: Justin Schuh <code@justinschuh.com>
2020-12-23 18:16:46 -05:00
Dmitry Butyugin 1b1a97e8bd shaper_calibrate: Choose input shapers accounting smoothing
Improved algorithm to choose the 'optimal' shaper frequency taking
shaper smoothing into account. This may choose a frequency with
slightly more vibrations but less smoothing. Also allow users to
limit the maximum input shaper smoothing.

Signed-off-by: Dmitry Butyugin <dmbutyugin@google.com>
2020-12-22 18:37:41 -05:00
Kevin O'Connor a637c2f110 heaters: Fix TEMPERATURE_WAIT command with extruder and heater_bed
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-12-22 15:22:13 -05:00
Kevin O'Connor f84a570dde temperature_mcu: Fix slope on stm32f070
The stm32f070 has a negative temperature slope.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-12-19 11:19:44 -05:00
Kevin O'Connor e0395c69aa temperature_mcu: Fix slope on stm32f1
The stm32f103 has a negative temperature slope.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-12-19 10:38:50 -05:00
Kevin O'Connor 96eba9f2df endstop_phase: Obtain phases directly from stepper microsteps config
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-12-18 10:30:32 -05:00
Kevin O'Connor 7dcc778b6c stepper: Calculate step_distance from rotation_distance
Add support for automatically calculating the internal step_distance
from new config parameters - rotation_distance, microsteps,
full_steps_per_rotation, and gear_ratio.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-12-18 10:30:32 -05:00
Kevin O'Connor e786748f18 heaters: Always register heater pin as a pwm pin
There's no need to sometimes register the pin as a 'digital_out' pin
instead of as a 'pwm' pin.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-12-15 12:21:04 -05:00
Stefan Dej 77add95675
heaters: add last pwm value to heater.get_status (#3621)
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2020-12-13 20:08:16 -05:00
Kevin O'Connor 0923450286 tmc: Use configfile note_valid=False when inspecting stepper step_distance
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-12-13 10:42:25 -05:00
Kevin O'Connor 14fd40e3f9 safe_z_home: Use configfile note_valid=False when inspecting z position_max
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-12-13 10:42:25 -05:00
Kevin O'Connor b25520795d probe: Use configfile note_valid=False when inspecting z position_min
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-12-13 10:42:25 -05:00
Kevin O'Connor 89183edbda manual_probe: Use configfile note_valid=False when inspecting Z position_endstop
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-12-13 10:41:40 -05:00
Kevin O'Connor 65a49d17dd hd44780: Make the 4-bit init sequence more robust
The previous init sequence relied on the display ignoring commands if
they are sent faster than 40us.  Some displays may not have this
limit.

Rework the init to make it more robust to command transmission times.
The new init should still transition the display into 4-bit mode even
if the display processes commands faster than 40us.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-12-12 10:07:53 -05:00
Kevin O'Connor a1baefc2c2 temperature_mcu: Add enhanced support for monitoring mcu temperature
Add a "temperature_mcu" tool that can monitor builtin micro-controller
temperature sensors.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-12-10 02:39:06 -05:00
Kevin O'Connor e83801daab heaters: Add a TEMPERATURE_WAIT command
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-12-07 09:57:13 -05:00
Kevin O'Connor c4a37756ea temperature_sensor: Report temperature in stats
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-12-06 21:55:26 -05:00
Kevin O'Connor 9e293be5e0 pca9685: Use move queue for pwm updates
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-12-04 16:10:13 -05:00
Kevin O'Connor 14952ccef5 docs: Add links to default display.cfg and menu.cfg in Config_Reference.md
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-12-03 18:11:29 -05:00
Kevin O'Connor 23f547169c rpi_temperature: Don't read min_temp/max_temp directly from config
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-12-03 12:37:56 -05:00
Al b911db4c0d
rpi_temperature: New module to monitor RPi temperature (#3587)
Module to monitor RPi cpu temperature

Signed-off-by: Al Crate <aleph@al3ph.org>
2020-12-03 12:35:37 -05:00
Kevin O'Connor d7053f6e71 save_variables: Support saving variables to a disk file
Signed-off-by: Dushyant Ahuja dusht.ahuja@gmail.com
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-12-03 12:19:47 -05:00
Janar Sööt 91de1560a7
menu: modifications (#3262)
- remove lot of helper methods
- differentiate class instantiate from config or directly
- don't use 'enable' template rendering when static value is used.
- new element 'disabled'
- other internal adjustments

Signed-off-by: Janar Sööt <janar.soot@gmail.com>
2020-12-03 10:46:55 -05:00
Kevin O'Connor a4f7ad9ffc heater_fan: Fix typo causing excessive cpu usage
Commit error introduced in a7e90504 and f261a468.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-12-01 12:31:22 -05:00
Kevin O'Connor f261a4688b controller_fan: Improve timing of fan commands
Don't use the reactor eventtime to schedule micro-controller commands
as that time may have low accuracy.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-12-01 11:51:29 -05:00
Kevin O'Connor a7e9050439 heater_fan: Improve timing of fan commands
Don't use the reactor eventtime to schedule micro-controller commands
as that time may have low accuracy.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-12-01 11:51:24 -05:00
Kevin O'Connor f90fbb56d2 input_shaper: Simplify input shaper type reporting
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-12-01 11:36:37 -05:00
Kevin O'Connor 6ead8dd9d9 lm75: Start temperature measurements from "klippy:connect" callback
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-12-01 11:36:37 -05:00
Kevin O'Connor 52c6ba3bb5 htu21d: Start temperature measurements from "klippy:connect" callback
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-12-01 11:36:37 -05:00
Kevin O'Connor 69f06054e1 bme280: Start temperature measurements from "klippy:connect" callback
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-12-01 11:36:37 -05:00
Kevin O'Connor f3fd814ce0 neopixel: Don't wait for responses when in debug mode.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-12-01 11:36:37 -05:00
Stefan Dej 7266473fec
controller_fan: add get_status (#3566)
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2020-11-23 11:55:14 -05:00
Kevin O'Connor 665ec5e987 spi_temperature: Fix incorrect max31856 spi initialization
Writes to the max31856 chip use "burst mode", so only one address
during the initialization sequence can be sent.  This fixes erroneous
"Cold Junction Fault" errors.

Reported by @NBouquain.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-11-23 09:58:42 -05:00
Martin Hierholzer fcb78e50e5
hd44780: allow to configure line length (#3543)
This allows to use 16x4 displays rather than only 20x4.

Signed-off-by: Martin Hierholzer <hier@beta-centauri.de>
2020-11-20 14:49:38 -05:00
Kevin O'Connor bdd938b578 board_pins: Use an explicit parameter to specify mcu name(s)
Add an 'mcu' option to the board_pins config and use that to specify
the name of the mcu to apply the aliases to.  Support applying the
aliases to multiple mcus.

Add support for any number of options starting with an "aliases_"
prefix.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-11-20 12:00:36 -05:00
Kevin O'Connor 15b5dbaf8f docs: Move config reference information to new Config_Reference.md
Move all the config reference information from files in the config/
directory to a new Config_Reference.md document.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-11-18 20:10:21 -05:00
Arksine 5970227cbd print_stats: exclude time prior to first extrusion from "print_duration"
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2020-11-13 20:48:15 -05:00
Kevin O'Connor 90d755dc0a output_pin: Don't flush lookahead queue on a SET_PIN command
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-11-13 18:29:41 -05:00
Kevin O'Connor 9e1697786d neopixel: Apply LED updates at time of transmission
Queue updates so that delays between updates are properly applied.
This fixes macros that would blink LEDs by pausing between update
commands.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-11-05 12:57:14 -05:00
Kevin O'Connor 123908ac7a neopixel: Fix neopixel_result message so that it contains an oid
In order for commit 82156170 to work properly, the neopixel_result
message must contain the oid.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-11-05 11:40:34 -05:00
Kevin O'Connor 821561708d neopixel: Fix failure with multiple simultaneous neopixel updates
Make sure to set the oid parameter of mcu.lookup_query_command() so
responses are routed correctly.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-11-04 18:47:36 -05:00
Arksine 8a5e7d8d28 gcode_macro: implement "action_call_remote_method" context action
Users may use this action to call methods registered by a webhooks client from a command template.

Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2020-11-04 18:32:30 -05:00
Kevin O'Connor e0842e0e03 heaters: Add sensors to printer.heaters.available_sensors even if no gcode_id
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-11-01 20:09:16 -05:00
Kevin O'Connor 79877acb14 mcu: Add support for setting reqclock in CommandQueryWrapper.send()
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-10-29 12:00:28 -04:00
Kevin O'Connor 5f96f8a29b dotstar: Don't flush the lookahead queue on a SET_LED command
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-10-29 12:00:28 -04:00
Kevin O'Connor 6133737215 neopixel: Don't flush the lookahead queue on a SET_LED command
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-10-29 12:00:28 -04:00
Kevin O'Connor 7263077db5 neopixel: Add support for RGBW LEDs
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-10-29 12:00:25 -04:00
Kevin O'Connor 2bb30265b5 neopixel: Increase the maximum LED chain length
Rework neopixel updates to use an mcu buffer so that more than 18 LEDs
can be in a chain.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-10-29 11:59:15 -04:00
Kevin O'Connor c2c79ff98d bltouch: Fix bug causing incorrect position when "stow_on_each_sample=False"
It is only valid to call raise_probe() when the toolhead is not
moving.  Make sure to call sync_print_time() from multi_probe_end() to
ensure that.  This fixes a bug that could cause the Z axis steppers to
lose their position when "stow_on_each_sample=False".

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-10-24 00:22:58 -04:00
Kevin O'Connor f8cb1e30eb heaters: Don't raise an error if PID Ki is set to zero
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-10-17 20:48:25 -04:00
Dmitry Butyugin f8c4f90c04
resonance_tester: Resonance testing and input shaper auto-calibration (#3381)
Signed-off-by: Dmitry Butyugin <dmbutyugin@google.com>
2020-10-14 20:08:10 -04:00
Kevin O'Connor d317793171 bltouch: Add an extra 200ms delay to the initialization process
On a reset, the mcu.py code may have sent an initialization message to
the bltouch, which needs time to complete.  Add additional time during
the bltouch setup to avoid a race with these two times.  This avoids
some "timer too close" errors that users of fast host machines were
reporting.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-10-11 11:14:32 -04:00
Kevin O'Connor 930317fa2a thermistor: Add support for the board thermistor on the Einsy Rambo
Add in support for the "TDK NTCG104LH104JT1" thermistor.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-10-08 15:25:09 -04:00
jhpadjustable 48b30e0f5a
display_status: fix M117 checksum trimming (#3377)
The M117 command parser discards the last character of the message
whenever the M117 command does not begin the line and there is no *xx
checksum, e.g.
  N0 M117 Look at me
causes the banner area of the printer screen to display "Look at m".
This patch only trims the checksum when one is found to trim.

Signed-Off-By: Jonathan Pickard <jhp@adjustablelabs.info>
2020-09-28 10:11:05 -04:00
Kevin O'Connor 55e20f2c19 mcu: Add support for changing cycle_time in set_pwm()
Signed-off-by: Guy Shapira <gayuha@gmail.com>
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-09-26 20:55:56 -04:00
Kevin O'Connor ad0b76bd4b delta_calibrate: Don't error on an invalid kinematic guess
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-09-17 22:41:13 -04:00
Kevin O'Connor 4c14063404 heaters: Disable unused pwm output debugging info
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-09-17 02:06:20 -04:00
Kevin O'Connor cd23c95760 display: Remove circular references from intermediate context object
Explicilty clear the local context object so that it does not require
a gc sweep to free it.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-09-16 23:53:45 -04:00
Arksine 7ba1a2a749 bed_mesh: add mesh parameters to BED_MESH_CALIBRATE
This allows the generated points to be modified prior to probing the bed.

Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2020-09-15 20:36:55 -04:00
Arksine 9e68105b74 probe: add update_probe_points() method to helper
This allows the consumers of the ProbePoints helper to be reconfigured at runtime.

Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2020-09-15 20:36:55 -04:00
Arksine 6e77fd27cd bed_mesh: move algorithm verification to its own method
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2020-09-15 20:36:55 -04:00
Arksine 98931789d8 bed_mesh: move mesh area configuration to _init_mesh_config
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2020-09-15 20:36:55 -04:00
Paul McGowan 5a2f406fd1
probe: add get_status wrapper to probe for last_query from query_probe command (#3296)
Add get_status wrapper with last_query status for macros  It is sometimes useful to determine the state of the probe from a macro. If the probe is connected to an endstop pin, the results can be obtained via QUERY_ENDSTOPS but if a physical endstop is in use in addition to the probe the probe state cannot be obtained. This change allows one to use QUERY_PROBE  and then access the printer.probe.last_query object to obtain the state.

Signed-off-by: Paul McGowan <mental405@gmail.com>
2020-09-09 23:10:35 -04:00
rjpatawaran c7ea4b89c9
uc1701: Add x_offset (Used to add horizontal offset on SSD1306/SH1106 displays) (#3284)
Signed-off-by: RJ Patawaran <rjpatawaran@me.com>
2020-09-09 23:07:40 -04:00
Kevin O'Connor 1f5848fc1a adc_scaled: Add support for Duet2 Maestro "vref monitoring"
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-09-09 22:20:54 -04:00
Kevin O'Connor fc85675145 gcode_button: Add support for analog buttons
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-09-09 14:21:30 -04:00
Kevin O'Connor 3405095f0a adxl345: Add support for adxl345 accelerometer
Add support for taking measurements from an adxl345 accelerometer via
SPI interface.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-09-05 09:11:04 -04:00
Kevin O'Connor 2b2b610cff uc1701: Improve Python3 compatibility
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-09-04 22:29:55 -04:00
Kevin O'Connor d69a496b83 hd44780: Improve Python3 compatibility
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-09-04 22:14:06 -04:00
Kevin O'Connor 166ce06aea buttons: Improve python3 compatibility
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-09-04 19:33:04 -04:00
Kevin O'Connor 5cce7f4d55 pid_calibrate: Update for improved python3 compatibility
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-09-04 19:30:18 -04:00
Kevin O'Connor 3bcb6970f5 probe: Make sure z is homed before probing
Warn if the Z axis is not homed before attempting to probe.  This
improves the error message.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-09-04 15:47:52 -04:00
Kevin O'Connor 08adecd226 homing: Prefer printer.command_error() instead of homing.CommandError()
Update callers to use the printer.command_error reference instead of
directly using homing.CommandError() when raising or catching errors.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-09-04 12:10:36 -04:00
Kevin O'Connor f6dd97b784 homing: Remove EndstopError
There's no reason to distinguish between an EndstopError and a
CommandError, so just use CommandError.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-09-04 11:41:57 -04:00
Kevin O'Connor d0ed6e5705 input_shaper: Fix typo in SET_INPUT_SHAPER report of shaper_type_y
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-09-03 14:19:55 -04:00
Kevin O'Connor 6c872c71a7 quad_gantry_level: Add additional comments on how leveling works
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-09-03 12:09:02 -04:00
Kevin O'Connor c69527e2b0 spi_temperature: Simplify and comment MAX31865 temperature calculations
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-09-02 10:04:35 -04:00
Adrian Keet 37d7742468
spi_temperature: fix MAX31865 temperature conversion (#3274)
Signed-off-by: Adrian Keet <arkeet@gmail.com>
2020-09-02 09:32:30 -04:00
Janar Sööt 97da129793 menu: only render visible list items
Signed-off-by: Janar Sööt <janar.soot@gmail.com>
2020-08-26 10:08:12 -04:00
Janar Sööt 9459549db3 menu: fixing input gcode run issue on edit start
Signed-off-by: Janar Sööt <janar.soot@gmail.com>
2020-08-26 10:07:03 -04:00
Kevin O'Connor ff6e879349 display: Allow redrawing the screen up to 10 times per second
Increase the maximum redraw rate from 4 times per second to 10 times
per second.  Some users have reported slower rendering times as a
result of 8fa1c977.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-08-24 19:02:30 -04:00
Kevin O'Connor 37bbf161f8 adc_temperature: Minor simplification of default sensor registration
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-08-23 09:02:18 -04:00
Kevin O'Connor 4a6360f2af adc_temperature: Calculate "PT100 INA826" values from formula
Calculate the "PT100 INA826" values instead of using a voltage table.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-08-22 17:21:17 -04:00
Kevin O'Connor d3e41b55b7 adc_temperature: Calculate PT1000 temperature/resistance pairs from formula
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-08-22 17:16:45 -04:00
Kevin O'Connor 1286d3006c gcode_move: Move GCodeMove class from gcode.py to new extras module
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-08-20 21:03:22 -04:00
Kevin O'Connor 4c5e93d51d gcode: Split G0/G1 command handling to new gcode_move class
Split up the main GCodeParser class into GCodeDispatch and GCodeMove
classes.  The GCodeMove class is now available using the "gcode_move"
printer object name.  This split simplifies the gcode.py code.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-08-20 21:03:22 -04:00
Kevin O'Connor 80a6f59c8f gcode: Convert get_status() last_xpos to use a namedtuple
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-08-20 21:03:22 -04:00
Kevin O'Connor 2d5f9b6cda gcode: Remove unneeded base_xpos variables from get_status()
Convert the only user of base_zpos to use gcode_position.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-08-20 21:03:22 -04:00
Kevin O'Connor c0daf43d2f gcode: Convert get_status() homing_xpos to use a namedtuple
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-08-20 21:03:22 -04:00
Kevin O'Connor b2c78d71b0 gcode: Remove "action_" commands from get_status() calls
Rename printer.gcode.action_emergency_stop() to
action_emergency_stop(), printer.gcode.action_respond_info() to
action_respond_info(), and printer.gcode.action_respond_error() to
action_raise_error() in command templates.

This simplifies the get_status() interface, as returning callable
functions from that interface was confusing.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-08-20 21:03:22 -04:00
Kevin O'Connor 2caaaea9a4 toolhead: Add a manual_move() helper function
Add a helper function for submitting relative movements.  This
function will also automatically ensure gcode.reset_last_position() is
called.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-08-20 21:03:22 -04:00
Kevin O'Connor b9ac6d6306 skew_correction: Make sure to call reset_last_position() on a skew update
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-08-20 21:03:22 -04:00
Kevin O'Connor 4115a77342 gcode: Automatically call reset_last_position() on a toolhead set_position()
Generate a "toolhead:set_position" event on a call to
toolhead.set_position() and use that event to automatically call
gcode.reset_last_position().

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-08-20 21:03:22 -04:00
Janar Sööt 560d48dbc9 menu: reduce timeout timer period to 1s
Signed-off-by: Janar Sööt <janar.soot@gmail.com>
2020-08-20 09:10:23 -04:00
Kevin O'Connor 8fa1c97767 display: Support requesting a screen redraw on a menu key press
Add a request_redraw() method and call it when a key menu event
occurs.  Limit these proactive screen redraws to no more than 4 per
second.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-08-20 09:04:56 -04:00
alocin73 1bdf705524
hall_filament_width_sensor: Fix Flow update before next pending_position #3184 (#3198)
After reading the first item of self.filament_array, filament_width is updated back to self.nominal_filament_dia or self.diameter instead of retaining the value until next pending_position.

Updated Filament Menu Template.

Signed-off-by: Nicola Falciani <nicola.fal@gmail.com>
2020-08-19 18:58:49 -04:00
Janar Sööt bc904dd431 menu: remove surplus self.running=False
Signed-off-by: Janar Sööt <janar.soot@gmail.com>
2020-08-18 21:39:15 -04:00
Janar Sööt ccfcc3789b menu: optimize container populate
- don't populate all items at once
- populate items when container is pushed to stack
- precreate List back item, don't create it during populate.
- don't update items during populate

Signed-off-by: Janar Sööt <janar.soot@gmail.com>
2020-08-18 21:39:15 -04:00
Kevin O'Connor 568393c941 webhooks: Remove "method" parameter from webhook requests
Don't require or use the "method" parameter of requests.  This
simplifies the interface.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-08-16 13:20:25 -04:00
Kevin O'Connor b74a5c5217 webhooks: Remove register_static_path()
Use the "info" webhook to pass critical process information back to
the caller.  The remaining users of register_static_path() can get the
required information via get_status() calls.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-08-16 13:20:25 -04:00
Kevin O'Connor 118ef908a5 display: Remove reference to printer.gcode.busy from display.cfg
The "busy" variable was removed and using it isn't necessary.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-08-15 17:20:24 -04:00
Janar Sööt b490848bc9
menu: fix for overwriting existing menu item (#3189)
In case of an overwriting existing menu item,
the new item was added additionally to the end of the items list.

Signed-off-by: Janar Sööt <janar.soot@gmail.com>
2020-08-14 13:42:33 -04:00
Janar Sööt 7a615b4f69 hall_filament_width_sensor: fix error
Fix no attribute error in in get_status

Signed-off-by: Janar Sööt <janar.soot@gmail.com>
2020-08-13 16:49:51 -04:00
Arksine e4f3f60ea6 virtual_sdcard: register sd static path
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2020-08-11 10:47:04 -04:00
Bryan Boettcher 04bd48ca9d
adc_temperature: add support for AD597 (#3164)
The AD597 thermocouple amplifier is used in the Raise3D N2+ (and
possibly others).

Signed-off-by: Bryan Boettcher <bryan.boettcher@gmail.com>
2020-08-09 21:06:43 -04:00
Janar Sööt d991b4c83b
menu: Replace menu with new Jinja2 template system (#2344)
menu.cfg:
- jinja2 template scripting
- new Setup menu
- new Calibration menu
menu:
- redesigned menu code
- jinja2 support
- option to reverse menu up and down directions
- functionality set to support menu injection from other modules
- a new way of defining menu hierarchy
- other adjustments

Signed-off-by: Janar Sööt <janar.soot@gmail.com>
2020-08-09 09:29:55 -04:00
Trevor Jones efebbb9a2f
tmc5160: diag0 support (#3159)
Allow for diag0 only hardware to use sensorless homing.

Signed-off-by:  Trevor Jones <trevorjones141@gmail.com>
2020-08-09 08:17:51 -04:00
Toby Harper f851cfae46
gcode_arcs: increment absolute e coord for each arc segment (#3162)
Arc travel was working but extrusion in absolute mode seemed not to be happening at all. This was because the E coord being sent with each G1 segment of the arc was not incrementing, effectively the same value was being sent over and over so the total extrusion for the whole arc was the amount for just one segment which is an extremely tiny amount.

My change increments e_base by e_per_move for each subsequent coord when in absolute extrude mode which results in the correct absolute E value being sent for each segment.

Signed-off-by: Toby Harper <toby@fuith.org>
2020-08-07 12:15:03 -04:00
bondus c9e7119a93
fan_generic: Add support for named fans and gcode to control them (#3054)
Signed-off-by: Pontus Borg <liquidpontus@yahoo.se>
2020-08-07 11:39:44 -04:00
Arksine b9f48e634e print_stats: Add virtual_sdcard state tracking
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2020-08-05 13:46:24 -04:00
Arksine 6b1ad715aa print_stats: stat tracking for virtual sdcard prints in progress
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
2020-08-05 13:46:24 -04:00
Arksine 463194b1a3 virtual_sdcard: update get_status method
Do not reset progress to zero while paused.  Report 'is_active' and 'file_position'.

Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2020-08-05 13:46:24 -04:00
Arksine 963d7c247b virtual_sdcard: add SDCARD_PRINT_FILE gcode
SDCARD_PRINT_FILE allows Klipper to load and start the print for any
gcode file within the virtual_sdcard path, including subdirectories.

Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2020-08-05 13:46:24 -04:00
Arksine af39a209f3 virtual_sdcard: add SDCARD_RESET_FILE gcode
This allows the user to close a currently loaded file and reset the virtual_sdcard's state.

Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2020-08-05 13:46:24 -04:00
Florian Heilmann 10987003b0
safe_z_home: Make sure X and Y are homed before homing Z (#3153)
In it's current behavior, safe_z_home will attempt to home Z if it thinks the toolhead is above the z endstop even if the motors have since been disabled and the toolhead was moved to another position

Signed-off-by: Florian Heilmann <Florian.Heilmann@gmx.net>
2020-08-05 11:52:23 -04:00
Arksine 3143e31aca temperature_sensor: report min/max measured temp via get_status
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2020-08-01 15:56:51 -04:00
Arksine d37374974d filament_switch_sensor: report "enabled" state via get_status
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2020-08-01 15:56:51 -04:00
Kevin O'Connor 1f7c3fc8ec gcode: Report the final print_time in debuginput mode
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-07-30 12:53:59 -04:00
Arksine 4795c0896d bed_mesh: Move profile management to its own class
This streamlines the BedMeshCalibrate class, making it only resposible for configuring and executing the calibration procedure.

Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2020-07-25 12:05:29 -04:00
Arksine dbec03abd9 bed_mesh: track the probed_matrix and mesh_params exclusively in the ZMesh class
Rather than have multiple classes keep a reference to these items, keep them in the z_mesh.

Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2020-07-25 12:05:29 -04:00
Arksine 41eedda5d6 bed_mesh: differentiate between "mesh_config" and "mesh_params"
This fixes an issue where a new profile is not properly saved after a restart.

Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2020-07-25 12:05:29 -04:00
Arksine 7c8b60b40e bed_mesh: round x and y positions received via the finalize callback
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>

Update bed_mesh.py
2020-07-25 12:05:29 -04:00
Arksine 6458def588 bed_mesh: add get_status() method
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2020-07-25 12:05:29 -04:00
Kevin O'Connor db05938a5f servo: Set initial value via mcu_servo.setup_start_value()
Using the setup_start_value() method avoids the PWM output line
transitioning to an intermediate state prior to setting the initial
value.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-07-25 11:39:39 -04:00
Kevin O'Connor 428a8d4881 servo: Remove servo ENABLE parameter
Allow one to disable servos via `SET_SERVO WIDTH=0` instead of using
an explicit ENABLE parameter.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-07-25 11:39:39 -04:00
combolek 3835654116
lm75: Added support for LM75/LM75A I2C connected temperature sensors (#3101)
Signed-off-by: Boleslaw Ciesielski <combolek@users.noreply.github.com>
2020-07-19 20:18:54 -04:00
Iakabos b0901daa85
display: Add configuration options for OLED displays (#3084)
Add user-configurable contrast, vcomh (affects "smearing"), and invert options for SSD1306/SH1106 type OLED displays.

Signed-off-by:  James Esau <james_esau@hotmail.com>
2020-07-19 20:18:08 -04:00
Kevin O'Connor af981432f0 thermistor: Add in definition for "SliceEngineering 450" thermistor
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-07-11 12:50:58 -04:00
Kevin O'Connor 3a57608642 fan: Separate out the part cooling fan code from the generic fan code
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-07-05 21:04:04 -04:00
Dmitry Butyugin 4bdc11a8b3
input_shaper: Initial support of input shaping (#3032)
Input shaping can help to reduce printer vibrations due to resonances
and eliminate or reduce ghosting in prints.

Signed-off-by: Dmitry Butyugin <dmbutyugin@google.com>
2020-07-05 20:54:38 -04:00
Kevin O'Connor c6b652044d stepper: Make sure to reload trapq in set_stepper_kinematics()
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-06-30 20:20:16 -04:00
Arksine a342770ac5 pause_resume: Add CANCEL_PRINT gcode
Register API endpoints for "pause_resume/pause", "pause_resume/resume" and "pause_resume/cancel".

Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2020-06-24 19:07:33 -04:00
Arksine a31dd0ff0e query_endstops: register "query_endstops/status" endpoint
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2020-06-24 19:07:33 -04:00