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
Line 71 : *value = ((Wire.receive() << 8) | Wire.receive());
While it works -now- it's bad design because evaluation order is not guaranteed in c++.
So it could evaluate left->right or right->left depending on compiler brand/version/settings used.
You should split it into 2 lines to force the order :
*value = ((TinyWireM.read() << 8);
*value = | TinyWireM.read());
I once faced that same problem while switching from gcc to intel compiler which evaluates right->left.
The text was updated successfully, but these errors were encountered:
In the source SDL_Arduino_INA3221.cpp
Line 71 : *value = ((Wire.receive() << 8) | Wire.receive());
While it works -now- it's bad design because evaluation order is not guaranteed in c++.
So it could evaluate left->right or right->left depending on compiler brand/version/settings used.
You should split it into 2 lines to force the order :
*value = ((TinyWireM.read() << 8);
*value = | TinyWireM.read());
I once faced that same problem while switching from gcc to intel compiler which evaluates right->left.
The text was updated successfully, but these errors were encountered: