1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2025-02-20 10:54:14 +01:00

LP-480 RevoNano USART2 sbus baud rate workaround

This commit is contained in:
Vladimir Zidar 2017-04-21 12:01:42 +02:00
parent 05ee4b8dac
commit bb68ed2c5a
2 changed files with 6 additions and 2 deletions

View File

@ -35,6 +35,10 @@
// Define to report number of frames since last dropped instead of weighted ave
#undef SBUS_GOOD_FRAME_COUNT
#ifndef PIOS_SBUS_BAUD_RATE
#define PIOS_SBUS_BAUD_RATE 100000
#endif
#include <uavobjectmanager.h>
#include "pios_sbus_priv.h"
@ -168,7 +172,7 @@ int32_t PIOS_SBus_Init(uint32_t *sbus_id,
/* Set rest of the parameters */
if (driver->set_config) {
driver->set_config(lower_id, PIOS_COM_Word_length_8b, PIOS_COM_Parity_Even, PIOS_COM_StopBits_2, 100000);
driver->set_config(lower_id, PIOS_COM_Word_length_8b, PIOS_COM_Parity_Even, PIOS_COM_StopBits_2, PIOS_SBUS_BAUD_RATE);
}
/* Set inverted UART and IRQ priority */

View File

@ -233,7 +233,7 @@ extern uint32_t pios_packet_handler;
// -------------------------
#define PIOS_SBUS_MAX_DEVS 1
#define PIOS_SBUS_NUM_INPUTS (16 + 2)
#define PIOS_SBUS_BAUD_RATE 99999 /* f411 / 96mhz sysclk / usart2 baud rate weirdness */
// -------------------------
// Receiver HOTT input
// -------------------------