1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2024-11-29 07:24:13 +01:00

uncrustify

This commit is contained in:
Alessio Morale 2014-02-10 22:57:24 +01:00
parent 5060267034
commit 1ba5dbaca8
2 changed files with 35 additions and 35 deletions

View File

@ -417,7 +417,7 @@ static void radioRxTask(__attribute__((unused)) void *parameters)
// it is the caller responsibility to retry in such cases...
int32_t ret = -2;
uint8_t count = 5;
while(count-- > 0 && ret < -1){
while (count-- > 0 && ret < -1) {
ret = PIOS_COM_SendBufferNonBlocking(PIOS_COM_TELEMETRY, serial_data, bytes_to_process);
}
}
@ -517,7 +517,7 @@ static void serialRxTask(__attribute__((unused)) void *parameters)
// it is the caller responsibility to retry in such cases...
int32_t ret = -2;
uint8_t count = 5;
while(count-- > 0 && ret < -1){
while (count-- > 0 && ret < -1) {
PIOS_COM_SendBufferNonBlocking(PIOS_COM_RADIO, data->serialRxBuf, bytes_to_process);
}
}
@ -551,7 +551,7 @@ static int32_t UAVTalkSendHandler(uint8_t *buf, int32_t length)
// it is the caller responsibility to retry in such cases...
ret = -2;
uint8_t count = 5;
while(count-- > 0 && ret < -1){
while (count-- > 0 && ret < -1) {
ret = PIOS_COM_SendBufferNonBlocking(outputPort, buf, length);
}
} else {
@ -581,7 +581,7 @@ static int32_t RadioSendHandler(uint8_t *buf, int32_t length)
// it is the caller responsibility to retry in such cases...
int32_t ret = -2;
uint8_t count = 5;
while(count-- > 0 && ret < -1){
while (count-- > 0 && ret < -1) {
ret = PIOS_COM_SendBufferNonBlocking(outputPort, buf, length);
}
return ret;

View File

@ -274,9 +274,9 @@ int32_t PIOS_COM_ChangeBaud(uint32_t com_id, uint32_t baud)
static int32_t PIOS_COM_SendBufferNonBlockingInternal(struct pios_com_dev *com_dev, const uint8_t *buffer, uint16_t len)
{
PIOS_Assert(com_dev);
PIOS_Assert(com_dev->has_tx);
if (com_dev->driver->available && !com_dev->driver->available(com_dev->lower_id)) {
PIOS_Assert(com_dev);
PIOS_Assert(com_dev->has_tx);
if (com_dev->driver->available && !com_dev->driver->available(com_dev->lower_id)) {
/*
* Underlying device is down/unconnected.
* Dump our fifo contents and act like an infinite data sink.
@ -286,23 +286,23 @@ if (com_dev->driver->available && !com_dev->driver->available(com_dev->lower_id)
*/
fifoBuf_clearData(&com_dev->tx);
return len;
}
}
if (len > fifoBuf_getFree(&com_dev->tx)) {
if (len > fifoBuf_getFree(&com_dev->tx)) {
/* Buffer cannot accept all requested bytes (retry) */
return -2;
}
}
uint16_t bytes_into_fifo = fifoBuf_putData(&com_dev->tx, buffer, len);
uint16_t bytes_into_fifo = fifoBuf_putData(&com_dev->tx, buffer, len);
if (bytes_into_fifo > 0) {
if (bytes_into_fifo > 0) {
/* More data has been put in the tx buffer, make sure the tx is started */
if (com_dev->driver->tx_start) {
com_dev->driver->tx_start(com_dev->lower_id,
fifoBuf_getUsed(&com_dev->tx));
}
}
return bytes_into_fifo;
}
return bytes_into_fifo;
}
/**