Updated limit/homing routine. Works, but needs more TLC.
- Added acceleration to the homing routine. - Homing now accounts for different step rates when moving multiple axes without exceeding acceleration limits. - Homing now updates all internal positioning variables to machine zero after completion. - "Poor-man's" debounce delay added. - Updated the delay_us() function to perform faster and more accurate microsecond delays. Previously, the single increments would add noticeable time drift for larger delays. - Fix a bug in the stepper.c prescalar calculations that was changed in the last commit. - Other minor fixes.
This commit is contained in:
@ -23,6 +23,7 @@
|
||||
#include <avr/io.h>
|
||||
#include "settings.h"
|
||||
#include "config.h"
|
||||
#include "gcode.h"
|
||||
#include "motion_control.h"
|
||||
#include <util/delay.h>
|
||||
#include <math.h>
|
||||
@ -192,9 +193,12 @@ void mc_dwell(double seconds)
|
||||
}
|
||||
|
||||
|
||||
// TODO: Update limits and homing cycle subprograms for better integration with new features.
|
||||
// Execute homing cycle to locate and set machine zero.
|
||||
void mc_go_home()
|
||||
{
|
||||
limits_go_home();
|
||||
plan_set_current_position(0,0,0);
|
||||
limits_go_home();
|
||||
// Upon completion, reset all internal position vectors (g-code parser, planner, system)
|
||||
gc_clear_position();
|
||||
plan_clear_position();
|
||||
clear_vector_double(sys.position);
|
||||
}
|
||||
|
Reference in New Issue
Block a user