Commit Graph

859 Commits

Author SHA1 Message Date
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