Change incorrect variable type to unsigned int
This commit is contained in:
parent
2b5c66ca85
commit
8801355ace
4
Conf.cpp
4
Conf.cpp
|
@ -440,7 +440,7 @@ bool CConf::read()
|
|||
else if (::strcmp(key, "Columns") == 0)
|
||||
m_hd44780Columns = (unsigned int)::atoi(value);
|
||||
else if (::strcmp(key, "I2CAddress") == 0)
|
||||
m_hd44780i2cAddress = value;
|
||||
m_hd44780i2cAddress = (unsigned int)::atoi(value);
|
||||
else if (::strcmp(key, "PWM") == 0)
|
||||
m_hd44780PWM = ::atoi(value) == 1;
|
||||
else if (::strcmp(key, "PWMPin") == 0)
|
||||
|
@ -892,7 +892,7 @@ std::vector<unsigned int> CConf::getHD44780Pins() const
|
|||
return m_hd44780Pins;
|
||||
}
|
||||
|
||||
std::string CConf::getHD44780i2cAddress() const
|
||||
unsigned int CConf::getHD44780i2cAddress() const
|
||||
{
|
||||
return m_hd44780i2cAddress;
|
||||
}
|
||||
|
|
4
Conf.h
4
Conf.h
|
@ -137,7 +137,7 @@ public:
|
|||
unsigned int getHD44780Rows() const;
|
||||
unsigned int getHD44780Columns() const;
|
||||
std::vector<unsigned int> getHD44780Pins() const;
|
||||
std::string getHD44780i2cAddress() const;
|
||||
unsigned int getHD44780i2cAddress() const;
|
||||
bool getHD44780PWM() const;
|
||||
unsigned int getHD44780PWMPin() const;
|
||||
unsigned int getHD44780PWMBright() const;
|
||||
|
@ -253,7 +253,7 @@ private:
|
|||
unsigned int m_hd44780Rows;
|
||||
unsigned int m_hd44780Columns;
|
||||
std::vector<unsigned int> m_hd44780Pins;
|
||||
std::string m_hd44780i2cAddress;
|
||||
unsigned int m_hd44780i2cAddress;
|
||||
bool m_hd44780PWM;
|
||||
unsigned int m_hd44780PWMPin;
|
||||
unsigned int m_hd44780PWMBright;
|
||||
|
|
|
@ -36,7 +36,7 @@ char m_buffer2[128U];
|
|||
char m_buffer3[128U];
|
||||
char m_buffer4[128U];
|
||||
|
||||
CHD44780::CHD44780(unsigned int rows, unsigned int cols, const std::string& callsign, unsigned int dmrid, const std::vector<unsigned int>& pins, const std::string& i2cAddress, bool pwm, unsigned int pwmPin, unsigned int pwmBright, unsigned int pwmDim, bool displayClock, bool utc, bool duplex) :
|
||||
CHD44780::CHD44780(unsigned int rows, unsigned int cols, const std::string& callsign, unsigned int dmrid, const std::vector<unsigned int>& pins, unsigned int i2cAddress, bool pwm, unsigned int pwmPin, unsigned int pwmBright, unsigned int pwmDim, bool displayClock, bool utc, bool duplex) :
|
||||
CDisplay(),
|
||||
m_rows(rows),
|
||||
m_cols(cols),
|
||||
|
|
|
@ -89,7 +89,7 @@ enum ADAFRUIT_COLOUR {
|
|||
class CHD44780 : public CDisplay
|
||||
{
|
||||
public:
|
||||
CHD44780(unsigned int rows, unsigned int cols, const std::string& callsign, unsigned int dmrid, const std::vector<unsigned int>& pins, const std::string& i2cAddress, bool pwm, unsigned int pwmPin, unsigned int pwmBright, unsigned int pwmDim, bool displayClock, bool utc, bool duplex);
|
||||
CHD44780(unsigned int rows, unsigned int cols, const std::string& callsign, unsigned int dmrid, const std::vector<unsigned int>& pins, unsigned int i2cAddress, bool pwm, unsigned int pwmPin, unsigned int pwmBright, unsigned int pwmDim, bool displayClock, bool utc, bool duplex);
|
||||
virtual ~CHD44780();
|
||||
|
||||
virtual bool open();
|
||||
|
@ -123,7 +123,7 @@ private:
|
|||
unsigned int m_d1;
|
||||
unsigned int m_d2;
|
||||
unsigned int m_d3;
|
||||
std::string m_i2cAddress;
|
||||
unsigned int m_i2cAddress;
|
||||
bool m_pwm;
|
||||
unsigned int m_pwmPin;
|
||||
unsigned int m_pwmBright;
|
||||
|
|
|
@ -875,7 +875,7 @@ void CMMDVMHost::createDisplay()
|
|||
unsigned int rows = m_conf.getHD44780Rows();
|
||||
unsigned int columns = m_conf.getHD44780Columns();
|
||||
std::vector<unsigned int> pins = m_conf.getHD44780Pins();
|
||||
std::string i2cAddress = m_conf.getHD44780i2cAddress();
|
||||
unsigned int i2cAddress = m_conf.getHD44780i2cAddress();
|
||||
bool pwm = m_conf.getHD44780PWM();
|
||||
unsigned int pwmPin = m_conf.getHD44780PWMPin();
|
||||
unsigned int pwmBright = m_conf.getHD44780PWMBright();
|
||||
|
|
Loading…
Reference in a new issue