trivial code style cleanup round 2

This commit is contained in:
Daniel Agar
2015-03-27 23:38:58 -04:00
parent 5cc1a5dfda
commit 8aae66b893
56 changed files with 132 additions and 104 deletions
+3 -3
View File
@@ -90,7 +90,7 @@ static const int ERROR = -1;
class __EXPORT Airspeed : public device::I2C
{
public:
Airspeed(int bus, int address, unsigned conversion_interval, const char* path);
Airspeed(int bus, int address, unsigned conversion_interval, const char *path);
virtual ~Airspeed();
virtual int init();
@@ -108,8 +108,8 @@ private:
perf_counter_t _buffer_overflows;
/* this class has pointer data members and should not be copied */
Airspeed(const Airspeed&);
Airspeed& operator=(const Airspeed&);
Airspeed(const Airspeed &);
Airspeed &operator=(const Airspeed &);
protected:
virtual int probe();
@@ -85,7 +85,8 @@ int ar_init_motors(int ardrone_uart, int gpio);
/**
* Set LED pattern.
*/
void ar_set_leds(int ardrone_uart, uint8_t led1_red, uint8_t led1_green, uint8_t led2_red, uint8_t led2_green, uint8_t led3_red, uint8_t led3_green, uint8_t led4_red, uint8_t led4_green);
void ar_set_leds(int ardrone_uart, uint8_t led1_red, uint8_t led1_green, uint8_t led2_red, uint8_t led2_green,
uint8_t led3_red, uint8_t led3_green, uint8_t led4_red, uint8_t led4_green);
/**
* Mix motors and output actuators
+2 -2
View File
@@ -136,8 +136,8 @@ __EXPORT void stm32_spi3select(FAR struct spi_dev_s *dev, enum spi_dev_e devid,
switch (devid) {
case PX4_SPIDEV_GYRO:
/* Making sure the other peripherals are not selected */
stm32_gpiowrite(GPIO_SPI_CS_GYRO, !selected);
/* Making sure the other peripherals are not selected */
stm32_gpiowrite(GPIO_SPI_CS_GYRO, !selected);
stm32_gpiowrite(GPIO_SPI_CS_ACCEL_MAG, 1);
stm32_gpiowrite(GPIO_SPI_CS_BARO, 1);
break;
+2 -2
View File
@@ -90,8 +90,8 @@ __EXPORT void stm32_spi1select(FAR struct spi_dev_s *dev, enum spi_dev_e devid,
switch (devid) {
case PX4_SPIDEV_GYRO:
/* Making sure the other peripherals are not selected */
stm32_gpiowrite(GPIO_SPI_CS_GYRO, !selected);
/* Making sure the other peripherals are not selected */
stm32_gpiowrite(GPIO_SPI_CS_GYRO, !selected);
stm32_gpiowrite(GPIO_SPI_CS_MPU, 1);
stm32_gpiowrite(GPIO_SPI_CS_ACCEL, 1);
break;
+2 -2
View File
@@ -50,7 +50,7 @@
/* these headers are not C++ safe */
#include <stm32.h>
#include <arch/board/board.h>
/******************************************************************************
* Definitions
******************************************************************************/
@@ -117,7 +117,7 @@
#define GPIO_SBUS_OUTPUT (GPIO_OUTPUT|GPIO_CNF_OUTPP|GPIO_MODE_50MHz|GPIO_OUTPUT_CLEAR|GPIO_PORTB|GPIO_PIN10)
#define GPIO_SBUS_OENABLE (GPIO_OUTPUT|GPIO_CNF_OUTPP|GPIO_MODE_50MHz|GPIO_OUTPUT_SET|GPIO_PORTB|GPIO_PIN4)
/*
/*
* High-resolution timer
*/
#define HRT_TIMER 1 /* use timer1 for the HRT */
+3 -3
View File
@@ -63,7 +63,7 @@ public:
static int set_bus_clock(unsigned bus, unsigned clock_hz);
static unsigned int _bus_clocks[3];
protected:
/**
* The number of times a read or write operation will be retried on
@@ -144,8 +144,8 @@ private:
uint32_t _frequency;
struct i2c_dev_s *_dev;
I2C(const device::I2C&);
I2C operator=(const device::I2C&);
I2C(const device::I2C &);
I2C operator=(const device::I2C &);
};
} // namespace device
+2 -1
View File
@@ -127,7 +127,8 @@ __EXPORT extern void hrt_call_at(struct hrt_call *entry, hrt_abstime calltime, h
* Note thet the interval is timed between scheduled, not actual, call times, so the call rate may
* jitter but should not drift.
*/
__EXPORT extern void hrt_call_every(struct hrt_call *entry, hrt_abstime delay, hrt_abstime interval, hrt_callout callout, void *arg);
__EXPORT extern void hrt_call_every(struct hrt_call *entry, hrt_abstime delay, hrt_abstime interval,
hrt_callout callout, void *arg);
/*
* If this returns true, the entry has been invoked and removed from the callout list,
+2 -2
View File
@@ -58,7 +58,7 @@
/** play the numbered script in (arg), repeating forever */
#define RGBLED_PLAY_SCRIPT _RGBLEDIOC(2)
/**
/**
* Set the user script; (arg) is a pointer to an array of script lines,
* where each line is an array of four bytes giving <duration>, <command>, arg[0-2]
*
@@ -79,7 +79,7 @@
#define RGBLED_SET_PATTERN _RGBLEDIOC(7)
/*
/*
structure passed to RGBLED_SET_RGB ioctl()
Note that the driver scales the brightness to 0 to 255, regardless
of the hardware scaling
+2 -1
View File
@@ -222,6 +222,7 @@ void frsky_send_frame2(int uart)
float course = 0, lat = 0, lon = 0, speed = 0, alt = 0;
char lat_ns = 0, lon_ew = 0;
int sec = 0;
if (global_pos.timestamp != 0 && hrt_absolute_time() < global_pos.timestamp + 20000) {
time_t time_gps = global_pos.time_utc_usec / 1000000ULL;
struct tm *tm_gps = gmtime(&time_gps);
@@ -232,7 +233,7 @@ void frsky_send_frame2(int uart)
lon = frsky_format_gps(fabsf(global_pos.lon));
lon_ew = (global_pos.lon < 0) ? 'W' : 'E';
speed = sqrtf(global_pos.vel_n * global_pos.vel_n + global_pos.vel_e * global_pos.vel_e)
* 25.0f / 46.0f;
* 25.0f / 46.0f;
alt = global_pos.alt;
sec = tm_gps->tm_sec;
}
+2 -1
View File
@@ -1,7 +1,8 @@
#include <controllib/block/Block.hpp>
#include <controllib/block/BlockParam.hpp>
class BlockSysIdent : public control::Block {
class BlockSysIdent : public control::Block
{
public:
BlockSysIdent();
private: