Commit Graph

1503 Commits

Author SHA1 Message Date
Florian Heilmann b6bf455155 tmc2660: Add endstop phase detection functionality to TMC2660 extra (#816)
Signed-off-by: Florian Heilmann <Florian.Heilmann@gmx.net>
2018-10-24 16:01:12 -04:00
Kevin O'Connor 1a437c1fd1 sam3x8e: Don't report an error if bossac errors during device restart
Sometime bossac reports an error during chip restart.  It appears this
error is spurious - just suppress it.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-10-22 17:41:29 -04:00
Kevin O'Connor 04a12ec9bd docs: Update stm32f1.md - usb is now supported.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-10-22 13:22:58 -04:00
Kevin O'Connor e4bb90a1ca bed_mesh: Do not automatically run G28 on BED_MESH_CALIBRATE / BED_MESH_MAP
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-10-22 11:26:01 -04:00
Kevin O'Connor f382762962 bed_tilt: Do not automatically run G28 on BED_TILT_CALIBRATE
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-10-22 11:26:01 -04:00
Kevin O'Connor 925562cfb1 delta_calibrate: Do not automatically run G28 on DELTA_CALIBRATE
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-10-22 11:26:01 -04:00
Kevin O'Connor ca04caa42c docs: Fix SAM4E8E benchmark test revision
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-10-22 11:21:43 -04:00
Kevin O'Connor 2b81b2935c docs: Update SAM4E8E benchmarks
New benchmark numbers reported by @FHeilmann.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-10-22 11:18:55 -04:00
Kevin O'Connor 34c3cb5c01 sam4e8e: Enable SAM4 cache at startup
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-10-22 11:16:18 -04:00
Kevin O'Connor 7fac0de1f8 config: Add display buttons to printer-creality-cr10s-2017.cfg
Reported on IRC by gueee.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-10-20 19:27:53 -04:00
Kevin O'Connor b903f84c80 docs: Replace get_status example with get_clock in Protocol.md
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-10-20 11:53:32 -04:00
Kevin O'Connor 7efbc021a5 pid_calibrate: Add some comments on the calibration methodology
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-10-19 22:40:11 -04:00
Kevin O'Connor e30053f2a9 test: Add printer-adimlab-2018.cfg to printers.test
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-10-19 11:12:20 -04:00
Jason Rahaim c7f0d039ac config: ADIMlab Add support for LCD knob and caselight
Signed-off-by: Jason Rahaim <jason@jasonr.com>
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-10-19 11:10:32 -04:00
Kevin O'Connor 29e0996858 display: Check for M117 inside of draw_status()
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-10-18 20:43:43 -04:00
Kevin O'Connor 2549ccd722 klippy: No need to return anything from _connect() method
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-10-18 15:58:52 -04:00
Kevin O'Connor 530a37196c docs: Update LPC176x benchmarks
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-10-18 09:55:02 -04:00
Kevin O'Connor 8fca908445 lpc176x: Divide system clock within timer; not on system bus
Scaling the timer on the system bus has a notable impact on
performance.  So, scale the timer within the timer hardware itself.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-10-18 09:37:47 -04:00
Kevin O'Connor 0079311b0b docs: Add an Endstop_Phase.md document
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-10-16 13:09:49 -04:00
Kevin O'Connor 1e71909d02 endstop_phase: Add support for an ENDSTOP_PHASE_CALIBRATE command
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-10-16 13:09:49 -04:00
Kevin O'Connor def524bdf4 endstop_phase: Add support for detecting phase via TMC stepper drivers
The Trinamic stepper motor drivers are capable of reporting the
stepper phase - add support for using that capability to the
enddstop_phases module.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-10-16 13:09:23 -04:00
Kevin O'Connor a2df01b88e endstop_phase: Move endstop phase homing code to new "extras" module
Move the endstop phase tracking code from stepper.py to a new
extras/endstop_phase.py module.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-10-16 13:09:23 -04:00
Kevin O'Connor 216905ceca klippy: Add a basic event dispatch mechanism
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-10-16 13:09:23 -04:00
Kevin O'Connor fedf90680e homing: Pass printer instead of toolhead object to Homing class
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-10-16 13:09:23 -04:00
lf e7498fa241 chelper: Add a quick __main__ to compile c helper (#782)
Signed-off-by: Lucas Fink <software@lfcode.ca>
2018-10-16 12:21:18 -04:00
Jason R dd5695405f config: Add ADIMLab 3d printer (#781)
Configuration for ADIMLab printer. tested and working including LCD support. 

This printer was previously known as the HCmaker7

Signed-off-by: Jason Rahaim <jason@jasonr.com>
2018-10-16 12:07:47 -04:00
Kevin O'Connor 08d03ae0eb configfile: Strip trailing comments
The Python 2.x ConfigParser doesn't support stripping of trailing '#'
style comments.  Do that manually before parsing the config.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-10-16 11:45:20 -04:00
Kevin O'Connor 368703fd78 delta_calibrate: Perform coordinate descent in a background process
Run the coordinate descent in a background process so that the main
thread does not block.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-10-15 19:01:19 -04:00
Kevin O'Connor 46355f903e toolhead: Don't clear sync_print_time on a get_next_move_time() call
Only clear the internal sync_print_time flag if the code performs a
regular "lazy" flush of the look-ahead queue.  This helps build the
look-ahead queue even when running internal scripts.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-10-15 18:24:15 -04:00
Kevin O'Connor 21597f9b07 gcode: Report state message after any error in a STATUS response
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-10-13 17:24:37 -04:00
Kevin O'Connor 55eed2e9be gcode: Remove "Preparing to restart" message
Now that "Klipper state" messages are proactively sent, it is
redundant to send the "preparing to restart" message.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-10-13 17:21:15 -04:00
Kevin O'Connor f5c99c1dec docs: Update benchmarks for Arduino Due
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-10-13 11:57:13 -04:00
Kevin O'Connor 67278a6d8a sam3x8e: Align loops to a 16 byte boundary
It appears the sam3x8e has a primitive cache prefetch mechanism (it
prefetches 32 bytes at a time aligned to a 16 byte boundary).
Aligning the main loop in timer_dispatch_many() to a 16 byte boundary
significantly improves performance.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-10-13 11:52:24 -04:00
Kevin O'Connor fb798e3cba sched: Force sched_try_shutdown to be inlined
If sched_try_shutdown() is not inlined into timer_dispatch_many() it
can have a significant impact on benchmarks.  (Even though the
function isn't called in practice, the call causes gcc to organize the
function differently.)

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-10-13 11:47:00 -04:00
Kevin O'Connor 7a265f159a armcm_irq: Fix jump target alignment
The jump target needs to be 4 byte aligned (not 2^4 bytes).

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-10-13 11:47:00 -04:00
Kevin O'Connor 0225d17343 stm32f1: Use __always_inline on timer_read_time
Some older versions of gcc need the __always_inline directive in order
to inline timer_read_time.  Inlining that function is important for
performance on the stm32f1.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-10-11 22:20:02 -04:00
Kevin O'Connor aa693fbdc1 docs: Updates to stm32f103 benchmarks
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-10-11 10:57:24 -04:00
Kevin O'Connor 7cbc44b8d3 stm32f1: Use -O2 optimization and inline timer_read_time()
As long as timer_read_time() is inlined, I get better performance with
gcc -O2 optimization.  The binary is also dramatically smaller and O2
better matches the other platforms.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-10-11 10:50:51 -04:00
Kevin O'Connor 102ec4938d stm32f1: Use the main lib/cmsis-core directory for cmsis includes
Use the main cmsis header files with stm32f1.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-10-11 10:50:51 -04:00
Kevin O'Connor 75fa74313c stm32f1: Add support for building with bootloader support
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-10-11 10:50:51 -04:00
Kevin O'Connor 215b4c5a1e stm32f1: Move assembler build rules together
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-10-11 10:50:51 -04:00
Kevin O'Connor b8745bc973 stm32f1: Pull the USB D+ line low briefly to signal a device connect
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-10-11 10:50:51 -04:00
Kevin O'Connor bc5e961d73 stm32f1: Initial support for serial over USB
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-10-11 10:50:51 -04:00
Kevin O'Connor 1302514ea8 stm32f1: Serial should have a higher irq priority than timers
It's possible for the code to stay in the timer irq for up to 100ms,
so serial irqs should have a higher irq priority to prevent them from
being starved.  (The timer code disables irqs during event dispatch,
so serial irqs would only be permitted between events anyway.)

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-10-11 10:50:51 -04:00
Kevin O'Connor d32506bd2e homing: Move homing offset adjustment logic to generic homing code
Move the "stepper phase" adjustment logic from the kinematic classes
to the generic homing.py code.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-10-10 14:30:09 -04:00
Kevin O'Connor 770b92863f mcu: Add a set_commanded_position() method to MCU_stepper
Add the ability to directly set the "commanded" stepper position.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-10-10 14:30:09 -04:00
Kevin O'Connor 459e521991 delta: Add a special case to the limit checks for the homing position
When a delta printer has different arm lengths or different endstop
positions then the homing position falls outside of the normal
printable area.  Add a special check to the range checking code to
permit this move instead of homing to a position near the actual
homing position.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-10-10 12:18:22 -04:00
Kevin O'Connor bd1ba86839 delta: Reorganize init()
Just code movement.  Move boundary check init to after tower init.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-10-10 12:18:22 -04:00
Kevin O'Connor d4bf51231a homing: Implement second home from homing.py
Move the logic for performing the second home from the kinematics
classes to the generic homing code.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-10-10 12:14:27 -04:00
Kevin O'Connor 3db483e270 delta: Wrap lines to 80 columns
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-10-10 12:14:27 -04:00