1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2025-01-19 04:52:12 +01:00

LP-196 Fixed bug in Ex.Bus decoder and changed baud rate for UART to 125 kbaud.

This commit is contained in:
unknown 2016-01-03 18:27:14 +01:00
parent e07ded404e
commit d00c169dbb
4 changed files with 221 additions and 219 deletions

View File

@ -228,6 +228,7 @@ static int PIOS_EXBUS_UnrollChannels(struct pios_exbus_dev *exbus_dev)
goto stream_error;
byte += sizeof(uint8_t);
break;
case EXBUS_STATE_SUBLEN:
sub_length = *byte;
n_channels = sub_length / 2;
@ -248,6 +249,7 @@ static int PIOS_EXBUS_UnrollChannels(struct pios_exbus_dev *exbus_dev)
/* this channel was not received */
state->channel_data[channel] = PIOS_RCVR_INVALID;
}
return 0;
stream_error:
return -1;

View File

@ -1029,7 +1029,7 @@ static const struct pios_dsm_cfg pios_dsm_flexi_cfg = {
static const struct pios_usart_cfg pios_usart_exbus_main_cfg = {
.regs = USART1,
.init = {
.USART_BaudRate = 250000,
.USART_BaudRate = 125000,
.USART_WordLength = USART_WordLength_8b,
.USART_Parity = USART_Parity_No,
.USART_StopBits = USART_StopBits_1,
@ -1065,7 +1065,7 @@ static const struct pios_usart_cfg pios_usart_exbus_main_cfg = {
static const struct pios_usart_cfg pios_usart_exbus_flexi_cfg = {
.regs = USART3,
.init = {
.USART_BaudRate = 250000,
.USART_BaudRate = 125000,
.USART_WordLength = USART_WordLength_8b,
.USART_Parity = USART_Parity_No,
.USART_StopBits = USART_StopBits_1,

View File

@ -1064,7 +1064,7 @@ static const struct pios_usart_cfg pios_usart_exbus_flexi_cfg = {
.regs = USART3,
.remap = GPIO_AF_USART3,
.init = {
.USART_BaudRate = 250000,
.USART_BaudRate = 125000,
.USART_WordLength = USART_WordLength_8b,
.USART_Parity = USART_Parity_No,
.USART_StopBits = USART_StopBits_1,
@ -1105,7 +1105,7 @@ static const struct pios_usart_cfg pios_usart_exbus_main_cfg = {
.regs = USART1,
.remap = GPIO_AF_USART1,
.init = {
.USART_BaudRate = 250000,
.USART_BaudRate = 125000,
.USART_WordLength = USART_WordLength_8b,
.USART_Parity = USART_Parity_No,
.USART_StopBits = USART_StopBits_1,

View File

@ -594,7 +594,7 @@ static const struct pios_usart_cfg pios_usart_exbus_flexi_cfg = {
.regs = FLEXI_USART_REGS,
.remap = FLEXI_USART_REMAP,
.init = {
.USART_BaudRate = 250000,
.USART_BaudRate = 125000,
.USART_WordLength = USART_WordLength_8b,
.USART_Parity = USART_Parity_No,
.USART_StopBits = USART_StopBits_1,
@ -635,7 +635,7 @@ static const struct pios_usart_cfg pios_usart_exbus_main_cfg = {
.regs = MAIN_USART_REGS,
.remap = MAIN_USART_REMAP,
.init = {
.USART_BaudRate = 250000,
.USART_BaudRate = 125000,
.USART_WordLength = USART_WordLength_8b,
.USART_Parity = USART_Parity_No,
.USART_StopBits = USART_StopBits_1,