Skip to content

Commit

Permalink
Update LinoRoboArm.h
Browse files Browse the repository at this point in the history
  • Loading branch information
LoBrol committed Oct 31, 2022
1 parent c7f22a5 commit 1fe3527
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions LinoRoboArm.h
Original file line number Diff line number Diff line change
Expand Up @@ -121,11 +121,11 @@ uint16_t LinoRoboArm::checkValidPos(uint8_t servoID, uint16_t newPos) {
*/
bool LinoRoboArm::parseInput(String command) {
bool inputValid = false;
uint8_t servo = command.charAt(0).toInt();
if(servo <= 5) {
uint8_t servoID = command.charAt(0).toInt();
if(servoID <= 5) {
inputValid = true;
uint16_t newPos = command.substring(1,4).toInt();
curPos[servo] = checkPos(servo, newPos);
curPos[servo] = checkValidPos(servoID, newPos);
}
return inputValid;
}
Expand Down

0 comments on commit 1fe3527

Please sign in to comment.