AP_InertialSensor: Change from division to multiplication

This commit is contained in:
murata 2022-03-12 02:33:46 +09:00 committed by Andrew Tridgell
parent c90e42d10a
commit efe8427279
2 changed files with 2 additions and 2 deletions

View File

@ -417,7 +417,7 @@ void AP_InertialSensor_Invensense::start()
bool AP_InertialSensor_Invensense::get_output_banner(char* banner, uint8_t banner_len) {
if (_fast_sampling) {
snprintf(banner, banner_len, "IMU%u: fast sampling enabled %.1fkHz/%.1fkHz",
_gyro_instance, _gyro_backend_rate_hz * _gyro_fifo_downsample_rate / 1000.0, _gyro_backend_rate_hz / 1000.0);
_gyro_instance, _gyro_backend_rate_hz * _gyro_fifo_downsample_rate * 0.001, _gyro_backend_rate_hz * 0.001);
return true;
}
return false;

View File

@ -244,7 +244,7 @@ void AP_InertialSensor_Invensensev2::start()
bool AP_InertialSensor_Invensensev2::get_output_banner(char* banner, uint8_t banner_len) {
if (_fast_sampling) {
snprintf(banner, banner_len, "IMU%u: fast sampling enabled %.1fkHz/%.1fkHz",
_gyro_instance, _gyro_backend_rate_hz * _gyro_fifo_downsample_rate / 1000.0, _gyro_backend_rate_hz / 1000.0);
_gyro_instance, _gyro_backend_rate_hz * _gyro_fifo_downsample_rate * 0.001, _gyro_backend_rate_hz * 0.001);
return true;
}
return false;