Skip to content

Commit

Permalink
Fix ADIS16470 Gyro in Java
Browse files Browse the repository at this point in the history
  • Loading branch information
ThadHouse committed Nov 25, 2024
1 parent b7eb9fb commit 37b84d6
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -609,7 +609,7 @@ private int readRegister(int reg) {
m_spi.write(buf, 2);
m_spi.read(false, buf, 2);

return (buf[0] << 8) & buf[1];
return (buf[0] << 8) | buf[1];
}

private void writeRegister(int reg, int val) {
Expand Down

0 comments on commit 37b84d6

Please sign in to comment.