Make sure the heater.target_temp is set during the auto-tune test so
that the heater.set_pwm() command will allow the heater to be turned
on.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
The endstop_position is intended to support different values for each
stepper so that the individual tower heights can be configured.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Commit d0932009 introduced an error that could cause lost input in
cases where the sender did not wait for an "ok" message before sending
the next command.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Don't modify dictionaries while iterating them and be careful to use
// when doing an integer divide.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Create add_printer_objects() functions in the fan, heater, extruder,
and toolhead modules. Create the necessary printer component objects
from this call instead of placing the code directly in klippy.py.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
The atmega328 is basically the same as the atmega168 - it just adds
some additional memory. Allow the chip to be selected during the
build.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Instead of assuming the maximum PWM value is 255, export a constant
from the firmware to the host with the maximum value.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
On a retract move (which are common during "wipe" operations), treat
the move as if it were an extrude only move. It's valid for a retract
move to reverse more filament then it would be practical to push.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
When the log file does a rollover, start the top of the log with
critical system information (eg, software versions).
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
The set_printer_ready() can be called from a background thread on a
shutdown event, so don't try to lookup the printer components in that
case. Simplify build_handlers() so that it no longer tests for
components being available - test for component availability in the
command handlers.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Always call the regular .parse() method for each message type during
dump() - add a new .format_params() method for dumping a verbose
representation of the parsed message. This allows the new
format_params() to also be used with data already parsed.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
No need to recommend users disable "SD card support" in octoprint -
instead, just ignore the M21 command.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Always log the last synchronized clock during a shutdown event, and
use debug level for normal reports.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Advice users to issue a FIRMWARE_RESTART command on a printer shutdown
event, and remove support for CLEAR_SHUTDOWN. A full mcu reset is
preferable and it simplifies the interface.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Extend the FIRMWARE_RESTART command so that it can use the firmware
"reset" command instead of the "arduino" mechanism.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Add the new item at the same time as checking if there is space in the
queue.
Also, update the default optimization level of c_helper.so to O2 to
improve the compiled code layout.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Calculate where a tower must reverse direction during a move in the C
code instead of the delta.py kinematic code. This simplifies the
python code.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
The delta code calculates a "virtual tower" along the line of
movement. Rework the variable names and comments to make it clear
that this is occurring.
It is not necessary to pass the start_pos variable to the C code as it
is simple to update the start_pos at the start of each movement.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
It's not necessary to have separate C delta kinematic functions for
constant acceleration and constant velocity as constant velocity can
be obtained by using a constant acceleration of zero.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Update the C delta kinematic code to take velocity and acceleration
directly in step distances and clock ticks. This simplifies the
mcu.py python code as it only needs to do unit and axis conversion.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>