Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

[bug, minor] Firmware interface reports wrong dv/dt for Z-axis state #135

Open
jsimmonds2 opened this issue Feb 22, 2020 · 2 comments
Open
Labels

Comments

@jsimmonds2
Copy link
Contributor

Playing with the FarmbotFirmware interface to the Farmduino and noticed that the accelerate and decelerate reports for Z-axis state are "upside-down".

Picture this :-)

image

@RickCarlino RickCarlino transferred this issue from FarmBot/farmbot_os Feb 24, 2020
@gabrielburnworth
Copy link
Contributor

This may occur on any axis when moving in the negative direction:

if (curPos >= staPos && curPos <= halfway)
{
// accelerating
if (curPos > (staPos + stepsAccDec))
{
// now beyond the accelleration point to go full speed
newSpeed = maxSpeed + 1;
movementCruising = true;
movementMoving = true;
}
else
{
// speeding up, increase speed linear within the first period
newSpeed = (1.0 * (curPos - staPos) / stepsAccDec * (maxSpeed - minSpeed)) + minSpeed;
movementAccelerating = true;
movementMoving = true;
}
}
else
{
// decelerating
if (curPos < (endPos - stepsAccDec))
{
// still before the deceleration point so keep going at full speed
newSpeed = maxSpeed + 2;
movementCruising = true;
movementMoving = true;
}
else
{
// speeding up, increase speed linear within the first period
newSpeed = (1.0 * (endPos - curPos) / stepsAccDec * (maxSpeed - minSpeed)) + minSpeed;
movementDecelerating = true;
movementMoving = true;
}
}

@jsimmonds2
Copy link
Contributor Author

jsimmonds2 commented Feb 25, 2020

Oh, Ok. Not a "mathematical" state report, but a funky FarmBot thing ?

From Merriam Webster :
Definition of accelerate intransitive verb 1: to move faster : to gain speed
and
Definition of decelerate transitive verb 1: to reduce the speed of : slow down
:-)

@roryaronson roryaronson added the bug label Jun 9, 2020
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants