mirror of
https://github.com/eclipse/upm.git
synced 2025-03-15 04:57:30 +03:00
Wreorder: fix a variety of re-ordering warnings
Signed-off-by: Jon Trulson <jtrulson@ics.com>
This commit is contained in:
parent
d33e7e532e
commit
0589f445f0
@ -97,9 +97,9 @@ namespace upm {
|
||||
int value();
|
||||
|
||||
private:
|
||||
mraa::Aio m_aioOUT;
|
||||
mraa::Gpio m_gpioLOPlus;
|
||||
mraa::Gpio m_gpioLOMinus;
|
||||
mraa::Aio m_aioOUT;
|
||||
|
||||
float m_aref;
|
||||
int m_ares;
|
||||
|
@ -1418,12 +1418,12 @@ namespace upm {
|
||||
mraa::I2c *m_i2c;
|
||||
mraa::Spi *m_spi;
|
||||
|
||||
// spi chip select
|
||||
mraa::Gpio *m_gpioCS;
|
||||
|
||||
mraa::Gpio *m_gpioIntr1;
|
||||
mraa::Gpio *m_gpioIntr2;
|
||||
|
||||
// spi chip select
|
||||
mraa::Gpio *m_gpioCS;
|
||||
|
||||
uint8_t m_addr;
|
||||
RESOLUTION_T m_resolution;
|
||||
|
||||
|
@ -1185,12 +1185,12 @@ namespace upm {
|
||||
mraa::I2c *m_i2c;
|
||||
mraa::Spi *m_spi;
|
||||
|
||||
// spi chip select
|
||||
mraa::Gpio *m_gpioCS;
|
||||
|
||||
mraa::Gpio *m_gpioIntr1;
|
||||
mraa::Gpio *m_gpioIntr2;
|
||||
|
||||
// spi chip select
|
||||
mraa::Gpio *m_gpioCS;
|
||||
|
||||
uint8_t m_addr;
|
||||
|
||||
// SPI chip select
|
||||
|
@ -552,12 +552,12 @@ namespace upm {
|
||||
mraa::I2c *m_i2c;
|
||||
mraa::Spi *m_spi;
|
||||
|
||||
// spi chip select
|
||||
mraa::Gpio *m_gpioCS;
|
||||
|
||||
mraa::Gpio *m_gpioIntr;
|
||||
mraa::Gpio *m_gpioDR;
|
||||
|
||||
// spi chip select
|
||||
mraa::Gpio *m_gpioCS;
|
||||
|
||||
uint8_t m_addr;
|
||||
|
||||
OPERATION_MODE_T m_opmode;
|
||||
|
@ -156,13 +156,14 @@ namespace upm {
|
||||
|
||||
|
||||
protected:
|
||||
// temperature and humidity are optional features of this transmitter
|
||||
mraa::Aio *m_aioTemp;
|
||||
mraa::Aio *m_aioHum;
|
||||
|
||||
// CO2 reporting is always supported
|
||||
mraa::Aio m_aioCO2;
|
||||
|
||||
// temperature and humidity are optional features of this transmitter
|
||||
mraa::Aio *m_aioHum;
|
||||
mraa::Aio *m_aioTemp;
|
||||
|
||||
|
||||
private:
|
||||
float m_aref;
|
||||
float m_rResistor;
|
||||
|
@ -141,11 +141,11 @@ namespace upm {
|
||||
|
||||
|
||||
protected:
|
||||
mraa::Aio m_aioHum;
|
||||
|
||||
// temperature is an optional feature of the humidity transmitter
|
||||
mraa::Aio *m_aioTemp;
|
||||
|
||||
mraa::Aio m_aioHum;
|
||||
|
||||
private:
|
||||
float m_aref;
|
||||
int m_aResTemp;
|
||||
|
@ -42,10 +42,10 @@ using namespace upm;
|
||||
|
||||
Lcm1602::Lcm1602(int bus_in, int addr_in, bool isExpander,
|
||||
uint8_t numColumns, uint8_t numRows) :
|
||||
m_numColumns(numColumns), m_numRows(numRows),
|
||||
m_i2c_lcd_control(new mraa::I2c(bus_in)),
|
||||
m_gpioRS(0), m_gpioEnable(0), m_gpioD0(0),
|
||||
m_gpioD1(0), m_gpioD2(0), m_gpioD3(0),
|
||||
m_numColumns(numColumns), m_numRows(numRows)
|
||||
m_gpioD1(0), m_gpioD2(0), m_gpioD3(0)
|
||||
{
|
||||
mraa::Result error = mraa::SUCCESS;
|
||||
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,
|
||||
uint8_t d1, uint8_t d2, uint8_t d3,
|
||||
uint8_t numColumns, uint8_t numRows) :
|
||||
m_numColumns(numColumns), m_numRows(numRows),
|
||||
m_i2c_lcd_control(0),
|
||||
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_gpioD2(new mraa::Gpio(d2)), m_gpioD3(new mraa::Gpio(d3)),
|
||||
m_numColumns(numColumns), m_numRows(numRows)
|
||||
m_gpioD2(new mraa::Gpio(d2)), m_gpioD3(new mraa::Gpio(d3))
|
||||
{
|
||||
m_name = "Lcm1602 (4-bit GPIO)";
|
||||
m_isI2C = false;
|
||||
|
@ -136,6 +136,9 @@ namespace upm {
|
||||
|
||||
unsigned int m_instances;
|
||||
|
||||
mraa::Gpio m_gpioData;
|
||||
mraa::Gpio m_gpioClk;
|
||||
|
||||
// an array of uint16_t's representing our bit states (on/off)
|
||||
// intensities. Only the low 8 bits are used, but in the future
|
||||
// 16bit support can work here as well.
|
||||
@ -143,9 +146,6 @@ namespace upm {
|
||||
|
||||
uint16_t m_commandWord;
|
||||
|
||||
mraa::Gpio m_gpioClk;
|
||||
mraa::Gpio m_gpioData;
|
||||
|
||||
private:
|
||||
};
|
||||
|
||||
|
@ -469,9 +469,9 @@ namespace upm {
|
||||
TAG_TYPE_T tagType();
|
||||
|
||||
protected:
|
||||
mraa::I2c m_i2c;
|
||||
mraa::Gpio m_gpioIRQ;
|
||||
mraa::Gpio m_gpioReset;
|
||||
mraa::I2c m_i2c;
|
||||
|
||||
bool readAck();
|
||||
bool isReady();
|
||||
|
@ -32,10 +32,10 @@
|
||||
using namespace std;
|
||||
using namespace upm;
|
||||
|
||||
RGBRingCoder::RGBRingCoder(int en, int latch, int clear, int clk, int dat,
|
||||
int sw, int encA, int encB, int red,
|
||||
RGBRingCoder::RGBRingCoder(int en, int latch, int clear, int clk, int dat,
|
||||
int sw, int encA, int encB, int red,
|
||||
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_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
|
||||
m_gpioLatch.dir(mraa::DIR_OUT);
|
||||
m_gpioLatch.write(0);
|
||||
|
||||
|
||||
// clear, HIGH
|
||||
m_gpioClear.dir(mraa::DIR_OUT);
|
||||
m_gpioLatch.write(1);
|
||||
|
||||
|
||||
// clock
|
||||
m_gpioClock.dir(mraa::DIR_OUT);
|
||||
m_gpioClock.write(0);
|
||||
|
||||
|
||||
// data
|
||||
m_gpioData.dir(mraa::DIR_OUT);
|
||||
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.mode(mraa::MODE_HIZ); // no pullup
|
||||
m_gpioSwitch.write(0);
|
||||
|
||||
|
||||
// ecoder A interrupt
|
||||
m_gpioEncA.dir(mraa::DIR_IN);
|
||||
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
|
||||
// the msb is the state of the B pin. The lsb is the state
|
||||
// of the A pin on the encoder.
|
||||
newEncoderState = (This->m_gpioEncB.read()<<1) |
|
||||
newEncoderState = (This->m_gpioEncB.read()<<1) |
|
||||
(This->m_gpioEncA.read());
|
||||
|
||||
// Now we pair oldEncoderState with new encoder state
|
||||
|
@ -57,7 +57,7 @@ namespace upm {
|
||||
*
|
||||
* The device requires 11 pins, 3 of which must be PWM-capable
|
||||
* (for the RGB LEDs).
|
||||
*
|
||||
*
|
||||
* @image html rgbringcoder.jpg
|
||||
* @snippet rgbringcoder.cxx Interesting
|
||||
*/
|
||||
@ -80,7 +80,7 @@ namespace upm {
|
||||
* @param green RGB green 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);
|
||||
|
||||
/**
|
||||
@ -98,26 +98,26 @@ namespace upm {
|
||||
*/
|
||||
void setRingLEDS(uint16_t bits);
|
||||
|
||||
/*
|
||||
/**
|
||||
* Returns the state of the button
|
||||
*
|
||||
* @return True if the button is pressed, false otherwise
|
||||
*/
|
||||
bool getButtonState();
|
||||
|
||||
/*
|
||||
/*
|
||||
* Gets the current rotary encoder counter value
|
||||
*
|
||||
* @return Current counter value
|
||||
*/
|
||||
int getEncoderPosition() { return m_counter; };
|
||||
|
||||
/*
|
||||
/**
|
||||
* Sets the encoder counter to 0
|
||||
*/
|
||||
void clearEncoderPosition() { m_counter = 0; };
|
||||
|
||||
/*
|
||||
/**
|
||||
* 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.
|
||||
*
|
||||
@ -128,7 +128,7 @@ namespace upm {
|
||||
void setRGBLED(float r, float g, float b);
|
||||
|
||||
private:
|
||||
|
||||
|
||||
mraa::Gpio m_gpioEn;
|
||||
|
||||
mraa::Gpio m_gpioLatch;
|
||||
@ -138,17 +138,15 @@ namespace upm {
|
||||
|
||||
mraa::Gpio m_gpioSwitch;
|
||||
|
||||
mraa::Gpio m_gpioEncA;
|
||||
mraa::Gpio m_gpioEncB;
|
||||
|
||||
mraa::Pwm m_pwmRed;
|
||||
mraa::Pwm m_pwmGreen;
|
||||
mraa::Pwm m_pwmBlue;
|
||||
|
||||
mraa::Gpio m_gpioEncA;
|
||||
mraa::Gpio m_gpioEncB;
|
||||
|
||||
static void interruptHandler(void *ctx);
|
||||
volatile int m_counter;
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
|
@ -511,7 +511,7 @@ const unsigned char font[] = {
|
||||
* @con spi
|
||||
*
|
||||
* @brief API for the ST7735 LCD
|
||||
*
|
||||
*
|
||||
* This module defines the interface for the ST7735 display library
|
||||
*
|
||||
* @image html st7735.jpg
|
||||
@ -625,13 +625,13 @@ class ST7735 : public GFX {
|
||||
|
||||
uint8_t m_map[160 * 128 * 2]; /**< Screens buffer */
|
||||
private:
|
||||
mraa::Spi m_spi;
|
||||
uint8_t m_spiBuffer[32];
|
||||
|
||||
|
||||
mraa::Gpio m_csLCDPinCtx;
|
||||
mraa::Gpio m_cSDPinCtx;
|
||||
mraa::Gpio m_rSTPinCtx;
|
||||
mraa::Gpio m_rSPinCtx;
|
||||
mraa::Spi m_spi;
|
||||
|
||||
std::string m_name;
|
||||
};
|
||||
|
@ -38,7 +38,7 @@ using namespace std;
|
||||
(((_val) < (_min)) ? (_min) : (((_val) > (_max)) ? (_max) : (_val)))
|
||||
|
||||
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_format, 0, sizeof(struct v4l2_format));
|
||||
|
@ -163,7 +163,7 @@ namespace upm {
|
||||
{
|
||||
m_debugging = enable;
|
||||
};
|
||||
|
||||
|
||||
protected:
|
||||
// open the device and check that it meats minimum requirements
|
||||
bool initVideoDevice();
|
||||
@ -180,13 +180,13 @@ namespace upm {
|
||||
|
||||
// does the actual capture
|
||||
bool doCaptureImage();
|
||||
|
||||
|
||||
private:
|
||||
// internal ioctl
|
||||
int xioctl(int fd, int request, void* argp);
|
||||
|
||||
|
||||
std::string m_videoDevice;
|
||||
|
||||
|
||||
// our file descriptor to the video device
|
||||
int m_fd;
|
||||
|
||||
@ -210,5 +210,3 @@ namespace upm {
|
||||
bool m_debugging;
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user