Commit Graph

1513 Commits

Author SHA1 Message Date
Kevin O'Connor e5ef15ad0f probe: Separate out manual probing from automatic probing code
Only call cmd_NEXT() for manual probing.  This simplifies the code as
the automatic probing and manual probing have slightly different
probing mechanisms.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-10-01 11:12:30 -04:00
Kevin O'Connor cb3fede19a probe: Move move_next() method within ProbePointsHelper class
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-10-01 11:12:30 -04:00
Kevin O'Connor 8e7eac9b08 probe: Implement ProbePointsHelper get_probed_position() locally
Now that all users of ProbePointsHelper use the same
get_probed_position() code, it is possible to implement that locally
within the ProbePointsHelper class.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-10-01 11:12:30 -04:00
Kevin O'Connor ae4eb35a70 delta_calibrate: Use kin.calc_position() in get_probed_position() callback
It's possible (and a little simpler) to use cartesian coordinates when
calculating a stable position.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-10-01 11:12:30 -04:00
Kevin O'Connor c68c0c6526 avr: Increase stack size to 256 for all AVR targets
Recent code additions have increased the stack usage and it is no
longer clear that everything will fit in 128 bytes.  Increase all
targets to 256 bytes (the atmega2560 was already at 256 bytes).

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-10-01 10:33:18 -04:00
Kevin O'Connor b3a6fbed74 usbstd: Force usb_string_descriptor data field to match unicode string
Fix travis-ci build failure by forcing the data field of the struct
usb_string_descriptor to be the same type as a 16bit unicode string.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-09-30 23:50:51 -04:00
Kevin O'Connor 9ec2ad0992 lib: Remove pjrc_usb_serial
The pjrc_usb_serial is no longer used.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-09-30 22:55:21 -04:00
Kevin O'Connor d05aa81927 avr: Use generic usb_cdc code for usb serial support
Use the generic usb_cdc driver code instead of the "pjrc" usb driver
code.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-09-30 22:55:21 -04:00
Kevin O'Connor c0311bee33 usb_cdc: Perform basic request validation
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-09-30 22:32:19 -04:00
Kevin O'Connor 93e4897044 usb_cdc: Add usb_read_ep0_setup() interface function
Use new usb_read_ep0_setup() function when reading a setup packet -
this allows the low-level usb hardware code to better handle errors.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-09-30 22:32:19 -04:00
Kevin O'Connor 731236cf20 usb_cdc: Add support for usb_send_ep0_progmem()
Add support for explicitly sending to the ep0 pipe from constant
"progmem" memory on the AVR.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-09-30 22:32:19 -04:00
Kevin O'Connor 92aea93500 usb_cdc: Fix handling of zero-length-packets
A zero length packet should only be sent at the end of a transmission
if the host is expecting more data.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-09-30 22:32:19 -04:00
Kevin O'Connor be1effebc3 usb_cdc: Rework transfer state tracking code
Maintain the state tracking code entirely within a usb_do_xfer()
method.  This simplifies the callers.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-09-30 22:32:19 -04:00
Kevin O'Connor 6ab16d2407 usb_cdc: Rename interface functions to avoid the term "setup"
Use "ep0" when referring to endpoint0 - don't use "setup" as that can
be confused with the low-level usb setup token.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-09-30 14:09:55 -04:00
Nikolai Ugelvik 50a8efe0a5 config: Add encoder and click pins for CR-10 mini
Signed-off-by: Nikolai Ugelvik <nikolaiu@gmail.com>
2018-09-30 12:52:06 -04:00
Kevin O'Connor de7c1f76db gcode_macro: Provide more information on a formatting error
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-09-30 12:43:54 -04:00
Kevin O'Connor b112cac47a config: Fix typo in gcode_macro default_parameter description
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-09-30 12:11:07 -04:00
Janar Sööt 68dc28580f gcode_macro: default parameter values
Signed-off-by: Janar Sööt <janar.soot@gmail.com>
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-09-30 11:53:10 -04:00
Janar Sööt d9e35481be configfile: add get_prefix_options method
Signed-off-by: Janar Sööt <janar.soot@gmail.com>
2018-09-30 11:51:26 -04:00
Kevin O'Connor 8c2991ceac tmc2208: Improve error handling
Configure the tmc2208 during the 'connect' phase so that a problem
during configuration is properly raised as a config error.  Catch
errors during DUMP_TMC and raise them as g-code errors.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-09-30 10:57:47 -04:00
Kevin O'Connor 864918b1f9 verify_heater: Don't report a heater error if printer is shutdown
Don't log a heater verification error if that error is due to the
printer being shutdown for some other reason.  Those spurious error
reports can be confusing.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-09-30 10:40:44 -04:00
Kevin O'Connor 47b6144ff6 logextract: Add support for extracting recent g-code from a shutdown
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-09-28 12:24:39 -04:00
Kevin O'Connor cf79b3c342 config: Note gcode_macro string formatting in example-extras.cfg
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-09-26 08:25:44 -04:00
Kevin O'Connor 439f6684be config: Move some sections around in example-extras.cfg
Move the quad_gantry_level description closer to z_tilt section.  Move
the force_move section closer to the homing_override section.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-09-26 08:16:40 -04:00
Janar Sööt d22b30342a gcode_macro: 2 lines wrapped at 80 chars
Signed-off-by: Janar Sööt <janar.soot@gmail.com>
2018-09-26 08:03:39 -04:00
Janar Sööt 51d64ad7f8 gcode_macro: macro improvement with parameters
Signed-off-by: Janar Sööt <janar.soot@gmail.com>
2018-09-26 08:03:39 -04:00
Kevin O'Connor 170b9678fb display: Don't error on an out of range M73 request
No need to report an error if the M73 is not between 0 and 100 - just
display the nearest valid value.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-09-25 20:51:51 -04:00
Kevin O'Connor 364faf497b toolhead: Update look-ahead flush comment
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-09-25 15:44:45 -04:00
Janar Sööt 18b56c3cda menu: vsdcard - scroll long filenames (#694)
Signed-off-by: Janar Sööt <janar.soot@gmail.com>
2018-09-25 14:52:23 -04:00
Kevin O'Connor 95392595f6 config: Wanhao Duplicator 6 likely does not need "restart: command"
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-09-25 14:29:05 -04:00
Kevin O'Connor 4b5db04f78 docs: Add Delta_Calibrate.md guide with "enhanced delta calibration"
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-09-25 13:48:46 -04:00
Charlie 1165c0c9c5 docs: Additional images for enhanced calibration procedure reference (#639)
Signed-off-by: Charles Galant <cgalant@cogwheel.net>
2018-09-25 13:48:46 -04:00
Kevin O'Connor 0b2c89ecaf delta_calibrate: Initial support for enhanced delta calibration
Add support for an enhanced delta calibration routine that performs XY
dimension calibration.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-09-25 13:48:46 -04:00
Kevin O'Connor 929733f0a7 delta_calibrate: Support save/restore of delta_calibrate state
Support using SAVE_CONFIG to store the results of DELTA_CALIBRATE to
the printer config file.  Store the low level probe measurements in
the config as well.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-09-25 13:48:46 -04:00
Kevin O'Connor ed0882dc10 delta: Move "stable position" logic to delta_calibrate.py
Move the "stable position" logic from the delta.py kinematics code to
the delta_calibrate.py calibration code.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-09-25 13:48:46 -04:00
Kevin O'Connor d48e8ea162 bed_tilt: Support saving calibration data via SAVE_CONFIG command
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-09-25 13:48:46 -04:00
Kevin O'Connor 5a1b2d61ae pid_calibrate: Support saving calibration data via SAVE_CONFIG
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-09-25 13:48:46 -04:00
Kevin O'Connor 531134f092 configfile: Add support for rewriting the printer config file
Add support for writing back the main printer config file with
additional calibration data stored in it.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-09-25 13:48:46 -04:00
Kevin O'Connor f80456a698 configfile: Move config file code from klippy.py to new file
Add a klippy/configfile.py file with the code needed to read the main
printer config file.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-09-25 13:48:46 -04:00
Janar Sööt 5144c5f01e menu: new fast step rate feature
Signed-off-by: Janar Sööt <janar.soot@gmail.com>
2018-09-21 19:29:30 -04:00
Kevin O'Connor 1379a59085 st7920: No need to clear glyph framebuffer before programming glyphs
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-09-21 16:39:38 -04:00
Kevin O'Connor 7cca8d970a hd44780: Simplify framebuffer access
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-09-21 16:39:38 -04:00
Kevin O'Connor 742d6481a9 st7920: Simplify framebuffer access
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-09-21 16:39:38 -04:00
Kevin O'Connor 05ba62600c st7920: Support writing degrees symbol
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-09-21 16:39:38 -04:00
Kevin O'Connor a4e2540f14 uc1701: Support writing degrees symbol
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-09-21 16:39:38 -04:00
Kevin O'Connor 30a49d3186 display: Use write_glyph() when writing special characters
Always use the write_glyph() method when writing special characters
during status screen updates.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-09-21 16:39:38 -04:00
Kevin O'Connor c8d9d575a1 display: Support writing single character glyphs using write_glyph()
Add write_glyph() support to hd44780.py.  Update uc1701.py and
st7920.py to support writing single character glyphs via
write_glyph().

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-09-21 16:39:38 -04:00
Kevin O'Connor 2a5778be3a display: Move icon drawing from display.py to lcd_chip code
Move the st7920 icon rendering optimizations from display.py to
st7920.py.  This simplifies the code for other displays.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-09-21 16:39:38 -04:00
Kevin O'Connor 2857255ef1 icons: Add the bed to the bed heating animations
It isn't necessary to use the st7920's xor capabilities when drawing
the bed heating animations.  This makes it easier to use the icons for
other displays.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-09-21 16:39:38 -04:00
Kevin O'Connor 3d4ee9e962 docs: Add stm32f1.md link to Overview.md
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-09-20 20:11:04 -04:00