Hi Rob,
I just got around to testing the wrapper. Unfortunately it doesn't work and I'm afraid, there is a fundamental problem. The requestFrom functions of TwoWire are not virtual so calls to these functions (e.g. in SHT31, which I used to test) are bound early by gcc. When SHT31.cpp is compiled the only implementation of requestFrom known to gcc is the one in TwoWire and as it is not declared virtual, the compiler inserts a call directly to this implementation.
Hi Rob,
I just got around to testing the wrapper. Unfortunately it doesn't work and I'm afraid, there is a fundamental problem. The
requestFromfunctions of TwoWire are not virtual so calls to these functions (e.g. in SHT31, which I used to test) are bound early by gcc. When SHT31.cpp is compiled the only implementation ofrequestFromknown to gcc is the one in TwoWire and as it is not declared virtual, the compiler inserts a call directly to this implementation.