Rover: fixed HIL build

This commit is contained in:
Andrew Tridgell 2013-07-15 10:30:10 +10:00
parent e96d0f745c
commit 6e52a09e50
1 changed files with 4 additions and 6 deletions

View File

@ -567,13 +567,11 @@ static uint8_t check_digital_pin(uint8_t pin)
static void servo_write(uint8_t ch, uint16_t pwm)
{
#if HIL_MODE != HIL_MODE_DISABLED
if (!g.hil_servos) {
if (ch < 8) {
RC_Channel::rc_channel(ch)->radio_out = pwm;
}
return;
if (ch < 8) {
RC_Channel::rc_channel(ch)->radio_out = pwm;
}
#endif
#else
hal.rcout->enable_ch(ch);
hal.rcout->write(ch, pwm);
#endif
}