Skip to content

Commit

Permalink
AP_InertialSensor: use AP_Math rand_float()
Browse files Browse the repository at this point in the history
  • Loading branch information
tridge committed May 3, 2017
1 parent 2fcecaa commit 62b8269
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 7 deletions.
6 changes: 0 additions & 6 deletions libraries/AP_InertialSensor/AP_InertialSensor_SITL.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -148,12 +148,6 @@ void AP_InertialSensor_SITL::timer_update(void)
}
}

// generate a random float between -1 and 1
float AP_InertialSensor_SITL::rand_float(void)
{
return ((((unsigned)random()) % 2000000) - 1.0e6) / 1.0e6;
}

float AP_InertialSensor_SITL::gyro_drift(void)
{
if (sitl->drift_speed == 0.0f ||
Expand Down
1 change: 0 additions & 1 deletion libraries/AP_InertialSensor/AP_InertialSensor_SITL.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ class AP_InertialSensor_SITL : public AP_InertialSensor_Backend
private:
bool init_sensor(void);
void timer_update();
float rand_float(void);
float gyro_drift(void);
void generate_accel(uint8_t instance);
void generate_gyro(uint8_t instance);
Expand Down

0 comments on commit 62b8269

Please sign in to comment.