Skip to content

Commit

Permalink
[BUGFIX] servo rate working again
Browse files Browse the repository at this point in the history
  • Loading branch information
schugabe committed Mar 21, 2015
1 parent 332a7dc commit a9f363c
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/mixer.c
Original file line number Diff line number Diff line change
Expand Up @@ -482,7 +482,7 @@ static void servoMixer(void)
input[INPUT_RC_THROTTLE] = mcfg.midrc - rcData[THROTTLE];

for (i = 0; i < MAX_SERVOS; i++)
servo[i] = servoMiddle(i);
servo[i] = 0;

// mix servos according to rules
for (i = 0; i < numberRules; i++) {
Expand All @@ -509,8 +509,10 @@ static void servoMixer(void)
}

// servo rates
for (i = 0; i < MAX_SERVOS; i++)
for (i = 0; i < MAX_SERVOS; i++) {
servo[i] = ((int32_t)cfg.servoConf[i].rate * servo[i]) / 100;
servo[i] += servoMiddle(i);
}
}

void mixTable(void)
Expand Down

0 comments on commit a9f363c

Please sign in to comment.