Skip to content

Commit

Permalink
AP_InertialSensor: Added explicit casts to get rid of Qurt compiler w…
Browse files Browse the repository at this point in the history
…arning about implicit casts
  • Loading branch information
katzfey committed Nov 15, 2024
1 parent a69b777 commit cc4f622
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions libraries/AP_InertialSensor/AP_InertialSensor_ADIS1647x.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -171,22 +171,22 @@ bool AP_InertialSensor_ADIS1647x::check_product_id(uint16_t &prod_id)
opmode = OpMode::Delta32;
expected_sample_rate_hz = 1200;
accel_scale = 392.0 / 2097152000.0;
dvel_scale = 400.0 / 0x7FFFFFFF;
dvel_scale = 400.0 / (float)0x7FFFFFFF;
_clip_limit = (40.0f - 0.5f) * GRAVITY_MSS;
// RANG_MDL register used for gyro range
uint16_t rang_mdl = read_reg16(REG_RANG_MDL);
switch ((rang_mdl >> 2) & 3) {
case 0:
gyro_scale = radians(125) / 0x4E200000;
dangle_scale = radians(360.0 / 0x7FFFFFFF);
dangle_scale = radians(360.0 / (float)0x7FFFFFFF);
break;
case 1:
gyro_scale = radians(500) / 0x4E200000;
dangle_scale = radians(720.0 / 0x7FFFFFFF);
dangle_scale = radians(720.0 / (float)0x7FFFFFFF);
break;
case 3:
gyro_scale = radians(2000) / 0x4E200000;
dangle_scale = radians(2160.0 / 0x7FFFFFFF);
dangle_scale = radians(2160.0 / (float)0x7FFFFFFF);
break;
default:
return false;
Expand Down

0 comments on commit cc4f622

Please sign in to comment.