-
Notifications
You must be signed in to change notification settings - Fork 77
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
Some function return wrong error code because of using claim_port macro #159
Comments
claim_port
macro
claim_port
macro
Good catch, thanks for opening this issue. Looks like we used just the Lines 38 to 46 in 65a5845
The simplest fix would be to use this exact same method for the functions that you mentioned that are still using |
@HotelCalifornia This should be closed. |
Closed in #160. Not sure why it didn't close this automatically |
According to lines 47 ~ 48 in /include/api.h
https://github.com/purduesigbots/pros/blob/develop/include/api.h#L47-L48
As far as I know, the first one (
PROS_ERR
) is used in functions which return an integer value andPROS_ERR_F
is used in functions which return a double value.But according to the file /src/devices/vdml_motors.c and file /include/vdml/vdml.h
https://github.com/purduesigbots/pros/blob/develop/src/devices/vdml_motors.c#L178-L182
https://github.com/purduesigbots/pros/blob/develop/include/vdml/vdml.h#L28-L57
The
claim_port
macro returnsPROS_ERR
. It used in all functions but not all of them should returnPROS_ERR
.Expected Behavior:
claim_port macro should only be used in functions returning int32_t, so we need to change
claim_port
behavior.Steps to reproduce:
Try it yourself
System information:
Platform: V5
PROS Kernel Version: all
Screenshots/Output Dumps/Stack Traces
The text was updated successfully, but these errors were encountered: