| 272 | #endif // HAL_LOGGING_ENABLED |
| 273 | |
| 274 | void AP_InertialSensor::BatchSampler::sample(uint8_t _instance, AP_InertialSensor::IMU_SENSOR_TYPE _type, uint64_t sample_us, const Vector3f &_sample) |
| 275 | { |
| 276 | #if HAL_LOGGING_ENABLED |
| 277 | if (!should_log(_instance, _type)) { |
| 278 | return; |
| 279 | } |
| 280 | if (data_write_offset == 0) { |
| 281 | measurement_started_us = sample_us; |
| 282 | } |
| 283 | |
| 284 | data_x[data_write_offset] = multiplier*_sample.x; |
| 285 | data_y[data_write_offset] = multiplier*_sample.y; |
| 286 | data_z[data_write_offset] = multiplier*_sample.z; |
| 287 | |
| 288 | data_write_offset++; // may unblock the reading process |
| 289 | #endif |
| 290 | } |
| 291 | #endif //#if AP_INERTIALSENSOR_BATCHSAMPLER_ENABLED |
no outgoing calls
no test coverage detected