SITL: fixed the pwm output on startup

This commit is contained in:
Andrew Tridgell 2012-03-07 17:20:29 +11:00
parent 8b37790bd1
commit d1713bd2fb
1 changed files with 5 additions and 2 deletions

View File

@ -197,8 +197,11 @@ static void sitl_simulator_output(void)
last_update = millis();
for (i=0; i<11; i++) {
// the registers are 2x the PWM value
pwm[i] = (*reg[i])/2;
if (*reg[i] == 0xFFFF) {
pwm[i] = 0;
} else {
pwm[i] = (*reg[i])/2;
}
}
if (!desktop_state.quadcopter) {