AP_InertialSensor: added get_last_update_usec()
this will be used by the inter-EKF scheduling changes
This commit is contained in:
parent
e78f55ef9b
commit
e62fdad12c
@ -1257,6 +1257,8 @@ void AP_InertialSensor::update(void)
|
||||
}
|
||||
}
|
||||
|
||||
_last_update_usec = AP_HAL::micros();
|
||||
|
||||
_have_sample = false;
|
||||
}
|
||||
|
||||
|
@ -256,6 +256,10 @@ public:
|
||||
void acal_update();
|
||||
|
||||
bool accel_cal_requires_reboot() const { return _accel_cal_requires_reboot; }
|
||||
|
||||
// return time in microseconds of last update() call
|
||||
uint32_t get_last_update_usec(void) const { return _last_update_usec; }
|
||||
|
||||
private:
|
||||
|
||||
// load backend drivers
|
||||
@ -396,6 +400,9 @@ private:
|
||||
// time between samples in microseconds
|
||||
uint32_t _sample_period_usec;
|
||||
|
||||
// last time update() completed
|
||||
uint32_t _last_update_usec;
|
||||
|
||||
// health of gyros and accels
|
||||
bool _gyro_healthy[INS_MAX_INSTANCES];
|
||||
bool _accel_healthy[INS_MAX_INSTANCES];
|
||||
|
Loading…
Reference in New Issue
Block a user