We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d1350df commit 7b32ecaCopy full SHA for 7b32eca
src/MagneticSensorSPI.cpp
@@ -233,7 +233,7 @@ word MagneticSensorSPI::read(word angle_register){
233
234
register_value = register_value >> (1 + data_start_bit - bit_resolution); //this should shift data to the rightmost bits of the word
235
236
- const static word data_mask = ~(0 >> (16 - bit_resolution));
+ const static word data_mask = 0xFFFF >> (16 - bit_resolution);
237
238
return register_value & data_mask; // Return the data, stripping the non data (e.g parity) bits
239
}
0 commit comments