Skip to content
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

Fix incorrect port type #139

Merged
merged 1 commit into from
Apr 23, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions include/pros/motors.h
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,7 @@ int32_t motor_is_over_temp(uint8_t port);
* \return 1 if the motor is not moving, 0 if the motor is moving, or PROS_ERR
* if the operation failed, setting errno
*/
int32_t motor_is_stopped(uint32_t port);
int32_t motor_is_stopped(uint8_t port);

/**
* Checks if the motor is at its zero position.
Expand All @@ -341,7 +341,7 @@ int32_t motor_is_stopped(uint32_t port);
* moved from its absolute zero, or PROS_ERR if the operation failed,
* setting errno
*/
int32_t motor_get_zero_position_flag(uint32_t port);
int32_t motor_get_zero_position_flag(uint8_t port);

#ifdef __cplusplus
} // namespace c
Expand Down
4 changes: 2 additions & 2 deletions src/devices/vdml_motors.c
Original file line number Diff line number Diff line change
Expand Up @@ -141,15 +141,15 @@ int32_t motor_is_over_temp(uint8_t port) {
return_port(port - 1, rtn);
}

int32_t motor_is_stopped(uint32_t port) {
int32_t motor_is_stopped(uint8_t port) {
errno = ENOSYS;
return PROS_ERR;
claim_port(port - 1, E_DEVICE_MOTOR);
int rtn = vexDeviceMotorZeroVelocityFlagGet(device->device_info);
return_port(port - 1, rtn);
}

int32_t motor_get_zero_position_flag(uint32_t port) {
int32_t motor_get_zero_position_flag(uint8_t port) {
errno = ENOSYS;
return PROS_ERR;
claim_port(port - 1, E_DEVICE_MOTOR);
Expand Down