Hi, a bit early to ask this but it may take a few hours before I can actually see what values I'm getting (my usart/serial port is not functioning at the moment) so I might as well ask here.
Is there something to I need to do to enable support for 32 bit arithm ops? It appears that the following statement: STEPPER.brakeDistance = ((unsigned long)(STEPPER.maxSpeed+STEPPER.minSpeed))*(STEPPER.maxSpeed-STEPPER.minSpeed)/(2*STEPPER.acceleration); does not produce what I would expect. With the following values maspeed = 5000 minspeed = 300 acceleration = 10000 this should give breakDistance = 1245 but judgin from the behavior of the motors this is not happening. If I manuallu put in the correct breakDistance then this works. Yeah, would be better if I had some actual faulty values to show, but that will take some hours..or days. Meanwhile, anything obvious in my code? Do I need to recompile SDCC libraries or some such? br Kusti ------------------------------------------------------------------------------ This SF.net email is sponsored by: SourcForge Community SourceForge wants to tell your story. http://p.sf.net/sfu/sf-spreadtheword _______________________________________________ Sdcc-user mailing list Sdcc-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/sdcc-user