mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-01-29 14:52:12 +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)
|
if(rfm22b_dev->ppm_packet.channels[i - 1] != PIOS_RCVR_TIMEOUT)
|
||||||
valid_input_detected = true;
|
valid_input_detected = true;
|
||||||
}
|
}
|
||||||
valid_input_detected = true;
|
|
||||||
|
|
||||||
// Send the PPM packet if it's valid
|
// Send the PPM packet if it's valid
|
||||||
if (valid_input_detected)
|
if (valid_input_detected)
|
||||||
|
@ -197,6 +197,19 @@ void PIOS_Board_Init(void) {
|
|||||||
}
|
}
|
||||||
#endif
|
#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 */
|
/* Configure the flexi serial port */
|
||||||
{
|
{
|
||||||
uint32_t pios_usart3_id;
|
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. */
|
/* Initalize the RFM22B radio COM device. */
|
||||||
#if defined(PIOS_INCLUDE_RFM22B)
|
#if defined(PIOS_INCLUDE_RFM22B)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user