-
Notifications
You must be signed in to change notification settings - Fork 4
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
✨ Check ports at compile time #8
Conversation
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.
just one question about a minor design choice, other than that it looks good. Oh, and also merge conflicts
* } | ||
* @endcode | ||
*/ | ||
V5RotationSensor(std::int8_t port); | ||
static V5RotationSensor from_pros_rot(pros::Rotation encoder); |
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.
why do we not just overload the constructor?
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.
Because it leads to issues with ambiguous calls, since Motor(1, 200_rpm)
could be either the SmartPort ctor or the pros::Motor ctor
Clangd's IDE popup now includes the phrase "Port out of range"
LGTM |
Closes #6