Re: [Emc-developers] Of Kinematics and Kernels

2010-06-24 Thread Alexey Starikovskiy
Forget duplicates... I just can't read. I think real problem is here: dy = pos->tran.y - old.y; dx = pos->tran.x - old.x; if (dx != 0 || dy != 0) { C = atan2(dx, dy); } C should be set to zero before if. dx == 0 and dy == 0 may be not what you want. fabs(dx)>eps will be more appropriate. and dx,

Re: [Emc-developers] Of Kinematics and Kernels

2010-06-24 Thread Alexey Starikovskiy
Hi Andy, please make "struct haldata_t {} *haldata = 0;" static too. You don't want duplicates: -- result = hal_pin_float_new("taperkins.fKcount", HAL_OUT, &(haldata->fKcount), comp_id); if(result < 0) goto error; result = hal_pin_float_new("taperkins.rKcount",

Re: [Emc-developers] Of Kinematics and Kernels

2010-06-24 Thread Andy Pugh
On 24 June 2010 15:03, Neil Baylis wrote: > If changing/removing some unrelated line of code fixes a problem, then I > usually suspect one of two things: a) It's a race condition, and you changed > the timing, or b) You changed the memory layout, and corruption (e.g. due to > wild pointer) that wa

Re: [Emc-developers] Patch to confirm re-homing EMC

2010-06-24 Thread Jeff Epler
On Wed, May 12, 2010 at 06:50:06PM -0500, Ries van Twisk wrote: > hey All, > > this patch that pop-ups a dialog, > should that have been in 2.4 or 2.5? It was originally put in 2.5 only but after some thought I've just put it in 2.4 as well. Thanks again for your contribution. Jeff ---

Re: [Emc-developers] Of Kinematics and Kernels

2010-06-24 Thread Andy Pugh
On 24 June 2010 15:03, Neil Baylis wrote: > b) You changed the memory layout, and corruption (e.g. due to > wild pointer) that was occurring at a vital location is now occurring at an > innocuous location. This has been my working hypothesis, but I have looked and looked at my code and not spott

Re: [Emc-developers] Of Kinematics and Kernels

2010-06-24 Thread Neil Baylis
If changing/removing some unrelated line of code fixes a problem, then I usually suspect one of two things: a) It's a race condition, and you changed the timing, or b) You changed the memory layout, and corruption (e.g. due to wild pointer) that was occurring at a vital location is now occurring at

Re: [Emc-developers] Of Kinematics and Kernels

2010-06-24 Thread Stephen Wille Padnos
[snip] > Even if that isn't the problem, you should probably declare those > variables static so that future readers of the code don't have to go > looking to find out where else the variables might be used or changed. Although I agree that static declarations are a better idea, it's unlikely to

Re: [Emc-developers] Of Kinematics and Kernels

2010-06-24 Thread Kenneth Lerman
Andy Pugh wrote: On 24 June 2010 13:39, Kenneth Lerman wrote: == static PmCartesian old; double dx = 0, dy = 0, C = 0; double fKcount = 0, rKcount = 0; == "static" means that this variable will be visible only from this file. The lack of the static keyword means that dx, dy,

Re: [Emc-developers] Of Kinematics and Kernels

2010-06-24 Thread Andy Pugh
On 24 June 2010 13:39, Kenneth Lerman wrote: > == > static PmCartesian old; > double dx = 0, dy = 0, C = 0; > double fKcount = 0, rKcount = 0; > == > "static" means that this variable will be visible only from this file. > The lack of the static keyword means that dx, dy, C, fKcou

Re: [Emc-developers] Of Kinematics and Kernels

2010-06-24 Thread Kenneth Lerman
On 06/23/2010 07:23 PM, Andy Pugh wrote: I finally have my kinematics module running as expected. The solution (at least initially) seems to be to run it in SIM, where everything works as it should. Running it on my "real" build I get all sorts of wierd stuff, such as numeric values coming out ju