HAL_Linux: Enable PCA9685 output after its setup

This commit is contained in:
Mikhail Avkhimenia 2014-12-23 16:05:47 +03:00 committed by Andrew Tridgell
parent ce9b87c101
commit 954b0795d4

View File

@ -31,13 +31,13 @@ void LinuxRCOutput_Navio::init(void* machtnicht)
return; // never reached
}
// Set the initial frequency
set_freq(0, 50);
/* Enable PCA9685 PWM */
enable_pin = hal.gpio->channel(PCA9685_OUTPUT_ENABLE);
enable_pin->mode(HAL_GPIO_OUTPUT);
enable_pin->write(0);
// Set the initial frequency
set_freq(0, 50);
}
void LinuxRCOutput_Navio::set_freq(uint32_t chmask, uint16_t freq_hz)