aboutsummaryrefslogtreecommitdiffstats
path: root/klippy/mcu.py
Commit message (Collapse)AuthorAgeFilesLines
...
* homing: Create QueryEndstops class from gcodeKevin O'Connor2016-11-181-2/+3
| | | | | | | | | | | Create the QueryEndstops in the gcode handler instead of in the kinematic classes. This simplifies the gcode handler as it can directly register its response callback. Also, store the stepper name in the stepper class. Also, propagate the print_time of the query request to the mcu_endstop class. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* mcu: Remove support for DummyMCU classKevin O'Connor2016-11-161-87/+0
| | | | | | | It's easier to test with the file output mechanism and the DummyMCU code has grown stale. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* stepper: Reset the next step time on a stepper stopKevin O'Connor2016-11-141-7/+3
| | | | | | | | | Automatically reset the next step time to zero on a stepper_stop() call. This makes the host code simpler as it no longer needs to schedule an explicit reset_step_clock command on the step after a homing operation. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* delta: Initial support for linear delta kinematicsKevin O'Connor2016-11-141-0/+13
| | | | | | This adds support for delta based robots. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* stepcompress: Do all step rounding in C codeKevin O'Connor2016-11-131-16/+12
| | | | | | | | | | | | | | | | | Commits f0cefebf and 8f331f08 changed the way the code determined what steps to take on fractional steps. Unfortunately, it was possible in some situations for the C code to round differently from the python code which could result in warnings and lost steps. Change the code so that all fractional step handling is done in the C code. Implementing the step rounding logic in one location avoids any conflicts. In order to efficiently handle the step rounding in the C code, the C code has also been extended to directly send the "set_next_step_dir" command. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* mcu: Do not invert the direction of pullup pins by defaultKevin O'Connor2016-11-081-2/+2
| | | | | | | | | | A pullup setting on an input pin (ie, '^') should enable the hardware pullup resistor, but it should not invert the trigger level (ie, it should remain trigger on high). Those that need to change the trigger level (ie, trigger on low) must now do that explicitly (ie, '^!'). This makes the code match what other firmwares do. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* mcu: Remove python checks for stepcompress integer overflowKevin O'Connor2016-11-021-6/+3
| | | | | | | Now that the C code checks for overflow, it is no longer necessary for the python code to check. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* mcu: Fix endstop query timeout checkingKevin O'Connor2016-10-111-6/+10
| | | | | | | | | | Commit 0685802c changed the query endstop timeout to use host time instead of the mcu clock. However, it is possible for an endstop homing request to be in the future which makes using the host time inappropriate. Revert back to using the mcu clock to determine when to send an endstop query. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* homing: Support querying the current status of endstopsKevin O'Connor2016-09-221-15/+21
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* toolhead: Force a firmware shutdown on an unhandled exceptionKevin O'Connor2016-09-221-0/+6
| | | | | | | Check for unhandled exceptions and force the MCU to shutdown in that case. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* mcu: Write initial config commands when in file output modeKevin O'Connor2016-09-101-2/+4
| | | | | | | When doing serial file output debugging, write the config commands as they are often useful to inspect. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* mcu: Consistently use mcu_freq variable name (instead of clock_freq)Kevin O'Connor2016-08-251-13/+13
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* mcu: Internally store _print_start_time instead of _print_start_clockKevin O'Connor2016-08-251-9/+12
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* mcu: convert stepper, endstop, and digital_out to take mcu_timeKevin O'Connor2016-08-241-35/+36
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* mcu: Convert PWM and ADC objects to take mcu_time instead of clockKevin O'Connor2016-08-241-24/+29
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* stepper: Support stepper phase adjustments when homingKevin O'Connor2016-07-281-0/+8
| | | | | | | Add support for enhancing the precision of endstop switches by also inspecting the phase of the stepper motor when the endstop triggers. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* Initial commit of source code.Kevin O'Connor2016-05-251-0/+510
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>