Commit Graph

1781 Commits

Author SHA1 Message Date
Arksine 9766d62ad3 pause_resume: fixes
- When using absolute extrusion the gcode position e-axis position is now captured on PAUSE and restored in RESUME with a call to the G92 handler.
- Add a get_status() function that returns a dictionary with an 'is_paused' key.
- Do not allow consective calls to PAUSE or RESUME to exectue.  Also do not allow a RESUME to executed without a previous PAUSE.

Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2019-02-08 10:53:59 -05:00
Arksine ca4e10dbd6 gcode: add 'abs_extrude' to get_status() dictionary
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2019-02-08 10:53:59 -05:00
Kevin O'Connor 6c10e4bcef config: Update generic-fysetc-f6.cfg display section
Reported by @bruce356 and @nandinho84.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-02-07 18:23:17 -05:00
Tschipel 33c6c8b803 config: Update generic-bigtreetech-skr-v1.1 (#1209)
Add "RepRapDiscount 128x64 Full Graphic Smart Controller" type displays

Signed-off-by: Mario Frost <waschbaerbauch75@ist-einmalig.de>
Co-Authored-By: Jens <malgangda@users.noreply.github.com>
2019-02-07 18:16:07 -05:00
Kevin O'Connor 32e0d4d3ac docs: Update atsam benchmarks
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-02-07 13:24:03 -05:00
Kevin O'Connor 74c216543c atsam: Configure the atsam sram matrix register
The sram matrix configuration is, bizarrely, configured with a slow
default.  It will typically add an extra wait state to every memory
access.  Set the matrix sram controller to improve the performance.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-02-07 13:12:35 -05:00
Kevin O'Connor af8376e203 debugcmds: Add support for reading/writing 32bit values
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-02-07 11:50:14 -05:00
Kevin O'Connor 1f9208dc66 docs: Update benchmarks
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-02-06 22:08:39 -05:00
Kevin O'Connor 9f3517fdc7 stm32f1: Convert code to use armcm_timer
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-02-06 22:03:09 -05:00
Kevin O'Connor eb8db46ca3 stm32f1: Use internal functions for early USB gpio toggle
Avoid using the "low-level" library timing utilities.  This is in
preparation for using SysTick as part of the timer implementation.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-02-06 22:03:09 -05:00
Kevin O'Connor 1096075d9b lpc176x: Convert code to use armcm_timer
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-02-06 22:03:09 -05:00
Kevin O'Connor 77db1aa379 atsam: Convert code to use armcm_timer
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-02-06 22:03:09 -05:00
Kevin O'Connor 26fb421d59 atsamd: Convert SAMD51 to use armcm_timer
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-02-06 22:03:09 -05:00
Kevin O'Connor 55df8bf55f armcm_timer: Add a generic timer mechanism for ARM CortexM3/M4 chips
The ARM CortexM3 (and later) chips almost always have a 32bit timer in
the "Debug and Watch Trace" (DWT) unit which resides within the cpu
core itself.  This timer is generally faster to access than timers
located on the chip's peripheral bus.  When combined with the standard
ARM SysTick timer it provides a (generally) portable mechanism to
implement Klipper's software timer mechanism.  It's generally also
faster than using the vendor specific timers.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-02-06 22:03:09 -05:00
Kevin O'Connor c171b28a0b gcode: Return to a default gcode speed of 25mm/s
Commit f4d323ad changed the handling of the self.speed variable, and
it inadvertently changed the default startup speed.  Return to the
default of 25mm/s.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-02-04 23:45:09 -05:00
Kevin O'Connor 4c48c1e8e4 bltouch: Issue just a pin_up command on a normal raise probe attempt
In the normal case, a regular pin_up command should be sufficient to
raise the probe.  (Should the regular pin_up fail, the code can issue
a "reset" command during the retry.)

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-02-04 18:03:07 -05:00
Kevin O'Connor 345a5f4e1f bltouch: Increase default pin_move_time from 200ms to 675ms
Use the same pin move time that Marlin uses.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-02-04 18:02:53 -05:00
Kevin O'Connor cd8678aa6d spi_temperature: Fix order of init
Commit c3efcd9c moved the config_spi setup to a build_config callback.
It's also necessary to move the config_thermocouple to a build_config
callback as well.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-02-04 09:30:26 -05:00
Kevin O'Connor 5b9ce328e5 docs: Clarify FAQ item on running multiple instances of klippy
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-02-03 17:41:57 -05:00
Kevin O'Connor d088a7ca72 tmc2130: Share config reading helpers with tmc2208.py code
Add helper function for reading current, microsteps, and stealthchop
settings from the config file.  Use these helpers in both the tmc2130
and tmc2208 modules.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-02-03 17:39:07 -05:00
Kevin O'Connor 0920a518ce tmc2208: Rename self.field_helper to self.fields
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-02-03 17:15:43 -05:00
Kevin O'Connor 30b6414295 tmc2208: move local set_field/get_field helpers to FieldHelper class
Move these helper functions to the FieldHelper class so that they can
be used by other Trinamic drivers.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-02-03 14:07:27 -05:00
Kevin O'Connor 17a17c5b77 tmc2208: Add helper for setting fields from the config file
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-02-03 13:03:44 -05:00
Kevin O'Connor 83001959f1 tmc2208: Use field definitions during driver init
Reduce the amount of bit manipulations by using the FieldHelper class.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-02-03 12:22:12 -05:00
Dmitry Frolov 51f14b9c8c tmc2208: Add register field formatters
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Signed-off-by: Dmitry Frolov <dmitry.frolov@gmail.com>
2019-02-03 11:19:36 -05:00
Kevin O'Connor 955fdcaa0c tmc2130: Convert field helper into a class
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-02-03 11:11:15 -05:00
Arksine cdcc320710 bed_mesh: add support for round beds
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2019-02-02 23:29:00 -05:00
Arksine 542f941f07 bed_mesh: log when fade completes.
- Also simplify the math for the mesh x and y multipliers.

Signed-off-by: Eric Callahan <arksine.code@gmail.com>
2019-02-02 23:29:00 -05:00
lorf 54683c9535 tmc2208: Decode register fields in DUMP_TMC (#1156)
Report values of TMC2208 register fields in DUMP_TMC command to help in
tuning and diagnostics.

This also adds functions to refer to register fields by name for TMC drivers
and register mappings for TMC2208.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Signed-off-by: Dmitry Frolov <dmitry.frolov@gmail.com>
2019-02-02 19:46:27 -05:00
Kevin O'Connor 3b6ddb08a1 bltouch: Don't error on startup if the bltouch is in an error state
Stopping the connect sequence can make it difficult to get the bltouch
out of an error state.  Allow the connect to proceed, ideally if the
bltouch stays in an error state it will be detected during the first
probe attempt.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-01-31 09:43:35 -05:00
Kevin O'Connor a5d3d161d3 bltouch: Retry reset/pin_up if the raise probe attempt fails
There's no harm in retrying the attempt if it appears to have failed
for some reason.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-01-31 09:43:29 -05:00
Samori Gorse 04c6e1f646 idle_timeout: Added a missing logging import
I noticed Octoprint was disconnecting after a while, and after reading the logs, I came across this error:

```
Unhandled exception during run
Traceback (most recent call last):
  File "/home/pi/klipper/klippy/klippy.py", line 171, in run
    self.reactor.run()
  File "/home/pi/klipper/klippy/reactor.py", line 176, in run
    g_next.switch()
  File "/home/pi/klipper/klippy/reactor.py", line 203, in _dispatch_loop
    timeout = self._check_timers(eventtime)
  File "/home/pi/klipper/klippy/reactor.py", line 82, in _check_timers
    t.waketime = t.callback(eventtime)
  File "/home/pi/klipper/klippy/extras/idle_timeout.py", line 62, in timeout_handler
    return self.check_idle_timeout(eventtime)
  File "/home/pi/klipper/klippy/extras/idle_timeout.py", line 59, in check_idle_timeout
    return self.transition_idle_state(eventtime)
  File "/home/pi/klipper/klippy/extras/idle_timeout.py", line 35, in transition_idle_state
    logging.exception("idle timeout gcode execution")
NameError: global name 'logging' is not defined
```

I therefore added the missing import.

Signed-off-by: Samori Gorse <samori.gorse+github@gmail.com>
2019-01-29 11:18:44 -05:00
Kevin O'Connor c3e889a67c docs: Add performance results for SAMD51
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-01-28 20:05:50 -05:00
Kevin O'Connor 8cd83b4c2d atsamd: Initial support for SAMD51
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-01-28 20:02:16 -05:00
Kevin O'Connor f6ce875818 lib: Update samd51 to work with gcc and bootloaders
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-01-28 20:02:16 -05:00
Kevin O'Connor e47ba6374a lib: Add Atmel SAMD51 cmsis files
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-01-28 20:02:16 -05:00
Kevin O'Connor c5fc264a07 atsamd: Add a get_pclock_frequency() helper function
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-01-28 20:02:16 -05:00
Kevin O'Connor 8f763d80b7 atsamd: Select the 8K bootloader by default
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-01-28 20:02:16 -05:00
Kevin O'Connor 40b5de1680 atsamd: Pass the power management id to enable_pclock()
Pass the power management id instead of the APBCMASK bit to the
enable_pclock() function.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-01-28 20:02:16 -05:00
Kevin O'Connor ed1334c24b atsamd: Clarify clock generation code
Implement gen_clock() and route_pclock() helpers in an effort to make
the code more readable.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-01-28 20:02:16 -05:00
Arksine 893cbbab83 pause_resume: update documentation
Add updates to example-extras.cfg and G-Codes.md documenting pause_resume.  Also add M600 (filament change) to sample-macros.cfg.

Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2019-01-28 11:23:52 -05:00
Arksine 7605752dc2 pause_resume: initial implementation of pause/resume functionality for Klipper
This module adds PAUSE and RESUME gcodes that can programatically determine if the gcode is printing from virtual sd or over the serial connection.  It also captures the current toolhead position and gcode feedrate on pause, and recovers that position and feedrate on resume.

Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2019-01-28 11:23:52 -05:00
Arksine 8385dc20e6 gcode: add 'speed' parameter to dictionary returned by get_status()
Signed-off-by: Eric Callahan  <arksine.code@gmail.com>
2019-01-28 11:23:52 -05:00
Arksine e69742df8f virtual_sdcard: prepare for pause_resume implementation
- Add is_active() member function to return the active printing status of the virtual sdcard
- M27 now reports current file position when file has been opened. See http://marlinfw.org/docs/gcode/M027.html

Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2019-01-28 11:23:52 -05:00
Ales Stimec 0d4544e72a config: Added example config file for Geeetech gt2560 controller.
Signed-off-by: Ales Stimec <ales.stimec@gmail.com>
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-01-28 11:20:01 -05:00
Kevin O'Connor 90827a88de docs: Minor wording change to step_distance FAQ
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-01-27 16:52:16 -05:00
Kevin O'Connor 71ef715a88 docs: Expand FAQ on why step_distance is used
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-01-27 11:29:42 -05:00
Kevin O'Connor 932acd3048 usbserial: Allow USB ids to be specified via Kconfig
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-01-25 19:04:14 -05:00
Kevin O'Connor 1ad1ed573a simulator: Fix simulator build
Commit b6ccd268 inadvertently broke the simulator build - fix it.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-01-25 18:23:27 -05:00
Kevin O'Connor ee86463ed2 avr: Only prompt for CLEAR_PRESCALER and SIMULAVR with LOW_LEVEL_OPTIONS
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-01-25 18:07:31 -05:00