aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* adc_temperature: Calculate PT1000 temperature/resistance pairs from formulaKevin O'Connor2020-08-221-4/+6
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* lib: Add a .gitignore file for intermediate files in lib/ directoryKevin O'Connor2020-08-211-0/+5
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* gcode_move: Move GCodeMove class from gcode.py to new extras moduleKevin O'Connor2020-08-2011-284/+296
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* docs: Document printer.gcode_move variables in Command_Templates.mdKevin O'Connor2020-08-201-7/+32
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* gcode: Split G0/G1 command handling to new gcode_move classKevin O'Connor2020-08-2015-194/+219
| | | | | | | | 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>
* toolhead: Move G4 and M400 commands from gcode.py to toolhead.pyKevin O'Connor2020-08-202-9/+11
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* gcode: Convert get_status() last_xpos to use a namedtupleKevin O'Connor2020-08-202-6/+3
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* gcode: Remove unneeded base_xpos variables from get_status()Kevin O'Connor2020-08-202-8/+6
| | | | | | Convert the only user of base_zpos to use gcode_position. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* gcode: Convert get_status() homing_xpos to use a namedtupleKevin O'Connor2020-08-202-4/+2
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* gcode: Remove unused move_xpos get_status() variablesKevin O'Connor2020-08-201-4/+0
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* docs: Add idle_timeout get_status() info to Command_Templates.mdKevin O'Connor2020-08-201-0/+6
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* toolhead: Remove unused get_stats() dataKevin O'Connor2020-08-201-10/+2
| | | | | | | 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>
* gcode: Remove "action_" commands from get_status() callsKevin O'Connor2020-08-2010-61/+67
| | | | | | | | | | | | 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>
* toolhead: Add a manual_move() helper functionKevin O'Connor2020-08-206-55/+34
| | | | | | | | 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>
* skew_correction: Make sure to call reset_last_position() on a skew updateKevin O'Connor2020-08-201-7/+10
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* gcode: Automatically call reset_last_position() on a toolhead set_position()Kevin O'Connor2020-08-208-9/+3
| | | | | | | | 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>
* menu: reduce timeout timer period to 1sJanar Sööt2020-08-201-7/+2
| | | | Signed-off-by: Janar Sööt <janar.soot@gmail.com>
* display: Support requesting a screen redraw on a menu key pressKevin O'Connor2020-08-202-12/+23
| | | | | | | | 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>
* hall_filament_width_sensor: Fix Flow update before next pending_position ↵alocin732020-08-192-26/+24
| | | | | | | | | #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>
* menu: remove surplus self.running=FalseJanar Sööt2020-08-181-2/+0
| | | | Signed-off-by: Janar Sööt <janar.soot@gmail.com>
* menu: optimize container populateJanar Sööt2020-08-181-13/+8
| | | | | | | | | - 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>
* graph_temp_sensor: Add tool to graph ADC resolution of temperature sensorsKevin O'Connor2020-08-171-0/+142
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* klippy: Report "shutdown" category from get_state_message()Kevin O'Connor2020-08-161-0/+2
| | | | | | Reported by @Arksine. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* webhooks: Improve type checking of api requestsKevin O'Connor2020-08-161-29/+31
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* webhooks: Convert to a json-rpc inspired message formatKevin O'Connor2020-08-161-21/+26
| | | | | | | | | | | | Convert to a new json message format. Requests look like: {"id":14, "method": "info", "params": {}} and responses look like: {"id": 14, "result": {}} Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* webhooks: Remove call_remote_method()Kevin O'Connor2020-08-161-13/+1
| | | | | | Clients will now only receive messages that they've subscribed to. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* webhooks: Add klippy state to webhooks get_status() methodKevin O'Connor2020-08-161-11/+4
| | | | | | | | Clients can now subscribe to the webhooks get_status() info to determine if the printer state changes. It is no longer needed to send a message to all clients on a shutdown transition. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* webhooks: Rework get_status() subscriptionsKevin O'Connor2020-08-161-116/+89
| | | | | | | | | Implement a new subscription system for get_status() updates. Subscriptions are per-client. After an initial update, only changes will be transmitted. Responses are only transmitted to the client that issued the subscription. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* webhooks: Require a subscription to receive gcode outputKevin O'Connor2020-08-163-32/+53
| | | | | | | | | | | Add a new "gcode/subscribe_output" webhook endpoint to subscribe to gcode output. Only client connections that subscribe to the gcode output will receive that output. This also moves all the gcode webhooks from gcode.py to webhooks.py and arranges for gcode.py to be initialized prior to webhooks.py. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* webhooks: Remove "method" parameter from webhook requestsKevin O'Connor2020-08-164-67/+31
| | | | | | | Don't require or use the "method" parameter of requests. This simplifies the interface. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* webhooks: Create StatusHandler class in add_early_printer_objects()Kevin O'Connor2020-08-161-4/+4
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* webhooks: Remove register_static_path()Kevin O'Connor2020-08-162-32/+10
| | | | | | | | 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>
* webhooks: Specify server_address on klippy command-lineKevin O'Connor2020-08-162-9/+11
| | | | | | | | Don't default to "/tmp/klippy_uds" for the webhooks unix domain socket filename. Instead, require the filename to be specified on the command-line (via a new "-a" parameter). Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* whconsole: Add utility for testing the "webhooks" interfaceKevin O'Connor2020-08-161-0/+89
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* display: Remove reference to printer.gcode.busy from display.cfgKevin O'Connor2020-08-151-1/+1
| | | | | | The "busy" variable was removed and using it isn't necessary. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* menu: fix for overwriting existing menu item (#3189)Janar Sööt2020-08-141-1/+3
| | | | | | 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>
* hall_filament_width_sensor: fix errorJanar Sööt2020-08-131-0/+1
| | | | | | Fix no attribute error in in get_status Signed-off-by: Janar Sööt <janar.soot@gmail.com>
* virtual_sdcard: register sd static pathArksine2020-08-111-0/+3
| | | | Signed-off-by: Eric Callahan <arksine.code@gmail.com>
* webhooks: register gcode output handler and additional static pathsArksine2020-08-111-0/+24
| | | | Signed-off-by: Eric Callahan <arksine.code@gmail.com>
* webhooks: Implement a send buffer for socket writesArksine2020-08-111-25/+29
| | | | | | This prevents ClientConnection.send() from blocking, removing the possibility that callers become reentrant. Signed-off-by: Eric Callahan <arksine.code@gmail.com>
* webhooks: Implement unix domain socket serverArksine2020-08-111-38/+77
| | | | Signed-off-by: Eric Callahan <arksine.code@gmail.com>
* config: Add homing order not to Ender 3 config (#3069)Yannic Schröder2020-08-091-0/+12
| | | | | | By homing the y axis before the x axis, the nozzle will not touch the plastic cover of the bed heater cable. Signed-off-by: Yannic Schroeder <schroeder@ibr.cs.tu-bs.de>
* lib: Fix whitespace in READMEKevin O'Connor2020-08-091-1/+1
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* stm32: Improvements to CAN bus ID generation. And added a small fast hash ↵bondus2020-08-095-6/+142
| | | | | | | | library (#3165) Improved CAM bus ID generation, there were issues with ID collisions. Added a small fast hash library. Signed-off-by: Pontus Borg <liquidpontus@yahoo.se>
* adc_temperature: add support for AD597 (#3164)Bryan Boettcher2020-08-093-4/+13
| | | | | | The AD597 thermocouple amplifier is used in the Raise3D N2+ (and possibly others). Signed-off-by: Bryan Boettcher <bryan.boettcher@gmail.com>
* docs: Note menu change in Config_Changes.mdKevin O'Connor2020-08-091-0/+5
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* menu: Replace menu with new Jinja2 template system (#2344)Janar Sööt2020-08-095-1559/+1198
| | | | | | | | | | | | | | | 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>
* tmc5160: diag0 support (#3159)Trevor Jones2020-08-096-24/+36
| | | | | Allow for diag0 only hardware to use sensorless homing. Signed-off-by: Trevor Jones <trevorjones141@gmail.com>
* itersolve: Use stricter completion check in itersolve_find_step()Kevin O'Connor2020-08-081-2/+4
| | | | | | | | Use a more strict check for determining if the iterative solver has correctly found a step - the guess must be within 1 picometer of the target or correct to within 1 nanosecond. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* itersolve: Enhance "false position" method with "illinois algorithm"Kevin O'Connor2020-08-081-1/+8
| | | | | | | This prevents some cases where the iterative solver fails to converge in a reasonable time, causing "no next step" errors. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>