Commit Graph

411 Commits

Author SHA1 Message Date
Kevin O'Connor ec805aee2e scripts: Add octopi installation scripts
Add a system startup script so that Klipper can automatically start at
boot time.  Create an installation script that will install the system
dependencies and the startup script.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2017-04-21 10:14:27 -04:00
Kevin O'Connor 167b18b58f gcode: Ignore M21 command
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>
2017-04-20 10:11:10 -04:00
Kevin O'Connor 4b1a530330 stepcompress: Simplify delta Z only move calculations
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2017-04-20 00:56:18 -04:00
Kevin O'Connor 19ffaa9ff0 docs: Reword parts of the pressure advance kinematics description.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2017-04-19 20:48:23 -04:00
Kevin O'Connor 0f5167a407 docs: Misc image updates
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2017-04-19 19:55:50 -04:00
Kevin O'Connor 563ab5caa5 docs: Add info on delta acceleration limits
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2017-04-19 19:54:48 -04:00
Kevin O'Connor db5b5f121c docs: Add initial Pressure Advance tuning document
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2017-04-19 16:02:11 -04:00
Kevin O'Connor 1f417a8441 docs: Update Todo - initial kinematic document written
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2017-04-15 22:59:34 -04:00
Kevin O'Connor b74b09ea7a docs: Updates to Features document
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2017-04-15 22:52:36 -04:00
Kevin O'Connor 2cce67ad84 docs: Add initial Kinematics document
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2017-04-15 22:26:03 -04:00
Kevin O'Connor 2cb935c300 mcu: No need to log mcu_stats debugging
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2017-04-14 10:43:14 -04:00
Kevin O'Connor b9623c1128 klippy: Don't log stats when the printer is idle
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2017-04-14 10:38:37 -04:00
Kevin O'Connor 7a386cff7d mcu: Change "Synchronizing mcu clock" logging to debug
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>
2017-04-14 10:06:11 -04:00
Kevin O'Connor 839725e3c5 queuelogger: Automatically roll log file
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2017-04-14 09:58:34 -04:00
Kevin O'Connor 8920479f85 klippy: Remove CLEAR_SHUTDOWN command
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>
2017-04-13 14:53:41 -04:00
Kevin O'Connor 4c25eae9b4 mcu: Make sure a FIRMWARE_RESTART actually resets the mcu
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2017-04-13 14:29:18 -04:00
Kevin O'Connor a3a45b5037 docs: Update Todo - RPi power over USB now implemented
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2017-04-13 14:18:48 -04:00
Kevin O'Connor dc645d76b4 docs: Reword and reformat parts of move code flow in Code_Overview
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2017-04-13 14:08:02 -04:00
Kevin O'Connor daff83ee9a hub-ctrl: Add support for micro-controller reset via RPi usb power toggling
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2017-04-13 13:20:13 -04:00
Kevin O'Connor 9f9e3e61d6 mcu: Support reset command
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>
2017-04-13 13:20:13 -04:00
Kevin O'Connor 1592395036 reactor: Fix bug causing end() to not always work
Only set the self._process flag in run() not _dispatch_loop().

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2017-04-13 13:20:13 -04:00
Kevin O'Connor 8491b1f86a docs: Update Features document with latest performance benchmarks
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2017-04-11 13:53:33 -04:00
Kevin O'Connor a7b4d70cc6 docs: Add documentation on how to run the graphstats.py script
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2017-04-11 13:41:11 -04:00
Kevin O'Connor fa193e9618 graphstats: The times are no longer in UTC time
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2017-04-11 13:40:25 -04:00
Kevin O'Connor 050008f3c8 docs: Update Debugging.md file with python virtual env setup
Direct readers to the main Installation file to setup the python
virtual environment and remove the outdated instructions in the
Debugging file.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2017-04-11 12:49:12 -04:00
Kevin O'Connor 70e53cb080 docs: Update Firmware_Commands with recent end stop changes
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2017-04-11 12:36:29 -04:00
Kevin O'Connor 7b03b04c78 klippy: Support minimum/maximum value checks on configuration variables
Verify that numeric parameters are in a sane range when reading the
config.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2017-04-11 11:42:55 -04:00
Kevin O'Connor 7a7b98cc31 sam3x8e: Rework adc pin search to be more clear
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2017-04-11 10:01:22 -04:00
Kevin O'Connor 15d5837322 avr: Rework adc and pwm pin search to be more clear
Rework the pin search loop.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2017-04-11 10:01:22 -04:00
Kevin O'Connor f9ebb8b23e avr: Move code around in gpio.c
Move the PWM, ADC, and SPI pin tables closer to their corresponding
code.  This is code movement only - no code changes.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2017-04-11 10:00:54 -04:00
Kevin O'Connor 77b94451de avr: Fix irqstatus_t typo in gpio_pwm_setup
The flags and cs variables should be uint8_t not irqstatus_t.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2017-04-11 09:49:35 -04:00
Kevin O'Connor ca6245e974 docs: Update Code Overview document with code flow for a typical move
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2017-04-10 22:10:49 -04:00
Kevin O'Connor 1cdddeec30 stepcompress: Add comment on common suffixes and units
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2017-04-07 20:22:32 -04:00
Kevin O'Connor 657c908f88 stepcompress: Modify check_expand() into check_push()
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>
2017-04-07 19:05:04 -04:00
Kevin O'Connor d7a0e22d59 stepcompress: Remove step_dist from stepcompress_push_delta()
Pass the step direction explicitly to the low-level delta kinematic C
code.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2017-04-07 15:08:42 -04:00
Kevin O'Connor 33b809714f delta: Do reverse direction checking in C code
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>
2017-04-07 15:05:41 -04:00
Kevin O'Connor b915a2ad7d delta: Make it clear that a "virtual tower" is created
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>
2017-04-07 15:05:41 -04:00
Kevin O'Connor 85ed5cef7f stepcompress: Merge stepcompress_delta_const and stepcompress_delta_accel
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>
2017-04-07 14:47:00 -04:00
Kevin O'Connor df42b0d1ac stepcompress: Pass delta velocity and acceleration directly to C code
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>
2017-04-07 14:43:48 -04:00
Kevin O'Connor 98add22891 stepcompress: Merge stepcompress_push_accel() and stepcompress_push_const()
It's not necessary to have separate C 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>
2017-04-07 14:43:25 -04:00
Kevin O'Connor 1d81bf5596 stepcompress: Pass constant velocity and acceleration directly to C code
Update the C 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>
2017-04-07 13:57:24 -04:00
Kevin O'Connor e4153a536f mcu: Change mcu_stepper.set_position() to take a location in millimeters
Update the set_position() method to convert from millimeters to
absolute step position.

Also, update PrinterStepper.get_homed_offset() and
mcu_stepper.get_commanded_position() to return millimeters.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2017-04-07 13:44:17 -04:00
Kevin O'Connor 79f31238b0 mcu: Don't export the commanded_position variable from mcu_stepper
Now that the kinematic classes call the mcu_stepper with millimeters
and seconds it is no longer necessary for them to directly access the
stepper's position in absolute steps.  Rename
mcu_stepper.commanded_position to mcu_stepper._commanded_pos to make
clear it is not a variable intended to be externally accessed.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2017-04-07 13:44:17 -04:00
Kevin O'Connor 8c712d959d mcu: Pass delta velocity and acceleration directly to mcu_stepper
Rework the parameters of step_delta_const() and step_delta_accel() so
that they take velocity and acceleration directly in millimeters and
seconds.  This simplifies the delta.py kinematic code.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2017-04-07 13:44:04 -04:00
Kevin O'Connor c4b1a79db2 mcu: Pass constant velocity and acceleration directly to mcu_stepper
Rename step_sqrt/step_factor to step_accel/step_const and have them
directly take the velocity and acceleration in millimeters and
seconds.  This simplifies the kinematic classes.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2017-04-07 13:43:56 -04:00
Kevin O'Connor 47f12f107d stepcompress: Move stepcompress_push_* functions to their own section
This is only code movement; no code changes.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2017-04-07 13:26:39 -04:00
Kevin O'Connor bfad970e4d mcu: Rename self.ffi_lib to self._ffi_lib
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2017-04-04 10:13:02 -04:00
Kevin O'Connor 49bdc6fbd1 corexy: Initial corexy kinematic implementation
Add initial support for corexy kinematics.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2017-04-03 17:27:14 -04:00
Kevin O'Connor 57f279677f endstop: Support halting more than one stepper on trigger
Extend the endstop code so that more than one stepper can be halted
during endstop homing.  Some kinematic setups (eg, corexy) require an
endstop to support this.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2017-04-03 17:27:10 -04:00
Kevin O'Connor fff73c7735 avr: Invert diff in timer checks
Minor optimization on avr.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2017-04-03 10:39:49 -04:00