Pfannex / DS18B20_DS2482

DS2482 - I2C to 1-Wire bridge used with ESP8266 WIFI on ARDUINO
19 stars 7 forks source link

Compile fails with invalid conversions #3

Open whatnick opened 7 years ago

whatnick commented 7 years ago

Compile fails for ESP8266 on Arduino 1.6.9 , ESP8266 boards 2.3.0.

Arduino: 1.6.9 (Windows 10), TD: 1.29, Board: "NodeMCU 1.0 (ESP-12E Module), 80 MHz, 115200, 4M (3M SPIFFS)"

C:\Users\tisham\Documents\Arduino\libraries\DS18B20_DS2482\DS18B20_DS2482.cpp: In member function 'bool DS18B20_DS2482::validAddress(const uint8_t*)':

C:\Users\tisham\Documents\Arduino\libraries\DS18B20_DS2482\DS18B20_DS2482.cpp:87:41: error: invalid conversion from 'const uint8_t {aka const unsigned char}' to 'uint8_t {aka unsigned char}' [-fpermissive]

 return (_wire->crc8(deviceAddress, 7) == deviceAddress[7]);

                                     ^

In file included from C:\Users\tisham\Documents\Arduino\libraries\DS18B20_DS2482\DS18B20_DS2482.h:22:0,

             from C:\Users\tisham\Documents\Arduino\libraries\DS18B20_DS2482\DS18B20_DS2482.cpp:9:

C:\Users\tisham\Documents\Arduino\libraries\DS18B20_DS2482/DS2482.h:91:20: error: initializing argument 1 of 'static uint8_t DS2482::crc8(uint8_t*, uint8_t)' [-fpermissive]

 static uint8_t crc8( uint8_t *addr, uint8_t len);

                ^

C:\Users\tisham\Documents\Arduino\libraries\DS18B20_DS2482\DS18B20_DS2482.cpp: In member function 'bool DS18B20_DS2482::readScratchPad(const uint8_t, uint8_t)':

C:\Users\tisham\Documents\Arduino\libraries\DS18B20_DS2482\DS18B20_DS2482.cpp:129:36: error: invalid conversion from 'const uint8_t {aka const unsigned char}' to 'uint8_t {aka unsigned char}' [-fpermissive]

 _wire->wireSelect(deviceAddress);

                                ^

In file included from C:\Users\tisham\Documents\Arduino\libraries\DS18B20_DS2482\DS18B20_DS2482.h:22:0,

             from C:\Users\tisham\Documents\Arduino\libraries\DS18B20_DS2482\DS18B20_DS2482.cpp:9:

C:\Users\tisham\Documents\Arduino\libraries\DS18B20_DS2482/DS2482.h:70:10: error: initializing argument 1 of 'void DS2482::wireSelect(uint8_t*)' [-fpermissive]

 void wireSelect( uint8_t rom[8]);

      ^

C:\Users\tisham\Documents\Arduino\libraries\DS18B20_DS2482\DS18B20_DS2482.cpp: In member function 'void DS18B20_DS2482::writeScratchPad(const uint8_t, const uint8_t)':

C:\Users\tisham\Documents\Arduino\libraries\DS18B20_DS2482\DS18B20_DS2482.cpp:157:36: error: invalid conversion from 'const uint8_t {aka const unsigned char}' to 'uint8_t {aka unsigned char}' [-fpermissive]

 _wire->wireSelect(deviceAddress);

                                ^

In file included from C:\Users\tisham\Documents\Arduino\libraries\DS18B20_DS2482\DS18B20_DS2482.h:22:0,

             from C:\Users\tisham\Documents\Arduino\libraries\DS18B20_DS2482\DS18B20_DS2482.cpp:9:

C:\Users\tisham\Documents\Arduino\libraries\DS18B20_DS2482/DS2482.h:70:10: error: initializing argument 1 of 'void DS2482::wireSelect(uint8_t*)' [-fpermissive]

 void wireSelect( uint8_t rom[8]);

      ^

C:\Users\tisham\Documents\Arduino\libraries\DS18B20_DS2482\DS18B20_DS2482.cpp:168:36: error: invalid conversion from 'const uint8_t {aka const unsigned char}' to 'uint8_t {aka unsigned char}' [-fpermissive]

 _wire->wireSelect(deviceAddress);

                                ^

In file included from C:\Users\tisham\Documents\Arduino\libraries\DS18B20_DS2482\DS18B20_DS2482.h:22:0,

             from C:\Users\tisham\Documents\Arduino\libraries\DS18B20_DS2482\DS18B20_DS2482.cpp:9:

C:\Users\tisham\Documents\Arduino\libraries\DS18B20_DS2482/DS2482.h:70:10: error: initializing argument 1 of 'void DS2482::wireSelect(uint8_t*)' [-fpermissive]

 void wireSelect( uint8_t rom[8]);

      ^

C:\Users\tisham\Documents\Arduino\libraries\DS18B20_DS2482\DS18B20_DS2482.cpp: In member function 'bool DS18B20_DS2482::readPowerSupply(const uint8_t*)':

C:\Users\tisham\Documents\Arduino\libraries\DS18B20_DS2482\DS18B20_DS2482.cpp:182:36: error: invalid conversion from 'const uint8_t {aka const unsigned char}' to 'uint8_t {aka unsigned char}' [-fpermissive]

 _wire->wireSelect(deviceAddress);

                                ^

In file included from C:\Users\tisham\Documents\Arduino\libraries\DS18B20_DS2482\DS18B20_DS2482.h:22:0,

             from C:\Users\tisham\Documents\Arduino\libraries\DS18B20_DS2482\DS18B20_DS2482.cpp:9:

C:\Users\tisham\Documents\Arduino\libraries\DS18B20_DS2482/DS2482.h:70:10: error: initializing argument 1 of 'void DS2482::wireSelect(uint8_t*)' [-fpermissive]

 void wireSelect( uint8_t rom[8]);

      ^

C:\Users\tisham\Documents\Arduino\libraries\DS18B20_DS2482\DS18B20_DS2482.cpp: In member function 'bool DS18B20_DS2482::requestTemperaturesByAddress(const uint8_t*)':

C:\Users\tisham\Documents\Arduino\libraries\DS18B20_DS2482\DS18B20_DS2482.cpp:354:36: error: invalid conversion from 'const uint8_t {aka const unsigned char}' to 'uint8_t {aka unsigned char}' [-fpermissive]

 _wire->wireSelect(deviceAddress);

                                ^

In file included from C:\Users\tisham\Documents\Arduino\libraries\DS18B20_DS2482\DS18B20_DS2482.h:22:0,

             from C:\Users\tisham\Documents\Arduino\libraries\DS18B20_DS2482\DS18B20_DS2482.cpp:9:

C:\Users\tisham\Documents\Arduino\libraries\DS18B20_DS2482/DS2482.h:70:10: error: initializing argument 1 of 'void DS2482::wireSelect(uint8_t*)' [-fpermissive]

 void wireSelect( uint8_t rom[8]);

      ^

exit status 1 Error compiling for board NodeMCU 1.0 (ESP-12E Module).

habeIchVergessen commented 7 years ago

bugfix needs to be merged (refer #4)

AlexPoeltl commented 3 years ago

Although this thread is very old. I've the same problems with Arduino 1.8.15. You bugfixes seems to remove and add only comments and endifs? Is that right?