If max_accel_to_decel is greater than max_accel in the config, then
just internally limit max_accel_to_decel to max_accel. This makes it
easier to completely disable the max_accel_to_decel feature (as it can
just be set to a high value in the config).
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Add a fully functional STM32F1 port, currently mostly targeting STM32F103
microcontrollers. This requires an 8 MHz XTAL. The maximum possible step rate
is around 282K steps per second.
This uses stm32flash to burn the firmware. The bootloader needs to be started
by setting BOOT0 to 1 and resetting the MCU. There is no automatic bootloader,
unlike on Arduino.
Signed-off-by: Grigori Goronzy <greg@kinoho.net>
Instead of supporting a single linear range for the temperature
lookup, allow multiple ranges to be defined. This makes the lookup
more accurate when a full lookup table is available.
Update the AD595 sensor to use the full table defined in its spec.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
If the c3 coefficient is negative it can cause the adc calculations to
fail. The c3 shouldn't be negative in practice, so fallback to a
simple beta calculation in that case.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Move the Thermistor code to a new thermistor.py module. Move the
Linear code to a new adc_temperature.py module. This simplifies the
heater.py code.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
The Thermistor (and Linear) class should handle all the details of
reading the ADC values and converting them to temperatures. So, move
that logic out of the Heater() class.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Add a PrinterHeaters class that can stores references to available
temperature sensors and stores references to instantiated heaters.
Add a extras/heater_bed.py file and delay instantiation of the
heater_bed object. This allows the heater.py module to be imported
earlier during the setup phase, and allows the PrinterHeaters class to
be available for registering sensors and heaters.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Most callers did a lookup of the pins module via
printer.lookup_object("pins"). Use that as the standard method and
remove these less frequently used methods.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
The existing junction algorithm limits the speed between two moves by
determining the maximum speed an arc between those two moves would
have if the cetripetal acceleration of that arc did not exceed the
printer's maximum acceleration.
However, should the slicer send an actual arc to the printer, then the
existing junction algorithm would not impose any significant limit on
the travel speed of that arc. This would permit the head to travel in
a circle at high velocity and with a greater centripetal acceleration
than the printer's maximum acceleration. To avoid this, impose a
limit on the junction velocity of short moves so that an approximate
centripetal acceleration of that move does not exceed the move's
acceleration limit.
Suggested by Michael Barbour.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Apply the bed tilt settings immediately after finding them. This
makes it easier for users to perform automatic tilt calibration at the
start of every print.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Automatically clear the information printed at the start of each log
file rollover on a klippy internal restart.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Drop support for M303 and PID_TUNE, and replace it with a new
PID_CALIBRATE command. Move the logic for this command from heater.py
to a new pid_calibrate.py file in the extras/ directory.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Move the probe_z_offset parameter from delta_calibrate and
bed_tilt_calibrate to a z_offset parameter within the probe config
section. It's easier to understand the z offset setting when it is in
the probe config section.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
If a z_virtual_endstop is in use, then record the last XY position
that is used when the Z is homed. Use that XY position to report what
change is needed to the z position_endstop.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Rename the digital_output, pwm_output, and static_pwm_output config
sections to output_pin and move to a new module in the extras/
directory.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Move the code for the static_digital_output config section from
chipmisc.py to a new file in the extras/ directory.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
It looks like OctoPrint is expecting the result from M114 to be
relative to the last G92 command. Also, introduce GET_POSITION to
report the actual location that the printer is at.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Commit 9bc4239e now emphasizes the first line of a multi-line error
message, so rework startup_message to conform to that.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Report the first line of a multi-line error message twice - once as
part of the informational content, and once with the "!!" error
prefix.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
If a heater falls out of the target range, accumulate the temperature
differences to determine if an error should be raised. This should
make it less likely to report an error for heaters that drift slightly
out of range, and it should make error reporting faster for heaters
that rapidly fall out of range.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
A default of 4 degrees and 10 seconds may be too aggressive - change
the default to 10 degrees and 15 seconds.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Add support for additional carriages on cartesian printers. This is
used by some printers to handle multiple extruders.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Separate out the hd44780 screen drawing from the st7920 code. Use a
layout that takes advantage of the 20 columns. Add custom hd44780
fonts.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Add support for displaying basic status information on ST7920 and
HD44780 based LCDs that are attached directly to a micro-controller.
Signed-off-by: Marcio Teixeira <marcio@alephobjects.com>
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Support low-priority message transmits. This may be useful for bulk
commands that should be delayed util the comms are otherwise idle.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Add a lookup_command() method to the SerialReader class that provides
a wrapper that stores the serial and commandqueue references. This
makes it easier to run the send() method.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>