1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2025-01-18 03:52:11 +01:00

Fixed configuration of PPM input.

This commit is contained in:
Brian Webb 2012-12-12 20:27:08 -07:00
parent 90e0746ade
commit 6e929d7a92
2 changed files with 13 additions and 13 deletions

View File

@ -1500,7 +1500,6 @@ static bool rfm22_sendPPM(struct pios_rfm22b_dev *rfm22b_dev)
if(rfm22b_dev->ppm_packet.channels[i - 1] != PIOS_RCVR_TIMEOUT)
valid_input_detected = true;
}
valid_input_detected = true;
// Send the PPM packet if it's valid
if (valid_input_detected)

View File

@ -197,6 +197,19 @@ void PIOS_Board_Init(void) {
}
#endif
/* Configure PPM input */
#if defined(PIOS_INCLUDE_PPM)
if (oplinkSettings.PPM == OPLINKSETTINGS_PPM_TRUE)
{
uint32_t pios_ppm_id;
PIOS_PPM_Init(&pios_ppm_id, &pios_ppm_cfg);
if (PIOS_RCVR_Init(&pios_ppm_rcvr_id, &pios_ppm_rcvr_driver, pios_ppm_id))
PIOS_Assert(0);
}
else
#endif /* PIOS_INCLUDE_PPM */
/* Configure the flexi serial port */
{
uint32_t pios_usart3_id;
@ -214,18 +227,6 @@ void PIOS_Board_Init(void) {
}
}
/* Configure PPM input */
#if defined(PIOS_INCLUDE_PPM)
if (oplinkSettings.PPM == OPLINKSETTINGS_PPM_TRUE)
{
uint32_t pios_ppm_id;
PIOS_PPM_Init(&pios_ppm_id, &pios_ppm_cfg);
if (PIOS_RCVR_Init(&pios_ppm_rcvr_id, &pios_ppm_rcvr_driver, pios_ppm_id))
PIOS_Assert(0);
}
#endif /* PIOS_INCLUDE_PPM */
/* Initalize the RFM22B radio COM device. */
#if defined(PIOS_INCLUDE_RFM22B)
{