mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-26 01:51:41 +00:00
Fixes analog gyro casting to float then returning double (#177)
This commit is contained in:
committed by
Peter Johnson
parent
f9ebd3bde6
commit
7ddc153623
@@ -205,7 +205,7 @@ double HAL_GetAnalogGyroAngle(HAL_GyroHandle handle, int32_t* status) {
|
||||
static_cast<double>(1 << HAL_GetAnalogAverageBits(gyro->handle, status)) /
|
||||
(HAL_GetAnalogSampleRate(status) * gyro->voltsPerDegreePerSecond);
|
||||
|
||||
return static_cast<float>(scaledValue);
|
||||
return scaledValue;
|
||||
}
|
||||
|
||||
double HAL_GetAnalogGyroRate(HAL_GyroHandle handle, int32_t* status) {
|
||||
|
||||
Reference in New Issue
Block a user