Commit Graph

1254 Commits

Author SHA1 Message Date
Kevin O'Connor 907cfb9105 stepper: Fix typo in error report - name should be self.name
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-05-14 12:31:28 -04:00
Kevin O'Connor 6c3db80d89 homing: Apply speed rounding after calling home_prepare()
The step speed rounding and the cpu delay must be run after running
the endstop specific preparation code.  Otherwise, a delay in the
home_prepare() code could undo those calculations.  Specifically, this
could lead to errors on a multi-mcu setup when the Z is homed using a
virtual_z_offset and there is a delay in the activate_gcode section.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-05-14 11:40:35 -04:00
Michael Barbour bf3c41cd06 temperature_fan: Add support for temperature-triggered fan.
Signed-off-by: Michael Barbour <barbour.michael.0@gmail.com>
2018-05-10 19:32:23 -04:00
Lukas Wingerberg 6ad344c8a6 config: Add example generic-radds.cfg config file
Signed-off-by: Lukas Wingerberg <lukas@wingerberg.de>
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-05-10 11:40:09 -04:00
Kevin O'Connor 2e3fa8da13 console: Fix handling of bad commands
Don't return early on a command error - continue to process remaining
commands and pop commands from the queue.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-05-08 11:31:25 -04:00
Kevin O'Connor f70fefa06f linux: Convert linux SPI code to use the generic spicmds.c code
Use the generic spi send/receive code on Linux.  Update the replicape
code to use the updated command format.

Also, update the replicape code to turn off the stepper motors on a
shutdown event.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-05-07 09:10:34 -04:00
Kevin O'Connor 31ae74c56c sam3x8e: Add SPI support
Signed-off-by: Petri Honkala <cruwaller@gmail.com>
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-05-07 09:10:34 -04:00
Kevin O'Connor 22487d95e9 spicmds: Rework SPI message transmission
Improve the SPI message transmit system.  Add support for bus speed
and bus mode.  Add support for sending SPI messages on shutdown.

Signed-off-by: Petri Honkala <cruwaller@gmail.com>
Signed-off-by: Douglas Hammond <wizhippo@gmail.com>
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-05-07 09:10:34 -04:00
Kevin O'Connor 838da992e8 msgproto: Support sending empty strings from create_message()
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-05-07 09:07:22 -04:00
Kevin O'Connor 9c52ad4310 stm32f1: Enable lcd chip support
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-05-07 01:03:25 -04:00
Kevin O'Connor 018c5daa94 sam3x8e: Enable lcd chip support
Testing shows the hd44780 and st7920 chips do work on the Due.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-05-07 01:03:01 -04:00
Kevin O'Connor 99b233df3f serialqueue: Fix batching of BACKGROUND_PRIORITY_CLOCK messages
In order to properly delay BACKGROUND_PRIORITY_CLOCK messages, they
must be 5ms beyond the minimum defined by MIN_REQTIME_DELTA.  So, add
both MIN_REQTIME_DELTA and MIN_BACKGROUND_DELTA to the timing of these
messages.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-05-05 20:59:33 -04:00
Kevin O'Connor 640ff1ad56 clocksync: Change timer frequency to avoid resonating with other timers
If the clock querying messages occur at a similar frequency to other
events on the micro-controller or host, then it's possible for the
load created by those other events to skew the clock synchronization.
In particular, the 500ms lcd screen update could resonate with the 1
second clock query.  Use an unusual clock querying frequency to avoid
this issue.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-05-05 20:14:46 -04:00
Kevin O'Connor cd9e21e3aa FAQ: Add item on TMC2208 being disabled in the middle of a print
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-05-05 13:06:55 -04:00
cruwaller 7fd14848ca chelper: Fix hub-ctrl compilation
Signed-off-by: Petri Honkala <cruwaller@gmail.com>
2018-05-05 11:23:18 -04:00
Kevin O'Connor 1f11c171c7 thermistor: Add Honeywell 100K and MGB18 thermistor definitions
Add two additional thermistors (as suggested by Tim Miller).

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-04-30 16:08:17 -04:00
Kevin O'Connor 461390ac87 config: Add exaple generic-rumba.cfg config file
Add config file for the RUMBA board (from config provided by Tim
Miller).

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-04-30 15:48:14 -04:00
Kevin O'Connor 15248706ae chelper: Move the host C code to a new klippy/chelper/ directory
Move the C code out of the main klippy/ directory and into its own
directory.  This reduces the clutter in the main klippy directory.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-04-30 11:44:53 -04:00
Kevin O'Connor 8e1b516eb6 config: Fix typo in adc_temperature section (Ohms vs Volts)
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-04-30 10:31:39 -04:00
Kevin O'Connor 4a8f9407b8 avr: Do not use Idle mode
The AVR chips (bizarrely) start an ADC conversion when entering Idle
mode.  This behavior can cause the ADC to be busy when a sample is
required.  Worse, if a series of events cause the cpu to enter and
leave Idle mode with a timing similar to the ADC checking rate then it
can cause the ADC to show as busy for extended periods.  This could
cause high MCU load and possibly lead to a "Rescheduled timer in the
past" shutdown.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-04-28 21:26:42 -04:00
Kevin O'Connor 46cf3ef145 avr: Explicitly set ADCSRA on each conversion start
Don't logically or the ADSC bit on the start of a conversion -
explicitly set the full contents of the register.  Also, clear the
ADIF flag on each write.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-04-25 19:13:44 -04:00
Kevin O'Connor cf475a9a39 avr: Clean up serial port register aliases
Define unique register aliases for all of the hardware serial port
definitions.  This makes it easier to deal with the AVR chips that use
different register names.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-04-25 10:55:18 -04:00
Kevin O'Connor 22c49a7c3f docs: Improve FAQ update software entry (use make menuconfig ; make clean)
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-04-25 10:29:55 -04:00
Kevin O'Connor 76bafadb71 virtual_sdcard: Add logging on start, stop, stats, and shutdown
Add additional logging to the virtual_sdcard support.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-04-23 18:35:15 -04:00
Kevin O'Connor 3ef7c00b73 docs: Fix internal link description in Code_Overview.md
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-04-23 18:23:39 -04:00
Kevin O'Connor bdd26e421b toolhead: Add a SET_VELOCITY_LIMIT command
Add a command to adjust the maximum velocity, acceleration, and
junction deviation parameters.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-04-20 22:36:05 -04:00
Kevin O'Connor d5dc6b785d gcode: Add minval/maxval/above/below options to get_X parsers
Add value checking to gcode parameter parsing code.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-04-20 22:24:36 -04:00
Kevin O'Connor 8f4f5da11c fan: Add a set_shutdown_speed() method
Add a set_shutdown_speed() method so that the heater_fan code does not
need to peek into the fan object's internal members.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-04-20 22:16:08 -04:00
Kevin O'Connor 6d03dee104 gcode: Add a SET_GCODE_OFFSET command
The M206 command is confusing (it uses negative offsets) and isn't
very flexible.  Add a new SET_GCODE_OFFSET command to make it easier
to add virtual offsets to gcode commands.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-04-20 20:04:41 -04:00
Kevin O'Connor 93262919ed gcode: Rename homing_add to homing_offset
The M206 command is confusing as positive values in that command
result in negative offsets to future g-code commands.  Perform the
parameter negation in the M206 command instead of storing it that way
internally.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-04-20 19:46:19 -04:00
Kevin O'Connor 68864333f3 probe: Limit Z lift speed to be the same as the probing speed
When using an automatic probe, limit the Z lift speed to be no greater
than the Z probing speed.  This can reduce Z jerks during probing.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-04-20 14:00:41 -04:00
Kevin O'Connor eff1c8604d klippy: Reword the error messages during config file parsing
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-04-20 13:38:08 -04:00
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