You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
_i2c_addr is just a variable with a typedef for an integer, but () is initializing it like a class. I don't know what the compiler would do with () on a variable, it's not an array index This caused runtime memory errors for me so it may be trying to access it as a class with an undefined pointer?
Should be:
INA3221(ina3221_addr_t addr) {i2c_addr=addr};
The text was updated successfully, but these errors were encountered:
Constructor:
INA3221(ina3221_addr_t addr) : _i2c_addr(addr){};
_i2c_addr is just a variable with a typedef for an integer, but () is initializing it like a class. I don't know what the compiler would do with () on a variable, it's not an array index This caused runtime memory errors for me so it may be trying to access it as a class with an undefined pointer?
Should be:
INA3221(ina3221_addr_t addr) {i2c_addr=addr};
The text was updated successfully, but these errors were encountered: