-
Notifications
You must be signed in to change notification settings - Fork 113
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
RSDK 1020 Part I - refactor base, encoded motor struct and tests. #2227
Conversation
@@ -33,6 +35,7 @@ func (f *fakeDirectionAware) DirectionMoving() int64 { | |||
} | |||
|
|||
func TestMotorEncoder1(t *testing.T) { | |||
t.Skip() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@penguinland skips here will unblock you for Digital interrupts.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if rdkutils.Float64AlmostEqual(em.ticksPerRotation, 0, 0.01) { | ||
em.ticksPerRotation = 1 | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[q] why does this need to use Float64AlmostEqual
but mc.TicksPerRotation
on line 64 can be directly compared to 0?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good catch! thanks!
@@ -399,17 +405,18 @@ func (m *EncodedMotor) rpmMonitorPass(pos, lastPos, now, lastTime int64, rpmDebu | |||
// slow down so we don't overshoot | |||
// halve and quarter rpm values based on seconds remaining in move | |||
|
|||
desiredRPM := m.state.desiredRPM | |||
// desiredRPM := m.state.desiredRPM |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[nit] maybe remove unless you want to keep it for future reference since this is only part 1
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM with the caveat that I don't 100% understand what some things are doing, but feel free to ignore my questions if you have a good understanding of the reasoning. I'll take one more look once the tests/checks are all passing
|
…amrobotics#2227) This PR: - removes some driver-level logic from the base client - removes unused functions from wheeled base - reactors motor setup - skips tests that are meant to be refactored because of leaky goroutines
Original PR: #2211