Fixes analog gyro casting to float then returning double (#177)

This commit is contained in:
Thad House
2016-07-15 18:13:51 -07:00
committed by Peter Johnson
parent f9ebd3bde6
commit 7ddc153623

View File

@@ -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) {