Skip to content

Commit

Permalink
Make 2.1 servo mixing rules compatible with 2.2
Browse files Browse the repository at this point in the history
  • Loading branch information
shellixyz committed May 29, 2019
1 parent 370544a commit 4bfae8d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/main/fc/cli.c
Original file line number Diff line number Diff line change
Expand Up @@ -1638,12 +1638,13 @@ static void cliServoMix(char *cmdline)
} else {
enum {RULE = 0, TARGET, INPUT, RATE, SPEED, CONDITION, ARGS_COUNT};
char *ptr = strtok_r(cmdline, " ", &saveptr);
args[CONDITION] = -1;
while (ptr != NULL && check < ARGS_COUNT) {
args[check++] = fastA2I(ptr);
ptr = strtok_r(NULL, " ", &saveptr);
}

if (ptr != NULL || check != ARGS_COUNT) {
if (ptr != NULL || (check < ARGS_COUNT - 1)) {
cliShowParseError();
return;
}
Expand Down

0 comments on commit 4bfae8d

Please sign in to comment.