AP_InertialSensor: minor tidy up for HIL driver

This commit is contained in:
Andrew Tridgell 2014-10-16 10:31:55 +11:00
parent 85686c22ec
commit ff6d87f145
1 changed files with 5 additions and 0 deletions

View File

@ -43,6 +43,8 @@ bool AP_InertialSensor_HIL::_init_sensor(AP_InertialSensor::Sample_rate sample_r
case AP_InertialSensor::RATE_400HZ:
_sample_period_usec = 2500;
break;
default:
return false;
}
// grab the used instances
@ -54,10 +56,13 @@ bool AP_InertialSensor_HIL::_init_sensor(AP_InertialSensor::Sample_rate sample_r
bool AP_InertialSensor_HIL::update(void)
{
// the data is stored directly in the frontend, so update()
// doesn't need to do anything
return true;
}
bool AP_InertialSensor_HIL::_sample_available()
{
// just use the timing based wait_for_sample() in the frontend
return true;
}