From 5ab2bb7767730ee32960fd53793721ec27f91fd9 Mon Sep 17 00:00:00 2001 From: Sonny Jeon Date: Sun, 29 Dec 2013 20:51:48 -0700 Subject: [PATCH] Incomplete dev code push, but working. Lots of updates/fixes/improvements. Much still to polish. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Ugh. Github just erased my list of improvements and changes due to a conflict and forcing me to resolve it. Hope this goes through. - Major stepper algorithm change. Trashed the old v0.9 edge branch-style stepper algorithm. It’s fine, but it was susceptible to aliasing noise when moving very slow or very fast. It also had a bit of CPU overhead. It was written to solve a standing issue with v0.8 master, where it couldn’t generate a smooth acceleration abocve 10-15kHz. But, with new step segment buffer in v0.9c, it inadvertently fixed the acceleration problem with v0.8 stepper algorithm. So, what does it mean for you? Smoother stepper pulses and likely higher step frequencies. - Stepper algorithm now uses Timer1 and Timer2, instead of Timer0 and Timer2. Timers 0 and 2 can be swapped if there is an issue. - With the old v0.8 stepper algorithm, the STEP_DELAY_PULSE configuration option is also back. - NEW! Hard limit software debouncing. Grbl now employs the AVR’s watchdog timer as a way to monitor the hard limit pins and checking their states after a delay. This is a simple software debouncing technique and may help alleviate some of the false trigger some users have been complaining about. BUT, this won’t fix electric noise issues! - Fixed an issue with the new homing cycle routine where it wasn’t honoring the acceleration and axis speed limits depending on the homing cycle mask. Now does. Also, updated the homing direction mask code to be a little cleaner. - Moved the main part of the homing cycle control and execution to motion_control.c, where it fits better. - Removed the STATE_INIT system state as it was redundant. Made the system states into bitflags so multiple system states can be checked via one if statement. - Reorganized the power-up routine to work with the new system states. --- stepper.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/stepper.c b/stepper.c index 63ee2dc..b02c9d5 100644 --- a/stepper.c +++ b/stepper.c @@ -105,7 +105,6 @@ typedef struct { float step_per_mm; // Current planner block step/millimeter conversion scalar float steps_remaining; - float dt_remainder; float mm_per_step; float minimum_mm; @@ -528,8 +527,6 @@ void st_prep_buffer() pl_block->entry_speed_sqr = prep.exit_speed*prep.exit_speed; } else { prep.current_speed = sqrt(pl_block->entry_speed_sqr); } - - prep.dt_remainder = 0.0; } /* ---------------------------------------------------------------------------------