Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

EasyGoPiGo3.steer() uses no_limit_speed, says uses current speed #277

Closed
slowrunner opened this issue Mar 29, 2020 · 2 comments
Closed

EasyGoPiGo3.steer() uses no_limit_speed, says uses current speed #277

slowrunner opened this issue Mar 29, 2020 · 2 comments

Comments

@slowrunner
Copy link
Contributor

The self doc on the EasyGoPiGo3.steer() method states:

        Each motor is assigned a percentage of the current speed value. 
..
        :param int left_percent: Percentage of current speed value that gets applied to left motor. 
..
        :param int right_percent: Percentage of current speed value that gets applied to right motor. 
..
        For setting the motor speed, use :py:meth:`~easygopigo3.EasyGoPiGo3.set_speed`.
        Default ``speed`` is set to **300** - see :py:meth:`~easygopigo3.EasyGoPiGo3.__init__`.
        .. important::

but coded as (and nearly impossible to use):

        self.set_motor_dps(self.MOTOR_LEFT, self.NO_LIMIT_SPEED * left_percent / 100)
        self.set_motor_dps(self.MOTOR_RIGHT, self.NO_LIMIT_SPEED * right_percent / 100)
@slowrunner
Copy link
Contributor Author

Added pull request:
#289

@CleoQc
Copy link
Member

CleoQc commented Oct 21, 2021

A preference to use get_speed() instead of accessing speed directly means this PR #303 got merged instead of #289
In essence it's the exact same fix, and thank you for your contribution.

@CleoQc CleoQc closed this as completed Oct 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants