Wreorder: fix a variety of re-ordering warnings

Signed-off-by: Jon Trulson <jtrulson@ics.com>
This commit is contained in:
Jon Trulson 2016-11-03 11:56:48 -06:00
parent d33e7e532e
commit 0589f445f0
14 changed files with 51 additions and 54 deletions

View File

@ -97,9 +97,9 @@ namespace upm {
int value(); int value();
private: private:
mraa::Aio m_aioOUT;
mraa::Gpio m_gpioLOPlus; mraa::Gpio m_gpioLOPlus;
mraa::Gpio m_gpioLOMinus; mraa::Gpio m_gpioLOMinus;
mraa::Aio m_aioOUT;
float m_aref; float m_aref;
int m_ares; int m_ares;

View File

@ -1418,12 +1418,12 @@ namespace upm {
mraa::I2c *m_i2c; mraa::I2c *m_i2c;
mraa::Spi *m_spi; mraa::Spi *m_spi;
// spi chip select
mraa::Gpio *m_gpioCS;
mraa::Gpio *m_gpioIntr1; mraa::Gpio *m_gpioIntr1;
mraa::Gpio *m_gpioIntr2; mraa::Gpio *m_gpioIntr2;
// spi chip select
mraa::Gpio *m_gpioCS;
uint8_t m_addr; uint8_t m_addr;
RESOLUTION_T m_resolution; RESOLUTION_T m_resolution;

View File

@ -1185,12 +1185,12 @@ namespace upm {
mraa::I2c *m_i2c; mraa::I2c *m_i2c;
mraa::Spi *m_spi; mraa::Spi *m_spi;
// spi chip select
mraa::Gpio *m_gpioCS;
mraa::Gpio *m_gpioIntr1; mraa::Gpio *m_gpioIntr1;
mraa::Gpio *m_gpioIntr2; mraa::Gpio *m_gpioIntr2;
// spi chip select
mraa::Gpio *m_gpioCS;
uint8_t m_addr; uint8_t m_addr;
// SPI chip select // SPI chip select

View File

@ -552,12 +552,12 @@ namespace upm {
mraa::I2c *m_i2c; mraa::I2c *m_i2c;
mraa::Spi *m_spi; mraa::Spi *m_spi;
// spi chip select
mraa::Gpio *m_gpioCS;
mraa::Gpio *m_gpioIntr; mraa::Gpio *m_gpioIntr;
mraa::Gpio *m_gpioDR; mraa::Gpio *m_gpioDR;
// spi chip select
mraa::Gpio *m_gpioCS;
uint8_t m_addr; uint8_t m_addr;
OPERATION_MODE_T m_opmode; OPERATION_MODE_T m_opmode;

View File

@ -156,13 +156,14 @@ namespace upm {
protected: protected:
// temperature and humidity are optional features of this transmitter
mraa::Aio *m_aioTemp;
mraa::Aio *m_aioHum;
// CO2 reporting is always supported // CO2 reporting is always supported
mraa::Aio m_aioCO2; mraa::Aio m_aioCO2;
// temperature and humidity are optional features of this transmitter
mraa::Aio *m_aioHum;
mraa::Aio *m_aioTemp;
private: private:
float m_aref; float m_aref;
float m_rResistor; float m_rResistor;

View File

@ -141,11 +141,11 @@ namespace upm {
protected: protected:
mraa::Aio m_aioHum;
// temperature is an optional feature of the humidity transmitter // temperature is an optional feature of the humidity transmitter
mraa::Aio *m_aioTemp; mraa::Aio *m_aioTemp;
mraa::Aio m_aioHum;
private: private:
float m_aref; float m_aref;
int m_aResTemp; int m_aResTemp;

View File

@ -42,10 +42,10 @@ using namespace upm;
Lcm1602::Lcm1602(int bus_in, int addr_in, bool isExpander, Lcm1602::Lcm1602(int bus_in, int addr_in, bool isExpander,
uint8_t numColumns, uint8_t numRows) : uint8_t numColumns, uint8_t numRows) :
m_numColumns(numColumns), m_numRows(numRows),
m_i2c_lcd_control(new mraa::I2c(bus_in)), m_i2c_lcd_control(new mraa::I2c(bus_in)),
m_gpioRS(0), m_gpioEnable(0), m_gpioD0(0), m_gpioRS(0), m_gpioEnable(0), m_gpioD0(0),
m_gpioD1(0), m_gpioD2(0), m_gpioD3(0), m_gpioD1(0), m_gpioD2(0), m_gpioD3(0)
m_numColumns(numColumns), m_numRows(numRows)
{ {
mraa::Result error = mraa::SUCCESS; mraa::Result error = mraa::SUCCESS;
m_name = "Lcm1602 (I2C)"; m_name = "Lcm1602 (I2C)";
@ -103,11 +103,11 @@ Lcm1602::Lcm1602(int bus_in, int addr_in, bool isExpander,
Lcm1602::Lcm1602(uint8_t rs, uint8_t enable, uint8_t d0, Lcm1602::Lcm1602(uint8_t rs, uint8_t enable, uint8_t d0,
uint8_t d1, uint8_t d2, uint8_t d3, uint8_t d1, uint8_t d2, uint8_t d3,
uint8_t numColumns, uint8_t numRows) : uint8_t numColumns, uint8_t numRows) :
m_numColumns(numColumns), m_numRows(numRows),
m_i2c_lcd_control(0), m_i2c_lcd_control(0),
m_gpioRS(new mraa::Gpio(rs)), m_gpioEnable(new mraa::Gpio(enable)), m_gpioRS(new mraa::Gpio(rs)), m_gpioEnable(new mraa::Gpio(enable)),
m_gpioD0(new mraa::Gpio(d0)), m_gpioD1(new mraa::Gpio(d1)), m_gpioD0(new mraa::Gpio(d0)), m_gpioD1(new mraa::Gpio(d1)),
m_gpioD2(new mraa::Gpio(d2)), m_gpioD3(new mraa::Gpio(d3)), m_gpioD2(new mraa::Gpio(d2)), m_gpioD3(new mraa::Gpio(d3))
m_numColumns(numColumns), m_numRows(numRows)
{ {
m_name = "Lcm1602 (4-bit GPIO)"; m_name = "Lcm1602 (4-bit GPIO)";
m_isI2C = false; m_isI2C = false;

View File

@ -136,6 +136,9 @@ namespace upm {
unsigned int m_instances; unsigned int m_instances;
mraa::Gpio m_gpioData;
mraa::Gpio m_gpioClk;
// an array of uint16_t's representing our bit states (on/off) // an array of uint16_t's representing our bit states (on/off)
// intensities. Only the low 8 bits are used, but in the future // intensities. Only the low 8 bits are used, but in the future
// 16bit support can work here as well. // 16bit support can work here as well.
@ -143,9 +146,6 @@ namespace upm {
uint16_t m_commandWord; uint16_t m_commandWord;
mraa::Gpio m_gpioClk;
mraa::Gpio m_gpioData;
private: private:
}; };

View File

@ -469,9 +469,9 @@ namespace upm {
TAG_TYPE_T tagType(); TAG_TYPE_T tagType();
protected: protected:
mraa::I2c m_i2c;
mraa::Gpio m_gpioIRQ; mraa::Gpio m_gpioIRQ;
mraa::Gpio m_gpioReset; mraa::Gpio m_gpioReset;
mraa::I2c m_i2c;
bool readAck(); bool readAck();
bool isReady(); bool isReady();

View File

@ -32,10 +32,10 @@
using namespace std; using namespace std;
using namespace upm; using namespace upm;
RGBRingCoder::RGBRingCoder(int en, int latch, int clear, int clk, int dat, RGBRingCoder::RGBRingCoder(int en, int latch, int clear, int clk, int dat,
int sw, int encA, int encB, int red, int sw, int encA, int encB, int red,
int green, int blue) : int green, int blue) :
m_gpioEn(en), m_gpioLatch(latch), m_gpioClear(clear), m_gpioClock(clk), m_gpioEn(en), m_gpioLatch(latch), m_gpioClear(clear), m_gpioClock(clk),
m_gpioData(dat), m_gpioSwitch(sw), m_gpioEncA(encA), m_gpioEncB(encB), m_gpioData(dat), m_gpioSwitch(sw), m_gpioEncA(encA), m_gpioEncB(encB),
m_pwmRed(red), m_pwmGreen(green), m_pwmBlue(blue) m_pwmRed(red), m_pwmGreen(green), m_pwmBlue(blue)
{ {
@ -48,15 +48,15 @@ RGBRingCoder::RGBRingCoder(int en, int latch, int clear, int clk, int dat,
// latch // latch
m_gpioLatch.dir(mraa::DIR_OUT); m_gpioLatch.dir(mraa::DIR_OUT);
m_gpioLatch.write(0); m_gpioLatch.write(0);
// clear, HIGH // clear, HIGH
m_gpioClear.dir(mraa::DIR_OUT); m_gpioClear.dir(mraa::DIR_OUT);
m_gpioLatch.write(1); m_gpioLatch.write(1);
// clock // clock
m_gpioClock.dir(mraa::DIR_OUT); m_gpioClock.dir(mraa::DIR_OUT);
m_gpioClock.write(0); m_gpioClock.write(0);
// data // data
m_gpioData.dir(mraa::DIR_OUT); m_gpioData.dir(mraa::DIR_OUT);
m_gpioData.write(0); m_gpioData.write(0);
@ -65,7 +65,7 @@ RGBRingCoder::RGBRingCoder(int en, int latch, int clear, int clk, int dat,
m_gpioSwitch.dir(mraa::DIR_IN); m_gpioSwitch.dir(mraa::DIR_IN);
m_gpioSwitch.mode(mraa::MODE_HIZ); // no pullup m_gpioSwitch.mode(mraa::MODE_HIZ); // no pullup
m_gpioSwitch.write(0); m_gpioSwitch.write(0);
// ecoder A interrupt // ecoder A interrupt
m_gpioEncA.dir(mraa::DIR_IN); m_gpioEncA.dir(mraa::DIR_IN);
m_gpioEncA.mode(mraa::MODE_PULLUP); m_gpioEncA.mode(mraa::MODE_PULLUP);
@ -136,7 +136,7 @@ void RGBRingCoder::interruptHandler(void *ctx)
// First, find the newEncoderState. This'll be a 2-bit value // First, find the newEncoderState. This'll be a 2-bit value
// the msb is the state of the B pin. The lsb is the state // the msb is the state of the B pin. The lsb is the state
// of the A pin on the encoder. // of the A pin on the encoder.
newEncoderState = (This->m_gpioEncB.read()<<1) | newEncoderState = (This->m_gpioEncB.read()<<1) |
(This->m_gpioEncA.read()); (This->m_gpioEncA.read());
// Now we pair oldEncoderState with new encoder state // Now we pair oldEncoderState with new encoder state

View File

@ -57,7 +57,7 @@ namespace upm {
* *
* The device requires 11 pins, 3 of which must be PWM-capable * The device requires 11 pins, 3 of which must be PWM-capable
* (for the RGB LEDs). * (for the RGB LEDs).
* *
* @image html rgbringcoder.jpg * @image html rgbringcoder.jpg
* @snippet rgbringcoder.cxx Interesting * @snippet rgbringcoder.cxx Interesting
*/ */
@ -80,7 +80,7 @@ namespace upm {
* @param green RGB green LED PWM * @param green RGB green LED PWM
* @param blue RGB blue LED PWM * @param blue RGB blue LED PWM
*/ */
RGBRingCoder(int en, int latch, int clear, int clk, int dat, int sw, RGBRingCoder(int en, int latch, int clear, int clk, int dat, int sw,
int encA, int encB, int red, int green, int blue); int encA, int encB, int red, int green, int blue);
/** /**
@ -98,26 +98,26 @@ namespace upm {
*/ */
void setRingLEDS(uint16_t bits); void setRingLEDS(uint16_t bits);
/* /**
* Returns the state of the button * Returns the state of the button
* *
* @return True if the button is pressed, false otherwise * @return True if the button is pressed, false otherwise
*/ */
bool getButtonState(); bool getButtonState();
/* /*
* Gets the current rotary encoder counter value * Gets the current rotary encoder counter value
* *
* @return Current counter value * @return Current counter value
*/ */
int getEncoderPosition() { return m_counter; }; int getEncoderPosition() { return m_counter; };
/* /**
* Sets the encoder counter to 0 * Sets the encoder counter to 0
*/ */
void clearEncoderPosition() { m_counter = 0; }; void clearEncoderPosition() { m_counter = 0; };
/* /**
* Sets the intensity of the red, green, and blue LEDs. Values can * Sets the intensity of the red, green, and blue LEDs. Values can
* be between 0.0 and 1.0. Lower is brighter, higher is dimmer. * be between 0.0 and 1.0. Lower is brighter, higher is dimmer.
* *
@ -128,7 +128,7 @@ namespace upm {
void setRGBLED(float r, float g, float b); void setRGBLED(float r, float g, float b);
private: private:
mraa::Gpio m_gpioEn; mraa::Gpio m_gpioEn;
mraa::Gpio m_gpioLatch; mraa::Gpio m_gpioLatch;
@ -138,17 +138,15 @@ namespace upm {
mraa::Gpio m_gpioSwitch; mraa::Gpio m_gpioSwitch;
mraa::Gpio m_gpioEncA;
mraa::Gpio m_gpioEncB;
mraa::Pwm m_pwmRed; mraa::Pwm m_pwmRed;
mraa::Pwm m_pwmGreen; mraa::Pwm m_pwmGreen;
mraa::Pwm m_pwmBlue; mraa::Pwm m_pwmBlue;
mraa::Gpio m_gpioEncA;
mraa::Gpio m_gpioEncB;
static void interruptHandler(void *ctx); static void interruptHandler(void *ctx);
volatile int m_counter; volatile int m_counter;
}; };
} }

View File

@ -511,7 +511,7 @@ const unsigned char font[] = {
* @con spi * @con spi
* *
* @brief API for the ST7735 LCD * @brief API for the ST7735 LCD
* *
* This module defines the interface for the ST7735 display library * This module defines the interface for the ST7735 display library
* *
* @image html st7735.jpg * @image html st7735.jpg
@ -625,13 +625,13 @@ class ST7735 : public GFX {
uint8_t m_map[160 * 128 * 2]; /**< Screens buffer */ uint8_t m_map[160 * 128 * 2]; /**< Screens buffer */
private: private:
mraa::Spi m_spi;
uint8_t m_spiBuffer[32]; uint8_t m_spiBuffer[32];
mraa::Gpio m_csLCDPinCtx; mraa::Gpio m_csLCDPinCtx;
mraa::Gpio m_cSDPinCtx; mraa::Gpio m_cSDPinCtx;
mraa::Gpio m_rSTPinCtx; mraa::Gpio m_rSTPinCtx;
mraa::Gpio m_rSPinCtx; mraa::Gpio m_rSPinCtx;
mraa::Spi m_spi;
std::string m_name; std::string m_name;
}; };

View File

@ -38,7 +38,7 @@ using namespace std;
(((_val) < (_min)) ? (_min) : (((_val) > (_max)) ? (_max) : (_val))) (((_val) < (_min)) ? (_min) : (((_val) > (_max)) ? (_max) : (_val)))
VCAP::VCAP(string videoDev) : VCAP::VCAP(string videoDev) :
m_buffer(0), m_fd(-1) m_fd(-1), m_buffer(0)
{ {
memset(&m_caps, 0, sizeof(struct v4l2_capability)); memset(&m_caps, 0, sizeof(struct v4l2_capability));
memset(&m_format, 0, sizeof(struct v4l2_format)); memset(&m_format, 0, sizeof(struct v4l2_format));

View File

@ -163,7 +163,7 @@ namespace upm {
{ {
m_debugging = enable; m_debugging = enable;
}; };
protected: protected:
// open the device and check that it meats minimum requirements // open the device and check that it meats minimum requirements
bool initVideoDevice(); bool initVideoDevice();
@ -180,13 +180,13 @@ namespace upm {
// does the actual capture // does the actual capture
bool doCaptureImage(); bool doCaptureImage();
private: private:
// internal ioctl // internal ioctl
int xioctl(int fd, int request, void* argp); int xioctl(int fd, int request, void* argp);
std::string m_videoDevice; std::string m_videoDevice;
// our file descriptor to the video device // our file descriptor to the video device
int m_fd; int m_fd;
@ -210,5 +210,3 @@ namespace upm {
bool m_debugging; bool m_debugging;
}; };
} }