-
Notifications
You must be signed in to change notification settings - Fork 52
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-7267] Board cleanup part 1: analogs can be written to #606
Conversation
Warning your change may break code samples. If your change modifies any of the following functions please contact @viamrobotics/fleet-management. Thanks!
|
Don't worry, github-actions bot. I didn't touch |
pin = await my_board.gpio_pin_by_name(name="15") | ||
|
||
# Get if it is true or false that the pin is set to high. | ||
duty_cycle = await pin.get_pwm() |
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.
This paragraph is unrelated to my main change, but also has nothing to do with the function it's documenting. Reading an analog pin doesn't involve PWM, and I suspect this "documentation" was added via a copy-and-paste mistake.
I've needed to rerun the tests several times because they time out after 1 minute, and only 95ish% of the tests finish in a minute. Is this expected? I'm unsure if I've somehow made the tests much slower than normal, or the timeout threshold ought to be raised. With enough reruns, the tests can pass within the time limit... |
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.
One minor thing (no need to re-request review) otherwise lgtm!
Surprise, no I won't! Olivia already did that 2 weeks ago. |
AnalogReader
is now justAnalog
. Similarly,analog_reader_by_name
is justanalog_by_name
, etc.Analog
abstract class can now.write()
in addition to.read()
.WriteAnalog
RPC on the board. but SDK users don't interact directly with the RPCs.)In an upcoming PR, I'll have more board cleanup to stream digital interrupts. but that's separate enough to warrant a separate PR.