Commit Graph

1807 Commits

Author SHA1 Message Date
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
Kevin O'Connor a92d995727 chelper: Set compiler flags to never use "x387" floating point math
The default on X86 32bit machines is to use 80bit floating point math
(as found in the ancient "387 coprocessor").  This can cause numerical
stability problems.  Set the compiler flags to make sure the newer SSE
math is always used on X86.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-09-15 17:12:53 -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 13ee6032ae mcu: Use schedule_pwm_out instead of set_pwm_out on a restart
Some mcu implementations don't like it when the pwm pin is configured
twice, so use the normal schedule_pwm_out implementation to update on
a restart.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-09-09 13:16:02 -04:00
Kevin O'Connor c285f8b6cf klippy: Improve handling of reactor.run() exceptions
Try to invoke a shutdown on an unhandled exception from reactor.run().
If that fails, try to do a clean exit.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-09-06 12:45:27 -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 1f3a160f47 toolhead: Add a move.move_error() helper
Move the EndstopMoveError() code from homing.py to a new method in the
toolhead Move class.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-09-03 16:22:54 -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
Kevin O'Connor a7defdcad0 kin_shaper: Fix check for optimized X or Y only calculations
The optimized version is only available if it's the only axis used.
This fixes input_shaper on corexz.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-08-30 12:32:11 -04:00
Kevin O'Connor 08ddf25cf3 kin_shaper: Add an init_shaper() helper function
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-08-30 12:32:11 -04:00
Kevin O'Connor d28e148ddc kin_shaper: Group shaper setup code together
No code changes - just code movement.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-08-30 12:32:11 -04:00
Kevin O'Connor 0e21188cb2 kin_shaper: Allocate space for maximum number of shaper pulses in advance
Combine the shaper pulses and count of those pulses into a `struct
shaper_pulses`.  Allocate space for the maximum number of pulses in
`struct input_shaper`.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-08-30 11:30:39 -04:00
Kevin O'Connor b6a25393d3 webhooks: Add client_info parameter to "info" webhook
Allow clients to send their version info to klipper and arrange for
that info to be logged.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-08-26 10:12:58 -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 6763210558 gcode: Fix out-of-order cmd_M112 reference
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-08-23 13:18: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 cd7c1b8e68 toolhead: Move G4 and M400 commands from gcode.py to toolhead.py
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 39261d884d gcode: Remove unused move_xpos get_status() variables
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-08-20 21:03:22 -04:00
Kevin O'Connor 9103aaf6d5 toolhead: Remove unused get_stats() data
The "status" and "printing_time" are now available in the
"idle_timeout" module, so no need to report them from toolhead.

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