Hi!
First thing want to say is thank you for creating and maintaining cpp4robots! I'm so happy I can finally program EV3 in c++!
I don't know if I'm doing something wrong but it seems to me that the functions PowerMotor_RotationAngle() and SpeedMotor_RotationAngle() need
a positive or negative number for power or speed according to the direction of rotation.
I think it would be helpful if they just used the absolute value since the direction is already given by the angle parameter.
Motors
Moderator: cpp4robots_admin
-
- Administrátor fóra
- Posts: 21
- Joined: 04 Nov 2020 14:34
- Contact:
Re: Motors
Hi Dave,
We're glad you like the Cpp4Robots extension.
As for the PowerMotor_RotationAngle and SpeedMotor_RotationAngle functions, you're right.
Thank you for your helpful notice.
We will modify these functions in the next version of the Cpp4Robots extension.
Cpp4Robots Support
We're glad you like the Cpp4Robots extension.
As for the PowerMotor_RotationAngle and SpeedMotor_RotationAngle functions, you're right.
Thank you for your helpful notice.
We will modify these functions in the next version of the Cpp4Robots extension.
Cpp4Robots Support
Re: Motors
Hi! It's me again.
I have some code like this in my program but it's not always behaving as intended.
It works most of the times (repeats the loop while the motor is turning), but sometimes it skips it
and start executing the following code while the motor is still running.
It seems to happen most often when the motor is running at low speeds.
My hypothesis is that isMotorBusy() gives the wrong result if the motor isn't turning fast enough.
How do I know when a new version is released?
P.S. cpp4robots is great! I never had so much fun with EV3 before!
I have some code like this in my program but it's not always behaving as intended.
It works most of the times (repeats the loop while the motor is turning), but sometimes it skips it
and start executing the following code while the motor is still running.
It seems to happen most often when the motor is running at low speeds.
My hypothesis is that isMotorBusy() gives the wrong result if the motor isn't turning fast enough.
Code: Select all
SpeedMotor_RotationAngle(E_Port_D, speed, angle);
while (isMotorBusy(E_Port_D, E_MotorType_Medium))
{
[do some stuff...]
EV3_Sleep(50);
}
[more stuff...] // this should not be executed until the motor is done moving.
P.S. cpp4robots is great! I never had so much fun with EV3 before!
-
- Administrátor fóra
- Posts: 21
- Joined: 04 Nov 2020 14:34
- Contact:
Re: Motors
Hi Dave,
Thank you for your other notice.
We will add this issue with function isMotorBusy to our plan for the next release.
Cpp4Robots Support
Thank you for your other notice.
We will add this issue with function isMotorBusy to our plan for the next release.
Visual studio should notify you that a new version of Cpp4Robots is available.How do I know when a new version is released?
Cpp4Robots Support
Who is online
Users browsing this forum: No registered users and 0 guests