Skip to content

Commit

Permalink
Merge pull request #24 from pat92fr/main
Browse files Browse the repository at this point in the history
ESP32 Firmware : Swap servo ID using CLI
  • Loading branch information
mangdangroboticsclub authored Apr 16, 2023
2 parents 595413f + 3109787 commit b268b33
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions esp32/main/mini_pupper_cmd.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -485,14 +485,14 @@ static int mini_pupper_cmd_setID(int argc, char **argv)
printf("Invalid servo ID\r\n");
return 0;
}
if( servo_id>12 ) {
if( servo_id>12 && servo_id !=99) {
printf("Invalid servo ID\r\n");
return 0;
}

/* Check servo_newid "--newid" option */
int servo_newid = servo_newid_args.servo_newid->ival[0];
if(servo_newid<0 || servo_newid>12) {
if( (servo_newid<0 || servo_newid>12) && servo_newid!=99) {
printf("Invalid new servo ID\r\n");
return 0;
}
Expand Down

0 comments on commit b268b33

Please sign in to comment.