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:
parent
90e0746ade
commit
6e929d7a92
@ -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)
|
||||
|
@ -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)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user