Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/sensors/MagneticSensorSPI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ word MagneticSensorSPI::read(word angle_register){

register_value = register_value >> (1 + data_start_bit - bit_resolution); //this should shift data to the rightmost bits of the word

const static word data_mask = 0xFFFF >> (16 - bit_resolution);
const word data_mask = 0xFFFF >> (16 - bit_resolution);

return register_value & data_mask; // Return the data, stripping the non data (e.g parity) bits
}
Expand Down