Commit Graph

1172 Commits

Author SHA1 Message Date
Kevin O'Connor 85e6cd865c fan: Scale fan speed requests between 0 and max_power
If the fan's max power is limited by the config, then scale speed
requests between 0 and max_power.  This makes more sense for typical
g-code fan speeds.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-04-20 13:15:03 -04:00
Kevin O'Connor 48e9fa04e7 toolhead: Allow max_accel_to_decel to be greater than max_accel in config
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>
2018-04-20 12:50:04 -04:00
Kevin O'Connor 832c0bc017 docs: Add more hints to use /dev/by-id/ for the serial device
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-04-20 11:57:49 -04:00
Kevin O'Connor 6793970198 serial_irq: Add new generic/serial_irq.c code
Extract out common code from avr/serial.c, sam3x8e/serial.c, and
stm32f1/serial.c into a new generic/serial_irq.c file.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-04-20 11:19:37 -04:00
Kevin O'Connor 606222da5b docs: Add STM32F103 benchmarks to the Features document
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-04-20 11:19:37 -04:00
Kevin O'Connor add370230f stm32f1: Use generic timer_irq.c dispatch code
With the optimized timer_read_time() it is no longer necessary to
implement custom timer dispatch code - use the generic mechanism in
timer_irq.c.  This simplifies the code and provides a small
performance increase.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-04-20 11:19:37 -04:00
Kevin O'Connor 2bf9e27b9e stm32f1: Use different method for handling 16bit -> 32bit timer conversion
Implement 32bit timer conversion without disabling interrupts.  This
uses the 16th bit of timer_high as a rollover detection flag.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-04-20 11:19:37 -04:00
Kevin O'Connor 06a4753f73 stm32f1: Prefer uint32_t over uint16_t in timer.c
The ARM architecture handles 32bit values faster than 16bit values -
use uint32_t where possible.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-04-20 11:19:37 -04:00
Kevin O'Connor bf4e851e21 config: Update sample-bltouch.cfg with recent probe changes
Commit e3f9ff67 changed the probe code to require a z_offset parameter
- update the config/sample-bltouch.cfg file with the new parameters.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-04-18 18:04:21 -04:00
Kevin O'Connor 35f3f6506b scripts: Add stm32flash to octopi-install.sh package list
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-04-12 13:58:30 -04:00
Kevin O'Connor c539fed8bb docs: Add additional information to FAQ on heater checks
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-04-09 22:00:26 -04:00
Kevin O'Connor b5b365289c test: Add STM32F1 compile test case
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-04-09 19:23:55 -04:00
Grigori Goronzy 75d5737211 Add STM32F103 port
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>
2018-04-09 18:08:29 -04:00
Grigori Goronzy e097b08520 config: add display support for Anet A8
Signed-off-by: Grigori Goronzy <greg@kinoho.net>
2018-04-09 16:24:14 -04:00
Kevin O'Connor 6466af6313 adc_temperature: Support defining custom sensors in the config file
Allow the user to define a custom sensor with their own set of
temperature/voltage measurements.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-04-09 15:44:34 -04:00
Kevin O'Connor c463893a5e adc_temperatures: Add "PT100 INA826" sensor type
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-04-09 15:12:35 -04:00
Kevin O'Connor b2caa486c5 adc_temperature: Support multiple ranges for ADC lookup
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>
2018-04-09 15:06:53 -04:00
Kevin O'Connor 75b89f5261 thermistor: Fallback to using beta if Steinhart-Hart c3 is negative
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>
2018-04-09 12:35:18 -04:00
Kevin O'Connor 8c8261ba80 thermistor: Add support for defining custom thermistors
Add the ability to define a new thermistor type in the config file.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-04-09 12:17:39 -04:00
Kevin O'Connor f8a28401c0 config: Update indentation of display section in example-extras.cfg
Use the same indentation as the other sections.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-04-09 12:02:23 -04:00
Kevin O'Connor 97f30765a1 docs: Update installation document for OctoPrint 1.3.7
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-04-09 11:39:36 -04:00
Arkadiusz Gluszyk f616a88b15 Adjusted Tronxy X5s settings
Signed-off-by: Arkadiusz Gluszyk <agluszyk@cs.com>
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-04-09 11:24:31 -04:00
Kevin O'Connor 7c5f9ee458 config: Add display section to default Creality CR10s config
The CR10s uses a "12864" type display on the standard RAMPS pins.
Reported by @jm493.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-04-08 11:14:48 -04:00
Kevin O'Connor 460cc88f3d pid_calibrate: Make sure to unregister new control class on error
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-04-06 11:39:24 -04:00
Kevin O'Connor 06d73207e7 heater: Move Thermistor and Linear to their own files in extras/
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>
2018-04-04 23:14:55 -04:00
Kevin O'Connor 0fc4f0946e heater: Move adc logic into Thermistor class
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>
2018-04-04 23:14:33 -04:00
Kevin O'Connor 7e78b2665e heater: Merge ThermistorBeta class into Thermistor class
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-04-04 23:13:55 -04:00
Kevin O'Connor aed958eb5c heater: Add PrinterHeaters class that stores all sensors and heaters
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>
2018-04-04 23:13:53 -04:00
Kevin O'Connor 4eeb43b191 pins: Remove module level get_printer_pins() and setup_pin() functions
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>
2018-04-04 12:26:39 -04:00
Kevin O'Connor a4439b93b7 toolhead: Limit junction speed of short moves
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>
2018-04-03 13:35:10 -04:00
Kevin O'Connor 5e060c3c65 bed_tilt: Apply bed_tilt_calibrate settings to current session
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>
2018-04-03 13:18:53 -04:00
Kevin O'Connor 0f1a142779 extruder: Log SET_PRESSURE_ADVANCE changes
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-04-03 13:18:53 -04:00
Kevin O'Connor bb8926d67a klippy: Automatically clear rollover_info on each restart
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>
2018-04-03 13:18:52 -04:00
Michael Barbour a301713361 extruder: Add SET_PRESSURE_ADVANCE command.
Signed-off-by: Michael Barbour <barbour.michael.0@gmail.com>
2018-04-03 00:00:41 -04:00
Kevin O'Connor bee179eab4 docs: Update release notes for v0.6.0 release
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-03-31 14:04:39 -04:00
Kevin O'Connor 039bb9f10f docs: Add Patreon link to FAQ page
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-03-31 13:55:41 -04:00
Kevin O'Connor b0b4bc8958 heater: Add some comments to the thermistor math
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-03-29 16:40:26 -04:00
Kevin O'Connor a6553538e6 docs: Update G-Codes.md with recent output_pin changes
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-03-28 15:11:10 -04:00
Kevin O'Connor 019666a6f6 docs: Add a section on adding new host modules to Code_Overview.md
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-03-28 13:12:41 -04:00
Kevin O'Connor 7579b9671b stepstats: Add documentation clarification
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-03-23 10:51:11 -04:00
Kevin O'Connor 99f3c99238 display: Round temperature and position to nearest whole number
The "%d" formatting truncates a floating point number - use "%.0f" to
show a rounded number.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-03-19 15:17:53 -04:00
Kevin O'Connor aba04bf3bd display: Remove unneeded semicolons from file
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-03-19 15:16:01 -04:00
Kevin O'Connor f5c67baac2 docs: Recommend running PID_CALIBRATE in Config_checks.md
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-03-18 12:43:41 -04:00
Kevin O'Connor 973ef97143 pid_calibrate: Move PID calibration logic from heater.py to new file
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>
2018-03-18 12:02:30 -04:00
Kevin O'Connor 310cdf88cc config: Remove tabs from printer-wanhao-duplicator-i3-v2.1-2017.cfg
Remove tabs from example config file and replace with spaces.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-03-18 11:44:56 -04:00
Kevin O'Connor 5c05a24947 docs: Fix typo in M220 description in G-Codes.md
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-03-18 11:44:56 -04:00
Kevin O'Connor c93dad8eba config: Update generic-cramps.cfg with P9_23 machine enable
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-03-18 10:33:40 -04:00
Kevin O'Connor fb3065cfa7 config: Change pullup_resistor to 2000 in generic-cramps.cfg
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-03-17 14:18:49 -04:00
Kevin O'Connor e3f9ff6701 probe: Add z_offset parameter
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>
2018-03-17 14:07:15 -04:00
Kevin O'Connor c95cc3fb66 bed_tilt: Take into account the XY position used with z_virtual_endstop
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>
2018-03-17 13:47:31 -04:00