mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-02-20 10:54:14 +01:00
Uncrustify/clean commented code
This commit is contained in:
parent
21156dbb9e
commit
8e2e534c60
@ -90,7 +90,7 @@ void updateGpsSettings(UAVObjEvent *ev);
|
||||
#define STACK_SIZE_BYTES 1024
|
||||
#else
|
||||
#if defined(PIOS_GPS_MINIMAL)
|
||||
#define GPS_READ_BUFFER 32
|
||||
#define GPS_READ_BUFFER 32
|
||||
#define STACK_SIZE_BYTES 500
|
||||
#else
|
||||
#define STACK_SIZE_BYTES 650
|
||||
|
@ -45,7 +45,6 @@ void handleGPS()
|
||||
int32_t datacounter = PIOS_UBX_DDC_GetAvailableBytes(PIOS_I2C_GPS);
|
||||
if (datacounter > 0) {
|
||||
uint8_t toRead = (uint32_t)datacounter > BUFFER_SIZE - lastUnsentData ? BUFFER_SIZE - lastUnsentData : (uint8_t)datacounter;
|
||||
//uint8_t toRead = (uint32_t)datacounter > BUFFER_SIZE ? BUFFER_SIZE : (uint8_t)datacounter;
|
||||
uint8_t toSend = toRead;
|
||||
PIOS_UBX_DDC_ReadData(PIOS_I2C_GPS, buffer, toRead);
|
||||
|
||||
@ -71,7 +70,7 @@ void handleGPS()
|
||||
if (datacounter > 0) {
|
||||
PIOS_UBX_DDC_WriteData(PIOS_I2C_GPS, buffer, datacounter);
|
||||
}
|
||||
if(maxCount){
|
||||
if (maxCount) {
|
||||
// Note: this delay is needed as querying too quickly the UBX module's I2C(DDC)
|
||||
// port causes a lot of weird issues (it stops sending nav sentences)
|
||||
vTaskDelay(2 * configTICK_RATE_HZ / 1000);
|
||||
@ -94,7 +93,7 @@ void setupGPS()
|
||||
cfgprt.fragments.data.txReady = CFG_PRT_DATA_TXREADI_DISABLED;
|
||||
cfgprt.fragments.data.mode = CFG_PRT_DATA_MODE_ADDR;
|
||||
cfgprt.fragments.data.reserved3 = 0;
|
||||
cfgprt.fragments.data.inProtoMask = CFG_PRT_DATA_PROTO_UBX | CFG_PRT_DATA_PROTO_NMEA |CFG_PRT_DATA_PROTO_RTCM;
|
||||
cfgprt.fragments.data.inProtoMask = CFG_PRT_DATA_PROTO_UBX | CFG_PRT_DATA_PROTO_NMEA | CFG_PRT_DATA_PROTO_RTCM;
|
||||
cfgprt.fragments.data.outProtoMask = CFG_PRT_DATA_PROTO_UBX;
|
||||
cfgprt.fragments.data.flags = 0;
|
||||
cfgprt.fragments.data.reserved5 = 0;
|
||||
|
@ -40,7 +40,7 @@ void handleMag()
|
||||
}
|
||||
#else
|
||||
static uint32_t lastUpdate = 0;
|
||||
if(PIOS_DELAY_DiffuS(lastUpdate) < (1000000 / MAG_RATE_HZ)){
|
||||
if (PIOS_DELAY_DiffuS(lastUpdate) < (1000000 / MAG_RATE_HZ)) {
|
||||
return;
|
||||
}
|
||||
lastUpdate = PIOS_DELAY_GetRaw();
|
||||
|
@ -65,9 +65,9 @@ struct pios_usart_dev {
|
||||
|
||||
uint32_t rx_dropped;
|
||||
|
||||
uint8_t tx_buffer[PIOS_UART_TX_BUFFER];
|
||||
uint8_t tx_len;
|
||||
uint8_t tx_pos;
|
||||
uint8_t tx_buffer[PIOS_UART_TX_BUFFER];
|
||||
uint8_t tx_len;
|
||||
uint8_t tx_pos;
|
||||
};
|
||||
|
||||
static struct pios_usart_dev *PIOS_USART_validate(uint32_t usart_id)
|
||||
@ -288,9 +288,7 @@ static void PIOS_USART_generic_irq_handler(uint32_t usart_id)
|
||||
bool tx_need_yield = false;
|
||||
if (USART_GetITStatus(usart_dev->cfg->regs, USART_IT_TXE) != RESET) {
|
||||
if (usart_dev->tx_out_cb) {
|
||||
//uint8_t b;
|
||||
//uint16_t bytes_to_send;
|
||||
if(!usart_dev->tx_len){
|
||||
if (!usart_dev->tx_len) {
|
||||
usart_dev->tx_len = (usart_dev->tx_out_cb)(usart_dev->tx_out_context, usart_dev->tx_buffer, PIOS_UART_TX_BUFFER, NULL, &tx_need_yield);
|
||||
usart_dev->tx_pos = 0;
|
||||
}
|
||||
|
@ -83,7 +83,7 @@
|
||||
// #define PIOS_MPU6000_ACCEL
|
||||
/* #define PIOS_INCLUDE_HMC5843 */
|
||||
#define PIOS_INCLUDE_HMC5X83
|
||||
//#define PIOS_HMC5X83_HAS_GPIOS
|
||||
// #define PIOS_HMC5X83_HAS_GPIOS
|
||||
/* #define PIOS_INCLUDE_BMP085 */
|
||||
/* #define PIOS_INCLUDE_MS5611 */
|
||||
/* #define PIOS_INCLUDE_MPXV */
|
||||
|
Loading…
x
Reference in New Issue
Block a user