andhieSetyabudi / BQ25896

Arduino Library for access BQ25896 through I2C ( Wire )
MIT License
7 stars 3 forks source link

Can't compile - error in TwoWire function #5

Open plafond75 opened 2 years ago

plafond75 commented 2 years ago

Hi there,

I'm trying to use your library but I can't compile it... Here is the output :


include/BQ25896.h:255:42: error: no matching function for call to 'TwoWire::TwoWire()'
             BQ25896(TwoWire& w) : wire(&w){};
packages/framework-arduinoespressif32/libraries/Wire/src/Wire.h:73:5: note: candidate: 'TwoWire::TwoWire(uint8_t)'
     TwoWire(uint8_t bus_num);
     ^~~~~~~
packages/framework-arduinoespressif32/libraries/Wire/src/Wire.h:73:5: note:   candidate expects 1 argument, 0 provided
packages/framework-arduinoespressif32/libraries/Wire/src/Wire.h:43:7: note: candidate: 'constexpr TwoWire::TwoWire(const TwoWire&)'
class TwoWire: public Stream
       ^~~~~~~
packages/framework-arduinoespressif32/libraries/Wire/src/Wire.h:43:7: note:   candidate expects 1 argument, 0 provided

Any idea of what I could do to patch this ?

Thanks in advance !

FloHomi commented 11 months ago

Same Problem Here. I tried to fix it, but no luck/skill...

jtrexr2 commented 3 months ago

You can open the library directly and remove the TwoWire derivation on the BQ class name, as shown here