Commit Graph

3736 Commits

Author SHA1 Message Date
Kevin O'Connor 5a5bd2596a extruder: Add nozzle and filament diameter config settings
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2017-01-03 18:12:51 -05:00
Kevin O'Connor 38ca051381 config: Update example config files to be more clear on default values
Be more clear on which parameters have defaults and which parameters
must be specified in the config.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2017-01-02 13:22:20 -05:00
Kevin O'Connor 91056809dd mcu: Change the default baud rate to 250000
Update the default baud rate in mcu.py to 250000 (as that is the
default in all other places).

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2017-01-02 12:22:43 -05:00
Kevin O'Connor f75430e95f gpio: Fix sam38xe ADC startup check
The status register needs to be inspected, not the enable register.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2017-01-01 22:10:24 -05:00
Kevin O'Connor 8e797e6830 stepcompress: Flush periodically if adding more than 64K steps in a move
It's possible for a printer with very fine resolution to require a
large number of steps for a homing operation.  Instead of storing all
of those steps in memory, periodically flush the queue should more
than 64K steps be present.  This keeps a reasonable limit on the
amount of ram needed to store steps.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2016-12-31 13:21:53 -05:00
Kevin O'Connor 73c4be3fd3 docs: Update protocol document with internal VLQ link
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2016-12-31 11:30:50 -05:00
Kevin O'Connor c552ba06b4 serialqueue: Remove serialqueue_flush_ready()
The serialqueue_flush_ready() code was used to flush queue_step
commands during a homing operation.  It's no longer necessary now that
moves during a homing operation use the normal message priority
system.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2016-12-30 20:15:05 -05:00
Kevin O'Connor 6bd5f4e44e stepcompress: Using normal message priority system during homing
The endstop homing system requires all queue_step commands be in the
MCU's 'move queue' before endstop checking starts.  Use the normal
message priority system to request that stepper queue_step commands
are received prior to the start of the end_stop_home command.  This
simplifies the code and removes the need for special serial queue
flushing.

This also fixes a bug in homing operations that take longer than 2^31
clock ticks.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2016-12-30 20:14:48 -05:00
Kevin O'Connor 6138d18f4b toolhead: Also call reset_print_time() on force_shutdown()
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2016-12-28 22:38:29 -05:00
Kevin O'Connor d028f42e99 mcu: Don't call steppersync_flush if steppersync not created
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2016-12-28 22:38:29 -05:00
Kevin O'Connor 860fc3e91d gcode: Add support for M115 command
Support querying the firmware type and version.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2016-12-28 22:38:29 -05:00
Kevin O'Connor 2e03d84755 gcode: Add support for M400 command
Add ability to fully stall the input until all moves are complete.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2016-12-28 22:38:28 -05:00
Kevin O'Connor f2b406fc5e toolhead: Don't call into kinematic class on extrude only moves
Add a is_kinematic_move flag to the Move class and clear it on extrude
only moves.  Don't call the kinematic check_move() or move() methods
for extrude only moves.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2016-12-28 22:38:28 -05:00
Kevin O'Connor f46bc0ef04 stepper: Change default max_error from 50us to 25us
Change the default compression error window (max_error) from 50us to
25us - it's common for stepper motor drivers to have 30us for their
"pwm fixed off time" and it would be good for the steps to be
scheduled within that time.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2016-12-28 22:38:27 -05:00
Kevin O'Connor 800d53db6a stepcompress: Rework addfactor integer overflow check
Revert 4a16053c and avoid integer overflows in the addfactor
calculation by exiting the loop early if count > 0x200.  This provides
stronger protection against overflows.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2016-12-26 12:47:17 -05:00
Kevin O'Connor a9444d3399 mcu: Log the MCU configuration during connect phase
Log the constants reported by the MCU and log the number of move items
allocated after configuration.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2016-12-24 12:33:56 -05:00
Kevin O'Connor 4a16053c00 stepcompress: Fix integer overflow leading to infinite loop
Commit a217c0f3 changed the way the "addfactor" was calculated.
Unfortunately, it was possible for the updated method to cause an
integer overflow and have a negative addfactor.  Fix this by
explicitly casting the addfactor calculation to uint32_t.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2016-12-24 12:02:37 -05:00
Kevin O'Connor d0c61f0f76 klippy: Log the contents of the config file at startup
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2016-12-24 10:18:41 -05:00
Kevin O'Connor 451ffd567d klippy: Log the host software git version at startup
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2016-12-24 10:17:48 -05:00
Kevin O'Connor f3a49604f1 stepcompress: Increase check on max count to 10000000
Some motors have very small step distances and they can generate over
a million steps during a homing operation.  Increase the maximum count
to ten million to avoid triggering the internal sanity check.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2016-12-23 23:13:35 -05:00
Kevin O'Connor 3576dd6e87 docs: Note version 0.3.0 release
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2016-12-23 19:10:09 -05:00
Kevin O'Connor 3b668c9baf docs: Add Releases page with history of releases
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2016-12-23 18:28:42 -05:00
Kevin O'Connor 618fe0e6fb sam3x8e: Add support for ADC pins
Support analog-to-digital inputs.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2016-12-23 17:06:11 -05:00
Kevin O'Connor 872b08601a mcu: Obtain the maximum adc value from the firmware
Don't assume the hardware ADC has 10bit resultion - instead have the
firmware define a constant and read that constant in the host.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2016-12-23 17:06:10 -05:00
Kevin O'Connor fe95ea221b build: Define DECL_CONSTANT mechanism for defining exported constants
Add a DECL_CONSTANT macro to allow the firmware to define constants
that are to be exported to the host during the "identify" phase.  This
replaces the existing hardcoded mechanism of scanning the Kconfig
header file for certain constants.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2016-12-23 17:06:10 -05:00
Kevin O'Connor 4e8674d5df build: Disable gcc's use-linker-plugin option
On GCC v6 the -fwhole-program option does not take effect when
-fuse-linker-plugin is also in effect. The -fuse-linker-plugin option
does not optimize as well as -fwhole-program, so explicitly disable
the linker plugin via -fno-use-linker-plugin.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2016-12-22 22:48:14 -05:00
Kevin O'Connor 9894348e12 docs: Add an example to the description of the message block contents
Use a more real-world example to improve the description of message
block contents. Make it more clear that the data dictionary contains
and utilizes the full command descriptions.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2016-12-22 13:38:45 -05:00
Kevin O'Connor 189ac86b06 docs: Update protocol document to highlight its "compression" system
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2016-12-21 15:10:25 -05:00
Kevin O'Connor 6f3bbafbbd docs: Minor wording change to protocol document
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2016-12-21 14:06:44 -05:00
Kevin O'Connor 3a478adeaa docs: Minor updates to protocol document
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2016-12-21 13:54:45 -05:00
Kevin O'Connor 29aa6ef6c7 docs: Update installation document
Various installation updates.  Recommend upgrade to OctoPrint v1.3.0.
Recommend configuring OctoPrint to not disconnect on error.  Note
quirk with needing to reload page if "/tmp/printer" not in list of
serial connections.  Add brief documentation on use of extended
commands and checking for errors.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2016-12-21 12:01:39 -05:00
Kevin O'Connor 219796ef4e gcode: Add a "STATUS" command
Add a status command that will report the current printer status.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2016-12-21 11:35:00 -05:00
Kevin O'Connor 4f087c331c klippy: Update config error message - use "RESTART" when ready to continue
It is possible to restart the host software with a RESTART command
after manually resetting the micro-controller.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2016-12-21 11:16:06 -05:00
Kevin O'Connor 18456f71f8 docs: Add a features document
Add a document describing some high-level features in Klipper.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2016-12-20 22:31:46 -05:00
Kevin O'Connor 1d841eeb87 stepcompress: Prefer greater interval if all else equal
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2016-12-19 11:20:39 -05:00
Kevin O'Connor 19d1f83d97 stepcompress: Move check for add=0 sequences out of loop
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2016-12-19 11:20:38 -05:00
Kevin O'Connor 6efadf44d0 stepcompress: Favor higher add values when bisecting
Instead of splitting the available "add range" in half, try for add
values closer to the higher end of the range.  This heuristic seems to
result in better choices.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2016-12-19 11:20:38 -05:00
Kevin O'Connor e4c4a4628b stepcompress: Use inclusive range on min/maxadd
Change the min/maxadd variables to use an inclusive range instead of
exclusive.  This better matches min/maxinterval.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2016-12-19 11:20:38 -05:00
Kevin O'Connor a217c0f394 stepcompress: Be consistent with "point" vs "nextpoint"
Make it clear which variables refer to the best verified point found
so far, and which variables deal with the next (not yet verified)
point.

Also, remove checked_count as bestcount serves the same purpose.

Also, allow minmax_point to be inlined.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2016-12-19 11:20:38 -05:00
Kevin O'Connor 1dbd11446c stepcompress: Don't warn on multi-step interval=0 sequences
It is possible to get a valid multi-step sequence with an interval of
zero if the add is non-zero.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2016-12-14 11:03:16 -05:00
Kevin O'Connor 74fa8a3907 serialhdl: Clear "hupcl" bit from serial port
The arduino style serial port interfaces can reset the MCU when the
serial port is opened.  Clearing the HUPCL flag makes this less
likely.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2016-12-09 19:07:03 -05:00
Kevin O'Connor cad1e0b985 docs: Recommend latest version of pyserial in installation instructions
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2016-12-09 18:59:36 -05:00
Kevin O'Connor b099851a8b gcode: Increase initial speed
If a speed is never specified then default to 25mm/s (up from 1 mm/s).
If a user accidentally issues a move without setting the speed, the
default speed shouldn't be so slow that it takes minutes to finish the
move.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2016-12-09 17:28:09 -05:00
Kevin O'Connor f25ead109c gcode: Handle M112 emergency stop command
Also try to support the command if it is sent out of order.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2016-12-09 17:09:51 -05:00
Kevin O'Connor edd7dfe1c8 gcode: Rework toolhead stalling to use greenlets
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2016-12-09 17:09:51 -05:00
Kevin O'Connor 89f5452ddb gcode: Rework homing to use greenlets
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2016-12-09 17:09:51 -05:00
Kevin O'Connor a6de1db94d gcode: Rework endstop query to use greenlets
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2016-12-09 17:09:51 -05:00
Kevin O'Connor ed9d7e4fae gcode: Convert wait for temp to use greenlets
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2016-12-08 18:15:11 -05:00
Kevin O'Connor e169f70bfb gcode: Convert busy handler from timer to greenlet
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2016-12-08 18:15:11 -05:00
Kevin O'Connor 35428f2e04 cartesian: Make it clear which methods of CartKinematics are internal
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2016-12-08 18:14:46 -05:00