Merge pull request #2454 from tumbili/gyrosim_cleanup

remove usleep in gyrosim
This commit is contained in:
Lorenz Meier 2015-06-24 09:27:54 +02:00
commit 55f47a68b5
1 changed files with 3 additions and 9 deletions

View File

@ -1070,23 +1070,17 @@ GYROSIM::measure()
/*
* Report buffers.
*/
accel_report arb;
accel_report arb;
gyro_report grb;
/*
* Adjust and scale results to m/s^2.
*/
// for now use local time but this should be the timestamp of the simulator
grb.timestamp = hrt_absolute_time();
arb.timestamp = grb.timestamp;
// this sleep is needed because the timing of the drivers is not yet working
usleep(1000);
// report the error count as the sum of the number of bad
// transfers and bad register reads. This allows the higher
// level code to decide if it should use this sensor based on
// whether it has had failures
grb.error_count = arb.error_count = 0;
grb.error_count = arb.error_count = 0; // FIXME
/*
* 1) Scale raw value to SI units using scaling from datasheet.