mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-07-01 02:41:48 +00:00
Improve ADXRS450 error detection.
Ensure the POR, PWR, and CST error bits are not set when reading the sample. Reported by: Jared Russell, Austin Schuh Change-Id: Ib38178d6b51880480aee86e13c16f9ba89a80693
This commit is contained in:
committed by
Gerrit Code Review
parent
e852547344
commit
5904314a75
@@ -69,7 +69,7 @@ ADXRS450_Gyro::ADXRS450_Gyro(SPI::Port port) : m_spi(port) {
|
||||
return;
|
||||
}
|
||||
|
||||
m_spi.InitAccumulator(kSamplePeriod, 0x20000000u, 4, 0x0c000000u, 0x04000000u,
|
||||
m_spi.InitAccumulator(kSamplePeriod, 0x20000000u, 4, 0x0c00000eu, 0x04000000u,
|
||||
10u, 16u, true, true);
|
||||
|
||||
Calibrate();
|
||||
|
||||
Reference in New Issue
Block a user