Skip to content

Commit

Permalink
remove error exit when the angle exceeds the servo's limit
Browse files Browse the repository at this point in the history
  • Loading branch information
inesmaria08 committed Oct 15, 2024
1 parent 834d6d6 commit b60f9d2
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions examples/servo/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,7 @@ int main(void) {
printf("\nThe angle you provided exceeds 360 degrees\n");
return -1;
} else if (result == RETURNCODE_FAIL) {
printf("\nThe angle could not be changed. The provided angle exceeds the servo's limit\n");
return -1;
printf("\nAngle %d exceeds the servo's limit angle.\n", i);
}
}
if (libtock_servo_read_angle(index, &angle) != RETURNCODE_SUCCESS) {
Expand Down

0 comments on commit b60f9d2

Please sign in to comment.