Skip to content

Fixed MoveSteering error when steering value is >50 or <-50, degrees … - #516

Closed
stubs12 wants to merge 1 commit into
ev3dev:ev3dev-stretchfrom
stubs12:MoveSteeringFix
Closed

stubs12 wants to merge 1 commit into
ev3dev:ev3dev-stretchfrom
stubs12:MoveSteeringFix

Conversation

@stubs12

@stubs12 stubs12 commented Sep 11, 2018

Copy link
Copy Markdown

Fix a problem where MoveSteering.on_for_degrees() with steering values larger than 50 or smaller than -50 caused negative degrees to be calculated, leading to an assert. Just used abs() on the calculated degrees, the negative speed takes care of the direction.

…for one motor went negative causing assert error. Addes abs( ) on degrees calc to avoid negative degrees.
@WasabiFan

Copy link
Copy Markdown
Member

This looks good to me; there definitely was an error on my part when changing units here. Could you add a test for this case as well?

@WasabiFan

Copy link
Copy Markdown
Member

I have included the fix from here for the bad property name in #523. We are now removing the requirement for positive powers, so the code around this area has been changed by that PR to solve the problem. I won't be merging the PR as the relevant part is in #523. Thanks for the contribution!

@WasabiFan WasabiFan closed this Sep 23, 2018
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

Successfully merging this pull request may close these issues.

2 participants